views:

67

answers:

2

I'm trying to use boost unit testing alongside the Allegro graphics library, but both require main() alterations / overwrites. Has anyone had any experience using both?

Edit 1/29/2010: I've refrained from selecting an answer until I can verify one or another, and due to the... sparse nature of the answers.

A: 

I don't quite see the issue, you do the boost functions you want to run inside of main, the allegro setup, then run your tests, do the allegro teardown, whatever of boost you want to tear down.

Unless you want to unit test the allegro setup functions there should not be a problem.

Can you clarify or post specific problems ?

Harald Scheirich
A: 

boost.test can be used with or without a main(). look into these macros will give you some idea how to use it properly:

//#define BOOST_TEST_MODULE my_test
//#define BOOST_TEST_MAIN
//#define BOOST_TEST_DYN_LINK
//#define BOOST_TEST_NO_MAIN
t.g.
Thanks! That's the place to look
Narfanator
Place BOOST_TEST_NO_MAIN above #include <boost/test....>
Narfanator