|
Boost Users : |
Subject: [Boost-users] [test] spread case over multiple translation units
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2010-04-16 17:13:27
Is it possible have multiple cpp's linked for a single master test
suite? Doing the naive below results int multiply defined symbols linker
errror. See below:
suite1.cpp
-------------------------------------
#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE Master
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_SUITE(Sweet1)
BOOST_AUTO_TEST_CASE(TestCase1)
{
BOOST_CHECK (true);
BOOST_REQUIRE(true);
BOOST_REQUIRE(true);
BOOST_CHECK (true);
}
BOOST_AUTO_TEST_CASE(TestCase2)
{
BOOST_CHECK (true);
BOOST_REQUIRE(true);
BOOST_REQUIRE(true);
BOOST_CHECK (true);
}
BOOST_AUTO_TEST_SUITE_END()
suite2.cpp
------------------------------------------
#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE Master
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_SUITE(Sweet2)
BOOST_AUTO_TEST_CASE(TestCaseA)
{
BOOST_CHECK (true);
BOOST_REQUIRE(true);
BOOST_REQUIRE(true);
BOOST_CHECK (true);
}
BOOST_AUTO_TEST_CASE(TestCaseB)
{
BOOST_CHECK (true);
BOOST_REQUIRE(true);
BOOST_REQUIRE(true);
BOOST_CHECK (true);
}
BOOST_AUTO_TEST_SUITE_END()
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