Boost logo

Boost Users :

Subject: [Boost-users] [Boost.Test]: How I can write custom external main ?
From: NtVisigoth (ntvisigoth_at_[hidden])
Date: 2014-10-29 08:32:21


Hi, Everybody!

I've 2 questions about Boost.Test usage.

My general cpp-source file appmain.cpp:

// more lines with "#include"-constructions

#define BOOST_TEST_MODULE TestMain
#include <boost/test/unit_test.hpp>

My suite-source file suite1.cpp:

#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_SUITE(FooFooSuite)

BOOST_AUTO_TEST_CASE(testBarBarBar)
{
// more lines
}
BOOST_AUTO_TEST_SUITE_END()

Questions #1:
How can write external main in my general cpp-file appmain.cpp?
I want usage exe-file like : test.exe d:\test-files\

Questions #2:

I see these lines in the boost.test documentation:

boost::unit_test::framework::master_test_suite().argc
boost::unit_test::framework::master_test_suite().argv

This args and argv global, are these ?

Can I use this in different suites without save to global variable ?

P.S.:
I sorry for my English.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net