KiCad PCB EDA Suite
common/test_module.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <wx/image.h>
#include <wx/init.h>

Go to the source code of this file.

Functions

bool init_unit_test ()
 Main file for the libcommon tests to be compiled. More...
 
int main (int argc, char *argv[])
 

Function Documentation

◆ init_unit_test()

bool init_unit_test ( )

Main file for the libcommon tests to be compiled.

Definition at line 33 of file common/test_module.cpp.

34 {
35  boost::unit_test::framework::master_test_suite().p_name.value = "Common library module tests";
36  bool ok = wxInitialize();
37 
38  if( ok )
39  {
40  // need these for library image functions
41  wxInitAllImageHandlers();
42  }
43 
44  return ok;
45 }

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 48 of file common/test_module.cpp.

49 {
50  int ret = boost::unit_test::unit_test_main( &init_unit_test, argc, argv );
51 
52  // This causes some glib warnings on GTK3 (http://trac.wxwidgets.org/ticket/18274)
53  // but without it, Valgrind notices a lot of leaks from WX
54  wxUninitialize();
55 
56  return ret;
57 }
bool init_unit_test()
Main file for the libcommon tests to be compiled.

References init_unit_test().