Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2007-06-05 00:07:06


Author: dgregor
Date: 2007-06-05 00:07:05 EDT (Tue, 05 Jun 2007)
New Revision: 4445
URL: http://svn.boost.org/trac/boost/changeset/4445

Log:
Partial CMake testing for the Statechart library

Added:
   sandbox-branches/boost-cmake/boost_1_34_0/libs/statechart/CMakeLists.txt
   sandbox-branches/boost-cmake/boost_1_34_0/libs/statechart/test/CMakeLists.txt
Text files modified:
   sandbox-branches/boost-cmake/boost_1_34_0/TODO | 3 ++-
   1 files changed, 2 insertions(+), 1 deletions(-)

Modified: sandbox-branches/boost-cmake/boost_1_34_0/TODO
==============================================================================
--- sandbox-branches/boost-cmake/boost_1_34_0/TODO (original)
+++ sandbox-branches/boost-cmake/boost_1_34_0/TODO 2007-06-05 00:07:05 EDT (Tue, 05 Jun 2007)
@@ -24,6 +24,7 @@
 
 - Testing for the Spirit library
 
-- Testing for the Statechart library
+- Statechart library: deal with building libraries for testing, and
+ with link-only tests.
 
 - Xpressive: port multipledefs and msvc-stlport tests

Added: sandbox-branches/boost-cmake/boost_1_34_0/libs/statechart/CMakeLists.txt
==============================================================================
--- (empty file)
+++ sandbox-branches/boost-cmake/boost_1_34_0/libs/statechart/CMakeLists.txt 2007-06-05 00:07:05 EDT (Tue, 05 Jun 2007)
@@ -0,0 +1,4 @@
+boost_library_project(
+ Statechart
+ TESTDIRS test
+ )
\ No newline at end of file

Added: sandbox-branches/boost-cmake/boost_1_34_0/libs/statechart/test/CMakeLists.txt
==============================================================================
--- (empty file)
+++ sandbox-branches/boost-cmake/boost_1_34_0/libs/statechart/test/CMakeLists.txt 2007-06-05 00:07:05 EDT (Tue, 05 Jun 2007)
@@ -0,0 +1,89 @@
+macro(statechart_compile_fail TESTNAME)
+ boost_test_compile_fail("${TESTNAME}Normal"
+ SOURCES ${TESTNAME}.cpp
+ )
+ boost_test_compile_fail("${TESTNAME}Native"
+ SOURCES ${TESTNAME}.cpp
+ COMPILE_FLAGS "-DBOOST_STATECHART_USE_NATIVE_RTTI"
+ )
+ boost_test_compile_fail("${TESTNAME}Relaxed"
+ SOURCES ${TESTNAME}.cpp
+ COMPILE_FLAGS "-DBOOST_STATECHART_RELAX_TRANSITION_CONTEXT"
+ )
+ boost_test_compile_fail("${TESTNAME}Both"
+ SOURCES ${TESTNAME}.cpp
+ COMPILE_FLAGS "-DBOOST_STATECHART_USE_NATIVE_RTTI -DBOOST_STATECHART_RELAX_TRANSITION_CONTEXT"
+ )
+endmacro(statechart_compile_fail)
+
+macro(statechart_run TESTNAME)
+ boost_test_run("${TESTNAME}Normal"
+ SOURCES ${TESTNAME}.cpp
+ DEPENDS boost_test_exec_monitor-static
+ )
+ boost_test_run("${TESTNAME}Native"
+ SOURCES ${TESTNAME}.cpp
+ COMPILE_FLAGS "-DBOOST_STATECHART_USE_NATIVE_RTTI"
+ DEPENDS boost_test_exec_monitor-static
+ )
+ boost_test_run("${TESTNAME}Relaxed"
+ SOURCES ${TESTNAME}.cpp
+ COMPILE_FLAGS "-DBOOST_STATECHART_RELAX_TRANSITION_CONTEXT"
+ DEPENDS boost_test_exec_monitor-static
+ )
+ boost_test_run("${TESTNAME}Both"
+ SOURCES ${TESTNAME}.cpp
+ COMPILE_FLAGS "-DBOOST_STATECHART_USE_NATIVE_RTTI -DBOOST_STATECHART_RELAX_TRANSITION_CONTEXT"
+ DEPENDS boost_test_exec_monitor-static
+ )
+endmacro(statechart_run)
+
+statechart_compile_fail(InvalidChartTest1)
+statechart_compile_fail(InvalidChartTest2)
+statechart_compile_fail(InvalidChartTest3)
+statechart_run(TransitionTest)
+statechart_compile_fail(InvalidTransitionTest1)
+statechart_compile_fail(InvalidTransitionTest2)
+statechart_run(InStateReactionTest)
+statechart_run(TerminationTest)
+statechart_run(DeferralTest)
+statechart_run(CustomReactionTest)
+statechart_compile_fail(InvalidResultAssignTest)
+statechart_compile_fail(InvalidResultDefCtorTest)
+statechart_run(InvalidResultCopyTest)
+statechart_run(UnconsumedResultTest)
+statechart_run(HistoryTest)
+statechart_compile_fail(InconsistentHistoryTest1)
+statechart_compile_fail(InconsistentHistoryTest2)
+statechart_compile_fail(InconsistentHistoryTest3)
+statechart_compile_fail(InconsistentHistoryTest4)
+statechart_compile_fail(InconsistentHistoryTest5)
+statechart_compile_fail(InconsistentHistoryTest6)
+statechart_compile_fail(InconsistentHistoryTest7)
+statechart_compile_fail(InconsistentHistoryTest8)
+statechart_compile_fail(UnsuppDeepHistoryTest)
+statechart_run(StateCastTest)
+statechart_run(TypeInfoTest)
+statechart_run(StateIterationTest)
+statechart_run(FifoSchedulerTest)
+# TODO: We need to create some libraries (just for testing!?), then link
+# and run tests against them. Ick.
+#statechart-st-lib-run LibTestNormal
+# : TuTestMain : TuTest : <link>static $(normal))
+#statechart-st-lib-run LibTestNative
+# : TuTestMain : TuTest : <link>static $(native))
+#statechart-st-lib-run DllTestNormal
+# : TuTestMain : TuTest : <link>shared $(normal))
+#statechart-st-lib-run DllTestNative
+# : TuTestMain : TuTest : <link>shared $(native))
+
+# TODO: These tests need support for link-only tests.
+#statechart-st-compile-example BitMachine : BitMachine : BitMachine)
+#statechart-st-compile-example Camera
+# : Camera : Camera Configuring Main Shooting)
+#statechart-st-compile-example Handcrafted : Handcrafted : Handcrafted)
+#statechart-st-compile-example Keyboard : Keyboard : Keyboard :)
+#statechart-st-compile-example Performance : Performance : Performance)
+#statechart-st-compile-example PingPong : PingPong : PingPong)
+#statechart-st-compile-example StopWatch : StopWatch : StopWatch)
+#statechart-st-compile-example StopWatch2 : StopWatch : StopWatch2) ;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk