Testing the structure
This commit is contained in:
parent
2403f2b558
commit
75b0549f6f
|
@ -34,11 +34,11 @@ add_executable( qa_eagle_plugin
|
||||||
test_basic.cpp
|
test_basic.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies( qa_eagle_plugin eeschema )
|
add_dependencies( qa_eagle_plugin common eeschema_kiface )
|
||||||
|
|
||||||
target_link_libraries( qa_eagle_plugin
|
target_link_libraries( qa_eagle_plugin
|
||||||
eeschema
|
common
|
||||||
eeschema_kiface
|
eeschema_kiface
|
||||||
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
|
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
|
||||||
${wxWidgets_LIBRARIES}
|
${wxWidgets_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
|
@ -24,21 +24,26 @@
|
||||||
|
|
||||||
#include <boost/test/unit_test.hpp>
|
#include <boost/test/unit_test.hpp>
|
||||||
#include <boost/test/test_case_template.hpp>
|
#include <boost/test/test_case_template.hpp>
|
||||||
#include <sch_eagle_plugin.h>
|
#include <sch_io_mgr.h>
|
||||||
|
#include <kiway.h>
|
||||||
|
|
||||||
#include <data/fixtures_eagle_plugin.h>
|
#include <data/fixtures_eagle_plugin.h>
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * Declares the IteratorFixture as the boost test suite fixture.
|
* Checks that the SCH_IO manager finds the Eagle plugin
|
||||||
// */
|
*/
|
||||||
// BOOST_FIXTURE_TEST_SUITE( SegmentReference, CommonTestData )
|
BOOST_AUTO_TEST_CASE( FindPlugin )
|
||||||
|
{
|
||||||
|
BOOST_CHECK( SCH_IO_MGR::FindPlugin( SCH_IO_MGR::SCH_EAGLE ) != NULL );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks the XML tree load
|
*
|
||||||
*/
|
*/
|
||||||
BOOST_AUTO_TEST_CASE( Load )
|
BOOST_AUTO_TEST_CASE( Load )
|
||||||
{
|
{
|
||||||
SCH_EAGLE_PLUGIN plugin;
|
SCH_PLUGIN* pi = SCH_IO_MGR::FindPlugin( SCH_IO_MGR::SCH_EAGLE );
|
||||||
//
|
|
||||||
// plugin.Load( "data/eagle_schematics/empty.sch", NULL );
|
pi->Load("/home/alejandro/Proyectos/kicad/kicad-alejandro/eeschema/qa/data/eagle_schematics",
|
||||||
|
&Kiway());
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,8 +68,8 @@ SCH_SHEET* SCH_EAGLE_PLUGIN::Load( const wxString& aFileName, KIWAY* aKiway,
|
||||||
|
|
||||||
wxFileName fn = aFileName;
|
wxFileName fn = aFileName;
|
||||||
|
|
||||||
// if( !m_xmlTree.Load( fn.GetFullPath() ) )
|
if( !m_xmlTree.Load( fn.GetFullPath() ) )
|
||||||
// THROW_IO_ERROR( wxString::Format( _( "Unable to read file '%s'" ), fn.GetFullPath() ) );
|
THROW_IO_ERROR( wxString::Format( _( "Unable to read file '%s'" ), fn.GetFullPath() ) );
|
||||||
|
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue