From 1a3a82a110af04fc3b027dde49923d1181963fd2 Mon Sep 17 00:00:00 2001 From: "Mike D. Lowis" Date: Sun, 12 Feb 2012 12:49:55 -0500 Subject: [PATCH] Commit initial version (0.1a) --- Doxyfile | 1719 +++++++ LICENSE.md | 24 + README.md | 103 + build/DUMMY | 0 deps/DUMMY | 0 docs/DUMMY | 0 example.dl | 97 + rakefile.rb | 68 + res/DUMMY | 0 res/environment.scm | 225 + source/dllexer/dllexer.cpp | 316 ++ source/dllexer/dllexer.h | 83 + source/dlparser/dlparser.cpp | 376 ++ source/dlparser/dlparser.h | 92 + source/dlparser/macro/macro.c | 49 + source/dlparser/macro/macro.h | 26 + source/dlparser/macro/param.c | 57 + source/dlparser/macro/param.h | 31 + source/main.cpp | 87 + source/parse_utils/ast/ast.cpp | 113 + source/parse_utils/ast/ast.h | 34 + source/parse_utils/exception/exception.cpp | 25 + source/parse_utils/exception/exception.h | 21 + source/parse_utils/lexer/lexer.cpp | 80 + source/parse_utils/lexer/lexer.h | 30 + source/parse_utils/lexer/token/token.cpp | 30 + source/parse_utils/lexer/token/token.h | 24 + .../parse_utils/parser/btparser/btparser.cpp | 117 + source/parse_utils/parser/btparser/btparser.h | 39 + .../parser/llkparser/llkparser.cpp | 101 + .../parse_utils/parser/llkparser/llkparser.h | 31 + source/parse_utils/parser/parser.cpp | 55 + source/parse_utils/parser/parser.h | 40 + source/parse_utils/visitor/visitor.cpp | 35 + source/parse_utils/visitor/visitor.h | 29 + .../macroapplication/macroapplication.cpp | 57 + .../macroapplication/macroapplication.h | 27 + source/visitors/scheme/scheme.cpp | 190 + source/visitors/scheme/scheme.h | 28 + source/visitors/sexp/sexp.cpp | 41 + source/visitors/sexp/sexp.h | 23 + tests/source/main.h | 18 + tests/system/system_tests.dl | 118 + tools/cxxtest/COPYING | 504 +++ tools/cxxtest/README | 42 + tools/cxxtest/Versions | 152 + tools/cxxtest/admin/cxxtest.spec | 37 + tools/cxxtest/admin/jenkins_cxxtest | 41 + tools/cxxtest/admin/release | 32 + tools/cxxtest/admin/virtualenv.py | 2102 +++++++++ tools/cxxtest/bin/cxxtestgen | 18 + tools/cxxtest/build_tools/SCons/AUTHORS | 19 + tools/cxxtest/build_tools/SCons/cxxtest.py | 348 ++ .../build_tools/SCons/test/default_env/README | 2 + .../SCons/test/default_env/SConstruct | 10 + .../SCons/test/default_env/TestDef.py | 9 + .../SCons/test/empty_source_list/README | 2 + .../SCons/test/empty_source_list/SConstruct | 4 + .../SCons/test/empty_source_list/TestDef.py | 2 + .../test/empty_source_list/requirement.hpp | 12 + .../SCons/test/empty_source_list/test_bar.t.h | 23 + .../SCons/test/empty_source_list/test_foo.t.h | 23 + .../build_tools/SCons/test/eprouvette.py | 204 + .../build_tools/SCons/test/expanding_#/README | 3 + .../SCons/test/expanding_#/SConstruct | 10 + .../SCons/test/expanding_#/TestDef.py | 2 + .../build_tools/SCons/test/globbing/README | 2 + .../SCons/test/globbing/SConstruct | 3 + .../SCons/test/globbing/TestDef.py | 2 + .../SCons/test/globbing/src/requirement.cpp | 14 + .../SCons/test/globbing/src/requirement.h | 14 + .../SCons/test/globbing/src/test_bar.t.h | 23 + .../SCons/test/globbing/src/test_foo.t.h | 23 + .../SCons/test/globbing_edmundo/README | 2 + .../SCons/test/globbing_edmundo/SConstruct | 35 + .../SCons/test/globbing_edmundo/TestDef.py | 1 + .../SCons/test/globbing_edmundo/hello.cc | 22 + .../SCons/test/globbing_edmundo/hello.hh | 15 + .../SCons/test/globbing_edmundo/hellotest.t.h | 23 + .../SCons/test/globbing_edmundo/main.cpp | 18 + .../SCons/test/include_CCFLAGS/README | 3 + .../SCons/test/include_CCFLAGS/SConstruct | 12 + .../SCons/test/include_CCFLAGS/TestDef.py | 1 + .../include_CCFLAGS/src/not-with-pedantic.h | 20 + .../include_CCFLAGS/src/only_with_ansi.t.h | 22 + .../SCons/test/include_CXXFLAGS/README | 5 + .../SCons/test/include_CXXFLAGS/SConstruct | 16 + .../SCons/test/include_CXXFLAGS/TestDef.py | 2 + .../include_CXXFLAGS/src/not-with-pedantic.h | 19 + .../SCons/test/multifile_tests/SConstruct | 8 + .../SCons/test/multifile_tests/TestDef.py | 2 + .../test/multifile_tests/src/requirement.cpp | 14 + .../test/multifile_tests/src/requirement.h | 14 + .../test/multifile_tests/src/test_bar.t.h | 23 + .../test/multifile_tests/src/test_foo.t.h | 23 + .../SCons/test/need_cpppath/SConstruct | 9 + .../SCons/test/need_cpppath/TestDef.py | 0 .../SCons/test/need_cpppath/src/cpppath.t.h | 25 + .../need_cpppath/src/cpppathdir/include.h | 16 + .../test/nonstandard_cxxtest_dir/SConstruct | 10 + .../test/nonstandard_cxxtest_dir/TestDef.py | 2 + .../SCons/test/printer_propagation/SConstruct | 8 + .../SCons/test/printer_propagation/TestDef.py | 0 .../printer_propagation/cxxtest/CrazyRunner.h | 16 + .../test/printer_propagation/src/failtest.t.h | 23 + .../SCons/test/recursive_sources/README | 2 + .../SCons/test/recursive_sources/SConstruct | 3 + .../SCons/test/recursive_sources/TestDef.py | 1 + .../recursive_sources/src/requirement.cpp | 14 + .../test/recursive_sources/src/requirement.h | 14 + .../test/recursive_sources/src/test_bar.t.h | 23 + .../test/recursive_sources/src/test_foo.t.h | 23 + .../SCons/test/string_cpppath/SConstruct | 9 + .../SCons/test/string_cpppath/TestDef.py | 0 .../SCons/test/string_cpppath/src/cpppath.t.h | 25 + .../string_cpppath/src/cpppathdir/include.h | 16 + .../SCons/test/target_syntax/SConstruct | 9 + .../SCons/test/target_syntax/TestDef.py | 0 .../SCons/test/target_syntax/src/cpppath.t.h | 25 + .../target_syntax/src/cpppathdir/include.h | 16 + tools/cxxtest/cxxtest/Descriptions.cpp | 69 + tools/cxxtest/cxxtest/Descriptions.h | 91 + tools/cxxtest/cxxtest/DummyDescriptions.cpp | 60 + tools/cxxtest/cxxtest/DummyDescriptions.h | 87 + tools/cxxtest/cxxtest/ErrorFormatter.h | 304 ++ tools/cxxtest/cxxtest/ErrorPrinter.h | 66 + tools/cxxtest/cxxtest/Flags.h | 154 + tools/cxxtest/cxxtest/GlobalFixture.cpp | 34 + tools/cxxtest/cxxtest/GlobalFixture.h | 41 + tools/cxxtest/cxxtest/Gui.h | 192 + tools/cxxtest/cxxtest/LinkedList.cpp | 183 + tools/cxxtest/cxxtest/LinkedList.h | 73 + tools/cxxtest/cxxtest/Mock.h | 375 ++ tools/cxxtest/cxxtest/ParenPrinter.h | 32 + tools/cxxtest/cxxtest/QtGui.h | 282 ++ tools/cxxtest/cxxtest/RealDescriptions.cpp | 330 ++ tools/cxxtest/cxxtest/RealDescriptions.h | 237 + tools/cxxtest/cxxtest/Root.cpp | 29 + tools/cxxtest/cxxtest/SelfTest.h | 18 + tools/cxxtest/cxxtest/StdHeaders.h | 36 + tools/cxxtest/cxxtest/StdTestSuite.h | 61 + tools/cxxtest/cxxtest/StdValueTraits.h | 246 + tools/cxxtest/cxxtest/StdioFilePrinter.h | 52 + tools/cxxtest/cxxtest/StdioPrinter.h | 33 + tools/cxxtest/cxxtest/TeeListener.h | 199 + tools/cxxtest/cxxtest/TestListener.h | 85 + tools/cxxtest/cxxtest/TestMain.h | 114 + tools/cxxtest/cxxtest/TestRunner.h | 136 + tools/cxxtest/cxxtest/TestSuite.cpp | 264 ++ tools/cxxtest/cxxtest/TestSuite.h | 601 +++ tools/cxxtest/cxxtest/TestTracker.cpp | 267 ++ tools/cxxtest/cxxtest/TestTracker.h | 129 + tools/cxxtest/cxxtest/ValueTraits.cpp | 164 + tools/cxxtest/cxxtest/ValueTraits.h | 401 ++ tools/cxxtest/cxxtest/Win32Gui.h | 542 +++ tools/cxxtest/cxxtest/X11Gui.h | 338 ++ tools/cxxtest/cxxtest/XUnitPrinter.h | 48 + tools/cxxtest/cxxtest/XmlFormatter.h | 575 +++ tools/cxxtest/cxxtest/XmlPrinter.h | 75 + tools/cxxtest/cxxtest/YesNoRunner.h | 40 + tools/cxxtest/doc/Makefile | 22 + tools/cxxtest/doc/README.txt | 34 + tools/cxxtest/doc/catalog.xml | 8 + tools/cxxtest/doc/epub/README | 88 + tools/cxxtest/doc/epub/bin/dbtoepub | 76 + tools/cxxtest/doc/epub/bin/lib/docbook.rb | 227 + tools/cxxtest/doc/epub/bin/xslt/obfuscate.xsl | 12 + tools/cxxtest/doc/epub/docbook.xsl | 1690 +++++++ tools/cxxtest/doc/examples/Assertions.h | 148 + tools/cxxtest/doc/examples/BadTestSuite1.h | 19 + tools/cxxtest/doc/examples/GetGlobals.sh | 4 + tools/cxxtest/doc/examples/MockTestSuite.h | 26 + tools/cxxtest/doc/examples/MyClass.h | 38 + tools/cxxtest/doc/examples/MyTestSuite1.h | 12 + tools/cxxtest/doc/examples/MyTestSuite10.h | 20 + tools/cxxtest/doc/examples/MyTestSuite11.h | 20 + tools/cxxtest/doc/examples/MyTestSuite2.h | 19 + tools/cxxtest/doc/examples/MyTestSuite3.h | 32 + tools/cxxtest/doc/examples/MyTestSuite4.h | 14 + tools/cxxtest/doc/examples/MyTestSuite5.h | 35 + tools/cxxtest/doc/examples/MyTestSuite6.h | 24 + tools/cxxtest/doc/examples/MyTestSuite7.h | 35 + tools/cxxtest/doc/examples/MyTestSuite8.h | 71 + tools/cxxtest/doc/examples/MyTestSuite9.h | 33 + tools/cxxtest/doc/examples/TMyClass.h | 43 + tools/cxxtest/doc/examples/buildRunner.sh | 15 + tools/cxxtest/doc/examples/buildRunner.txt | 1 + tools/cxxtest/doc/examples/buildRunner10.sh | 15 + tools/cxxtest/doc/examples/buildRunner10.txt | 7 + tools/cxxtest/doc/examples/buildRunner11.sh | 16 + tools/cxxtest/doc/examples/buildRunner11.txt | 2 + tools/cxxtest/doc/examples/buildRunner12.sh | 16 + tools/cxxtest/doc/examples/buildRunner12.txt | 2 + tools/cxxtest/doc/examples/buildRunner13.sh | 40 + tools/cxxtest/doc/examples/buildRunner14.sh | 15 + tools/cxxtest/doc/examples/buildRunner14.txt | 1 + tools/cxxtest/doc/examples/buildRunner15.sh | 15 + tools/cxxtest/doc/examples/buildRunner15.txt | 6 + tools/cxxtest/doc/examples/buildRunner16.sh | 15 + tools/cxxtest/doc/examples/buildRunner16.txt | 1 + tools/cxxtest/doc/examples/buildRunner17.sh | 16 + tools/cxxtest/doc/examples/buildRunner17.txt | 9 + tools/cxxtest/doc/examples/buildRunner18.sh | 16 + tools/cxxtest/doc/examples/buildRunner18.txt | 5 + tools/cxxtest/doc/examples/buildRunner19.sh | 16 + tools/cxxtest/doc/examples/buildRunner19.txt | 10 + tools/cxxtest/doc/examples/buildRunner2.sh | 15 + tools/cxxtest/doc/examples/buildRunner2.txt | 5 + tools/cxxtest/doc/examples/buildRunner20.sh | 16 + tools/cxxtest/doc/examples/buildRunner20.txt | 5 + tools/cxxtest/doc/examples/buildRunner21.sh | 16 + tools/cxxtest/doc/examples/buildRunner21.txt | 5 + tools/cxxtest/doc/examples/buildRunner3.sh | 15 + tools/cxxtest/doc/examples/buildRunner3.txt | 5 + tools/cxxtest/doc/examples/buildRunner4.sh | 15 + tools/cxxtest/doc/examples/buildRunner4.txt | 5 + tools/cxxtest/doc/examples/buildRunner5.sh | 17 + tools/cxxtest/doc/examples/buildRunner5.txt | 1 + tools/cxxtest/doc/examples/buildRunner6.sh | 15 + tools/cxxtest/doc/examples/buildRunner6.txt | 7 + tools/cxxtest/doc/examples/buildRunner7.sh | 15 + tools/cxxtest/doc/examples/buildRunner7.txt | 5 + tools/cxxtest/doc/examples/buildRunner8.sh | 15 + tools/cxxtest/doc/examples/buildRunner9.sh | 21 + tools/cxxtest/doc/examples/cxxtestgen.out | 43 + tools/cxxtest/doc/examples/exeRunner.out | 5 + tools/cxxtest/doc/examples/exeRunner.sh | 5 + tools/cxxtest/doc/examples/exeRunner2.out | 5 + tools/cxxtest/doc/examples/exeRunner2.sh | 5 + tools/cxxtest/doc/examples/rand_example.cpp | 7 + tools/cxxtest/doc/examples/runner10.tpl | 14 + .../doc/examples/runner13.MyTestSuite2.txt | 5 + tools/cxxtest/doc/examples/runner13.help.txt | 6 + .../doc/examples/runner13.helpTests.txt | 6 + .../examples/runner13.testMultiplication.txt | 5 + .../runner13.testMultiplicationVerbose.txt | 7 + tools/cxxtest/doc/examples/test_examples.py | 27 + tools/cxxtest/doc/examples/time_mock.cpp | 3 + tools/cxxtest/doc/examples/time_mock.h | 8 + tools/cxxtest/doc/examples/time_real.cpp | 3 + tools/cxxtest/doc/guide.epub | Bin 0 -> 44332 bytes tools/cxxtest/doc/guide.html | 3981 +++++++++++++++++ tools/cxxtest/doc/guide.pdf | Bin 0 -> 240355 bytes tools/cxxtest/doc/guide.txt | 1559 +++++++ tools/cxxtest/doc/include_anchors.py | 81 + tools/cxxtest/python/README.txt | 8 + tools/cxxtest/python/convert.py | 19 + tools/cxxtest/python/cxxtest/__init__.py | 33 + tools/cxxtest/python/cxxtest/__init__.pyc | Bin 0 -> 1057 bytes tools/cxxtest/python/cxxtest/__release__.py | 13 + tools/cxxtest/python/cxxtest/__release__.pyc | Bin 0 -> 290 bytes tools/cxxtest/python/cxxtest/cxx_parser.py | 2189 +++++++++ tools/cxxtest/python/cxxtest/cxx_parser.pyc | Bin 0 -> 87686 bytes tools/cxxtest/python/cxxtest/cxxtest_fog.py | 96 + tools/cxxtest/python/cxxtest/cxxtest_fog.pyc | Bin 0 -> 2577 bytes tools/cxxtest/python/cxxtest/cxxtest_misc.py | 19 + tools/cxxtest/python/cxxtest/cxxtest_misc.pyc | Bin 0 -> 527 bytes .../cxxtest/python/cxxtest/cxxtest_parser.py | 242 + .../cxxtest/python/cxxtest/cxxtest_parser.pyc | Bin 0 -> 9997 bytes tools/cxxtest/python/cxxtest/cxxtestgen.py | 480 ++ tools/cxxtest/python/cxxtest/cxxtestgen.pyc | Bin 0 -> 19526 bytes .../python/python3/cxxtest/__init__.py | 33 + .../python/python3/cxxtest/__release__.py | 13 + .../python/python3/cxxtest/cxx_parser.py | 2189 +++++++++ .../python/python3/cxxtest/cxxtest_fog.py | 96 + .../python/python3/cxxtest/cxxtest_misc.py | 19 + .../python/python3/cxxtest/cxxtest_parser.py | 242 + .../python/python3/cxxtest/cxxtestgen.py | 480 ++ .../cxxtest/python/python3/scripts/cxxtestgen | 5 + tools/cxxtest/python/scripts/cxxtestgen | 5 + tools/cxxtest/python/setup.py | 53 + tools/cxxtest/sample/.cvsignore | 5 + tools/cxxtest/sample/Construct | 64 + tools/cxxtest/sample/CreatedTest.h | 31 + tools/cxxtest/sample/DeltaTest.h | 27 + tools/cxxtest/sample/EnumTraits.h | 39 + tools/cxxtest/sample/ExceptionTest.h | 52 + tools/cxxtest/sample/FixtureTest.h | 37 + tools/cxxtest/sample/Makefile.PL | 32 + tools/cxxtest/sample/Makefile.bcc32 | 94 + tools/cxxtest/sample/Makefile.msvc | 93 + tools/cxxtest/sample/Makefile.unix | 83 + tools/cxxtest/sample/MessageTest.h | 30 + tools/cxxtest/sample/SCons/SConstruct | 40 + tools/cxxtest/sample/SCons/include/stack.h | 27 + tools/cxxtest/sample/SCons/src/stack.c | 48 + tools/cxxtest/sample/SCons/tests/stack_test.h | 71 + tools/cxxtest/sample/SimpleTest.h | 59 + tools/cxxtest/sample/TraitsTest.h | 69 + tools/cxxtest/sample/aborter.tpl | 16 + tools/cxxtest/sample/file_printer.tpl | 22 + tools/cxxtest/sample/gui/GreenYellowRed.h | 57 + tools/cxxtest/sample/mock/Dice.cpp | 14 + tools/cxxtest/sample/mock/Dice.h | 13 + tools/cxxtest/sample/mock/Makefile | 22 + tools/cxxtest/sample/mock/MockStdlib.h | 31 + tools/cxxtest/sample/mock/T/stdlib.h | 13 + tools/cxxtest/sample/mock/TestDice.h | 62 + tools/cxxtest/sample/mock/mock_stdlib.cpp | 2 + tools/cxxtest/sample/mock/real_stdlib.cpp | 2 + tools/cxxtest/sample/mock/roll.cpp | 11 + tools/cxxtest/sample/msvc/CxxTest_1_Run.dsp | 93 + tools/cxxtest/sample/msvc/CxxTest_2_Build.dsp | 94 + .../sample/msvc/CxxTest_3_Generate.dsp | 93 + .../cxxtest/sample/msvc/CxxTest_Workspace.dsw | 59 + tools/cxxtest/sample/msvc/FixFiles.bat | 210 + tools/cxxtest/sample/msvc/Makefile | 34 + tools/cxxtest/sample/msvc/ReadMe.txt | 30 + tools/cxxtest/sample/only.tpl | 33 + tools/cxxtest/sample/parts/.cvsignore | 1 + tools/cxxtest/sample/parts/Makefile.unix | 39 + tools/cxxtest/sample/winddk/Makefile | 2 + tools/cxxtest/sample/winddk/Makefile.inc | 13 + tools/cxxtest/sample/winddk/RunTests.tpl | 13 + tools/cxxtest/sample/winddk/SOURCES | 46 + tools/cxxtest/sample/yes_no_runner.cpp | 11 + tools/cxxtest/test/.cvsignore | 1 + tools/cxxtest/test/AborterNoThrow.h | 19 + tools/cxxtest/test/BadTest.h | 55 + tools/cxxtest/test/Comments.h | 24 + tools/cxxtest/test/Comments2.h | 21 + tools/cxxtest/test/CppTemplateTest.h | 37 + tools/cxxtest/test/DeepAbort.h | 84 + tools/cxxtest/test/DefaultAbort.h | 3 + tools/cxxtest/test/DefaultTraits.h | 37 + tools/cxxtest/test/DoubleCall.h | 38 + tools/cxxtest/test/DynamicAbort.h | 52 + tools/cxxtest/test/DynamicMax.h | 65 + tools/cxxtest/test/EmptySuite.h | 16 + tools/cxxtest/test/Exceptions.h | 70 + tools/cxxtest/test/Factor.h | 64 + tools/cxxtest/test/ForceNoEh.h | 16 + tools/cxxtest/test/GfSetUpFails.h | 28 + tools/cxxtest/test/GfSetUpThrows.h | 28 + tools/cxxtest/test/GfTearDownFails.h | 26 + tools/cxxtest/test/GfTearDownThrows.h | 26 + tools/cxxtest/test/GlobalFixtures.h | 72 + tools/cxxtest/test/GoodSuite.h | 114 + tools/cxxtest/test/GuiWait.h | 6 + tools/cxxtest/test/HaveEH.tpl | 10 + tools/cxxtest/test/HaveStd.h | 15 + tools/cxxtest/test/HaveStd.tpl | 10 + tools/cxxtest/test/IncludeTest.h | 15 + tools/cxxtest/test/InheritedTest.h | 65 + tools/cxxtest/test/Int64.h | 16 + tools/cxxtest/test/LessThanEquals.h | 22 + tools/cxxtest/test/LongLong.h | 16 + tools/cxxtest/test/LongTraits.h | 16 + tools/cxxtest/test/Makefile | 10 + tools/cxxtest/test/MaxDump.h | 5 + tools/cxxtest/test/MockTest.h | 182 + tools/cxxtest/test/NoEh.h | 11 + tools/cxxtest/test/Part1.h | 18 + tools/cxxtest/test/Part2.h | 18 + tools/cxxtest/test/Relation.h | 41 + tools/cxxtest/test/SameData.h | 40 + tools/cxxtest/test/SameFiles.h | 41 + tools/cxxtest/test/SameFilesLonger.h | 42 + tools/cxxtest/test/SameZero.h | 26 + tools/cxxtest/test/SetUpWorldError.h | 34 + tools/cxxtest/test/SetUpWorldFails.h | 28 + tools/cxxtest/test/SetUpWorldThrows.h | 28 + tools/cxxtest/test/SimpleInheritedTest.h | 36 + tools/cxxtest/test/SimpleInheritedTest2.h | 38 + tools/cxxtest/test/Something.h | 3 + tools/cxxtest/test/StlTraits.h | 152 + tools/cxxtest/test/TearDownWorldFails.h | 25 + tools/cxxtest/test/TearDownWorldThrows.h | 25 + tools/cxxtest/test/TestNonFinite.h | 30 + tools/cxxtest/test/ThrowNoStd.h | 10 + tools/cxxtest/test/ThrowNoStd.tpl | 10 + tools/cxxtest/test/ThrowsAssert.h | 101 + tools/cxxtest/test/TraitsTest.h | 61 + tools/cxxtest/test/Tsm.h | 53 + tools/cxxtest/test/UserTraits.h | 36 + tools/cxxtest/test/UserTraits.tpl | 20 + tools/cxxtest/test/VoidTraits.h | 20 + tools/cxxtest/test/WideCharTest.h | 18 + tools/cxxtest/test/WorldFixtures.h | 40 + tools/cxxtest/test/__init__.py | 1 + tools/cxxtest/test/abort.out | 111 + tools/cxxtest/test/activate.tpl | 19 + tools/cxxtest/test/anything.cpp | 6 + tools/cxxtest/test/bad.out | 24 + tools/cxxtest/test/comments.out | 5 + tools/cxxtest/test/comments2.out | 5 + tools/cxxtest/test/cxxtest/DummyGui.h | 45 + tools/cxxtest/test/default_abort.out | 120 + tools/cxxtest/test/eh_normals.out | 44 + tools/cxxtest/test/eh_plus_abort.out | 63 + tools/cxxtest/test/error.out | 51 + tools/cxxtest/test/factor.out | 72 + tools/cxxtest/test/fake/.cvsignore | 1 + tools/cxxtest/test/fake/X11/Xlib.h | 46 + tools/cxxtest/test/fake/X11/Xutil.h | 1 + tools/cxxtest/test/fake/commctrl.h | 25 + tools/cxxtest/test/fake/qapplication.h | 14 + tools/cxxtest/test/fake/qglobal.h | 2 + tools/cxxtest/test/fake/qlabel.h | 10 + tools/cxxtest/test/fake/qlayout.h | 8 + tools/cxxtest/test/fake/qmessagebox.h | 8 + tools/cxxtest/test/fake/qpixmap.h | 2 + tools/cxxtest/test/fake/qprogressbar.h | 29 + tools/cxxtest/test/fake/qstatusbar.h | 10 + tools/cxxtest/test/fake/qstring.h | 17 + tools/cxxtest/test/fake/qwidget.h | 23 + tools/cxxtest/test/fake/windows.h | 122 + tools/cxxtest/test/gfsuf.out | 6 + tools/cxxtest/test/gfsut.out | 6 + tools/cxxtest/test/gftdf.out | 9 + tools/cxxtest/test/gftdt.out | 9 + tools/cxxtest/test/gfxs.out | 2 + tools/cxxtest/test/good.out | 2 + tools/cxxtest/test/gui.out | 15 + tools/cxxtest/test/gui_paren.out | 15 + tools/cxxtest/test/include.out | 6 + tools/cxxtest/test/infinite.out | 11 + tools/cxxtest/test/inheritance.out | 44 + tools/cxxtest/test/int64.cpp | 8 + tools/cxxtest/test/int64.out | 8 + tools/cxxtest/test/longlong.cpp | 8 + tools/cxxtest/test/longlong.out | 8 + tools/cxxtest/test/main.cpp | 33 + tools/cxxtest/test/max.out | 56 + tools/cxxtest/test/normal.out | 204 + tools/cxxtest/test/normal.xml | 437 ++ tools/cxxtest/test/paren.out | 51 + tools/cxxtest/test/parts.out | 2 + tools/cxxtest/test/preamble.out | 67 + tools/cxxtest/test/preamble.tpl | 29 + tools/cxxtest/test/runner.out | 1 + tools/cxxtest/test/simple_inheritance.out | 2 + tools/cxxtest/test/simple_inheritance2.out | 2 + tools/cxxtest/test/std.out | 6 + tools/cxxtest/test/stl.out | 46 + tools/cxxtest/test/stpltpl.cpp | 6 + tools/cxxtest/test/suite.out | 24 + tools/cxxtest/test/suite_test.out | 6 + tools/cxxtest/test/suwe.out | 6 + tools/cxxtest/test/suwf.out | 5 + tools/cxxtest/test/suwt.out | 5 + tools/cxxtest/test/tdwf.out | 5 + tools/cxxtest/test/tdwt.out | 5 + tools/cxxtest/test/template.out | 2 + tools/cxxtest/test/test_cxxtest.py | 704 +++ tools/cxxtest/test/test_doc.py | 26 + tools/cxxtest/test/throw.out | 2 + tools/cxxtest/test/tpltpl.cpp | 10 + tools/cxxtest/test/unit/LinkedList_test.t.h | 57 + tools/cxxtest/test/unit/SConstruct | 12 + tools/cxxtest/test/user.out | 6 + tools/cxxtest/test/wchar.cpp | 11 + tools/cxxtest/test/wchar.out | 7 + tools/cxxtest/test/wildcard.out | 4 + tools/rake_utils/buildconfig.rb | 44 + tools/rake_utils/plainconfig.rb | 96 + tools/rake_utils/testconfig.rb | 82 + 457 files changed, 38517 insertions(+) create mode 100644 Doxyfile create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 build/DUMMY create mode 100644 deps/DUMMY create mode 100644 docs/DUMMY create mode 100644 example.dl create mode 100644 rakefile.rb create mode 100644 res/DUMMY create mode 100644 res/environment.scm create mode 100644 source/dllexer/dllexer.cpp create mode 100644 source/dllexer/dllexer.h create mode 100644 source/dlparser/dlparser.cpp create mode 100644 source/dlparser/dlparser.h create mode 100644 source/dlparser/macro/macro.c create mode 100644 source/dlparser/macro/macro.h create mode 100644 source/dlparser/macro/param.c create mode 100644 source/dlparser/macro/param.h create mode 100644 source/main.cpp create mode 100644 source/parse_utils/ast/ast.cpp create mode 100644 source/parse_utils/ast/ast.h create mode 100644 source/parse_utils/exception/exception.cpp create mode 100644 source/parse_utils/exception/exception.h create mode 100644 source/parse_utils/lexer/lexer.cpp create mode 100644 source/parse_utils/lexer/lexer.h create mode 100644 source/parse_utils/lexer/token/token.cpp create mode 100644 source/parse_utils/lexer/token/token.h create mode 100644 source/parse_utils/parser/btparser/btparser.cpp create mode 100644 source/parse_utils/parser/btparser/btparser.h create mode 100644 source/parse_utils/parser/llkparser/llkparser.cpp create mode 100644 source/parse_utils/parser/llkparser/llkparser.h create mode 100644 source/parse_utils/parser/parser.cpp create mode 100644 source/parse_utils/parser/parser.h create mode 100644 source/parse_utils/visitor/visitor.cpp create mode 100644 source/parse_utils/visitor/visitor.h create mode 100644 source/visitors/macroapplication/macroapplication.cpp create mode 100644 source/visitors/macroapplication/macroapplication.h create mode 100644 source/visitors/scheme/scheme.cpp create mode 100644 source/visitors/scheme/scheme.h create mode 100644 source/visitors/sexp/sexp.cpp create mode 100644 source/visitors/sexp/sexp.h create mode 100644 tests/source/main.h create mode 100644 tests/system/system_tests.dl create mode 100644 tools/cxxtest/COPYING create mode 100644 tools/cxxtest/README create mode 100644 tools/cxxtest/Versions create mode 100644 tools/cxxtest/admin/cxxtest.spec create mode 100644 tools/cxxtest/admin/jenkins_cxxtest create mode 100644 tools/cxxtest/admin/release create mode 100644 tools/cxxtest/admin/virtualenv.py create mode 100644 tools/cxxtest/bin/cxxtestgen create mode 100644 tools/cxxtest/build_tools/SCons/AUTHORS create mode 100644 tools/cxxtest/build_tools/SCons/cxxtest.py create mode 100644 tools/cxxtest/build_tools/SCons/test/default_env/README create mode 100644 tools/cxxtest/build_tools/SCons/test/default_env/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/default_env/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/empty_source_list/README create mode 100644 tools/cxxtest/build_tools/SCons/test/empty_source_list/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/empty_source_list/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/empty_source_list/requirement.hpp create mode 100644 tools/cxxtest/build_tools/SCons/test/empty_source_list/test_bar.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/empty_source_list/test_foo.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/eprouvette.py create mode 100644 tools/cxxtest/build_tools/SCons/test/expanding_#/README create mode 100644 tools/cxxtest/build_tools/SCons/test/expanding_#/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/expanding_#/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing/README create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.cpp create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.h create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing/src/test_bar.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing/src/test_foo.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing_edmundo/README create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing_edmundo/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing_edmundo/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hello.cc create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hello.hh create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hellotest.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/globbing_edmundo/main.cpp create mode 100644 tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/README create mode 100644 tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/not-with-pedantic.h create mode 100644 tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/only_with_ansi.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/README create mode 100644 tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/src/not-with-pedantic.h create mode 100644 tools/cxxtest/build_tools/SCons/test/multifile_tests/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/multifile_tests/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.cpp create mode 100644 tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.h create mode 100644 tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_bar.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_foo.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/need_cpppath/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/need_cpppath/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppath.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppathdir/include.h create mode 100644 tools/cxxtest/build_tools/SCons/test/nonstandard_cxxtest_dir/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/nonstandard_cxxtest_dir/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/printer_propagation/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/printer_propagation/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/printer_propagation/cxxtest/CrazyRunner.h create mode 100644 tools/cxxtest/build_tools/SCons/test/printer_propagation/src/failtest.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/recursive_sources/README create mode 100644 tools/cxxtest/build_tools/SCons/test/recursive_sources/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/recursive_sources/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.cpp create mode 100644 tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.h create mode 100644 tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_bar.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_foo.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/string_cpppath/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/string_cpppath/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppath.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppathdir/include.h create mode 100644 tools/cxxtest/build_tools/SCons/test/target_syntax/SConstruct create mode 100644 tools/cxxtest/build_tools/SCons/test/target_syntax/TestDef.py create mode 100644 tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppath.t.h create mode 100644 tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppathdir/include.h create mode 100644 tools/cxxtest/cxxtest/Descriptions.cpp create mode 100644 tools/cxxtest/cxxtest/Descriptions.h create mode 100644 tools/cxxtest/cxxtest/DummyDescriptions.cpp create mode 100644 tools/cxxtest/cxxtest/DummyDescriptions.h create mode 100644 tools/cxxtest/cxxtest/ErrorFormatter.h create mode 100644 tools/cxxtest/cxxtest/ErrorPrinter.h create mode 100644 tools/cxxtest/cxxtest/Flags.h create mode 100644 tools/cxxtest/cxxtest/GlobalFixture.cpp create mode 100644 tools/cxxtest/cxxtest/GlobalFixture.h create mode 100644 tools/cxxtest/cxxtest/Gui.h create mode 100644 tools/cxxtest/cxxtest/LinkedList.cpp create mode 100644 tools/cxxtest/cxxtest/LinkedList.h create mode 100644 tools/cxxtest/cxxtest/Mock.h create mode 100644 tools/cxxtest/cxxtest/ParenPrinter.h create mode 100644 tools/cxxtest/cxxtest/QtGui.h create mode 100644 tools/cxxtest/cxxtest/RealDescriptions.cpp create mode 100644 tools/cxxtest/cxxtest/RealDescriptions.h create mode 100644 tools/cxxtest/cxxtest/Root.cpp create mode 100644 tools/cxxtest/cxxtest/SelfTest.h create mode 100644 tools/cxxtest/cxxtest/StdHeaders.h create mode 100644 tools/cxxtest/cxxtest/StdTestSuite.h create mode 100644 tools/cxxtest/cxxtest/StdValueTraits.h create mode 100644 tools/cxxtest/cxxtest/StdioFilePrinter.h create mode 100644 tools/cxxtest/cxxtest/StdioPrinter.h create mode 100644 tools/cxxtest/cxxtest/TeeListener.h create mode 100644 tools/cxxtest/cxxtest/TestListener.h create mode 100644 tools/cxxtest/cxxtest/TestMain.h create mode 100644 tools/cxxtest/cxxtest/TestRunner.h create mode 100644 tools/cxxtest/cxxtest/TestSuite.cpp create mode 100644 tools/cxxtest/cxxtest/TestSuite.h create mode 100644 tools/cxxtest/cxxtest/TestTracker.cpp create mode 100644 tools/cxxtest/cxxtest/TestTracker.h create mode 100644 tools/cxxtest/cxxtest/ValueTraits.cpp create mode 100644 tools/cxxtest/cxxtest/ValueTraits.h create mode 100644 tools/cxxtest/cxxtest/Win32Gui.h create mode 100644 tools/cxxtest/cxxtest/X11Gui.h create mode 100644 tools/cxxtest/cxxtest/XUnitPrinter.h create mode 100644 tools/cxxtest/cxxtest/XmlFormatter.h create mode 100644 tools/cxxtest/cxxtest/XmlPrinter.h create mode 100644 tools/cxxtest/cxxtest/YesNoRunner.h create mode 100644 tools/cxxtest/doc/Makefile create mode 100644 tools/cxxtest/doc/README.txt create mode 100644 tools/cxxtest/doc/catalog.xml create mode 100644 tools/cxxtest/doc/epub/README create mode 100644 tools/cxxtest/doc/epub/bin/dbtoepub create mode 100644 tools/cxxtest/doc/epub/bin/lib/docbook.rb create mode 100644 tools/cxxtest/doc/epub/bin/xslt/obfuscate.xsl create mode 100644 tools/cxxtest/doc/epub/docbook.xsl create mode 100644 tools/cxxtest/doc/examples/Assertions.h create mode 100644 tools/cxxtest/doc/examples/BadTestSuite1.h create mode 100644 tools/cxxtest/doc/examples/GetGlobals.sh create mode 100644 tools/cxxtest/doc/examples/MockTestSuite.h create mode 100644 tools/cxxtest/doc/examples/MyClass.h create mode 100644 tools/cxxtest/doc/examples/MyTestSuite1.h create mode 100644 tools/cxxtest/doc/examples/MyTestSuite10.h create mode 100644 tools/cxxtest/doc/examples/MyTestSuite11.h create mode 100644 tools/cxxtest/doc/examples/MyTestSuite2.h create mode 100644 tools/cxxtest/doc/examples/MyTestSuite3.h create mode 100644 tools/cxxtest/doc/examples/MyTestSuite4.h create mode 100644 tools/cxxtest/doc/examples/MyTestSuite5.h create mode 100644 tools/cxxtest/doc/examples/MyTestSuite6.h create mode 100644 tools/cxxtest/doc/examples/MyTestSuite7.h create mode 100644 tools/cxxtest/doc/examples/MyTestSuite8.h create mode 100644 tools/cxxtest/doc/examples/MyTestSuite9.h create mode 100644 tools/cxxtest/doc/examples/TMyClass.h create mode 100644 tools/cxxtest/doc/examples/buildRunner.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner10.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner10.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner11.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner11.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner12.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner12.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner13.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner14.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner14.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner15.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner15.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner16.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner16.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner17.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner17.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner18.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner18.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner19.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner19.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner2.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner2.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner20.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner20.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner21.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner21.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner3.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner3.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner4.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner4.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner5.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner5.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner6.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner6.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner7.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner7.txt create mode 100644 tools/cxxtest/doc/examples/buildRunner8.sh create mode 100644 tools/cxxtest/doc/examples/buildRunner9.sh create mode 100644 tools/cxxtest/doc/examples/cxxtestgen.out create mode 100644 tools/cxxtest/doc/examples/exeRunner.out create mode 100644 tools/cxxtest/doc/examples/exeRunner.sh create mode 100644 tools/cxxtest/doc/examples/exeRunner2.out create mode 100644 tools/cxxtest/doc/examples/exeRunner2.sh create mode 100644 tools/cxxtest/doc/examples/rand_example.cpp create mode 100644 tools/cxxtest/doc/examples/runner10.tpl create mode 100644 tools/cxxtest/doc/examples/runner13.MyTestSuite2.txt create mode 100644 tools/cxxtest/doc/examples/runner13.help.txt create mode 100644 tools/cxxtest/doc/examples/runner13.helpTests.txt create mode 100644 tools/cxxtest/doc/examples/runner13.testMultiplication.txt create mode 100644 tools/cxxtest/doc/examples/runner13.testMultiplicationVerbose.txt create mode 100644 tools/cxxtest/doc/examples/test_examples.py create mode 100644 tools/cxxtest/doc/examples/time_mock.cpp create mode 100644 tools/cxxtest/doc/examples/time_mock.h create mode 100644 tools/cxxtest/doc/examples/time_real.cpp create mode 100644 tools/cxxtest/doc/guide.epub create mode 100644 tools/cxxtest/doc/guide.html create mode 100644 tools/cxxtest/doc/guide.pdf create mode 100644 tools/cxxtest/doc/guide.txt create mode 100644 tools/cxxtest/doc/include_anchors.py create mode 100644 tools/cxxtest/python/README.txt create mode 100644 tools/cxxtest/python/convert.py create mode 100644 tools/cxxtest/python/cxxtest/__init__.py create mode 100644 tools/cxxtest/python/cxxtest/__init__.pyc create mode 100644 tools/cxxtest/python/cxxtest/__release__.py create mode 100644 tools/cxxtest/python/cxxtest/__release__.pyc create mode 100644 tools/cxxtest/python/cxxtest/cxx_parser.py create mode 100644 tools/cxxtest/python/cxxtest/cxx_parser.pyc create mode 100644 tools/cxxtest/python/cxxtest/cxxtest_fog.py create mode 100644 tools/cxxtest/python/cxxtest/cxxtest_fog.pyc create mode 100644 tools/cxxtest/python/cxxtest/cxxtest_misc.py create mode 100644 tools/cxxtest/python/cxxtest/cxxtest_misc.pyc create mode 100644 tools/cxxtest/python/cxxtest/cxxtest_parser.py create mode 100644 tools/cxxtest/python/cxxtest/cxxtest_parser.pyc create mode 100644 tools/cxxtest/python/cxxtest/cxxtestgen.py create mode 100644 tools/cxxtest/python/cxxtest/cxxtestgen.pyc create mode 100644 tools/cxxtest/python/python3/cxxtest/__init__.py create mode 100644 tools/cxxtest/python/python3/cxxtest/__release__.py create mode 100644 tools/cxxtest/python/python3/cxxtest/cxx_parser.py create mode 100644 tools/cxxtest/python/python3/cxxtest/cxxtest_fog.py create mode 100644 tools/cxxtest/python/python3/cxxtest/cxxtest_misc.py create mode 100644 tools/cxxtest/python/python3/cxxtest/cxxtest_parser.py create mode 100644 tools/cxxtest/python/python3/cxxtest/cxxtestgen.py create mode 100644 tools/cxxtest/python/python3/scripts/cxxtestgen create mode 100644 tools/cxxtest/python/scripts/cxxtestgen create mode 100644 tools/cxxtest/python/setup.py create mode 100644 tools/cxxtest/sample/.cvsignore create mode 100644 tools/cxxtest/sample/Construct create mode 100644 tools/cxxtest/sample/CreatedTest.h create mode 100644 tools/cxxtest/sample/DeltaTest.h create mode 100644 tools/cxxtest/sample/EnumTraits.h create mode 100644 tools/cxxtest/sample/ExceptionTest.h create mode 100644 tools/cxxtest/sample/FixtureTest.h create mode 100644 tools/cxxtest/sample/Makefile.PL create mode 100644 tools/cxxtest/sample/Makefile.bcc32 create mode 100644 tools/cxxtest/sample/Makefile.msvc create mode 100644 tools/cxxtest/sample/Makefile.unix create mode 100644 tools/cxxtest/sample/MessageTest.h create mode 100644 tools/cxxtest/sample/SCons/SConstruct create mode 100644 tools/cxxtest/sample/SCons/include/stack.h create mode 100644 tools/cxxtest/sample/SCons/src/stack.c create mode 100644 tools/cxxtest/sample/SCons/tests/stack_test.h create mode 100644 tools/cxxtest/sample/SimpleTest.h create mode 100644 tools/cxxtest/sample/TraitsTest.h create mode 100644 tools/cxxtest/sample/aborter.tpl create mode 100644 tools/cxxtest/sample/file_printer.tpl create mode 100644 tools/cxxtest/sample/gui/GreenYellowRed.h create mode 100644 tools/cxxtest/sample/mock/Dice.cpp create mode 100644 tools/cxxtest/sample/mock/Dice.h create mode 100644 tools/cxxtest/sample/mock/Makefile create mode 100644 tools/cxxtest/sample/mock/MockStdlib.h create mode 100644 tools/cxxtest/sample/mock/T/stdlib.h create mode 100644 tools/cxxtest/sample/mock/TestDice.h create mode 100644 tools/cxxtest/sample/mock/mock_stdlib.cpp create mode 100644 tools/cxxtest/sample/mock/real_stdlib.cpp create mode 100644 tools/cxxtest/sample/mock/roll.cpp create mode 100644 tools/cxxtest/sample/msvc/CxxTest_1_Run.dsp create mode 100644 tools/cxxtest/sample/msvc/CxxTest_2_Build.dsp create mode 100644 tools/cxxtest/sample/msvc/CxxTest_3_Generate.dsp create mode 100644 tools/cxxtest/sample/msvc/CxxTest_Workspace.dsw create mode 100644 tools/cxxtest/sample/msvc/FixFiles.bat create mode 100644 tools/cxxtest/sample/msvc/Makefile create mode 100644 tools/cxxtest/sample/msvc/ReadMe.txt create mode 100644 tools/cxxtest/sample/only.tpl create mode 100644 tools/cxxtest/sample/parts/.cvsignore create mode 100644 tools/cxxtest/sample/parts/Makefile.unix create mode 100644 tools/cxxtest/sample/winddk/Makefile create mode 100644 tools/cxxtest/sample/winddk/Makefile.inc create mode 100644 tools/cxxtest/sample/winddk/RunTests.tpl create mode 100644 tools/cxxtest/sample/winddk/SOURCES create mode 100644 tools/cxxtest/sample/yes_no_runner.cpp create mode 100644 tools/cxxtest/test/.cvsignore create mode 100644 tools/cxxtest/test/AborterNoThrow.h create mode 100644 tools/cxxtest/test/BadTest.h create mode 100644 tools/cxxtest/test/Comments.h create mode 100644 tools/cxxtest/test/Comments2.h create mode 100644 tools/cxxtest/test/CppTemplateTest.h create mode 100644 tools/cxxtest/test/DeepAbort.h create mode 100644 tools/cxxtest/test/DefaultAbort.h create mode 100644 tools/cxxtest/test/DefaultTraits.h create mode 100644 tools/cxxtest/test/DoubleCall.h create mode 100644 tools/cxxtest/test/DynamicAbort.h create mode 100644 tools/cxxtest/test/DynamicMax.h create mode 100644 tools/cxxtest/test/EmptySuite.h create mode 100644 tools/cxxtest/test/Exceptions.h create mode 100644 tools/cxxtest/test/Factor.h create mode 100644 tools/cxxtest/test/ForceNoEh.h create mode 100644 tools/cxxtest/test/GfSetUpFails.h create mode 100644 tools/cxxtest/test/GfSetUpThrows.h create mode 100644 tools/cxxtest/test/GfTearDownFails.h create mode 100644 tools/cxxtest/test/GfTearDownThrows.h create mode 100644 tools/cxxtest/test/GlobalFixtures.h create mode 100644 tools/cxxtest/test/GoodSuite.h create mode 100644 tools/cxxtest/test/GuiWait.h create mode 100644 tools/cxxtest/test/HaveEH.tpl create mode 100644 tools/cxxtest/test/HaveStd.h create mode 100644 tools/cxxtest/test/HaveStd.tpl create mode 100644 tools/cxxtest/test/IncludeTest.h create mode 100644 tools/cxxtest/test/InheritedTest.h create mode 100644 tools/cxxtest/test/Int64.h create mode 100644 tools/cxxtest/test/LessThanEquals.h create mode 100644 tools/cxxtest/test/LongLong.h create mode 100644 tools/cxxtest/test/LongTraits.h create mode 100644 tools/cxxtest/test/Makefile create mode 100644 tools/cxxtest/test/MaxDump.h create mode 100644 tools/cxxtest/test/MockTest.h create mode 100644 tools/cxxtest/test/NoEh.h create mode 100644 tools/cxxtest/test/Part1.h create mode 100644 tools/cxxtest/test/Part2.h create mode 100644 tools/cxxtest/test/Relation.h create mode 100644 tools/cxxtest/test/SameData.h create mode 100644 tools/cxxtest/test/SameFiles.h create mode 100644 tools/cxxtest/test/SameFilesLonger.h create mode 100644 tools/cxxtest/test/SameZero.h create mode 100644 tools/cxxtest/test/SetUpWorldError.h create mode 100644 tools/cxxtest/test/SetUpWorldFails.h create mode 100644 tools/cxxtest/test/SetUpWorldThrows.h create mode 100644 tools/cxxtest/test/SimpleInheritedTest.h create mode 100644 tools/cxxtest/test/SimpleInheritedTest2.h create mode 100644 tools/cxxtest/test/Something.h create mode 100644 tools/cxxtest/test/StlTraits.h create mode 100644 tools/cxxtest/test/TearDownWorldFails.h create mode 100644 tools/cxxtest/test/TearDownWorldThrows.h create mode 100644 tools/cxxtest/test/TestNonFinite.h create mode 100644 tools/cxxtest/test/ThrowNoStd.h create mode 100644 tools/cxxtest/test/ThrowNoStd.tpl create mode 100644 tools/cxxtest/test/ThrowsAssert.h create mode 100644 tools/cxxtest/test/TraitsTest.h create mode 100644 tools/cxxtest/test/Tsm.h create mode 100644 tools/cxxtest/test/UserTraits.h create mode 100644 tools/cxxtest/test/UserTraits.tpl create mode 100644 tools/cxxtest/test/VoidTraits.h create mode 100644 tools/cxxtest/test/WideCharTest.h create mode 100644 tools/cxxtest/test/WorldFixtures.h create mode 100644 tools/cxxtest/test/__init__.py create mode 100644 tools/cxxtest/test/abort.out create mode 100644 tools/cxxtest/test/activate.tpl create mode 100644 tools/cxxtest/test/anything.cpp create mode 100644 tools/cxxtest/test/bad.out create mode 100644 tools/cxxtest/test/comments.out create mode 100644 tools/cxxtest/test/comments2.out create mode 100644 tools/cxxtest/test/cxxtest/DummyGui.h create mode 100644 tools/cxxtest/test/default_abort.out create mode 100644 tools/cxxtest/test/eh_normals.out create mode 100644 tools/cxxtest/test/eh_plus_abort.out create mode 100644 tools/cxxtest/test/error.out create mode 100644 tools/cxxtest/test/factor.out create mode 100644 tools/cxxtest/test/fake/.cvsignore create mode 100644 tools/cxxtest/test/fake/X11/Xlib.h create mode 100644 tools/cxxtest/test/fake/X11/Xutil.h create mode 100644 tools/cxxtest/test/fake/commctrl.h create mode 100644 tools/cxxtest/test/fake/qapplication.h create mode 100644 tools/cxxtest/test/fake/qglobal.h create mode 100644 tools/cxxtest/test/fake/qlabel.h create mode 100644 tools/cxxtest/test/fake/qlayout.h create mode 100644 tools/cxxtest/test/fake/qmessagebox.h create mode 100644 tools/cxxtest/test/fake/qpixmap.h create mode 100644 tools/cxxtest/test/fake/qprogressbar.h create mode 100644 tools/cxxtest/test/fake/qstatusbar.h create mode 100644 tools/cxxtest/test/fake/qstring.h create mode 100644 tools/cxxtest/test/fake/qwidget.h create mode 100644 tools/cxxtest/test/fake/windows.h create mode 100644 tools/cxxtest/test/gfsuf.out create mode 100644 tools/cxxtest/test/gfsut.out create mode 100644 tools/cxxtest/test/gftdf.out create mode 100644 tools/cxxtest/test/gftdt.out create mode 100644 tools/cxxtest/test/gfxs.out create mode 100644 tools/cxxtest/test/good.out create mode 100644 tools/cxxtest/test/gui.out create mode 100644 tools/cxxtest/test/gui_paren.out create mode 100644 tools/cxxtest/test/include.out create mode 100644 tools/cxxtest/test/infinite.out create mode 100644 tools/cxxtest/test/inheritance.out create mode 100644 tools/cxxtest/test/int64.cpp create mode 100644 tools/cxxtest/test/int64.out create mode 100644 tools/cxxtest/test/longlong.cpp create mode 100644 tools/cxxtest/test/longlong.out create mode 100644 tools/cxxtest/test/main.cpp create mode 100644 tools/cxxtest/test/max.out create mode 100644 tools/cxxtest/test/normal.out create mode 100644 tools/cxxtest/test/normal.xml create mode 100644 tools/cxxtest/test/paren.out create mode 100644 tools/cxxtest/test/parts.out create mode 100644 tools/cxxtest/test/preamble.out create mode 100644 tools/cxxtest/test/preamble.tpl create mode 100644 tools/cxxtest/test/runner.out create mode 100644 tools/cxxtest/test/simple_inheritance.out create mode 100644 tools/cxxtest/test/simple_inheritance2.out create mode 100644 tools/cxxtest/test/std.out create mode 100644 tools/cxxtest/test/stl.out create mode 100644 tools/cxxtest/test/stpltpl.cpp create mode 100644 tools/cxxtest/test/suite.out create mode 100644 tools/cxxtest/test/suite_test.out create mode 100644 tools/cxxtest/test/suwe.out create mode 100644 tools/cxxtest/test/suwf.out create mode 100644 tools/cxxtest/test/suwt.out create mode 100644 tools/cxxtest/test/tdwf.out create mode 100644 tools/cxxtest/test/tdwt.out create mode 100644 tools/cxxtest/test/template.out create mode 100644 tools/cxxtest/test/test_cxxtest.py create mode 100644 tools/cxxtest/test/test_doc.py create mode 100644 tools/cxxtest/test/throw.out create mode 100644 tools/cxxtest/test/tpltpl.cpp create mode 100644 tools/cxxtest/test/unit/LinkedList_test.t.h create mode 100644 tools/cxxtest/test/unit/SConstruct create mode 100644 tools/cxxtest/test/user.out create mode 100644 tools/cxxtest/test/wchar.cpp create mode 100644 tools/cxxtest/test/wchar.out create mode 100644 tools/cxxtest/test/wildcard.out create mode 100644 tools/rake_utils/buildconfig.rb create mode 100644 tools/rake_utils/plainconfig.rb create mode 100644 tools/rake_utils/testconfig.rb diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 0000000..b633d17 --- /dev/null +++ b/Doxyfile @@ -0,0 +1,1719 @@ +# Doxyfile 1.7.3 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = "DLang" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = v0.1a + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "A functional language with extensible syntax" + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = docs/doxygen + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = source + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.py \ + *.f90 \ + *.f \ + *.for \ + *.vhd \ + *.vhdl + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [0,1..20]) +# that doxygen will group on one line in the generated HTML documentation. +# Note that a value of 0 will completely suppress the enum values from +# appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = YES + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the +# mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = NO + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will write a font called Helvetica to the output +# directory and reference it in all dot files that doxygen generates. +# When you want a differently looking font you can specify the font name +# using DOT_FONTNAME. You need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = YES + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, svg, gif or svg. +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..8de46c8 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,24 @@ + +Copyright (c) 2012, Michael D. Lowis +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..f71fb76 --- /dev/null +++ b/README.md @@ -0,0 +1,103 @@ +DLang +============================================== +Version: 0.1a +Created By: Michael D. Lowis +Email: + +About This Project +---------------------------------------------- + +DLang is an experimental new programming language with arbitrarily extensible +syntax. The core of the language provides you the tools you need to get things +done while the flexible syntax allows YOU to decide how you want to get it done. +New domain specific languages can be invented on the fly with ease to solve any +problem you encounter. + +License +---------------------------------------------- + +Unless explicitly stated otherwise, all code and documentation in this project +is released under the FreeBSD License. You can find a copy of the license text +in the LICENSE.md file. + +Requirements For Building +---------------------------------------------- + +* Ruby and Rake +* Chicken Scheme Compiler +* A C++ compiler +* Python (For unit test generation) + +Build Instructions +---------------------------------------------- + +You build dlang with the following command: + + rake release + +The resulting binary is placed in 'build/bin'. You can test it with the +following commands: + + build/bin/dlang example.dl + ./example.exe + +Installation +---------------------------------------------- + +There are no installation instructions at the moment. This is a work in +progress. + +Project Files and Directories +---------------------------------------------- + + build/ Output directory for artifacts created during the build. + deps/ Libraries and other dependencies the source code may have. + docs/ Documentation for the language and the source code. + res/ Submodules and files that aren't part of DLang source but it still needs + source/ The source for the DLang parser + tests/ Unit test and mock files. + tools/ Tools required by the build system. + Doxyfile Doxygen documentation generator configuration. + example.dl An example DLang source file. + LICENSE.md The software license notification. + rakefile.rb Script containing the build configuration and tasks. + README.md You're reading this file right now! + +Know Issues or Bugs +---------------------------------------------- + +This is a non-comprehensive list of known issues and bugs that I intend to fix. + +* Memory leeaks like a sieve. +* Error messages are obtuse and unfriendly. +* Parser and Lexer have 0 error recovery. +* Usage prints out full path of binary instead of just the name. + +Version History +---------------------------------------------- + +### Version 0.1a + +Very first version ever. Its buggy, has obtuse error messages, and supports +about 1/20 of what I would like to see. Lets call it a proof of concept. + + +Feature Wish List +---------------------------------------------- + +This is a list of features are not yet supported, but may be at some point in +the future. + +* Command line options +* Overloaded macros. +* Multi-file support +* Inline function definition and application +* Inline array definition and access +* Inline list definition and access + +More Info +---------------------------------------------- + +For more info or general questions shoot me an email and I'll try to get back +to you in a timely manner. + diff --git a/build/DUMMY b/build/DUMMY new file mode 100644 index 0000000..e69de29 diff --git a/deps/DUMMY b/deps/DUMMY new file mode 100644 index 0000000..e69de29 diff --git a/docs/DUMMY b/docs/DUMMY new file mode 100644 index 0000000..e69de29 diff --git a/example.dl b/example.dl new file mode 100644 index 0000000..cb01400 --- /dev/null +++ b/example.dl @@ -0,0 +1,97 @@ +#------------------------------------------------------------------------------ +# Macro Tests +#------------------------------------------------------------------------------ +# Macro Definitions +% if ( cond, branch1:Block ) { + exec_if( cond, branch1 ) +} + +% ifelse ( cond, branch1:Block, branch2:Block ) { + exec_if( cond, branch1, branch2 ) +} + +% foreach ( lst, fn:Block ) { + for_each(fn, lst) +} + +# Macro Uses +if (1 == 1) +{ + print("1 Hello, World!") +} + +if (1 == 0) +{ + print("Hello, World!") +} + +ifelse (1 == 1) +{ + print("2 Hello, World!") +}{ + error("Incorrect branch was taken.") +} + +ifelse (1 == 0) +{ + error("Incorrect branch was taken.") +}{ + print("3 Hello, World!") +} + +#------------------------------------------------------------------------------ +# Collection Access and Iteration Tests +#------------------------------------------------------------------------------ +# Accessing elements of lists, vectors, and strings +lst1 = `(4,5,6) +print(lst1[0], " Hello, World!") + +vec1 = [4,5,6] +print(vec1[1], " Hello, World!") + +str1 = "456" +print(str1[2], " Hello, World!") + +# Iterating over lists, vectors, and strings +lst_foo = `(7,8,9,10) +foreach lst_foo { |a| + print(a," Hello, World!") +} + +vec_foo = [11,12,13,14,15] +foreach vec_foo { |a,b| + print(b," Hello, World!") +} + +str_foo = "6789" +foreach str_foo { |a| + print(1,a," Hello, World!") +} + +#------------------------------------------------------------------------------ +# Delayed Evaluation +#------------------------------------------------------------------------------ +% delay ( exp ) { + make_promise({ exp }) +} + +% force ( prom ) { + force( prom ) +} + +foo = delay nonexistent_var + 1 +nonexistent_var = 19 +assert( typeof(foo) == Block ) +assert( typeof( force foo ) == Num ) +print( force( foo ), " Hello, World!" ) + +#------------------------------------------------------------------------------ +# Type Checking Tests +#------------------------------------------------------------------------------ +assert( typeof( 1.1 ) == Num ) +assert( typeof( 'A' ) == Char ) +assert( typeof( `(1,2,3) ) == List ) +assert( typeof( [1,2,3] ) == Vector ) +assert( typeof( $Foo ) == Symbol ) +assert( typeof( {|a| a + 1} ) == Block ) + diff --git a/rakefile.rb b/rakefile.rb new file mode 100644 index 0000000..54d67af --- /dev/null +++ b/rakefile.rb @@ -0,0 +1,68 @@ +include Rake::DSL +require 'tools/rake_utils/buildconfig.rb' +require 'tools/rake_utils/testconfig.rb' + +#------------------------------------------------------------------------------ +# Configuration Objects +#------------------------------------------------------------------------------ +# Configuration for the binary artifact +Binary = BuildConfig.new({ + :name => 'dlang', + :compiler_options => [ '-c', '-Wall', '-Werror' ], + :source_files => [ 'source/**/*.c*' ], + :include_dirs => [ 'source/**/' ], +}) + +# Configuration for the unit tests +UnitTest = TestConfig.new({ + :test_files => [ 'tests/source/**.h' ], +}) + +#------------------------------------------------------------------------------ +# Release Tasks +#------------------------------------------------------------------------------ +desc 'Execute a complete build including unit tests and binary' +task :default => [ :release ] + +desc 'Display build configuration info' +task :config do + puts 'Release Configuration' + puts '---------------------' + puts Binary + puts '' + puts 'Unit Test Configuration' + puts '-----------------------' + puts UnitTest +end + +desc 'Build and link the binary' +task :release => [ Binary.binary_name() ] + +task Binary.binary_name() => Binary.directories() + Binary.objects() do + Binary.link() +end + +rule(/obj\/.+.o$/ => Binary.obj_src_lookup()) do |t| + Binary.compile(t.source,t.name) +end + +#------------------------------------------------------------------------------ +# Testing Tasks +#------------------------------------------------------------------------------ +desc 'Execute all unit tests' +task :test => UnitTest.directories() + UnitTest.runners() do + UnitTest.run_all_test_runners(); +end + +rule '_runner.exe' => UnitTest.bin_obj_lookup() do |t| + UnitTest.link([t.source],t.name) +end + +rule( /test\/.+_runner.o$/ => UnitTest.obj_src_lookup() ) do |t| + UnitTest.compile(t.source,t.name) +end + +rule '_runner.cpp' => UnitTest.src_test_lookup() do |t| + UnitTest.generate_test_runner(t.source,t.name) +end + diff --git a/res/DUMMY b/res/DUMMY new file mode 100644 index 0000000..e69de29 diff --git a/res/environment.scm b/res/environment.scm new file mode 100644 index 0000000..499b6d7 --- /dev/null +++ b/res/environment.scm @@ -0,0 +1,225 @@ +;------------------------------------------------------------------------------ +; Built-in Operators +;------------------------------------------------------------------------------ +(define ADD +) +(define SUB -) +(define MUL *) +(define DIV /) +(define NOT not) +(define EQ equal?) +(define (NE a b) (not (equal? a b))) +(define LT <) +(define GT >) +(define LTE <=) +(define GTE >=) +(define FN_CALL apply) +(define (ARRY_IDX coll idx) + (cond + ((list? coll) + (list-ref coll idx)) + ((vector? coll) + (vector-ref coll idx)) + ((string? coll) + (string-ref coll idx)))) + +;------------------------------------------------------------------------------ +; Built-in datatype constructors +;------------------------------------------------------------------------------ +(define VECTOR vector) +(define LIST list) +(define PARAMS list) +(define (MACRO) '()) + +;------------------------------------------------------------------------------ +; Import necessary libs +;------------------------------------------------------------------------------ +(require-extension srfi-1) ; List library +(require-extension srfi-13) ; String library +(require-extension vector-lib) ; Vector library + +;------------------------------------------------------------------------------ +; Built-in Symbols +;------------------------------------------------------------------------------ +; Null value definition +(define dl/null '()) + +; Boolean Value Definitions +(define dl/true #t) +(define dl/false #f) + +; Type Value Definitions +(define dl/Num 'dl/Num) +(define dl/Char 'dl/Char) +(define dl/List 'dl/List) +(define dl/Vector 'dl/Vector) +(define dl/String 'dl/String) +(define dl/Symbol 'dl/Symbol) +(define dl/Block 'dl/Block) + +;------------------------------------------------------------------------------ +; Built-in Functions +;------------------------------------------------------------------------------ +; Map existing scheme functions to our namespace +(define dl/display display) +(define dl/print print) +(define dl/error error) + +; Map +(define dl/list_map map) +(define dl/vector_map vector-map) +(define dl/string_map string-map) + +; for_each function definitions +(define dl/list_for_each for-each) +(define dl/vector_for_each vector-for-each) +(define dl/string_for_each string-for-each) + +; any function definitions +(define dl/list_any any) +(define dl/vector_any vector-any) +(define dl/string_any string-any) + +; every function definitions +(define dl/list_every every) +(define dl/vector_every vector-every) +(define dl/string_every string-every) + +; fold function definitions +(define dl/list_fold fold) +(define dl/vector_fold vector-fold) +(define dl/string_fold string-fold) + +; fold_right function definitions +(define dl/list_fold_right fold-right) +(define dl/vector_fold_right vector-fold-right) +(define dl/string_fold_right string-fold-right) + +; append function definitions +(define dl/list_append append) +(define dl/vector_append vector-append) +(define dl/string_append string-append) + +; concat function definitions +(define dl/list_concat concatenate) +(define dl/vector_concat vector-concatenate) +(define dl/string_concat string-concatenate) + +; Define type symbols +(define (dl/typeof var) + (cond + ((number? var) dl/Num) + ((char? var) dl/Char) + ((list? var) dl/List) + ((vector? var) dl/Vector) + ((string? var) dl/String) + ((symbol? var) dl/Symbol) + ((procedure? var) dl/Block) )) + +(define (dl/assert cnd . msg) + ; If condition is false + (if (not cnd) + ; If message is defined + (if (not (null? msg)) + ; Display the message + (error (car msg)) + ; Otherwise display a default message + (error "Assertion failed.") ))) + +(define (dl/exec_if a b . c) + (if a + ; call b as function + (b) + ; If c exists + (if (not (null? c)) + ; Call the head of c as a function + ((car c)) ))) + +(define (dl/map . args) + (let ((ls (list-ref args 1))) + (cond + ((list? ls) (apply map args)) + ((vector? ls) (apply vector-map args)) + ((string? ls) (apply string-map args)) ))) + +(define (dl/for_each . args) + (let ((ls (list-ref args 1))) + (cond + ((list? ls) (apply for-each args)) + ((vector? ls) (apply vector-for-each args)) + ((string? ls) (apply string-for-each args)) ))) + +(define (dl/any . args) + (let ((ls (list-ref args 1))) + (cond + ((list? ls) (apply any args)) + ((vector? ls) (apply vector-any args)) + ((string? ls) (apply string-any args)) ))) + +(define (dl/for_all . args) + (let ((ls (list-ref args 1))) + (cond + ((list? ls) (apply every args)) + ((vector? ls) (apply vector-every args)) + ((string? ls) (apply string-every args)) ))) + +(define (dl/fold_left . args) + (let ((ls (list-ref args 2))) + (cond + ((list? ls) (apply fold args)) + ((vector? ls) (apply vector-fold args)) + ((string? ls) (apply string-fold args)) ))) + +(define (dl/fold_right . args) + (let ((ls (list-ref args 2))) + (cond + ((list? ls) (apply fold-right args)) + ((vector? ls) (apply vector-fold-right args)) + ((string? ls) (apply string-fold-right args)) ))) + +(define (dl/append . args) + (let ((ls (list-ref args 1))) + (cond + ((list? ls) (apply append args)) + ((vector? ls) (apply vector-append args)) + ((string? ls) (apply string-append args)) ))) + +(define (dl/concat . args) + (let ((ls (list-ref args 1))) + (cond + ((list? ls) (apply concatenate args)) + ((vector? ls) (apply vector-concatenate args)) + ((string? ls) (apply string-concatenate args)) ))) + +(define (error reason . args) + (display "Error: ") + (display reason) + (for-each (lambda (arg) + (display " ") + (write arg)) + args) + (newline)) + +(define dl/error error) + +(define dl/make_promise + (lambda (proc) + (let ((result-ready? #f) + (result #f)) + (lambda () + (if result-ready? + result + (let ((x (proc))) + (if result-ready? + result + (begin (set! result-ready? #t) + (set! result x) + result)))))))) + +(define dl/force + (lambda (object) + (object))) + +;------------------------------------------------------------------------------ +; Start User Defined Code +;------------------------------------------------------------------------------ + diff --git a/source/dllexer/dllexer.cpp b/source/dllexer/dllexer.cpp new file mode 100644 index 0000000..3d99498 --- /dev/null +++ b/source/dllexer/dllexer.cpp @@ -0,0 +1,316 @@ +#include "dllexer.h" +#include "exception.h" + +using namespace std; + +#define NUM_SINGLE_CHAR_MATCHES 14 +SingleCharMatch_T Single_Character_Matches[ NUM_SINGLE_CHAR_MATCHES ] = { + { '[', LBRACK }, + { ']', RBRACK }, + { '(', LPAR }, + { ')', RPAR }, + { '{', LBRACE }, + { '}', RBRACE }, + { ',', COMMA }, + { '+', ADD }, + { '-', SUB }, + { '*', MUL }, + { '/', DIV }, + { '`', LIST }, + { '%', MACRO }, + { ':', SEP }, +}; + +bool DLLexer::isWhiteSpace(void) +{ + return (current == ' ') || + (current == '\t') || + (current == '\r') || + (current == '\n'); +} + +bool DLLexer::isLetter(void) +{ + return ((current >= 'a') && (current <= 'z')) || + ((current >= 'A') && (current <= 'Z')); +} + +bool DLLexer::isDigit(void) +{ + return ((current >= '0') && (current <= '9')); +} + +bool DLLexer::isOperator(void) +{ + return ( (current == '=') + || (current == '!') + || (current == '<') + || (current == '>') + || (current == '|') + || (current == '&')); +} + +bool DLLexer::isStringChar(void) +{ + return ( (current != '"') + && (current != '\r') + && (current != '\n')); +} + +Token* DLLexer::next(void) +{ + Token* ret = NULL; + while ( (!input->eof()) && (ret == NULL) ) + { + if (isWhiteSpace()) + { + WS(); + } + else if(current == '#') + { + COMMENT(); + } + else if (isLetter()) + { + ret = Id(); + } + else if( isOperator() ) + { + ret = MultiCharOp(); + } + else if (isDigit()) + { + ret = Number(); + } + else if(current == '\'') + { + ret = Char(); + } + else if(current == '"') + { + ret = String(); + } + else if(current == '$') + { + ret = Symbol(); + } + else + { + ret = SingleCharOp(); + } + } + return ret; +} + +void DLLexer::WS(void) +{ + do + { + consume(); + } + while(isWhiteSpace()); +} + +void DLLexer::COMMENT(void) +{ + match('#'); + do + { + consume(); + } + while( (current != '\n') + && (current != EOF)); + +} + +Token* DLLexer::Id(void) +{ + ostringstream oss; + do + { + oss << current; + consume(); + } + while(isLetter() || isDigit() || current == '_'); + return new Token(ID, oss.str(), line, column); +} + +Token* DLLexer::Number(void) +{ + ostringstream oss; + do + { + oss << current; + consume(); + } + while(isDigit()); + + if(current == '.') + { + return Decimal(oss); + } + + return new Token(NUM, oss.str(), line, column); +} + +Token* DLLexer::Decimal(ostringstream& oss) +{ + oss << current; + consume(); + + if(!isDigit()) + { + Exception ex(line,column); + ex.setMessage("Missing fractional portion of floating point number."); + throw ex; + } + + do + { + oss << current; + consume(); + } + while ( isDigit() ); + + return new Token(NUM, oss.str(), line, column); +} + +Token* DLLexer::Char(void) +{ + ostringstream oss; + + match('\''); + if(current != '\'') + { + oss << current; + consume(); + } + else + { + Exception ex(line,column); + ex.setMessage("Invalid character literal."); + throw ex; + } + match('\''); + + return new Token( CHAR, oss.str(), line, column ); +} + +Token* DLLexer::String(void) +{ + ostringstream oss; + match('"'); + while( isStringChar() ) + { + oss << current; + consume(); + } + match('"'); + return new Token( STRING, oss.str(), line, column ); +} + +Token* DLLexer::Symbol(void) +{ + ostringstream oss; + match('$'); + do + { + oss << current; + consume(); + } + while(isLetter() || isDigit() || current == '_'); + return new Token( SYMBOL, oss.str(), line, column ); +} + +Token* DLLexer::SingleCharOp(void) +{ + for(int i = 0; i < NUM_SINGLE_CHAR_MATCHES; i++) + { + if(current == Single_Character_Matches[i].match) + { + consume(); + return new Token( Single_Character_Matches[i].type, line, column ); + } + } + throw Exception(line,column); +} + +Token* DLLexer::MultiCharOp(void) +{ + Token* tok = NULL; + // save the current token so we can refer back to it + char last = current; + // remove the current token from the buffer so we cna see the next + consume(); + + if(last == '=') + { + if(current == '=') + { + consume(); + tok = new Token(EQ, line, column); + } + else + { + tok = new Token(ASSIGN, line, column); + } + } + else if(last == '!') + { + if(current == '=') + { + consume(); + tok = new Token(NE, line, column); + } + else + { + tok = new Token(NOT, line, column); + } + } + else if(last == '<') + { + if(current == '=') + { + consume(); + tok = new Token(LTE, line, column); + } + else + { + tok = new Token(LT, line, column); + } + } + else if(last == '>') + { + if(current == '=') + { + consume(); + tok = new Token(GTE, line, column); + } + else + { + tok = new Token(GT, line, column); + } + } + else if(last == '|') + { + if(current == '|') + { + consume(); + tok = new Token(OR, line, column); + } + else + { + tok = new Token(PIPE, line, column); + } + } + else if((last == '&') && (current == '&')) + { + consume(); + tok = new Token(AND, line, column); + } + else + { + throw Exception(line,column); + } + return tok; +} diff --git a/source/dllexer/dllexer.h b/source/dllexer/dllexer.h new file mode 100644 index 0000000..f73eab4 --- /dev/null +++ b/source/dllexer/dllexer.h @@ -0,0 +1,83 @@ +#ifndef DLLEXER_H +#define DLLEXER_H + +#include "lexer.h" +#include + +typedef enum TokenTypes +{ + // Datatypes + ID = 0, + NUM = 1, + CHAR = 2, + STRING = 3, + SYMBOL = 4, + LIST = 5, + VECTOR = 6, + FUNC = 7, + + // Symbols + LBRACK = 10, + RBRACK = 11, + LPAR = 12, + RPAR = 13, + LBRACE = 14, + RBRACE = 15, + COMMA = 16, + PIPE = 17, + + // Operators + AND = 20, + OR = 21, + NOT = 22, + EQ = 23, + NE = 24, + LT = 25, + GT = 26, + LTE = 27, + GTE = 28, + ASSIGN = 29, + ADD = 30, + SUB = 31, + MUL = 32, + DIV = 33, + + // AST "Virtual" Node Types + MACRO = 40, + SEP = 41, + PROGRAM = 42, + BLOCK = 43, + FN_CALL = 44, + PARAMS = 45, + ARRY_IDX = 46 +} eTokenTypes; + +typedef struct { + char match; + eTokenTypes type; +} SingleCharMatch_T; + +class DLLexer : public Lexer { + public: + bool isWhiteSpace(void); + bool isLetter(void); + bool isDigit(void); + bool isOperator(void); + bool isStringChar(void); + void WS(void); + void COMMENT(void); + + Token* next(void); + Token* Id(void); + Token* Number(void); + Token* Decimal(std::ostringstream& oss); + Token* Char(void); + Token* String(void); + Token* Symbol(void); + Token* SingleCharOp(void); + Token* MultiCharOp(void); +}; + + + +#endif diff --git a/source/dlparser/dlparser.cpp b/source/dlparser/dlparser.cpp new file mode 100644 index 0000000..690406e --- /dev/null +++ b/source/dlparser/dlparser.cpp @@ -0,0 +1,376 @@ +#include "dlparser.h" +#include "exception.h" + +DLParser::DLParser() : BTParser(new DLLexer()), ast(NULL) +{ +} + +void DLParser::parse(void) +{ + ast = Program(); +} + +AST* DLParser::getAST(void) +{ + return ast; +} + +bool DLParser::isMacro( Token* token ) +{ + bool ret = false; + if( (token->type() == ID) && (macros.find(token->text()) != macros.end()) ) + { + ret = true; + } + return ret; +} + +AST* DLParser::parseMacroParam(Param* param) +{ + AST* ret = NULL; + switch( param->type() ) + { + case ExpTyp: + ret = LogicalExpr(); + break; + + case BlockTyp: + ret = FuncLiteral(); + break; + + default: + Token* tok = lookaheadToken(1); + ostringstream oss; + oss << "Expected macro parameter type. Expected " << param->type() << ", received " << tok->type() << "."; + Exception ex( tok->line(), tok->column() ); + ex.setMessage(oss.str()); + break; + } + return ret; +} + +AST* DLParser::Program(void) +{ + AST* node = new AST( PROGRAM ); + while( lookaheadType(1) != EOF ) + { + node->addChild( Expression() ); + } + return node; +} + +AST* DLParser::Expression(void) +{ + AST* ret = NULL; + if((lookaheadType(1) == ID) && (lookaheadType(2) == ASSIGN)) + { + AST* id_node = new AST( ID,(char*)(lookaheadToken(1)->text().c_str()) ); + consume(); + match(ASSIGN); + ret = new AST( ASSIGN, 2, id_node, Expression()); + } + else if( (lookaheadType(1) == MACRO) && (lookaheadType(2) == ID)) + { + ret = MacroDefinition(); + } + else if( isMacro( lookaheadToken(1) ) ) + { + ret = MacroExpansion(); + } + else + { + ret = LogicalExpr(); + } + return ret; +} + +AST* DLParser::LogicalExpr(void) +{ + AST* ret = CompExpr(); + while((lookaheadType(1) == AND) || (lookaheadType(1) == OR)) + { + ret = new AST( lookaheadType(1), 1, ret); + consume(); + ret->addChild( CompExpr() ); + } + return ret; +} + +AST* DLParser::CompExpr(void) +{ + AST* ret = AddSubExpr(); + while( (lookaheadType(1) == EQ) || (lookaheadType(1) == NE) + || (lookaheadType(1) == LT) || (lookaheadType(1) == GT) + || (lookaheadType(1) == LTE) || (lookaheadType(1) == GTE)) + { + ret = new AST( lookaheadType(1), 1, ret); + consume(); + ret->addChild( AddSubExpr() ); + } + return ret; +} + +AST* DLParser::AddSubExpr(void) +{ + AST* ret = MulDivExpr(); + while((lookaheadType(1) == ADD) || (lookaheadType(1) == SUB)) + { + ret = new AST( lookaheadType(1), 1, ret); + consume(); + ret->addChild( MulDivExpr() ); + } + return ret; +} + +AST* DLParser::MulDivExpr(void) +{ + AST* ret = UnaryExpr(); + while((lookaheadType(1) == MUL) || (lookaheadType(1) == DIV)) + { + ret = new AST( lookaheadType(1), 1, ret); + consume(); + ret->addChild( UnaryExpr() ); + } + return ret; +} + +AST* DLParser::UnaryExpr(void) +{ + AST* ret = NULL; + if(lookaheadType(1) == NOT) + { + consume(); + ret = new AST(NOT, 1, GroupExpr() ); + } + else + { + ret = GroupExpr(); + } + return ret; +} + +AST* DLParser::GroupExpr(void) +{ + AST* ret = NULL; + if(lookaheadType(1) == LPAR) + { + match(LPAR); + ret = LogicalExpr(); + match(RPAR); + } + else + { + ret = Literal(); + if( lookaheadType(1) == LPAR ) + { + match(LPAR); + ret = new AST( FN_CALL, 2, ret, ExpList( LIST, RPAR ) ); + match(RPAR); + } + else if( lookaheadType(1) == LBRACK ) + { + match(LBRACK); + ret = new AST( ARRY_IDX, 2, ret, LogicalExpr() ); + match(RBRACK); + } + } + return ret; +} + +AST* DLParser::Literal(void) +{ + AST* node = NULL; + switch(lookaheadType(1)) + { + // Literal = VectorLiteral + case LBRACK: + node = VectorLiteral(); + break; + + // Literal = ListLiteral + case LIST: + node = ListLiteral(); + break; + + // Literal = FuncLiteral + case LBRACE: + node = FuncLiteral(); + break; + + // Literal = ID + case ID: + node = new AST( ID, lookaheadToken(1)->text() ); + consume(); + break; + + // Literal = NUM + case NUM: + node = new AST( NUM, lookaheadToken(1)->text() ); + consume(); + break; + + // Literal = CHAR + case CHAR: + node = new AST( CHAR, lookaheadToken(1)->text() ); + consume(); + break; + + // Literal = STRING + case STRING: + node = new AST( STRING, lookaheadToken(1)->text() ); + consume(); + break; + + // Literal = SYMBOL + case SYMBOL: + node = new AST( SYMBOL, lookaheadToken(1)->text() ); + consume(); + break; + + default: + Token* tok = lookaheadToken(1); + ostringstream oss; + oss << "Expected literal type, recieved type " << tok->type() << "."; + Exception ex( tok->line(), tok->column() ); + ex.setMessage(oss.str()); + throw ex; + } + return node; +} + +AST* DLParser::VectorLiteral(void) +{ + AST* ret = NULL; + match(LBRACK); + ret = ExpList(VECTOR, RBRACK); + match(RBRACK); + return ret; +} + +AST* DLParser::ListLiteral(void) +{ + AST* ret = NULL; + match(LIST); + match(LPAR); + ret = ExpList(LIST, RPAR); + match(RPAR); + return ret; +} + +AST* DLParser::FuncLiteral(void) +{ + AST* ret = NULL; + + match(LBRACE); + if(lookaheadType(1) == PIPE) + { + match(PIPE); + ret = ExpList(PARAMS, PIPE); + match(PIPE); + ret = new AST(FUNC, 2, ret, ExpBlock(BLOCK,RBRACE)); + } + else + { + ret = new AST(FUNC, 2, new AST(PARAMS), ExpBlock(BLOCK,RBRACE)); + } + match(RBRACE); + return ret; +} + +// MacroDefinition = '%' ID '(' MacroParamList ')' '{' Expression '}' +AST* DLParser::MacroDefinition(void) +{ + AST* ret = NULL; + AST* id = NULL; + AST* params = NULL; + AST* body = NULL; + Macro* macro = NULL; + + match(MACRO); + id = new AST( ID, lookaheadToken(1)->text() ); + consume(); + match(LPAR); + params = MacroParamList(); + match(RPAR); + match(LBRACE); + body = Expression(); + match(RBRACE); + ret = new AST( MACRO, 3, id, params, body ); + + macro = new Macro( ret ); + macros.insert( std::pair(id->text(), macro) ); + + return new AST(MACRO); +} + +AST* DLParser::MacroExpansion(void) +{ + AST* ret = NULL; + Macro* cur_macro = macros[ lookaheadToken(1)->text() ]; + list::const_iterator it = cur_macro->params().begin(); + + consume(); + for(; it != cur_macro->params().end(); it++) + { + (*it)->setValue( parseMacroParam( *it ) ); + } + ret = cur_macro->apply(); + + return ret; +} + +// MacroParamList = MacroParam (',' MacroParam)* +AST* DLParser::MacroParamList(void) +{ + AST* ret = new AST( PARAMS ); + ret->addChild( MacroParam() ); + while(lookaheadType(1) == COMMA) + { + match(COMMA); + ret->addChild( MacroParam() ); + } + return ret; +} + +// MacroParam = ID (':' ID)? +AST* DLParser::MacroParam(void) +{ + AST* ret = new AST( ID, lookaheadToken(1)->text() ); + consume(); + if( lookaheadType(1) == SEP ) + { + match(SEP); + AST* type = new AST( ID, lookaheadToken(1)->text() ); + consume(); + ret = new AST(SEP, 2, ret, type); + } + return ret; +} + +// ExpList = (Expression (',' Expression)*)? +AST* DLParser::ExpList(TokenType_T node_type, TokenType_T terminator) +{ + AST* node = new AST( node_type ); + if(lookaheadType(1) != terminator) + { + node->addChild( Expression() ); + while(lookaheadType(1) == COMMA) + { + match(COMMA); + node->addChild( Expression() ); + } + } + return node; +} + +// ExpBlock = Expression+ +AST* DLParser::ExpBlock(TokenType_T node_type, TokenType_T terminator) +{ + AST* node = new AST(node_type); + while(lookaheadType(1) != RBRACE) + { + node->addChild( Expression() ); + } + return node; +} + diff --git a/source/dlparser/dlparser.h b/source/dlparser/dlparser.h new file mode 100644 index 0000000..d00d1dd --- /dev/null +++ b/source/dlparser/dlparser.h @@ -0,0 +1,92 @@ +#ifndef DLPARSER_H +#define DLPARSER_H + +#include +#include "btparser.h" +#include "dllexer.h" +#include "macro.h" + +class DLParser : public BTParser +{ + private: + AST* ast; + std::map macros; + public: + DLParser(); + void parse(void); + AST* getAST(void); + bool isMacro(Token* token); + AST* parseMacroParam(Param* param); + + /********************************************************************** + * EBNF Syntax Grammar + *********************************************************************/ + // Program = Expression* + // + // Expression = ID '=' LogicalExpr + // | MacroDefinition + // | $MacroExpansion$ + // | LogicalExpr + // + // LogicalExpr = CompExpr (('&&' | '||') CompExpr)* + // + // CompExpr = AddSubExpr (('==' | '!=' | '<' | '>' | '<=' | '>=') AddSubExpr)* + // + // AddSubExpr = MulDivExpr (('+' | '-') MulDivExpr)* + // + // MulDivExpr = UnaryExpr (('*' | '/') UnaryExpr)* + // + // UnaryExpr = '!' GroupExpr + // | GroupExpr + // + // GroupExpr = '(' LogicalExpr ')' + // | Literal '(' ExpList ')' + // | Literal + // + // Literal = VectorLiteral + // | ListLiteral + // | FuncLiteral + // | ID + // | NUM + // | CHAR + // | STRING + // | SYMBOL + // + // VectorLiteral = '[' ExpList ']' + // + // ListLiteral = '`' '(' ExpList ')' + // + // FuncLiteral = '{' ExpBlock '}' + // | '{' '|' ExpList '|' ExpBlock '}' + // + // MacroDefinition = '%' ID '(' MacroParamList ')' '{' Expression '}' + // + // MacroParamList = MacroParam (',' MacroParam)* + // + // MacroParam = ID (':' ID)? + // + // ExpList = (GroupExpr (',' GroupExpr)*)? + // + // ExpBlock = Expression* + private: + AST* Program(void); + AST* Expression(void); + AST* LogicalExpr(void); + AST* CompExpr(void); + AST* AddSubExpr(void); + AST* MulDivExpr(void); + AST* UnaryExpr(void); + AST* GroupExpr(void); + AST* Literal(void); + AST* VectorLiteral(void); + AST* ListLiteral(void); + AST* FuncLiteral(void); + AST* MacroDefinition(void); + AST* MacroExpansion(void); + AST* MacroParamList(void); + AST* MacroParam(void); + AST* ExpList(TokenType_T node_type, TokenType_T terminator); + AST* ExpBlock(TokenType_T node_type, TokenType_T terminator); +}; + +#endif diff --git a/source/dlparser/macro/macro.c b/source/dlparser/macro/macro.c new file mode 100644 index 0000000..8542218 --- /dev/null +++ b/source/dlparser/macro/macro.c @@ -0,0 +1,49 @@ +#include "macro.h" +#include "macroapplication.h" + +Macro::Macro(AST* macro_def) +{ + list::iterator it = macro_def->children()->begin(); + + // Set Name + macro_name = (*it++)->text(); + + // Set Body + setUpParamList( *it++ ); + + // Set Params + macro_body = (*it++)->clone(); + +} + +Macro::~Macro() +{ + delete macro_body; +} + +const std::string& Macro::name(void) +{ + return macro_name; +} + +const std::list& Macro::params(void) +{ + return macro_params; +} + +AST* Macro::apply(void) +{ + MacroApplication application(macro_body->clone(), macro_params); + application.visit(); + return application.getAST()->clone(); +} + +void Macro::setUpParamList( AST* param_tree ) +{ + list::iterator it = param_tree->children()->begin(); + for(; it != param_tree->children()->end(); it++) + { + macro_params.push_back( new Param( *it ) ); + } +} + diff --git a/source/dlparser/macro/macro.h b/source/dlparser/macro/macro.h new file mode 100644 index 0000000..b95d728 --- /dev/null +++ b/source/dlparser/macro/macro.h @@ -0,0 +1,26 @@ +#ifndef MACRO_H +#define MACRO_H + +#include +#include +#include "param.h" +#include "ast.h" + +class Macro +{ + private: + std::string macro_name; + std::list macro_params; + AST* macro_body; + + void setUpParamList( AST* param_tree ); + public: + Macro(AST* macro_def); + ~Macro(); + + const std::string& name(void); + const std::list& params(void); + AST* apply(void); +}; + +#endif diff --git a/source/dlparser/macro/param.c b/source/dlparser/macro/param.c new file mode 100644 index 0000000..ac6a8bb --- /dev/null +++ b/source/dlparser/macro/param.c @@ -0,0 +1,57 @@ +#include "param.h" + +Param::Param(AST* param_def) +{ + int children = param_def->children()->size(); + if( children == 0 ) + { + param_name = param_def->text(); + } + else if( children == 2) + { + param_name = param_def->children()->front()->text(); + setType( param_def->children()->front()->text() ); + } + else + { + // Throw + } +} + +Param::~Param() +{ + delete param_value; +} + +std::string Param::name(void) +{ + return param_name; +} + +ParamType_T Param::type(void) +{ + return param_type; +} + +AST* Param::value(void) +{ + return param_value; +} + +void Param::setValue(AST* val) +{ + param_value = val; +} + +void Param::setType( const std::string& type_string ) +{ + if ( type_string.compare("Block") == 0 ) + { + param_type = BlockTyp; + } + else + { + param_type = ExpTyp; + } +} + diff --git a/source/dlparser/macro/param.h b/source/dlparser/macro/param.h new file mode 100644 index 0000000..79c209f --- /dev/null +++ b/source/dlparser/macro/param.h @@ -0,0 +1,31 @@ +#ifndef PARAM +#define PARAM + +#include +#include "ast.h" + +typedef enum { + ExpTyp, + BlockTyp +} ParamType_T; + +class Param +{ + private: + std::string param_name; + ParamType_T param_type; + AST* param_value; + + void setType( const std::string& type_string ); + + public: + Param(AST* param_def); + ~Param(); + + std::string name(void); + ParamType_T type(void); + AST* value(void); + void setValue(AST* val); +}; + +#endif diff --git a/source/main.cpp b/source/main.cpp new file mode 100644 index 0000000..3c8b8fc --- /dev/null +++ b/source/main.cpp @@ -0,0 +1,87 @@ +#include +#include +#include +#include +#include "dlparser.h" +#include "sexp.h" +#include "scheme.h" + +using namespace std; + +static bool fileExists(char* fname); +static string createTempFileName(string fname); + +int main(int argc, char** argv) +{ + int ret = 0; + + if( (argc == 2) && fileExists( argv[1] ) ) + { + string input_fname(argv[1]); + string temp_fname = createTempFileName( input_fname ); + DLParser parser; + Scheme* visitor = NULL; + + // Open the input and output files + ifstream input(input_fname.c_str()); + ofstream output(temp_fname.c_str()); + + // Parse the file + parser.setInput(&input); + parser.parse(); + + // Translate the AST + visitor = new Scheme( parser.getAST() ); + visitor->visit(); + + // Write to a temp file + output << visitor->str(); + cout << visitor->str(); + output.close(); + + // Compile temp file + system(("csc " + temp_fname).c_str()); + + //// delete temp file + remove(temp_fname.c_str()); + } + else + { + ret = 1; + } + + if(ret != 0) + { + // Print error code specific error + cout << "Usage: " << argv[0] << " \n" << endl; + cerr << "Error: No input files." << endl; + } + + return ret; +} + +bool fileExists(char* fname) +{ + string in_fname(fname); + ifstream file(fname,ifstream::in); + return (file != NULL); +} + +string createTempFileName(string fname) +{ + string ret_str; + size_t ext_index = fname.find_last_of('.'); + // If we did NOT find a match, assume no extension given + if (ext_index == string::npos) + { + ret_str = fname + ".scm"; + } + // else replace the existing extension + else + { + ret_str = fname; + ret_str.replace(ext_index, (ret_str.size() -1), ".scm"); + } + return ret_str; +} + diff --git a/source/parse_utils/ast/ast.cpp b/source/parse_utils/ast/ast.cpp new file mode 100644 index 0000000..35d14b7 --- /dev/null +++ b/source/parse_utils/ast/ast.cpp @@ -0,0 +1,113 @@ +#include "ast.h" +#include +#include +#include + +AST::AST(ASTNodeType type) +{ + node_type = type; + node_text = NULL; + node_children = new list(); +} + +AST::~AST() +{ + list::iterator it = node_children->begin(); + for(; it != node_children->end(); it++) + { + delete *(it); + } + delete node_children; + delete node_text; +} + +AST::AST(ASTNodeType type, const char* text) +{ + node_type = type; + node_text = new string(text); + node_children = new list(); +} + +AST::AST(ASTNodeType type, const std::string& text) +{ + node_type = type; + node_text = new string(text); + node_children = new list(); +} + +AST::AST(ASTNodeType type, int child_count, ...) +{ + va_list arg_list; + int i = 0; + node_type = type; + node_text = NULL; + node_children = new list(); + va_start (arg_list, child_count); + for (i = 0; i < child_count ; i++) + { + node_children->push_back( (AST*)va_arg(arg_list, AST*) ); + } + va_end(arg_list); +} + +AST& AST::operator = (AST& rhs) +{ + list::iterator it = rhs.children()->begin(); + node_type = rhs.type(); + *node_text = rhs.text(); + node_children->clear(); + + for(; it != rhs.children()->end(); it++) + { + node_children->push_back( (*it)->clone() ); + } + + return *this; +} + +ASTNodeType AST::type(void) +{ + return node_type; +} + +list* AST::children(void) +{ + return node_children; +} + +string AST::text(void) +{ + ostringstream oss; + if(node_text != NULL) + { + oss << node_text->c_str(); + } + return oss.str(); +} + +void AST::addChild(AST* node) +{ + node_children->push_back(node); +} + +AST* AST::clone(void) +{ + AST* new_clone = NULL; + list::iterator it = node_children->begin(); + + if(node_text == NULL) + { + new_clone = new AST( node_type ); + } + else + { + new_clone = new AST( node_type, *node_text ); + } + + for(; it != node_children->end(); it++) + { + new_clone->addChild( (*it)->clone() ); + } + return new_clone; +} + diff --git a/source/parse_utils/ast/ast.h b/source/parse_utils/ast/ast.h new file mode 100644 index 0000000..3ea3712 --- /dev/null +++ b/source/parse_utils/ast/ast.h @@ -0,0 +1,34 @@ +#ifndef AST_H +#define AST_H + +#include +#include +#include + +using namespace std; + +typedef unsigned int ASTNodeType; + +class AST +{ + protected: + ASTNodeType node_type; + string* node_text; + list* node_children; + public: + AST(ASTNodeType type); + AST(ASTNodeType type, const char* text); + AST(ASTNodeType type, const string& text); + AST(ASTNodeType type, int child_count, ...); + virtual ~AST(); + + AST& operator = (AST& rhs); + + ASTNodeType type(void); + string text(void); + list* children(void); + void addChild(AST* node); + AST* clone(void); +}; + +#endif diff --git a/source/parse_utils/exception/exception.cpp b/source/parse_utils/exception/exception.cpp new file mode 100644 index 0000000..cd4931b --- /dev/null +++ b/source/parse_utils/exception/exception.cpp @@ -0,0 +1,25 @@ +#include +#include "exception.h" + +Exception::Exception(int line, int column) throw() : std::exception(), ex_line(line), ex_column(column) +{ +} + +const char* Exception::what() const throw() +{ + std::ostringstream oss; + oss << "(ln " << ex_line << ", col " << ex_column << "): "; + oss << ((Exception*)this)->message() << std::endl; + return oss.str().c_str(); +} + +void Exception::setMessage(std::string msg) throw() +{ + ex_msg = msg; +} + +std::string& Exception::message(void) throw() +{ + return ex_msg; +} + diff --git a/source/parse_utils/exception/exception.h b/source/parse_utils/exception/exception.h new file mode 100644 index 0000000..93679d2 --- /dev/null +++ b/source/parse_utils/exception/exception.h @@ -0,0 +1,21 @@ +#ifndef EXCEPTION_H +#define EXCEPTION_H + +#include +#include + +class Exception : public std::exception +{ + protected: + int ex_line; + int ex_column; + std::string ex_msg; + public: + Exception(int line, int column) throw(); + virtual ~Exception() throw() {}; + virtual const char* what() const throw(); + void setMessage(std::string msg) throw(); + std::string& message(void) throw(); +}; + +#endif diff --git a/source/parse_utils/lexer/lexer.cpp b/source/parse_utils/lexer/lexer.cpp new file mode 100644 index 0000000..d84c25b --- /dev/null +++ b/source/parse_utils/lexer/lexer.cpp @@ -0,0 +1,80 @@ +#include +#include "lexer.h" +#include "exception.h" + +using namespace std; + +Lexer::Lexer() : line(-1), column(-1) +{ +} + +Lexer::~Lexer() +{ +} + +void Lexer::setInput(char* in) +{ + line = 1; + column = 0; + input = new istringstream( string( in ) ); + consume(); +} + +void Lexer::setInput(string& in) +{ + line = 1; + column = 0; + input = new istringstream( in ); + consume(); +} + +void Lexer::setInput(istream* in) +{ + line = 1; + column = 0; + input = in; + consume(); +} + +bool Lexer::eof(void) +{ + return ((input == NULL) || (input->eof())); +} + +void Lexer::consume(void) +{ + if(input->eof()) + { + current = EOF; + } + else + { + current = input->get(); + if(current == '\n') + { + line++; + column = 0; + } + else + { + column++; + } + } +} + +void Lexer::match(char x) { + if ( current == x) + { + consume(); + } + else + { + ostringstream oss; + oss << "Unexpected character. Expected " << x << ", received " << current << "."; + Exception ex(line,column); + ex.setMessage(oss.str()); + throw ex; + } +} + + diff --git a/source/parse_utils/lexer/lexer.h b/source/parse_utils/lexer/lexer.h new file mode 100644 index 0000000..3b89235 --- /dev/null +++ b/source/parse_utils/lexer/lexer.h @@ -0,0 +1,30 @@ +#ifndef LEXER_H +#define LEXER_H + +#include +#include +#include +#include "token.h" + +class Lexer +{ + public: + int line; + int column; + char current; + std::istream* input; + + Lexer(); + virtual ~Lexer(); + + void setInput(char* in); + void setInput(std::string& in); + void setInput(std::istream* in); + + void consume(void); + void match(char x); + bool eof(void); + virtual Token* next(void) = 0; +}; + +#endif diff --git a/source/parse_utils/lexer/token/token.cpp b/source/parse_utils/lexer/token/token.cpp new file mode 100644 index 0000000..9b68106 --- /dev/null +++ b/source/parse_utils/lexer/token/token.cpp @@ -0,0 +1,30 @@ +#include "token.h" + +Token::Token(TokenType_T ttype, std::string ttext, int line, int col) : tok_type(ttype), tok_text(ttext), tok_line(line), tok_col(col) +{ +} + +Token::Token(TokenType_T ttype, int line, int col) : tok_type(ttype), tok_line(line), tok_col(col) +{ +} + +TokenType_T Token::type() +{ + return tok_type; +} + +const std::string& Token::text() +{ + return tok_text; +} + +int Token::line() +{ + return tok_line; +} + +int Token::column() +{ + return tok_col; +} + diff --git a/source/parse_utils/lexer/token/token.h b/source/parse_utils/lexer/token/token.h new file mode 100644 index 0000000..32381b6 --- /dev/null +++ b/source/parse_utils/lexer/token/token.h @@ -0,0 +1,24 @@ +#ifndef TOKEN_H +#define TOKEN_H + +#include + +typedef int TokenType_T; + +class Token +{ + private: + TokenType_T tok_type; + std::string tok_text; + int tok_line; + int tok_col; + public: + Token(TokenType_T ttype, int line, int col); + Token(TokenType_T ttype, std::string ttext, int line, int col); + TokenType_T type(); + const std::string& text(); + int line(); + int column(); +}; + +#endif diff --git a/source/parse_utils/parser/btparser/btparser.cpp b/source/parse_utils/parser/btparser/btparser.cpp new file mode 100644 index 0000000..782174f --- /dev/null +++ b/source/parse_utils/parser/btparser/btparser.cpp @@ -0,0 +1,117 @@ +#include "BTParser.h" +#include "exception.h" + +BTParser::BTParser(Lexer* lxer) : lexer(lxer), current(0) +{ +} + +BTParser::~BTParser() +{ + if(lexer != NULL) + { + delete lexer; + // Input stream was deleted with the lexer so null it out + Parser::setInput((istream*)NULL); + } +} + +void BTParser::setInput(char* in) +{ + Parser::setInput(in); + lexer->setInput(in); +} + +void BTParser::setInput(string& in) +{ + Parser::setInput(in); + lexer->setInput(in); +} + +void BTParser::setInput(istream* in) +{ + Parser::setInput(in); + lexer->setInput(in); +} + +void BTParser::consume(void) +{ + current++; + if((current == lookahead.size()) && !isSpeculating()) + { + current = 0; + lookahead.clear(); + } + sync(1); +} + +void BTParser::sync(unsigned int i) +{ + unsigned int next_index = current + i - 1; + unsigned int max_index = (lookahead.size() == 0) ? 0 : (lookahead.size() - 1); + if( next_index >= max_index ) + { + fill( next_index - max_index); + } +} + +void BTParser::fill(unsigned int n) +{ + unsigned int i = 0; + for (i = 0; i <= n; i++) + { + lookahead.push_back( lexer->next() ); + } +} + +void BTParser::match(TokenType_T type) +{ + if( lookaheadType(1) == type ) + { + consume(); + } + else + { + Token* tok = lookaheadToken(1); + ostringstream oss; + oss << "Expected token type. Expected " << type << ", received " << tok->type() << "."; + Exception ex( tok->line(), tok->column() ); + ex.setMessage(oss.str()); + } +} + +Token* BTParser::lookaheadToken(unsigned int i) +{ + sync(i); + return lookahead.at( current + i - 1 ); +} + +TokenType_T BTParser::lookaheadType(unsigned int i) +{ + + Token* tok = lookaheadToken(i); + return (tok != NULL) ? tok->type() : EOF; +} + +unsigned int BTParser::mark(void) +{ + markers.push_back(current); + return current; +} + +void BTParser::release(void) +{ + unsigned int marker = markers.back(); + markers.pop_back(); + seek(marker); +} + +void BTParser::seek(unsigned int index) +{ + current = index; +} + +bool BTParser::isSpeculating(void) +{ + return (markers.size() > 0); +} + diff --git a/source/parse_utils/parser/btparser/btparser.h b/source/parse_utils/parser/btparser/btparser.h new file mode 100644 index 0000000..3b032b4 --- /dev/null +++ b/source/parse_utils/parser/btparser/btparser.h @@ -0,0 +1,39 @@ +#ifndef BT_PARSER_H +#define BT_PARSER_H + +#include +#include +#include "parser.h" +#include "lexer.h" +#include "ast.h" + +class BTParser : public Parser +{ + private: + Lexer* lexer; + unsigned int current; + std::vector markers; + std::vector lookahead; + public: + BTParser(Lexer* lxer); + ~BTParser(); + + void setInput(char* in); + void setInput(string& in); + void setInput(istream* in); + + void consume(void); + void sync(unsigned int i); + void fill(unsigned int n); + void match(TokenType_T type); + Token* lookaheadToken(unsigned int i); + TokenType_T lookaheadType(unsigned int i); + unsigned int mark(void); + void release(void); + void seek(unsigned int index); + bool isSpeculating(void); + + virtual void parse(void) = 0; +}; + +#endif diff --git a/source/parse_utils/parser/llkparser/llkparser.cpp b/source/parse_utils/parser/llkparser/llkparser.cpp new file mode 100644 index 0000000..db86ece --- /dev/null +++ b/source/parse_utils/parser/llkparser/llkparser.cpp @@ -0,0 +1,101 @@ +#include "llkparser.h" +#include "exception.h" + +LLKParser::LLKParser(int k_val, Lexer* lxer) : k(k_val), next(0), lexer(lxer) +{ + if ( lexer != NULL ) + { + lookahead = new Token*[k]; + } + else + { + throw std::exception(); + } +} + +LLKParser::~LLKParser() +{ + if(lexer != NULL) + { + delete lexer; + // Input stream was deleted with th elexer so null it out + Parser::setInput((istream*)NULL); + } + if (lookahead != NULL) + { + delete[] lookahead; + } +} + +void LLKParser::setInput(char* in) +{ + Parser::setInput(in); + lexer->setInput(in); + for (int i = 0; i < k; i++) + { + consume(); + } +} + +void LLKParser::setInput(string& in) +{ + Parser::setInput(in); + lexer->setInput(in); + for (int i = 0; i < k; i++) + { + consume(); + } +} + +void LLKParser::setInput(istream* in) +{ + Parser::setInput(in); + lexer->setInput(in); + for (int i = 0; i < k; i++) + { + consume(); + } +} + +void LLKParser::consume(void) +{ + if ( lookahead != NULL ) + { + lookahead[next] = lexer->next(); + next = (next + 1) % k; + } +} + +void LLKParser::match(TokenType_T type) +{ + if( lookaheadType(1) == type ) + { + consume(); + } + else + { + throw std::exception(); + } +} + +Token* LLKParser::lookaheadToken(int i) +{ + Token* ret = NULL; + if( lookahead != NULL ) + { + ret = lookahead[(next + i - 1) % k]; + } + return ret; +} + +TokenType_T LLKParser::lookaheadType(int i) +{ + TokenType_T ret = EOF; + if( lookahead != NULL ) + { + Token* tok = lookaheadToken(i); + ret = (tok != NULL) ? tok->type() : EOF; + } + return ret; +} + diff --git a/source/parse_utils/parser/llkparser/llkparser.h b/source/parse_utils/parser/llkparser/llkparser.h new file mode 100644 index 0000000..ab1fe51 --- /dev/null +++ b/source/parse_utils/parser/llkparser/llkparser.h @@ -0,0 +1,31 @@ +#ifndef LLK_PARSER_H +#define LLK_PARSER_H + +#include +#include "parser.h" +#include "lexer.h" +#include "ast.h" + +class LLKParser : public Parser +{ + private: + int k; + int next; + Lexer* lexer; + Token** lookahead; + public: + LLKParser(int k_val, Lexer* lxer); + ~LLKParser(); + + void setInput(char* in); + void setInput(string& in); + void setInput(istream* in); + + void consume(void); + void match(TokenType_T type); + Token* lookaheadToken(int i); + TokenType_T lookaheadType(int i); + virtual void parse(void) = 0; +}; + +#endif diff --git a/source/parse_utils/parser/parser.cpp b/source/parse_utils/parser/parser.cpp new file mode 100644 index 0000000..a7eee89 --- /dev/null +++ b/source/parse_utils/parser/parser.cpp @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (C) 2001 Michael D. Lowis + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + *****************************************************************************/ +/****************************************************************************** + * Includes and Prototypes + *****************************************************************************/ +#include +#include "parser.h" + +using namespace std; + +/****************************************************************************** + * Public Functions + *****************************************************************************/ +Parser::Parser() : input(NULL) +{ +} + +Parser::~Parser() +{ + if(input != NULL) + { + delete input; + } +} + +void Parser::setInput(char* in) +{ + input = new istringstream( string( in ) ); +} + +void Parser::setInput(string& in) +{ + input = new istringstream( in ); +} + +void Parser::setInput(istream* in) +{ + input = in; +} + + diff --git a/source/parse_utils/parser/parser.h b/source/parse_utils/parser/parser.h new file mode 100644 index 0000000..929334f --- /dev/null +++ b/source/parse_utils/parser/parser.h @@ -0,0 +1,40 @@ +/****************************************************************************** + * Copyright (C) 2001 Michael D. Lowis + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + *****************************************************************************/ +#ifndef PARSER_H +#define PARSER_H + +#include +#include +#include "ast.h" +#include "visitor.h" + +using namespace std; + +class Parser { + private: + istream* input; + public: + Parser(); + virtual ~Parser(); + virtual void parse() = 0; + + void setInput(char* in); + void setInput(string& in); + void setInput(istream* in); +}; + +#endif diff --git a/source/parse_utils/visitor/visitor.cpp b/source/parse_utils/visitor/visitor.cpp new file mode 100644 index 0000000..71c3ccf --- /dev/null +++ b/source/parse_utils/visitor/visitor.cpp @@ -0,0 +1,35 @@ +#include "visitor.h" +#include + +using namespace std; + +void Visitor::visit(AST* cur, int depth) +{ + list* children; + list::iterator it; + + // If we are just starting then use the global tree + if(cur == NULL) cur = ast; + + // Execute or pre-walk actions + if(depth == 0) beforeVisit( cur, depth ); + + // Setup our locals + children = cur->children(); + it = children->begin(); + + // Visit the tree + beforeChildren(cur,depth); + depth++; + for(; it != children->end(); it++) + { + beforeChild( *it, depth ); + visit( *it, depth ); + afterChild( *it, depth ); + } + afterChildren(cur,depth); + + // Execute our post-walk actions + if(depth == 1) afterVisit( cur, depth ); +} + diff --git a/source/parse_utils/visitor/visitor.h b/source/parse_utils/visitor/visitor.h new file mode 100644 index 0000000..b93359e --- /dev/null +++ b/source/parse_utils/visitor/visitor.h @@ -0,0 +1,29 @@ +#ifndef TRANSLATOR_H +#define TRANSLATOR_H + +#include "ast.h" +#include +#include + +class Visitor { + protected: + AST* ast; + public: + Visitor(AST* tree) : ast(tree) {}; + ~Visitor() { delete ast; } + void visit(AST* cur = NULL, int depth = 0); + private: + virtual void beforeVisit(AST* cur, int depth) = 0; + virtual void afterVisit(AST* cur, int depth) = 0; + virtual void beforeChildren(AST* cur, int depth) = 0; + virtual void afterChildren(AST* cur, int depth) = 0; + virtual void beforeChild(AST* cur, int depth) = 0; + virtual void afterChild(AST* cur, int depth) = 0; +}; + +class VisitorFactory { + public: + virtual Visitor* createVisitor(AST* root) = 0; +}; + +#endif diff --git a/source/visitors/macroapplication/macroapplication.cpp b/source/visitors/macroapplication/macroapplication.cpp new file mode 100644 index 0000000..4cdbf04 --- /dev/null +++ b/source/visitors/macroapplication/macroapplication.cpp @@ -0,0 +1,57 @@ +#include "MacroApplication.h" +#include "dllexer.h" + +using namespace std; + +Param* MacroApplication::getParamByName(std::string name) +{ + Param* ret = NULL; + std::list::iterator it = macro_params.begin(); + for(; it != macro_params.end(); it++) + { + if( (*it)->name().compare( name ) == 0) + { + ret = *it; + break; + } + } + return ret; +} + +AST* MacroApplication::getAST(void) +{ + return mod_ast; +} + +void MacroApplication::beforeVisit(AST* cur, int depth) +{ +} + +void MacroApplication::afterVisit(AST* cur, int depth) +{ +} + +void MacroApplication::beforeChildren(AST* cur, int depth) +{ + if(cur->type() == ID) + { + Param* param = getParamByName( cur->text() ); + if( param != NULL ) + { + (*cur) = *(param->value()); + } + } +} + +void MacroApplication::afterChildren(AST* cur, int depth) +{ +} + +void MacroApplication::beforeChild(AST* cur, int depth) +{ +} + +void MacroApplication::afterChild(AST* cur, int depth) +{ +} + diff --git a/source/visitors/macroapplication/macroapplication.h b/source/visitors/macroapplication/macroapplication.h new file mode 100644 index 0000000..0c43449 --- /dev/null +++ b/source/visitors/macroapplication/macroapplication.h @@ -0,0 +1,27 @@ +#ifndef MacroApplication_H +#define MacroApplication_H + +#include "visitor.h" +#include +#include +#include "param.h" + +class MacroApplication : public Visitor { + protected: + AST* mod_ast; + ostringstream stream; + std::list macro_params; + public: + MacroApplication(AST* root,std::list& params) : Visitor(root), mod_ast(root), macro_params(params) {}; + Param* getParamByName(std::string name); + AST* getAST(void); + private: + void beforeVisit(AST* cur, int depth); + void afterVisit(AST* cur, int depth); + void beforeChildren(AST* cur, int depth); + void afterChildren(AST* cur, int depth); + void beforeChild(AST* cur, int depth); + void afterChild(AST* cur, int depth); +}; + +#endif diff --git a/source/visitors/scheme/scheme.cpp b/source/visitors/scheme/scheme.cpp new file mode 100644 index 0000000..8d6e259 --- /dev/null +++ b/source/visitors/scheme/scheme.cpp @@ -0,0 +1,190 @@ +#include +#include "scheme.h" + +using namespace std; + +Scheme::Scheme(AST* root) : Visitor(root) { + ifstream input("res/environment.scm"); + if (input.is_open()) + { + while ( input.good() ) + { + string line; + getline(input,line); + stream << line << endl; + } + } + input.close(); +} + +string Scheme::str() +{ + return stream.str(); +} + +string Scheme::typeToString(ASTNodeType type) +{ + ostringstream ret; + + switch (type) + { + case ID: + ret << "ID "; break; + case NUM: + ret << "NUM "; break; + case CHAR: + ret << "CHAR "; break; + case ADD: + ret << "ADD "; break; + case SUB: + ret << "SUB "; break; + case MUL: + ret << "MUL "; break; + case DIV: + ret << "DIV "; break; + case AND: + ret << "and "; break; + case OR: + ret << "or "; break; + case NOT: + ret << "NOT "; break; + case EQ: + ret << "EQ "; break; + case NE: + ret << "NE "; break; + case LT: + ret << "LT "; break; + case GT: + ret << "GT "; break; + case LTE: + ret << "LTE "; break; + case GTE: + ret << "GTE "; break; + case MACRO: + ret << "MACRO "; break; + case ASSIGN: + ret << "define "; break; + case PROGRAM: + ret << "begin "; break; + case VECTOR: + ret << "VECTOR "; break; + case LIST: + ret << "LIST "; break; + case BLOCK: + ret << "begin "; break; + case FUNC: + ret << "lambda "; break; + case FN_CALL: + ret << "FN_CALL "; break; + case ARRY_IDX: + ret << "ARRY_IDX "; break; + case PARAMS: + break; + default: + ret << type; break; + } + + return ret.str(); +} + +void Scheme::beforeVisit(AST* cur, int depth) +{ +} + +void Scheme::afterVisit(AST* cur, int depth) +{ + stream << endl; +} + +void Scheme::beforeChildren(AST* cur, int depth) +{ + if( isDatatype( cur->type() ) ) + { + printDatatype( cur ); + } + else + { + stream << "(" << typeToString( cur->type() ) << cur->text(); + } +} + +void Scheme::afterChildren(AST* cur, int depth) +{ + if( !isDatatype( cur->type() ) ) + { + stream << ")"; + } +} + +void Scheme::beforeChild(AST* cur, int depth) +{ + stream << endl; + for(int i = 0; i< depth; i++) + { + stream << " "; + } +} + +void Scheme::afterChild(AST* cur, int depth) +{ +} + +bool Scheme::isDatatype(ASTNodeType type) +{ + bool ret = false; + switch(type) + { + case ID: + case NUM: + case CHAR: + case STRING: + case SYMBOL: + ret = true; + break; + default: + break; + } + return ret; +} + +void Scheme::printDatatype(AST* cur) +{ + switch(cur->type()) + { + case ID: + stream << "dl/" << cur->text(); + break; + case NUM: + stream << cur->text(); + break; + case CHAR: + charToString( cur->text() ); + break; + case STRING: + stream << '"' << cur->text() << '"'; + break; + case SYMBOL: + stream << '\'' << cur->text(); + break; + default: + break; + } +} + +void Scheme::charToString(string ch) +{ + switch(ch.at(0)) + { + case ' ': + stream << "#\\space"; + break; + case '\n': + stream << "#\\newline"; + break; + case '\r': + stream << "#\\return"; + break; + default: + stream << "#\\" << ch; + } +} diff --git a/source/visitors/scheme/scheme.h b/source/visitors/scheme/scheme.h new file mode 100644 index 0000000..e477f4c --- /dev/null +++ b/source/visitors/scheme/scheme.h @@ -0,0 +1,28 @@ +#ifndef Scheme_H +#define Scheme_H + +#include +#include +#include "visitor.h" +#include "dllexer.h" + +class Scheme : public Visitor { + protected: + ostringstream stream; + public: + Scheme(AST* root); + string str(); + string typeToString(ASTNodeType type); + bool isDatatype(ASTNodeType type); + void printDatatype(AST* cur); + void charToString(string ch); + private: + void beforeVisit(AST* cur, int depth); + void afterVisit(AST* cur, int depth); + void beforeChildren(AST* cur, int depth); + void afterChildren(AST* cur, int depth); + void beforeChild(AST* cur, int depth); + void afterChild(AST* cur, int depth); +}; + +#endif diff --git a/source/visitors/sexp/sexp.cpp b/source/visitors/sexp/sexp.cpp new file mode 100644 index 0000000..f49d787 --- /dev/null +++ b/source/visitors/sexp/sexp.cpp @@ -0,0 +1,41 @@ +#include "sexp.h" + +using namespace std; + +string SEXP::str() +{ + return stream.str(); +} + +void SEXP::beforeVisit(AST* cur, int depth) +{ +} + +void SEXP::afterVisit(AST* cur, int depth) +{ + stream << endl; +} + +void SEXP::beforeChildren(AST* cur, int depth) +{ + stream << "(" << cur->type() << " " << cur->text(); +} + +void SEXP::afterChildren(AST* cur, int depth) +{ + stream << ")"; +} + +void SEXP::beforeChild(AST* cur, int depth) +{ + stream << endl; + for(int i = 0; i< depth; i++) + { + stream << " "; + } +} + +void SEXP::afterChild(AST* cur, int depth) +{ +} + diff --git a/source/visitors/sexp/sexp.h b/source/visitors/sexp/sexp.h new file mode 100644 index 0000000..16cf992 --- /dev/null +++ b/source/visitors/sexp/sexp.h @@ -0,0 +1,23 @@ +#ifndef SEXP_H +#define SEXP_H + +#include "visitor.h" +#include +#include + +class SEXP : public Visitor { + protected: + ostringstream stream; + public: + SEXP(AST* root) : Visitor(root) {}; + string str(); + private: + void beforeVisit(AST* cur, int depth); + void afterVisit(AST* cur, int depth); + void beforeChildren(AST* cur, int depth); + void afterChildren(AST* cur, int depth); + void beforeChild(AST* cur, int depth); + void afterChild(AST* cur, int depth); +}; + +#endif diff --git a/tests/source/main.h b/tests/source/main.h new file mode 100644 index 0000000..359d9a8 --- /dev/null +++ b/tests/source/main.h @@ -0,0 +1,18 @@ +#include + +class MyTestSuite2 : public CxxTest::TestSuite +{ +public: + void testAddition(void) + { + TS_ASSERT(1 + 1 > 1); + TS_ASSERT_EQUALS(1 + 1, 2); + } + + void testMultiplication(void) + { + TS_TRACE("Starting multiplication test"); + TS_ASSERT_EQUALS(2 * 2, 5); + TS_TRACE("Finishing multiplication test"); + } +}; diff --git a/tests/system/system_tests.dl b/tests/system/system_tests.dl new file mode 100644 index 0000000..ce94648 --- /dev/null +++ b/tests/system/system_tests.dl @@ -0,0 +1,118 @@ +#------------------------------------------------------------------------------ +# Macro Tests +#------------------------------------------------------------------------------ +# Macro Definitions +% if ( cond, branch1:Block ) { + exec_if( cond, branch1 ) +} + +% ifelse ( cond, branch1:Block, branch2:Block ) { + exec_if( cond, branch1, branch2 ) +} + +% foreach ( lst, fn:Block ) { + for_each(fn, lst) +} + +# Possible New Macro Syntax +# _ Macro Name +# Exp Expression +# Vctr Vector +# Lst List +# Blk Block +# ID ID +# Num Number +# Chr Character +# Str String +# Sym Symbol +#% if { +# (_ Exp Blk) : exec_if( $1, $2 ) +# (_ Exp Blk Blk) : exec_if( $1, $2, $3 ) +#} +# +#% if { +# (_ Exp Blk) : exec_if( $1, $2 ) +# (_ Exp Blk ID(else) Blk) : exec_if( $1, $2, $3 ) +#} + +# Macro Uses +if (1 == 1) +{ + print("1 Hello, World!") +} + +if (1 == 0) +{ + print("Hello, World!") +} + +ifelse (1 == 1) +{ + print("2 Hello, World!") +}{ + error("Incorrect branch was taken.") +} + +ifelse (1 == 0) +{ + error("Incorrect branch was taken.") +}{ + print("3 Hello, World!") +} + +#------------------------------------------------------------------------------ +# Collection Access and Iteration Tests +#------------------------------------------------------------------------------ +# Accessing elements of lists, vectors, and strings +lst1 = `(4,5,6) +print(lst1[0], " Hello, World!") + +vec1 = [4,5,6] +print(vec1[1], " Hello, World!") + +str1 = "456" +print(str1[2], " Hello, World!") + +# Iterating over lists, vectors, and strings +lst_foo = `(7,8,9,10) +foreach lst_foo { |a| + print(a," Hello, World!") +} + +vec_foo = [11,12,13,14,15] +foreach vec_foo { |a,b| + print(b," Hello, World!") +} + +str_foo = "6789" +foreach str_foo { |a| + print(1,a," Hello, World!") +} + +#------------------------------------------------------------------------------ +# Delayed Evaluation +#------------------------------------------------------------------------------ +% delay ( exp ) { + make_promise({ exp }) +} + +% force ( prom ) { + force( prom ) +} + +foo = delay nonexistent_var + 1 +nonexistent_var = 19 +assert( typeof(foo) == Block ) +assert( typeof( force foo ) == Num ) +print( force( foo ), " Hello, World!" ) + +#------------------------------------------------------------------------------ +# Type Checking Tests +#------------------------------------------------------------------------------ +assert( typeof( 1.1 ) == Num ) +assert( typeof( 'A' ) == Char ) +assert( typeof( `(1,2,3) ) == List ) +assert( typeof( [1,2,3] ) == Vector ) +assert( typeof( $Foo ) == Symbol ) +assert( typeof( {|a| a + 1} ) == Block ) + diff --git a/tools/cxxtest/COPYING b/tools/cxxtest/COPYING new file mode 100644 index 0000000..b1e3f5a --- /dev/null +++ b/tools/cxxtest/COPYING @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/tools/cxxtest/README b/tools/cxxtest/README new file mode 100644 index 0000000..437202c --- /dev/null +++ b/tools/cxxtest/README @@ -0,0 +1,42 @@ +Overview +-------- + +CxxTest is a unit testing framework for C++ that is similar in +spirit to JUnit, CppUnit, and xUnit. CxxTest is easy to use because +it does not require precompiling a CxxTest testing library, it +employs no advanced features of C++ (e.g. RTTI) and it supports a +very flexible form of test discovery. + +CxxTest is available under the GNU Lesser General Public Licence (LGPL). + +A user guide is available in doc/guide.pdf. + + +A Simple Example +---------------- + +1. Create a test suite header file: + +MyTest.h: + #include + + class MyTestSuite : public CxxTest::TestSuite + { + public: + void testAddition( void ) + { + TS_ASSERT( 1 + 1 > 1 ); + TS_ASSERT_EQUALS( 1 + 1, 2 ); + } + }; + + +2. Generate the tests file: + + # cxxtestgen --error-printer -o tests.cpp MyTestSuite.h + +3. Compile and run! + + # g++ -o main main.cpp tests.cpp + # ./main + Running 1 test(s).OK! diff --git a/tools/cxxtest/Versions b/tools/cxxtest/Versions new file mode 100644 index 0000000..ccc7ad9 --- /dev/null +++ b/tools/cxxtest/Versions @@ -0,0 +1,152 @@ + +CxxTest Releases +---------------- + +* Version 4.0.3 (2012-01-07) + - Adding support for Python 2.4 - 3.2 + - Various cleanup of CxxTest root directory + - Adding patch that allows the cxxtestgen script to be used when symlinked. + +* Version 4.0.2 (2012-01-02) + - Bug fix to enable installation of cxxtestgen without the 'setuptools' package + +* Version 4.0.1 (2012-01-01) + - Documentation updates + - Bug fix for installation of cxxtestgen script + +* Version 4.0 (2011-12-28) + - Perl is no longer used to support CxxTest scripts. Python is now the only scripting language used by CxxTest. + - The testing scripts have been rewritten using the PyUnit framework. + - The installation process for CxxTest now leverages and integrates with the system Python installation. + - A more comprehensive C++ parser is now available, which supports testing of templates. + - The CxxTest GUI is no longer supported, and the <> is deprecated. + - CxxTest runners now have a command-line interface that facilitates interative use of the test runner. + - A new user guide is now available in PDF, HTML and Ebook formats. + +* Version 3.10.1 (2004-12-01) + - Improved support for VC7 + - Fixed clash with some versions of STL + +* Version 3.10.0 (2004-11-20) + - Added mock framework for global functions + - Added TS_ASSERT_THROWS_ASSERT and TS_ASSERT_THROWS_EQUALS + - Added CXXTEST_ENUM_TRAITS + - Improved support for STL classes (vector, map etc.) + - Added support for Digital Mars compiler + - Reduced root/part compilation time and binary size + - Support C++-style commenting of tests + +* Version 3.9.1 (2004-01-19) + - Fixed small bug with runner exit code + - Embedded test suites are now deprecated + +* Version 3.9.0 (2004-01-17) + - Added TS_TRACE + - Added --no-static-init + - CxxTest::setAbortTestOnFail() works even without --abort-on-fail + +* Version 3.8.5 (2004-01-08) + - Added --no-eh + - Added CxxTest::setAbortTestOnFail() and CXXTEST_DEFAULT_ABORT + - Added CxxTest::setMaxDumpSize() + - Added StdioFilePrinter + +* Version 3.8.4 (2003-12-31) + - Split distribution into cxxtest and cxxtest-selftest + - Added `sample/msvc/FixFiles.bat' + +* Version 3.8.3 (2003-12-24) + - Added TS_ASSERT_PREDICATE + - Template files can now specify where to insert the preamble + - Added a sample Visual Studio workspace in `sample/msvc' + - Can compile in MSVC with warning level 4 + - Changed output format slightly + +* Version 3.8.1 (2003-12-21) + - Fixed small bug when using multiple --part files. + - Fixed X11 GUI crash when there's no X server. + - Added GlobalFixture::setUpWorld()/tearDownWorld() + - Added leaveOnly(), activateAllTests() and `sample/only.tpl' + - Should now run without warnings on Sun compiler. + +* Version 3.8.0 (2003-12-13) + - Fixed bug where `Root.cpp' needed exception handling + - Added TS_ASSERT_RELATION + - TSM_ macros now also tell you what went wrong + - Renamed Win32Gui::free() to avoid clashes + - Now compatible with more versions of Borland compiler + - Improved the documentation + +* Version 3.7.1 (2003-09-29) + - Added --version + - Compiles with even more exotic g++ warnings + - Win32 Gui compiles with UNICODE + - Should compile on some more platforms (Sun Forte, HP aCC) + +* Version 3.7.0 (2003-09-20) + - Added TS_ASSERT_LESS_THAN_EQUALS + - Minor cleanups + +* Version 3.6.1 (2003-09-15) + - Improved QT GUI + - Improved portability some more + +* Version 3.6.0 (2003-09-04) + - Added --longlong + - Some portability improvements + +* Version 3.5.1 (2003-09-03) + - Major internal rewrite of macros + - Added TS_ASSERT_SAME_DATA + - Added --include option + - Added --part and --root to enable splitting the test runner + - Added global fixtures + - Enhanced Win32 GUI with timers, -keep and -title + - Now compiles with strict warnings + +* Version 3.1.1 (2003-08-27) + - Fixed small bug in TS_ASSERT_THROWS_*() + +* Version 3.1.0 (2003-08-23) + - Default ValueTraits now dumps value as hex bytes + - Fixed double invocation bug (e.g. TS_FAIL(functionWithSideEffects())) + - TS_ASSERT_THROWS*() are now "abort on fail"-friendly + - Win32 GUI now supports Windows 98 and doesn't need comctl32.lib + +* Version 3.0.1 (2003-08-07) + - Added simple GUI for X11, Win32 and Qt + - Added TS_WARN() macro + - Removed --exit-code + - Improved samples + - Improved support for older (pre-std::) compilers + - Made a PDF version of the User's Guide + +* Version 2.8.4 (2003-07-21) + - Now supports g++-3.3 + - Added --have-eh + - Fixed bug in numberToString() + +* Version 2.8.3 (2003-06-30) + - Fixed bugs in cxxtestgen.pl + - Fixed warning for some compilers in ErrorPrinter/StdioPrinter + - Thanks Martin Jost for pointing out these problems! + +* Version 2.8.2 (2003-06-10) + - Fixed bug when using CXXTEST_ABORT_TEST_ON_FAIL without standard library + - Added CXXTEST_USER_TRAITS + - Added --abort-on-fail + +* Version 2.8.1 (2003-01-16) + - Fixed charToString() for negative chars + +* Version 2.8.0 (2003-01-13) + - Added CXXTEST_ABORT_TEST_ON_FAIL for xUnit-like behaviour + - Added `sample/winddk' + - Improved ValueTraits + - Improved output formatter + - Started version history + +* Version 2.7.0 (2002-09-29) + - Added embedded test suites + - Major internal improvements + diff --git a/tools/cxxtest/admin/cxxtest.spec b/tools/cxxtest/admin/cxxtest.spec new file mode 100644 index 0000000..b25f135 --- /dev/null +++ b/tools/cxxtest/admin/cxxtest.spec @@ -0,0 +1,37 @@ +Name: cxxtest +Summary: CxxTest Testing Framework for C++ +Version: %{version} +Release: 1 +Copyright: LGPL +Group: Development/C++ +Source: cxxtest-%{version}.tar.gz +BuildRoot: /tmp/cxxtest-build +BuildArch: noarch +Prefix: /usr + +%description +CxxTest is a unit testing framework for C++ that is similar in +spirit to JUnit, CppUnit, and xUnit. CxxTest is easy to use because +it does not require precompiling a CxxTest testing library, it +employs no advanced features of C++ (e.g. RTTI) and it supports a +very flexible form of test discovery. + +%prep +%setup -n cxxtest + +%build + +%install +install -m 755 -d $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT/usr/include/cxxtest +install -m 755 bin/cxxtestgen $RPM_BUILD_ROOT/usr/bin/ +install -m 644 cxxtest/* $RPM_BUILD_ROOT/usr/include/cxxtest/ + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%attr(-, root, root) %doc README +%attr(-, root, root) %doc sample +%attr(-, root, root) /usr/include/cxxtest +%attr(-, root, root) /usr/bin/cxxtestgen + diff --git a/tools/cxxtest/admin/jenkins_cxxtest b/tools/cxxtest/admin/jenkins_cxxtest new file mode 100644 index 0000000..902f595 --- /dev/null +++ b/tools/cxxtest/admin/jenkins_cxxtest @@ -0,0 +1,41 @@ +#!/bin/bash + +export PATH=$WORKSPACE/vpython/bin:$PATH +g++ --version + +# Setup virtual Python environment +\rm -Rf vpython +python cxxtest/admin/virtualenv.py vpython +#vpy/scripts/vpy_install +vpython/bin/easy_install nose +vpython/bin/easy_install unittest2 +vpython/bin/easy_install ply +vpython/bin/easy_install ordereddict +vpython/bin/easy_install gcovr +vpython/bin/easy_install pyutilib.th +cd cxxtest/python +../../vpython/bin/python setup.py install + +# Cleanup test directory +cd ../test +make clean +cd ../.. + +# Run tests +export CXXTEST_GCOV_FLAGS='-fprofile-arcs -ftest-coverage' +vpython/bin/nosetests -v -v --with-xunit --xunit-file=$WORKSPACE/TEST-cxxtest.xml -w $WORKSPACE/cxxtest/test + +# Generate code coverage +cd cxxtest +../vpython/bin/gcovr -v -r $WORKSPACE/cxxtest -x -o $WORKSPACE/cxxtest/test/coverage.xml --gcov-filter '.*#test#(\.\.|\^)#cxxtest#.*gcov' + +echo "DONE" + +# Cleanup old gcov files +cd $WORKSPACE +\rm -f *.gcov cxxtest/*.gcov doc/*.gcov doc/examples/*.gcov +\rm -f *.gcno cxxtest/*.gcno doc/*.gcno doc/examples/*.gcno +\rm -f *.gcda cxxtest/*.gcda doc/*.gcda doc/examples/*.gcda +cd $WORKSPACE/cxxtest/test +make clean + diff --git a/tools/cxxtest/admin/release b/tools/cxxtest/admin/release new file mode 100644 index 0000000..da657f8 --- /dev/null +++ b/tools/cxxtest/admin/release @@ -0,0 +1,32 @@ +#! /usr/bin/env python + +import subprocess +import sys +import os + +if len(sys.argv) == 1: + print "Must specify release version" + sys.exit(1) + +rev = sys.argv[1] + +if os.path.exists('cxxtest'): + subprocess.call('rm -Rf cxxtest', shell=True) +if os.path.exists(rev): + subprocess.call('rm -Rf '+rev, shell=True) + +subprocess.call('svn export https://cxxtest.svn.sourceforge.net/svnroot/cxxtest/tags/%s cxxtest' % rev, shell=True) + +if not os.path.exists('cxxtest'): + print "Error exporting release "+rev + sys.exit(1) + +os.mkdir(rev) + +subprocess.call('tar cvf - cxxtest > %s/cxxtest-%s.tar' % (rev,rev), shell=True) +subprocess.call('gzip %s/cxxtest-%s.tar' % (rev,rev), shell=True) +subprocess.call('cp cxxtest/doc/guide.pdf %s/cxxtest-guide-%s.pdf' % (rev,rev), shell=True) +subprocess.call('cp cxxtest/doc/guide.html %s/cxxtest-guide-%s.html' % (rev,rev), shell=True) +subprocess.call('cp cxxtest/doc/guide.epub %s/cxxtest-guide-%s.epub' % (rev,rev), shell=True) +subprocess.call('zip -r %s/cxxtest-%s.zip cxxtest' % (rev,rev), shell=True) + diff --git a/tools/cxxtest/admin/virtualenv.py b/tools/cxxtest/admin/virtualenv.py new file mode 100644 index 0000000..5b4951d --- /dev/null +++ b/tools/cxxtest/admin/virtualenv.py @@ -0,0 +1,2102 @@ +#!/usr/bin/env python +"""Create a "virtual" Python installation +""" + +# If you change the version here, change it in setup.py +# and docs/conf.py as well. +virtualenv_version = "1.7" + +import base64 +import sys +import os +import optparse +import re +import shutil +import logging +import tempfile +import zlib +import errno +import distutils.sysconfig +from distutils.util import strtobool + +try: + import subprocess +except ImportError: + if sys.version_info <= (2, 3): + print('ERROR: %s' % sys.exc_info()[1]) + print('ERROR: this script requires Python 2.4 or greater; or at least the subprocess module.') + print('If you copy subprocess.py from a newer version of Python this script will probably work') + sys.exit(101) + else: + raise +try: + set +except NameError: + from sets import Set as set +try: + basestring +except NameError: + basestring = str + +try: + import ConfigParser +except ImportError: + import configparser as ConfigParser + +join = os.path.join +py_version = 'python%s.%s' % (sys.version_info[0], sys.version_info[1]) + +is_jython = sys.platform.startswith('java') +is_pypy = hasattr(sys, 'pypy_version_info') +is_win = (sys.platform == 'win32') +abiflags = getattr(sys, 'abiflags', '') + +user_dir = os.path.expanduser('~') +if sys.platform == 'win32': + user_dir = os.environ.get('APPDATA', user_dir) # Use %APPDATA% for roaming + default_storage_dir = os.path.join(user_dir, 'virtualenv') +else: + default_storage_dir = os.path.join(user_dir, '.virtualenv') +default_config_file = os.path.join(default_storage_dir, 'virtualenv.ini') + +if is_pypy: + expected_exe = 'pypy' +elif is_jython: + expected_exe = 'jython' +else: + expected_exe = 'python' + + +REQUIRED_MODULES = ['os', 'posix', 'posixpath', 'nt', 'ntpath', 'genericpath', + 'fnmatch', 'locale', 'encodings', 'codecs', + 'stat', 'UserDict', 'readline', 'copy_reg', 'types', + 're', 'sre', 'sre_parse', 'sre_constants', 'sre_compile', + 'zlib'] + +REQUIRED_FILES = ['lib-dynload', 'config'] + +majver, minver = sys.version_info[:2] +if majver == 2: + if minver >= 6: + REQUIRED_MODULES.extend(['warnings', 'linecache', '_abcoll', 'abc']) + if minver >= 7: + REQUIRED_MODULES.extend(['_weakrefset']) + if minver <= 3: + REQUIRED_MODULES.extend(['sets', '__future__']) +elif majver == 3: + # Some extra modules are needed for Python 3, but different ones + # for different versions. + REQUIRED_MODULES.extend(['_abcoll', 'warnings', 'linecache', 'abc', 'io', + '_weakrefset', 'copyreg', 'tempfile', 'random', + '__future__', 'collections', 'keyword', 'tarfile', + 'shutil', 'struct', 'copy']) + if minver >= 2: + REQUIRED_FILES[-1] = 'config-%s' % majver + if minver == 3: + # The whole list of 3.3 modules is reproduced below - the current + # uncommented ones are required for 3.3 as of now, but more may be + # added as 3.3 development continues. + REQUIRED_MODULES.extend([ + #"aifc", + #"antigravity", + #"argparse", + #"ast", + #"asynchat", + #"asyncore", + "base64", + #"bdb", + #"binhex", + "bisect", + #"calendar", + #"cgi", + #"cgitb", + #"chunk", + #"cmd", + #"codeop", + #"code", + #"colorsys", + #"_compat_pickle", + #"compileall", + #"concurrent", + #"configparser", + #"contextlib", + #"cProfile", + #"crypt", + #"csv", + #"ctypes", + #"curses", + #"datetime", + #"dbm", + #"decimal", + #"difflib", + #"dis", + #"doctest", + #"dummy_threading", + "_dummy_thread", + #"email", + #"filecmp", + #"fileinput", + #"formatter", + #"fractions", + #"ftplib", + #"functools", + #"getopt", + #"getpass", + #"gettext", + #"glob", + #"gzip", + "hashlib", + "heapq", + "hmac", + #"html", + #"http", + #"idlelib", + #"imaplib", + #"imghdr", + #"importlib", + #"inspect", + #"json", + #"lib2to3", + #"logging", + #"macpath", + #"macurl2path", + #"mailbox", + #"mailcap", + #"_markupbase", + #"mimetypes", + #"modulefinder", + #"multiprocessing", + #"netrc", + #"nntplib", + #"nturl2path", + #"numbers", + #"opcode", + #"optparse", + #"os2emxpath", + #"pdb", + #"pickle", + #"pickletools", + #"pipes", + #"pkgutil", + #"platform", + #"plat-linux2", + #"plistlib", + #"poplib", + #"pprint", + #"profile", + #"pstats", + #"pty", + #"pyclbr", + #"py_compile", + #"pydoc_data", + #"pydoc", + #"_pyio", + #"queue", + #"quopri", + "reprlib", + "rlcompleter", + #"runpy", + #"sched", + #"shelve", + #"shlex", + #"smtpd", + #"smtplib", + #"sndhdr", + #"socket", + #"socketserver", + #"sqlite3", + #"ssl", + #"stringprep", + #"string", + #"_strptime", + #"subprocess", + #"sunau", + #"symbol", + #"symtable", + #"sysconfig", + #"tabnanny", + #"telnetlib", + #"test", + #"textwrap", + #"this", + #"_threading_local", + #"threading", + #"timeit", + #"tkinter", + #"tokenize", + #"token", + #"traceback", + #"trace", + #"tty", + #"turtledemo", + #"turtle", + #"unittest", + #"urllib", + #"uuid", + #"uu", + #"wave", + "weakref", + #"webbrowser", + #"wsgiref", + #"xdrlib", + #"xml", + #"xmlrpc", + #"zipfile", + ]) + +if is_pypy: + # these are needed to correctly display the exceptions that may happen + # during the bootstrap + REQUIRED_MODULES.extend(['traceback', 'linecache']) + +class Logger(object): + + """ + Logging object for use in command-line script. Allows ranges of + levels, to avoid some redundancy of displayed information. + """ + + DEBUG = logging.DEBUG + INFO = logging.INFO + NOTIFY = (logging.INFO+logging.WARN)/2 + WARN = WARNING = logging.WARN + ERROR = logging.ERROR + FATAL = logging.FATAL + + LEVELS = [DEBUG, INFO, NOTIFY, WARN, ERROR, FATAL] + + def __init__(self, consumers): + self.consumers = consumers + self.indent = 0 + self.in_progress = None + self.in_progress_hanging = False + + def debug(self, msg, *args, **kw): + self.log(self.DEBUG, msg, *args, **kw) + def info(self, msg, *args, **kw): + self.log(self.INFO, msg, *args, **kw) + def notify(self, msg, *args, **kw): + self.log(self.NOTIFY, msg, *args, **kw) + def warn(self, msg, *args, **kw): + self.log(self.WARN, msg, *args, **kw) + def error(self, msg, *args, **kw): + self.log(self.WARN, msg, *args, **kw) + def fatal(self, msg, *args, **kw): + self.log(self.FATAL, msg, *args, **kw) + def log(self, level, msg, *args, **kw): + if args: + if kw: + raise TypeError( + "You may give positional or keyword arguments, not both") + args = args or kw + rendered = None + for consumer_level, consumer in self.consumers: + if self.level_matches(level, consumer_level): + if (self.in_progress_hanging + and consumer in (sys.stdout, sys.stderr)): + self.in_progress_hanging = False + sys.stdout.write('\n') + sys.stdout.flush() + if rendered is None: + if args: + rendered = msg % args + else: + rendered = msg + rendered = ' '*self.indent + rendered + if hasattr(consumer, 'write'): + consumer.write(rendered+'\n') + else: + consumer(rendered) + + def start_progress(self, msg): + assert not self.in_progress, ( + "Tried to start_progress(%r) while in_progress %r" + % (msg, self.in_progress)) + if self.level_matches(self.NOTIFY, self._stdout_level()): + sys.stdout.write(msg) + sys.stdout.flush() + self.in_progress_hanging = True + else: + self.in_progress_hanging = False + self.in_progress = msg + + def end_progress(self, msg='done.'): + assert self.in_progress, ( + "Tried to end_progress without start_progress") + if self.stdout_level_matches(self.NOTIFY): + if not self.in_progress_hanging: + # Some message has been printed out since start_progress + sys.stdout.write('...' + self.in_progress + msg + '\n') + sys.stdout.flush() + else: + sys.stdout.write(msg + '\n') + sys.stdout.flush() + self.in_progress = None + self.in_progress_hanging = False + + def show_progress(self): + """If we are in a progress scope, and no log messages have been + shown, write out another '.'""" + if self.in_progress_hanging: + sys.stdout.write('.') + sys.stdout.flush() + + def stdout_level_matches(self, level): + """Returns true if a message at this level will go to stdout""" + return self.level_matches(level, self._stdout_level()) + + def _stdout_level(self): + """Returns the level that stdout runs at""" + for level, consumer in self.consumers: + if consumer is sys.stdout: + return level + return self.FATAL + + def level_matches(self, level, consumer_level): + """ + >>> l = Logger([]) + >>> l.level_matches(3, 4) + False + >>> l.level_matches(3, 2) + True + >>> l.level_matches(slice(None, 3), 3) + False + >>> l.level_matches(slice(None, 3), 2) + True + >>> l.level_matches(slice(1, 3), 1) + True + >>> l.level_matches(slice(2, 3), 1) + False + """ + if isinstance(level, slice): + start, stop = level.start, level.stop + if start is not None and start > consumer_level: + return False + if stop is not None and stop <= consumer_level: + return False + return True + else: + return level >= consumer_level + + #@classmethod + def level_for_integer(cls, level): + levels = cls.LEVELS + if level < 0: + return levels[0] + if level >= len(levels): + return levels[-1] + return levels[level] + + level_for_integer = classmethod(level_for_integer) + +# create a silent logger just to prevent this from being undefined +# will be overridden with requested verbosity main() is called. +logger = Logger([(Logger.LEVELS[-1], sys.stdout)]) + +def mkdir(path): + if not os.path.exists(path): + logger.info('Creating %s', path) + os.makedirs(path) + else: + logger.info('Directory %s already exists', path) + +def copyfileordir(src, dest): + if os.path.isdir(src): + shutil.copytree(src, dest, True) + else: + shutil.copy2(src, dest) + +def copyfile(src, dest, symlink=True): + if not os.path.exists(src): + # Some bad symlink in the src + logger.warn('Cannot find file %s (bad symlink)', src) + return + if os.path.exists(dest): + logger.debug('File %s already exists', dest) + return + if not os.path.exists(os.path.dirname(dest)): + logger.info('Creating parent directories for %s' % os.path.dirname(dest)) + os.makedirs(os.path.dirname(dest)) + if not os.path.islink(src): + srcpath = os.path.abspath(src) + else: + srcpath = os.readlink(src) + if symlink and hasattr(os, 'symlink'): + logger.info('Symlinking %s', dest) + try: + os.symlink(srcpath, dest) + except (OSError, NotImplementedError): + logger.info('Symlinking failed, copying to %s', dest) + copyfileordir(src, dest) + else: + logger.info('Copying to %s', dest) + copyfileordir(src, dest) + +def writefile(dest, content, overwrite=True): + if not os.path.exists(dest): + logger.info('Writing %s', dest) + f = open(dest, 'wb') + f.write(content.encode('utf-8')) + f.close() + return + else: + f = open(dest, 'rb') + c = f.read() + f.close() + if c != content: + if not overwrite: + logger.notify('File %s exists with different content; not overwriting', dest) + return + logger.notify('Overwriting %s with new content', dest) + f = open(dest, 'wb') + f.write(content.encode('utf-8')) + f.close() + else: + logger.info('Content %s already in place', dest) + +def rmtree(dir): + if os.path.exists(dir): + logger.notify('Deleting tree %s', dir) + shutil.rmtree(dir) + else: + logger.info('Do not need to delete %s; already gone', dir) + +def make_exe(fn): + if hasattr(os, 'chmod'): + oldmode = os.stat(fn).st_mode & 0xFFF # 0o7777 + newmode = (oldmode | 0x16D) & 0xFFF # 0o555, 0o7777 + os.chmod(fn, newmode) + logger.info('Changed mode of %s to %s', fn, oct(newmode)) + +def _find_file(filename, dirs): + for dir in dirs: + if os.path.exists(join(dir, filename)): + return join(dir, filename) + return filename + +def _install_req(py_executable, unzip=False, distribute=False, + search_dirs=None, never_download=False): + + if search_dirs is None: + search_dirs = file_search_dirs() + + if not distribute: + setup_fn = 'setuptools-0.6c11-py%s.egg' % sys.version[:3] + project_name = 'setuptools' + bootstrap_script = EZ_SETUP_PY + source = None + else: + setup_fn = None + source = 'distribute-0.6.24.tar.gz' + project_name = 'distribute' + bootstrap_script = DISTRIBUTE_SETUP_PY + + if setup_fn is not None: + setup_fn = _find_file(setup_fn, search_dirs) + + if source is not None: + source = _find_file(source, search_dirs) + + if is_jython and os._name == 'nt': + # Jython's .bat sys.executable can't handle a command line + # argument with newlines + fd, ez_setup = tempfile.mkstemp('.py') + os.write(fd, bootstrap_script) + os.close(fd) + cmd = [py_executable, ez_setup] + else: + cmd = [py_executable, '-c', bootstrap_script] + if unzip: + cmd.append('--always-unzip') + env = {} + remove_from_env = [] + if logger.stdout_level_matches(logger.DEBUG): + cmd.append('-v') + + old_chdir = os.getcwd() + if setup_fn is not None and os.path.exists(setup_fn): + logger.info('Using existing %s egg: %s' % (project_name, setup_fn)) + cmd.append(setup_fn) + if os.environ.get('PYTHONPATH'): + env['PYTHONPATH'] = setup_fn + os.path.pathsep + os.environ['PYTHONPATH'] + else: + env['PYTHONPATH'] = setup_fn + else: + # the source is found, let's chdir + if source is not None and os.path.exists(source): + logger.info('Using existing %s egg: %s' % (project_name, source)) + os.chdir(os.path.dirname(source)) + # in this case, we want to be sure that PYTHONPATH is unset (not + # just empty, really unset), else CPython tries to import the + # site.py that it's in virtualenv_support + remove_from_env.append('PYTHONPATH') + else: + if never_download: + logger.fatal("Can't find any local distributions of %s to install " + "and --never-download is set. Either re-run virtualenv " + "without the --never-download option, or place a %s " + "distribution (%s) in one of these " + "locations: %r" % (project_name, project_name, + setup_fn or source, + search_dirs)) + sys.exit(1) + + logger.info('No %s egg found; downloading' % project_name) + cmd.extend(['--always-copy', '-U', project_name]) + logger.start_progress('Installing %s...' % project_name) + logger.indent += 2 + cwd = None + if project_name == 'distribute': + env['DONT_PATCH_SETUPTOOLS'] = 'true' + + def _filter_ez_setup(line): + return filter_ez_setup(line, project_name) + + if not os.access(os.getcwd(), os.W_OK): + cwd = tempfile.mkdtemp() + if source is not None and os.path.exists(source): + # the current working dir is hostile, let's copy the + # tarball to a temp dir + target = os.path.join(cwd, os.path.split(source)[-1]) + shutil.copy(source, target) + try: + call_subprocess(cmd, show_stdout=False, + filter_stdout=_filter_ez_setup, + extra_env=env, + remove_from_env=remove_from_env, + cwd=cwd) + finally: + logger.indent -= 2 + logger.end_progress() + if os.getcwd() != old_chdir: + os.chdir(old_chdir) + if is_jython and os._name == 'nt': + os.remove(ez_setup) + +def file_search_dirs(): + here = os.path.dirname(os.path.abspath(__file__)) + dirs = ['.', here, + join(here, 'virtualenv_support')] + if os.path.splitext(os.path.dirname(__file__))[0] != 'virtualenv': + # Probably some boot script; just in case virtualenv is installed... + try: + import virtualenv + except ImportError: + pass + else: + dirs.append(os.path.join(os.path.dirname(virtualenv.__file__), 'virtualenv_support')) + return [d for d in dirs if os.path.isdir(d)] + +def install_setuptools(py_executable, unzip=False, + search_dirs=None, never_download=False): + _install_req(py_executable, unzip, + search_dirs=search_dirs, never_download=never_download) + +def install_distribute(py_executable, unzip=False, + search_dirs=None, never_download=False): + _install_req(py_executable, unzip, distribute=True, + search_dirs=search_dirs, never_download=never_download) + +_pip_re = re.compile(r'^pip-.*(zip|tar.gz|tar.bz2|tgz|tbz)$', re.I) +def install_pip(py_executable, search_dirs=None, never_download=False): + if search_dirs is None: + search_dirs = file_search_dirs() + + filenames = [] + for dir in search_dirs: + filenames.extend([join(dir, fn) for fn in os.listdir(dir) + if _pip_re.search(fn)]) + filenames = [(os.path.basename(filename).lower(), i, filename) for i, filename in enumerate(filenames)] + filenames.sort() + filenames = [filename for basename, i, filename in filenames] + if not filenames: + filename = 'pip' + else: + filename = filenames[-1] + easy_install_script = 'easy_install' + if sys.platform == 'win32': + easy_install_script = 'easy_install-script.py' + cmd = [join(os.path.dirname(py_executable), easy_install_script), filename] + if sys.platform == 'win32': + cmd.insert(0, py_executable) + if filename == 'pip': + if never_download: + logger.fatal("Can't find any local distributions of pip to install " + "and --never-download is set. Either re-run virtualenv " + "without the --never-download option, or place a pip " + "source distribution (zip/tar.gz/tar.bz2) in one of these " + "locations: %r" % search_dirs) + sys.exit(1) + logger.info('Installing pip from network...') + else: + logger.info('Installing existing %s distribution: %s' % ( + os.path.basename(filename), filename)) + logger.start_progress('Installing pip...') + logger.indent += 2 + def _filter_setup(line): + return filter_ez_setup(line, 'pip') + try: + call_subprocess(cmd, show_stdout=False, + filter_stdout=_filter_setup) + finally: + logger.indent -= 2 + logger.end_progress() + +def filter_ez_setup(line, project_name='setuptools'): + if not line.strip(): + return Logger.DEBUG + if project_name == 'distribute': + for prefix in ('Extracting', 'Now working', 'Installing', 'Before', + 'Scanning', 'Setuptools', 'Egg', 'Already', + 'running', 'writing', 'reading', 'installing', + 'creating', 'copying', 'byte-compiling', 'removing', + 'Processing'): + if line.startswith(prefix): + return Logger.DEBUG + return Logger.DEBUG + for prefix in ['Reading ', 'Best match', 'Processing setuptools', + 'Copying setuptools', 'Adding setuptools', + 'Installing ', 'Installed ']: + if line.startswith(prefix): + return Logger.DEBUG + return Logger.INFO + + +class UpdatingDefaultsHelpFormatter(optparse.IndentedHelpFormatter): + """ + Custom help formatter for use in ConfigOptionParser that updates + the defaults before expanding them, allowing them to show up correctly + in the help listing + """ + def expand_default(self, option): + if self.parser is not None: + self.parser.update_defaults(self.parser.defaults) + return optparse.IndentedHelpFormatter.expand_default(self, option) + + +class ConfigOptionParser(optparse.OptionParser): + """ + Custom option parser which updates its defaults by by checking the + configuration files and environmental variables + """ + def __init__(self, *args, **kwargs): + self.config = ConfigParser.RawConfigParser() + self.files = self.get_config_files() + self.config.read(self.files) + optparse.OptionParser.__init__(self, *args, **kwargs) + + def get_config_files(self): + config_file = os.environ.get('VIRTUALENV_CONFIG_FILE', False) + if config_file and os.path.exists(config_file): + return [config_file] + return [default_config_file] + + def update_defaults(self, defaults): + """ + Updates the given defaults with values from the config files and + the environ. Does a little special handling for certain types of + options (lists). + """ + # Then go and look for the other sources of configuration: + config = {} + # 1. config files + config.update(dict(self.get_config_section('virtualenv'))) + # 2. environmental variables + config.update(dict(self.get_environ_vars())) + # Then set the options with those values + for key, val in config.items(): + key = key.replace('_', '-') + if not key.startswith('--'): + key = '--%s' % key # only prefer long opts + option = self.get_option(key) + if option is not None: + # ignore empty values + if not val: + continue + # handle multiline configs + if option.action == 'append': + val = val.split() + else: + option.nargs = 1 + if option.action in ('store_true', 'store_false', 'count'): + val = strtobool(val) + try: + val = option.convert_value(key, val) + except optparse.OptionValueError: + e = sys.exc_info()[1] + print("An error occured during configuration: %s" % e) + sys.exit(3) + defaults[option.dest] = val + return defaults + + def get_config_section(self, name): + """ + Get a section of a configuration + """ + if self.config.has_section(name): + return self.config.items(name) + return [] + + def get_environ_vars(self, prefix='VIRTUALENV_'): + """ + Returns a generator with all environmental vars with prefix VIRTUALENV + """ + for key, val in os.environ.items(): + if key.startswith(prefix): + yield (key.replace(prefix, '').lower(), val) + + def get_default_values(self): + """ + Overridding to make updating the defaults after instantiation of + the option parser possible, update_defaults() does the dirty work. + """ + if not self.process_default_values: + # Old, pre-Optik 1.5 behaviour. + return optparse.Values(self.defaults) + + defaults = self.update_defaults(self.defaults.copy()) # ours + for option in self._get_all_options(): + default = defaults.get(option.dest) + if isinstance(default, basestring): + opt_str = option.get_opt_string() + defaults[option.dest] = option.check_value(opt_str, default) + return optparse.Values(defaults) + + +def main(): + parser = ConfigOptionParser( + version=virtualenv_version, + usage="%prog [OPTIONS] DEST_DIR", + formatter=UpdatingDefaultsHelpFormatter()) + + parser.add_option( + '-v', '--verbose', + action='count', + dest='verbose', + default=0, + help="Increase verbosity") + + parser.add_option( + '-q', '--quiet', + action='count', + dest='quiet', + default=0, + help='Decrease verbosity') + + parser.add_option( + '-p', '--python', + dest='python', + metavar='PYTHON_EXE', + help='The Python interpreter to use, e.g., --python=python2.5 will use the python2.5 ' + 'interpreter to create the new environment. The default is the interpreter that ' + 'virtualenv was installed with (%s)' % sys.executable) + + parser.add_option( + '--clear', + dest='clear', + action='store_true', + help="Clear out the non-root install and start from scratch") + + parser.add_option( + '--no-site-packages', + dest='no_site_packages', + action='store_true', + help="Don't give access to the global site-packages dir to the " + "virtual environment") + + parser.add_option( + '--system-site-packages', + dest='system_site_packages', + action='store_true', + help="Give access to the global site-packages dir to the " + "virtual environment") + + parser.add_option( + '--unzip-setuptools', + dest='unzip_setuptools', + action='store_true', + help="Unzip Setuptools or Distribute when installing it") + + parser.add_option( + '--relocatable', + dest='relocatable', + action='store_true', + help='Make an EXISTING virtualenv environment relocatable. ' + 'This fixes up scripts and makes all .pth files relative') + + parser.add_option( + '--distribute', + dest='use_distribute', + action='store_true', + help='Use Distribute instead of Setuptools. Set environ variable ' + 'VIRTUALENV_DISTRIBUTE to make it the default ') + + default_search_dirs = file_search_dirs() + parser.add_option( + '--extra-search-dir', + dest="search_dirs", + action="append", + default=default_search_dirs, + help="Directory to look for setuptools/distribute/pip distributions in. " + "You can add any number of additional --extra-search-dir paths.") + + parser.add_option( + '--never-download', + dest="never_download", + action="store_true", + help="Never download anything from the network. Instead, virtualenv will fail " + "if local distributions of setuptools/distribute/pip are not present.") + + parser.add_option( + '--prompt=', + dest='prompt', + help='Provides an alternative prompt prefix for this environment') + + if 'extend_parser' in globals(): + extend_parser(parser) + + options, args = parser.parse_args() + + global logger + + if 'adjust_options' in globals(): + adjust_options(options, args) + + verbosity = options.verbose - options.quiet + logger = Logger([(Logger.level_for_integer(2-verbosity), sys.stdout)]) + + if options.python and not os.environ.get('VIRTUALENV_INTERPRETER_RUNNING'): + env = os.environ.copy() + interpreter = resolve_interpreter(options.python) + if interpreter == sys.executable: + logger.warn('Already using interpreter %s' % interpreter) + else: + logger.notify('Running virtualenv with interpreter %s' % interpreter) + env['VIRTUALENV_INTERPRETER_RUNNING'] = 'true' + file = __file__ + if file.endswith('.pyc'): + file = file[:-1] + popen = subprocess.Popen([interpreter, file] + sys.argv[1:], env=env) + raise SystemExit(popen.wait()) + + # Force --use-distribute on Python 3, since setuptools is not available. + if majver > 2: + options.use_distribute = True + + if os.environ.get('PYTHONDONTWRITEBYTECODE') and not options.use_distribute: + print( + "The PYTHONDONTWRITEBYTECODE environment variable is " + "not compatible with setuptools. Either use --distribute " + "or unset PYTHONDONTWRITEBYTECODE.") + sys.exit(2) + if not args: + print('You must provide a DEST_DIR') + parser.print_help() + sys.exit(2) + if len(args) > 1: + print('There must be only one argument: DEST_DIR (you gave %s)' % ( + ' '.join(args))) + parser.print_help() + sys.exit(2) + + home_dir = args[0] + + if os.environ.get('WORKING_ENV'): + logger.fatal('ERROR: you cannot run virtualenv while in a workingenv') + logger.fatal('Please deactivate your workingenv, then re-run this script') + sys.exit(3) + + if 'PYTHONHOME' in os.environ: + logger.warn('PYTHONHOME is set. You *must* activate the virtualenv before using it') + del os.environ['PYTHONHOME'] + + if options.relocatable: + make_environment_relocatable(home_dir) + return + + if options.no_site_packages: + logger.warn('The --no-site-packages flag is deprecated; it is now ' + 'the default behavior.') + + create_environment(home_dir, + site_packages=options.system_site_packages, + clear=options.clear, + unzip_setuptools=options.unzip_setuptools, + use_distribute=options.use_distribute, + prompt=options.prompt, + search_dirs=options.search_dirs, + never_download=options.never_download) + if 'after_install' in globals(): + after_install(options, home_dir) + +def call_subprocess(cmd, show_stdout=True, + filter_stdout=None, cwd=None, + raise_on_returncode=True, extra_env=None, + remove_from_env=None): + cmd_parts = [] + for part in cmd: + if len(part) > 45: + part = part[:20]+"..."+part[-20:] + if ' ' in part or '\n' in part or '"' in part or "'" in part: + part = '"%s"' % part.replace('"', '\\"') + if hasattr(part, 'decode'): + try: + part = part.decode(sys.getdefaultencoding()) + except UnicodeDecodeError: + part = part.decode(sys.getfilesystemencoding()) + cmd_parts.append(part) + cmd_desc = ' '.join(cmd_parts) + if show_stdout: + stdout = None + else: + stdout = subprocess.PIPE + logger.debug("Running command %s" % cmd_desc) + if extra_env or remove_from_env: + env = os.environ.copy() + if extra_env: + env.update(extra_env) + if remove_from_env: + for varname in remove_from_env: + env.pop(varname, None) + else: + env = None + try: + proc = subprocess.Popen( + cmd, stderr=subprocess.STDOUT, stdin=None, stdout=stdout, + cwd=cwd, env=env) + except Exception: + e = sys.exc_info()[1] + logger.fatal( + "Error %s while executing command %s" % (e, cmd_desc)) + raise + all_output = [] + if stdout is not None: + stdout = proc.stdout + encoding = sys.getdefaultencoding() + fs_encoding = sys.getfilesystemencoding() + while 1: + line = stdout.readline() + try: + line = line.decode(encoding) + except UnicodeDecodeError: + line = line.decode(fs_encoding) + if not line: + break + line = line.rstrip() + all_output.append(line) + if filter_stdout: + level = filter_stdout(line) + if isinstance(level, tuple): + level, line = level + logger.log(level, line) + if not logger.stdout_level_matches(level): + logger.show_progress() + else: + logger.info(line) + else: + proc.communicate() + proc.wait() + if proc.returncode: + if raise_on_returncode: + if all_output: + logger.notify('Complete output from command %s:' % cmd_desc) + logger.notify('\n'.join(all_output) + '\n----------------------------------------') + raise OSError( + "Command %s failed with error code %s" + % (cmd_desc, proc.returncode)) + else: + logger.warn( + "Command %s had error code %s" + % (cmd_desc, proc.returncode)) + + +def create_environment(home_dir, site_packages=False, clear=False, + unzip_setuptools=False, use_distribute=False, + prompt=None, search_dirs=None, never_download=False): + """ + Creates a new environment in ``home_dir``. + + If ``site_packages`` is true, then the global ``site-packages/`` + directory will be on the path. + + If ``clear`` is true (default False) then the environment will + first be cleared. + """ + home_dir, lib_dir, inc_dir, bin_dir = path_locations(home_dir) + + py_executable = os.path.abspath(install_python( + home_dir, lib_dir, inc_dir, bin_dir, + site_packages=site_packages, clear=clear)) + + install_distutils(home_dir) + + # use_distribute also is True if VIRTUALENV_DISTRIBUTE env var is set + # we also check VIRTUALENV_USE_DISTRIBUTE for backwards compatibility + if use_distribute or os.environ.get('VIRTUALENV_USE_DISTRIBUTE'): + install_distribute(py_executable, unzip=unzip_setuptools, + search_dirs=search_dirs, never_download=never_download) + else: + install_setuptools(py_executable, unzip=unzip_setuptools, + search_dirs=search_dirs, never_download=never_download) + + install_pip(py_executable, search_dirs=search_dirs, never_download=never_download) + + install_activate(home_dir, bin_dir, prompt) + +def path_locations(home_dir): + """Return the path locations for the environment (where libraries are, + where scripts go, etc)""" + # XXX: We'd use distutils.sysconfig.get_python_inc/lib but its + # prefix arg is broken: http://bugs.python.org/issue3386 + if sys.platform == 'win32': + # Windows has lots of problems with executables with spaces in + # the name; this function will remove them (using the ~1 + # format): + mkdir(home_dir) + if ' ' in home_dir: + try: + import win32api + except ImportError: + print('Error: the path "%s" has a space in it' % home_dir) + print('To handle these kinds of paths, the win32api module must be installed:') + print(' http://sourceforge.net/projects/pywin32/') + sys.exit(3) + home_dir = win32api.GetShortPathName(home_dir) + lib_dir = join(home_dir, 'Lib') + inc_dir = join(home_dir, 'Include') + bin_dir = join(home_dir, 'Scripts') + elif is_jython: + lib_dir = join(home_dir, 'Lib') + inc_dir = join(home_dir, 'Include') + bin_dir = join(home_dir, 'bin') + elif is_pypy: + lib_dir = home_dir + inc_dir = join(home_dir, 'include') + bin_dir = join(home_dir, 'bin') + else: + lib_dir = join(home_dir, 'lib', py_version) + inc_dir = join(home_dir, 'include', py_version + abiflags) + bin_dir = join(home_dir, 'bin') + return home_dir, lib_dir, inc_dir, bin_dir + + +def change_prefix(filename, dst_prefix): + prefixes = [sys.prefix] + + if sys.platform == "darwin": + prefixes.extend(( + os.path.join("/Library/Python", sys.version[:3], "site-packages"), + os.path.join(sys.prefix, "Extras", "lib", "python"), + os.path.join("~", "Library", "Python", sys.version[:3], "site-packages"))) + + if hasattr(sys, 'real_prefix'): + prefixes.append(sys.real_prefix) + prefixes = list(map(os.path.abspath, prefixes)) + filename = os.path.abspath(filename) + for src_prefix in prefixes: + if filename.startswith(src_prefix): + _, relpath = filename.split(src_prefix, 1) + assert relpath[0] == os.sep + relpath = relpath[1:] + return join(dst_prefix, relpath) + assert False, "Filename %s does not start with any of these prefixes: %s" % \ + (filename, prefixes) + +def copy_required_modules(dst_prefix): + import imp + for modname in REQUIRED_MODULES: + if modname in sys.builtin_module_names: + logger.info("Ignoring built-in bootstrap module: %s" % modname) + continue + try: + f, filename, _ = imp.find_module(modname) + except ImportError: + logger.info("Cannot import bootstrap module: %s" % modname) + else: + if f is not None: + f.close() + dst_filename = change_prefix(filename, dst_prefix) + copyfile(filename, dst_filename) + if filename.endswith('.pyc'): + pyfile = filename[:-1] + if os.path.exists(pyfile): + copyfile(pyfile, dst_filename[:-1]) + + +def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear): + """Install just the base environment, no distutils patches etc""" + if sys.executable.startswith(bin_dir): + print('Please use the *system* python to run this script') + return + + if clear: + rmtree(lib_dir) + ## FIXME: why not delete it? + ## Maybe it should delete everything with #!/path/to/venv/python in it + logger.notify('Not deleting %s', bin_dir) + + if hasattr(sys, 'real_prefix'): + logger.notify('Using real prefix %r' % sys.real_prefix) + prefix = sys.real_prefix + else: + prefix = sys.prefix + mkdir(lib_dir) + fix_lib64(lib_dir) + fix_local_scheme(home_dir) + stdlib_dirs = [os.path.dirname(os.__file__)] + if sys.platform == 'win32': + stdlib_dirs.append(join(os.path.dirname(stdlib_dirs[0]), 'DLLs')) + elif sys.platform == 'darwin': + stdlib_dirs.append(join(stdlib_dirs[0], 'site-packages')) + if hasattr(os, 'symlink'): + logger.info('Symlinking Python bootstrap modules') + else: + logger.info('Copying Python bootstrap modules') + logger.indent += 2 + try: + # copy required files... + for stdlib_dir in stdlib_dirs: + if not os.path.isdir(stdlib_dir): + continue + for fn in os.listdir(stdlib_dir): + bn = os.path.splitext(fn)[0] + if fn != 'site-packages' and bn in REQUIRED_FILES: + copyfile(join(stdlib_dir, fn), join(lib_dir, fn)) + # ...and modules + copy_required_modules(home_dir) + finally: + logger.indent -= 2 + mkdir(join(lib_dir, 'site-packages')) + import site + site_filename = site.__file__ + if site_filename.endswith('.pyc'): + site_filename = site_filename[:-1] + elif site_filename.endswith('$py.class'): + site_filename = site_filename.replace('$py.class', '.py') + site_filename_dst = change_prefix(site_filename, home_dir) + site_dir = os.path.dirname(site_filename_dst) + writefile(site_filename_dst, SITE_PY) + writefile(join(site_dir, 'orig-prefix.txt'), prefix) + site_packages_filename = join(site_dir, 'no-global-site-packages.txt') + if not site_packages: + writefile(site_packages_filename, '') + else: + if os.path.exists(site_packages_filename): + logger.info('Deleting %s' % site_packages_filename) + os.unlink(site_packages_filename) + + if is_pypy or is_win: + stdinc_dir = join(prefix, 'include') + else: + stdinc_dir = join(prefix, 'include', py_version + abiflags) + if os.path.exists(stdinc_dir): + copyfile(stdinc_dir, inc_dir) + else: + logger.debug('No include dir %s' % stdinc_dir) + + # pypy never uses exec_prefix, just ignore it + if sys.exec_prefix != prefix and not is_pypy: + if sys.platform == 'win32': + exec_dir = join(sys.exec_prefix, 'lib') + elif is_jython: + exec_dir = join(sys.exec_prefix, 'Lib') + else: + exec_dir = join(sys.exec_prefix, 'lib', py_version) + for fn in os.listdir(exec_dir): + copyfile(join(exec_dir, fn), join(lib_dir, fn)) + + if is_jython: + # Jython has either jython-dev.jar and javalib/ dir, or just + # jython.jar + for name in 'jython-dev.jar', 'javalib', 'jython.jar': + src = join(prefix, name) + if os.path.exists(src): + copyfile(src, join(home_dir, name)) + # XXX: registry should always exist after Jython 2.5rc1 + src = join(prefix, 'registry') + if os.path.exists(src): + copyfile(src, join(home_dir, 'registry'), symlink=False) + copyfile(join(prefix, 'cachedir'), join(home_dir, 'cachedir'), + symlink=False) + + mkdir(bin_dir) + py_executable = join(bin_dir, os.path.basename(sys.executable)) + if 'Python.framework' in prefix: + if re.search(r'/Python(?:-32|-64)*$', py_executable): + # The name of the python executable is not quite what + # we want, rename it. + py_executable = os.path.join( + os.path.dirname(py_executable), 'python') + + logger.notify('New %s executable in %s', expected_exe, py_executable) + if sys.executable != py_executable: + ## FIXME: could I just hard link? + executable = sys.executable + if sys.platform == 'cygwin' and os.path.exists(executable + '.exe'): + # Cygwin misreports sys.executable sometimes + executable += '.exe' + py_executable += '.exe' + logger.info('Executable actually exists in %s' % executable) + shutil.copyfile(executable, py_executable) + make_exe(py_executable) + if sys.platform == 'win32' or sys.platform == 'cygwin': + pythonw = os.path.join(os.path.dirname(sys.executable), 'pythonw.exe') + if os.path.exists(pythonw): + logger.info('Also created pythonw.exe') + shutil.copyfile(pythonw, os.path.join(os.path.dirname(py_executable), 'pythonw.exe')) + if is_pypy: + # make a symlink python --> pypy-c + python_executable = os.path.join(os.path.dirname(py_executable), 'python') + logger.info('Also created executable %s' % python_executable) + copyfile(py_executable, python_executable) + + if os.path.splitext(os.path.basename(py_executable))[0] != expected_exe: + secondary_exe = os.path.join(os.path.dirname(py_executable), + expected_exe) + py_executable_ext = os.path.splitext(py_executable)[1] + if py_executable_ext == '.exe': + # python2.4 gives an extension of '.4' :P + secondary_exe += py_executable_ext + if os.path.exists(secondary_exe): + logger.warn('Not overwriting existing %s script %s (you must use %s)' + % (expected_exe, secondary_exe, py_executable)) + else: + logger.notify('Also creating executable in %s' % secondary_exe) + shutil.copyfile(sys.executable, secondary_exe) + make_exe(secondary_exe) + + if 'Python.framework' in prefix: + logger.debug('MacOSX Python framework detected') + + # Make sure we use the the embedded interpreter inside + # the framework, even if sys.executable points to + # the stub executable in ${sys.prefix}/bin + # See http://groups.google.com/group/python-virtualenv/ + # browse_thread/thread/17cab2f85da75951 + original_python = os.path.join( + prefix, 'Resources/Python.app/Contents/MacOS/Python') + shutil.copy(original_python, py_executable) + + # Copy the framework's dylib into the virtual + # environment + virtual_lib = os.path.join(home_dir, '.Python') + + if os.path.exists(virtual_lib): + os.unlink(virtual_lib) + copyfile( + os.path.join(prefix, 'Python'), + virtual_lib) + + # And then change the install_name of the copied python executable + try: + call_subprocess( + ["install_name_tool", "-change", + os.path.join(prefix, 'Python'), + '@executable_path/../.Python', + py_executable]) + except: + logger.fatal( + "Could not call install_name_tool -- you must have Apple's development tools installed") + raise + + # Some tools depend on pythonX.Y being present + py_executable_version = '%s.%s' % ( + sys.version_info[0], sys.version_info[1]) + if not py_executable.endswith(py_executable_version): + # symlinking pythonX.Y > python + pth = py_executable + '%s.%s' % ( + sys.version_info[0], sys.version_info[1]) + if os.path.exists(pth): + os.unlink(pth) + os.symlink('python', pth) + else: + # reverse symlinking python -> pythonX.Y (with --python) + pth = join(bin_dir, 'python') + if os.path.exists(pth): + os.unlink(pth) + os.symlink(os.path.basename(py_executable), pth) + + if sys.platform == 'win32' and ' ' in py_executable: + # There's a bug with subprocess on Windows when using a first + # argument that has a space in it. Instead we have to quote + # the value: + py_executable = '"%s"' % py_executable + cmd = [py_executable, '-c', """ +import sys +prefix = sys.prefix +if sys.version_info[0] == 3: + prefix = prefix.encode('utf8') +if hasattr(sys.stdout, 'detach'): + sys.stdout = sys.stdout.detach() +elif hasattr(sys.stdout, 'buffer'): + sys.stdout = sys.stdout.buffer +sys.stdout.write(prefix) +"""] + logger.info('Testing executable with %s %s "%s"' % tuple(cmd)) + try: + proc = subprocess.Popen(cmd, + stdout=subprocess.PIPE) + proc_stdout, proc_stderr = proc.communicate() + except OSError: + e = sys.exc_info()[1] + if e.errno == errno.EACCES: + logger.fatal('ERROR: The executable %s could not be run: %s' % (py_executable, e)) + sys.exit(100) + else: + raise e + + proc_stdout = proc_stdout.strip().decode("utf-8") + proc_stdout = os.path.normcase(os.path.abspath(proc_stdout)) + norm_home_dir = os.path.normcase(os.path.abspath(home_dir)) + if hasattr(norm_home_dir, 'decode'): + norm_home_dir = norm_home_dir.decode(sys.getfilesystemencoding()) + if proc_stdout != norm_home_dir: + logger.fatal( + 'ERROR: The executable %s is not functioning' % py_executable) + logger.fatal( + 'ERROR: It thinks sys.prefix is %r (should be %r)' + % (proc_stdout, norm_home_dir)) + logger.fatal( + 'ERROR: virtualenv is not compatible with this system or executable') + if sys.platform == 'win32': + logger.fatal( + 'Note: some Windows users have reported this error when they installed Python for "Only this user". The problem may be resolvable if you install Python "For all users". (See https://bugs.launchpad.net/virtualenv/+bug/352844)') + sys.exit(100) + else: + logger.info('Got sys.prefix result: %r' % proc_stdout) + + pydistutils = os.path.expanduser('~/.pydistutils.cfg') + if os.path.exists(pydistutils): + logger.notify('Please make sure you remove any previous custom paths from ' + 'your %s file.' % pydistutils) + ## FIXME: really this should be calculated earlier + return py_executable + +def install_activate(home_dir, bin_dir, prompt=None): + if sys.platform == 'win32' or is_jython and os._name == 'nt': + files = {'activate.bat': ACTIVATE_BAT, + 'deactivate.bat': DEACTIVATE_BAT} + if os.environ.get('OS') == 'Windows_NT' and os.environ.get('OSTYPE') == 'cygwin': + files['activate'] = ACTIVATE_SH + else: + files = {'activate': ACTIVATE_SH} + + # suppling activate.fish in addition to, not instead of, the + # bash script support. + files['activate.fish'] = ACTIVATE_FISH + + # same for csh/tcsh support... + files['activate.csh'] = ACTIVATE_CSH + + + + files['activate_this.py'] = ACTIVATE_THIS + home_dir = os.path.abspath(home_dir) + if hasattr(home_dir, 'decode'): + home_dir = home_dir.decode(sys.getfilesystemencoding()) + vname = os.path.basename(home_dir) + for name, content in files.items(): + content = content.replace('__VIRTUAL_PROMPT__', prompt or '') + content = content.replace('__VIRTUAL_WINPROMPT__', prompt or '(%s)' % vname) + content = content.replace('__VIRTUAL_ENV__', home_dir) + content = content.replace('__VIRTUAL_NAME__', vname) + content = content.replace('__BIN_NAME__', os.path.basename(bin_dir)) + writefile(os.path.join(bin_dir, name), content) + +def install_distutils(home_dir): + distutils_path = change_prefix(distutils.__path__[0], home_dir) + mkdir(distutils_path) + ## FIXME: maybe this prefix setting should only be put in place if + ## there's a local distutils.cfg with a prefix setting? + home_dir = os.path.abspath(home_dir) + ## FIXME: this is breaking things, removing for now: + #distutils_cfg = DISTUTILS_CFG + "\n[install]\nprefix=%s\n" % home_dir + writefile(os.path.join(distutils_path, '__init__.py'), DISTUTILS_INIT) + writefile(os.path.join(distutils_path, 'distutils.cfg'), DISTUTILS_CFG, overwrite=False) + +def fix_local_scheme(home_dir): + """ + Platforms that use the "posix_local" install scheme (like Ubuntu with + Python 2.7) need to be given an additional "local" location, sigh. + """ + try: + import sysconfig + except ImportError: + pass + else: + if sysconfig._get_default_scheme() == 'posix_local': + local_path = os.path.join(home_dir, 'local') + if not os.path.exists(local_path): + os.symlink(os.path.abspath(home_dir), local_path) + +def fix_lib64(lib_dir): + """ + Some platforms (particularly Gentoo on x64) put things in lib64/pythonX.Y + instead of lib/pythonX.Y. If this is such a platform we'll just create a + symlink so lib64 points to lib + """ + if [p for p in distutils.sysconfig.get_config_vars().values() + if isinstance(p, basestring) and 'lib64' in p]: + logger.debug('This system uses lib64; symlinking lib64 to lib') + assert os.path.basename(lib_dir) == 'python%s' % sys.version[:3], ( + "Unexpected python lib dir: %r" % lib_dir) + lib_parent = os.path.dirname(lib_dir) + assert os.path.basename(lib_parent) == 'lib', ( + "Unexpected parent dir: %r" % lib_parent) + copyfile(lib_parent, os.path.join(os.path.dirname(lib_parent), 'lib64')) + +def resolve_interpreter(exe): + """ + If the executable given isn't an absolute path, search $PATH for the interpreter + """ + if os.path.abspath(exe) != exe: + paths = os.environ.get('PATH', '').split(os.pathsep) + for path in paths: + if os.path.exists(os.path.join(path, exe)): + exe = os.path.join(path, exe) + break + if not os.path.exists(exe): + logger.fatal('The executable %s (from --python=%s) does not exist' % (exe, exe)) + raise SystemExit(3) + if not is_executable(exe): + logger.fatal('The executable %s (from --python=%s) is not executable' % (exe, exe)) + raise SystemExit(3) + return exe + +def is_executable(exe): + """Checks a file is executable""" + return os.access(exe, os.X_OK) + +############################################################ +## Relocating the environment: + +def make_environment_relocatable(home_dir): + """ + Makes the already-existing environment use relative paths, and takes out + the #!-based environment selection in scripts. + """ + home_dir, lib_dir, inc_dir, bin_dir = path_locations(home_dir) + activate_this = os.path.join(bin_dir, 'activate_this.py') + if not os.path.exists(activate_this): + logger.fatal( + 'The environment doesn\'t have a file %s -- please re-run virtualenv ' + 'on this environment to update it' % activate_this) + fixup_scripts(home_dir) + fixup_pth_and_egg_link(home_dir) + ## FIXME: need to fix up distutils.cfg + +OK_ABS_SCRIPTS = ['python', 'python%s' % sys.version[:3], + 'activate', 'activate.bat', 'activate_this.py'] + +def fixup_scripts(home_dir): + # This is what we expect at the top of scripts: + shebang = '#!%s/bin/python' % os.path.normcase(os.path.abspath(home_dir)) + # This is what we'll put: + new_shebang = '#!/usr/bin/env python%s' % sys.version[:3] + activate = "import os; activate_this=os.path.join(os.path.dirname(__file__), 'activate_this.py'); execfile(activate_this, dict(__file__=activate_this)); del os, activate_this" + if sys.platform == 'win32': + bin_suffix = 'Scripts' + else: + bin_suffix = 'bin' + bin_dir = os.path.join(home_dir, bin_suffix) + home_dir, lib_dir, inc_dir, bin_dir = path_locations(home_dir) + for filename in os.listdir(bin_dir): + filename = os.path.join(bin_dir, filename) + if not os.path.isfile(filename): + # ignore subdirs, e.g. .svn ones. + continue + f = open(filename, 'rb') + lines = f.readlines() + f.close() + if not lines: + logger.warn('Script %s is an empty file' % filename) + continue + if not lines[0].strip().startswith(shebang): + if os.path.basename(filename) in OK_ABS_SCRIPTS: + logger.debug('Cannot make script %s relative' % filename) + elif lines[0].strip() == new_shebang: + logger.info('Script %s has already been made relative' % filename) + else: + logger.warn('Script %s cannot be made relative (it\'s not a normal script that starts with %s)' + % (filename, shebang)) + continue + logger.notify('Making script %s relative' % filename) + lines = [new_shebang+'\n', activate+'\n'] + lines[1:] + f = open(filename, 'wb') + f.writelines(lines) + f.close() + +def fixup_pth_and_egg_link(home_dir, sys_path=None): + """Makes .pth and .egg-link files use relative paths""" + home_dir = os.path.normcase(os.path.abspath(home_dir)) + if sys_path is None: + sys_path = sys.path + for path in sys_path: + if not path: + path = '.' + if not os.path.isdir(path): + continue + path = os.path.normcase(os.path.abspath(path)) + if not path.startswith(home_dir): + logger.debug('Skipping system (non-environment) directory %s' % path) + continue + for filename in os.listdir(path): + filename = os.path.join(path, filename) + if filename.endswith('.pth'): + if not os.access(filename, os.W_OK): + logger.warn('Cannot write .pth file %s, skipping' % filename) + else: + fixup_pth_file(filename) + if filename.endswith('.egg-link'): + if not os.access(filename, os.W_OK): + logger.warn('Cannot write .egg-link file %s, skipping' % filename) + else: + fixup_egg_link(filename) + +def fixup_pth_file(filename): + lines = [] + prev_lines = [] + f = open(filename) + prev_lines = f.readlines() + f.close() + for line in prev_lines: + line = line.strip() + if (not line or line.startswith('#') or line.startswith('import ') + or os.path.abspath(line) != line): + lines.append(line) + else: + new_value = make_relative_path(filename, line) + if line != new_value: + logger.debug('Rewriting path %s as %s (in %s)' % (line, new_value, filename)) + lines.append(new_value) + if lines == prev_lines: + logger.info('No changes to .pth file %s' % filename) + return + logger.notify('Making paths in .pth file %s relative' % filename) + f = open(filename, 'w') + f.write('\n'.join(lines) + '\n') + f.close() + +def fixup_egg_link(filename): + f = open(filename) + link = f.read().strip() + f.close() + if os.path.abspath(link) != link: + logger.debug('Link in %s already relative' % filename) + return + new_link = make_relative_path(filename, link) + logger.notify('Rewriting link %s in %s as %s' % (link, filename, new_link)) + f = open(filename, 'w') + f.write(new_link) + f.close() + +def make_relative_path(source, dest, dest_is_directory=True): + """ + Make a filename relative, where the filename is dest, and it is + being referred to from the filename source. + + >>> make_relative_path('/usr/share/something/a-file.pth', + ... '/usr/share/another-place/src/Directory') + '../another-place/src/Directory' + >>> make_relative_path('/usr/share/something/a-file.pth', + ... '/home/user/src/Directory') + '../../../home/user/src/Directory' + >>> make_relative_path('/usr/share/a-file.pth', '/usr/share/') + './' + """ + source = os.path.dirname(source) + if not dest_is_directory: + dest_filename = os.path.basename(dest) + dest = os.path.dirname(dest) + dest = os.path.normpath(os.path.abspath(dest)) + source = os.path.normpath(os.path.abspath(source)) + dest_parts = dest.strip(os.path.sep).split(os.path.sep) + source_parts = source.strip(os.path.sep).split(os.path.sep) + while dest_parts and source_parts and dest_parts[0] == source_parts[0]: + dest_parts.pop(0) + source_parts.pop(0) + full_parts = ['..']*len(source_parts) + dest_parts + if not dest_is_directory: + full_parts.append(dest_filename) + if not full_parts: + # Special case for the current directory (otherwise it'd be '') + return './' + return os.path.sep.join(full_parts) + + + +############################################################ +## Bootstrap script creation: + +def create_bootstrap_script(extra_text, python_version=''): + """ + Creates a bootstrap script, which is like this script but with + extend_parser, adjust_options, and after_install hooks. + + This returns a string that (written to disk of course) can be used + as a bootstrap script with your own customizations. The script + will be the standard virtualenv.py script, with your extra text + added (your extra text should be Python code). + + If you include these functions, they will be called: + + ``extend_parser(optparse_parser)``: + You can add or remove options from the parser here. + + ``adjust_options(options, args)``: + You can change options here, or change the args (if you accept + different kinds of arguments, be sure you modify ``args`` so it is + only ``[DEST_DIR]``). + + ``after_install(options, home_dir)``: + + After everything is installed, this function is called. This + is probably the function you are most likely to use. An + example would be:: + + def after_install(options, home_dir): + subprocess.call([join(home_dir, 'bin', 'easy_install'), + 'MyPackage']) + subprocess.call([join(home_dir, 'bin', 'my-package-script'), + 'setup', home_dir]) + + This example immediately installs a package, and runs a setup + script from that package. + + If you provide something like ``python_version='2.4'`` then the + script will start with ``#!/usr/bin/env python2.4`` instead of + ``#!/usr/bin/env python``. You can use this when the script must + be run with a particular Python version. + """ + filename = __file__ + if filename.endswith('.pyc'): + filename = filename[:-1] + f = open(filename, 'rb') + content = f.read() + f.close() + py_exe = 'python%s' % python_version + content = (('#!/usr/bin/env %s\n' % py_exe) + + '## WARNING: This file is generated\n' + + content) + return content.replace('##EXT' 'END##', extra_text) + +##EXTEND## + +def convert(s): + b = base64.b64decode(s.encode('ascii')) + return zlib.decompress(b).decode('utf-8') + +##file site.py +SITE_PY = convert(""" +eJzVPP1z2zaWv/OvwMqTIZXKdD66nR2n7o2TOK3v3MTbpLO5dT06SoIk1hTJEqQV7c3d337vAwAB +kvLHdvvDaTKxRAIPDw/vGw8YjUanZSnzhdgUiyaTQsmkmq9FmdRrJZZFJep1Wi0Oy6Sqd/B0fpOs +pBJ1IdROxdgqDoKnv/MTPBWf1qkyKMC3pKmLTVKn8yTLdiLdlEVVy4VYNFWar0Sap3WaZOk/oEWR +x+Lp78cgOM8FzDxLZSVuZaUArhLFUlzu6nWRi6gpcc7P4z8nL8cToeZVWtbQoNI4A0XWSR3kUi4A +TWjZKCBlWstDVcp5ukzntuG2aLKFKLNkLsV//RdPjZqGYaCKjdyuZSVFDsgATAmwSsQDvqaVmBcL +GQvxWs4THICft8QKGNoE10whGfNCZEW+gjnlci6VSqqdiGZNTYAIZbEoAKcUMKjTLAu2RXWjxrCk +tB5beCQSZg9/MsweME8cv885gOOHPPg5T79MGDZwD4Kr18w2lVymX0SCYOGn/CLnU/0sSpdikS6X +QIO8HmOTgBFQIktnRyUtx7d6hb47Iq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ibu600OHzls060IKCufql +g63Zv3Mp/t4j05foQb6spxj7zLkfX/uIVHPsB3RL7aqOIF5qnS8+en6tbzajQo/VVxLPa14fJ/Rc +7lx3WeOhYTQz6Jip0hhMCqzc72GoPWoLu8Mb0o5f3dXGSLs4BxdoP6/eqLOVh5VO02exqHRaC0vR ++G+mirJU+fmCq5Ta1xyCRccC897nZW+WyGsxiMawF7e329Zb2621wQDo2I7tLv7jrv9/AfAaXNUU +TOsyF6jViUG46+NBJqZXv+rRK7Evv2i81ZEw33DQ8y6YowH05r+BuxfN92SX3RbVP8bNymDOGnY7 +16PfvzG+4ecrzfzkjPZya/H/ScnXyqwX/JtSrrL5pbrryu1hPKFrZzsrJD6sUuyPwDGdKerJyxmq +dvmdHNCrrzU/+2W0pQ6gSvPl/Mertmi+7hBlDhB80kRUqcNeJCGapHNCz1cvCFwsf0A/Ne++jGMf +TuOJcm6+ZnP9TRR7tWjHreOhZ6huiKnPAP2zfmqpIqHHLG/emnNhyHxSs+JJYfIwj6t2AlLdVneO +3Is9u0R33ef+Wv2pVizPfbUW0rGhps1FRRfnZ/2xsnr3oT2Slh2tvngsLXu6M0OgIen7ufrjprrD +vzXQAgNE22ualqzbyAb97uvl6qF/2a5hcU+eBzVWzOdmVjA0PXQMQoAhsulmBv39oU13134SjSlb +dX85nKW3umfYbtu8713Sylhb2i3v2qaoc8C7S2P3pME8uIGedi1IxXbL+adi+P2fT8Xy/m+/PrxZ +/TrXDcpqOMjotwdo9AJmg8r1N7BySygc+Gp+XaYdJhpV8f/7Oy3Y1s330l09YBDTjnyjn5qHGF7x +6O7hZfMXz21OyLZB6lUfOGAGMzo/bjaL7VaV7Ha76D/1yJVEqKmr+L2nCbH7+959wDtv38JZplQG +BDaonX65d/fwEjNqlDjLVIvM9X+XVxF7 +""") + +##file distribute_setup.py +DISTRIBUTE_SETUP_PY = convert(""" +eJztG2tz2zbyu34FTh4PqYSi7TT3GM+pM2nj9DzNJZnYaT8kHhoiIYk1X+XDsvrrb3c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78d3vTcvMB3n7l3iX1JXWqk= +""") + +##file activate.csh +ACTIVATE_CSH = convert(""" +eJx9U11vmzAUffevOCVRu+UB9pws29Kl0iq1aVWllaZlcgxciiViItsQdb9+xiQp+dh4QOB7Pu49 +XHqY59IgkwVhVRmLmFAZSrGRNkdgykonhFiqSCRW1sJSmJg8wCDT5QrucRCyHn6WFRKhVGmhKwVp +kUpNiS3emup3TY6XIn7DVNQyJUwlrgthJD6n/iCNv72uhCzCpFx9CRkThRQGKe08cWXJ9db/yh/u +pvzl9mn+PLnjj5P5D1yM8QmXlzBkSdXwZ0H/BBc0mEo5FE5qI2jKhclHOOvy9HD/OO/6YO1mX9vx +sY0H/tPIV0dtqel0V7iZvWyNg8XFcBA0ToEqVeqOdNUEQFvN41SumAv32VtJrakQNSmLWmgp4oJM +yDoBHgoydtoEAs47r5wHHnUal5vbJ8oOI+9wI86vb2d8Nrm/4Xy4RZ8R85E4uTZPB5EZPnTaaAGu +E59J8BE2J8XgrkbLeXMlVoQxznEYFYY8uFFdxsKQRx90Giwx9vSueHP1YNaUSFG4vTaErNSYuBOF +lXiVyXa9Sy3JdClEyK1dD6Nos9mEf8iKlOpmqSNTZnYjNEWiUYn2pKNB3ttcLJ3HmYYXy6Un76f7 +r8rRsC1TpTJj7f19m5sUf/V3Ir+x/yjtLu8KjLX/CmN/AcVGUUo= +""") + +##file activate.bat +ACTIVATE_BAT = convert(""" +eJyFUkEKgzAQvAfyhz0YaL9QEWpRqlSjWGspFPZQTevFHOr/adQaU1GaUzI7Mzu7ZF89XhKkEJS8 +qxaKMMsvboQ+LxxE44VICSW1gEa2UFaibqoS0iyJ0xw2lIA6nX5AHCu1jpRsv5KRjknkac9VLVug +sX9mtzxIeJDE/mg4OGp47qoLo3NHX2jsMB3AiDht5hryAUOEifoTdCXbSh7V0My2NMq/Xbh5MEjU +ZT63gpgNT9lKOJ/CtHsvT99re3pX303kydn4HeyOeAg5cjf2EW1D6HOPkg9NGKhu +""") + +##file deactivate.bat +DEACTIVATE_BAT = convert(""" +eJxzSE3OyFfIT0vj4spMU0hJTcvMS01RiPf3cYkP8wwKCXX0iQ8I8vcNCFHQ4FIAguLUEgWIgK0q +FlWqXJpcICVYpGzx2BAZ4uHv5+Hv6wq1BWINXBTdKriEKkI1DhW2QAfhttcxxANiFZCBbglQSJUL +i2dASrm4rFz9XLgAwJNbyQ== +""") + +##file distutils-init.py +DISTUTILS_INIT = convert(""" +eJytV92L4zYQf/dfMU0ottuse7RvC6FQrg8Lxz2Ugz4si9HacqKuIxlJ2ST313dG8odkO9d7aGBB +luZLv/nNjFacOqUtKJMIvzK3cXlhWgp5MDBsqK5SNYftsBAGpLLA4F1oe2Ytl+9wUvW55TswCi4c +KibhbFDSglXQCFmDPXIwtm7FawLRbwtPzg2T9gf4gupKv4GS0N262w7V0NvpbCy8cvTo3eAus6C5 +ETU3ICQZX1hFTw/dzR6V/AW1RCN4/XAtbsVXqIXmlVX6liS4lOzEYY9QFB2zx6LfoSNjz1a0pqT9 +QOIfJWQ2E888NEVZNqLlZZnvIB0NpHkimlFdKn2iRRY7yGG/CCJb6Iz280d34SFXBS2yEYPNF0Q7 +yM7oCjpWvbEDQmnhRwOs6zjThpKE8HogwRAgraqYFZgGZvzmzVh+mgz9vskT3hruwyjdFcqyENJw +bbMPO5jdzonxK68QKT7B57CMRRG5shRSWDTX3dI8LzRndZbnSWL1zfvriUmK4TcGWSnZiEPCrxXv +bM+sP7VW2is2WgWXCO3sAu3Rzysz3FiNCA8WPyM4gb1JAAmCiyTZbhFjWx3h9SzauuRXC9MFoVbc +yNTCm1QXOOIfIn/g1kGMhDUBN72hI5XCBQtIXQw8UEEdma6Jaz4vJIJ51Orc15hzzmu6TdFp3ogr +Aof0c98tsw1SiaiWotHffk3XYCkqdToxWRfTFXqgpg2khcLluOHMVC0zZhLKIomesfSreUNNgbXi +Ky9VRzwzkBneNoGQyyvGjbsFQqOZvpWIjqH281lJ/jireFgR3cPzSyTGWzQpDNIU+03Fs4XKLkhp +/n0uFnuF6VphB44b3uWRneSbBoMSioqE8oeF0JY+qTvYfEK+bPLYdoR4McfYQ7wMZj39q0kfP8q+ +FfsymO0GzNlPh644Jje06ulqHpOEQqdJUfoidI2O4CWx4qOglLye6RrFQirpCRXvhoRqXH3sYdVJ +AItvc+VUsLO2v2hVAWrNIfVGtkG351cUMNncbh/WdowtSPtCdkzYFv6mwYc9o2Jt68ud6wectBr8 +hYAulPSlgzH44YbV3ikjrulEaNJxt+/H3wZ7bXSXje/YY4tfVVrVmUstaDwwOBLMg6iduDB0lMVC +UyzYx7Ab4kjCqdViEJmDcdk/SKbgsjYXgfMznUWcrtS4z4fmJ/XOM1LPk/iIpqass5XwNbdnLb1Y +8h3ERXSWZI6rZJxKs1LBqVH65w0Oy4ra0CBYxEeuOMbDmV5GI6E0Ha/wgVTtkX0+OXvqsD02CKLf +XHbeft85D7tTCMYy2Njp4DJP7gWJr6paVWXZ1+/6YXLv/iE0M90FktiI7yFJD9e7SOLhEkkaMTUO +azq9i2woBNR0/0eoF1HFMf0H8ChxH/jgcB34GZIz3Qn4/vid+VEamQrOVqAPTrOfmD4MPdVh09tb +8dLLjvh/61lEP4yW5vJaH4vHcevG8agXvzPGoOhhXNncpTr99PTHx6e/UvffFLaxUSjuSeP286Dw +gtEMcW1xKr/he4/6IQ6FUXP+0gkioHY5iwC9Eyx3HKO7af0zPPe+XyLn7fAY78k4aiR387bCr5XT +5C4rFgwLGfMvJuAMew== +""") + +##file distutils.cfg +DISTUTILS_CFG = convert(""" +eJxNj00KwkAMhfc9xYNuxe4Ft57AjYiUtDO1wXSmNJnK3N5pdSEEAu8nH6lxHVlRhtDHMPATA4uH +xJ4EFmGbvfJiicSHFRzUSISMY6hq3GLCRLnIvSTnEefN0FIjw5tF0Hkk9Q5dRunBsVoyFi24aaLg +9FDOlL0FPGluf4QjcInLlxd6f6rqkgPu/5nHLg0cXCscXoozRrP51DRT3j9QNl99AP53T2Q= +""") + +##file activate_this.py +ACTIVATE_THIS = convert(""" +eJyNUlGL2zAMfvevEBlHEujSsXsL9GGDvW1jD3sZpQQ3Ua7aJXawnbT595Ocpe0dO5ghseVP+vRJ +VpIkn2cYPZknwAvWLXWYhRP5Sk4baKgOWRWNqtpdgTyH2Y5wpq5Tug406YAgKEzkwqg7NBPwR86a +Hk0olPopaK0NHJHzYQPnE5rI0o8+yBUwiBfyQcT8mMPJGiAT0A0O+b8BY4MKJ7zPcSSzHaKrSpJE +qeDmUgGvVbPCS41DgO+6xy/OWbfAThMn/OQ9ukDWRCSLiKzk1yrLjWapq6NnvHUoHXQ4bYPdrsVX +4lQMc/q6ZW975nmSK+oH6wL42a9H65U6aha342Mh0UVDzrD87C1bH73s16R5zsStkBZDp0NrXQ+7 +HaRnMo8f06UBnljKoOtn/YT+LtdvSyaT/BtIv9KR60nF9f3qmuYKO4//T9ItJMsjPfgUHqKwCZ3n +xu/Lx8M/UvCLTxW7VULHxB1PRRbrYfvWNY5S8it008jOjcleaMqVBDnUXcWULV2YK9JEQ92OfC96 +1Tv4ZicZZZ7GpuEpZbbeQ7DxquVx5hdqoyFSSmXwfC90f1Dc7hjFs/tK99I0fpkI8zSLy4tSy+sI +3vMWehjQNJmE5VePlZbL61nzX3S93ZcfDqznnkb9AZ3GWJU= +""") + +if __name__ == '__main__': + main() + +## TODO: +## Copy python.exe.manifest +## Monkeypatch distutils.sysconfig diff --git a/tools/cxxtest/bin/cxxtestgen b/tools/cxxtest/bin/cxxtestgen new file mode 100644 index 0000000..e001cfa --- /dev/null +++ b/tools/cxxtest/bin/cxxtestgen @@ -0,0 +1,18 @@ +#! /usr/bin/env python +# +# The CxxTest driver script, which uses the cxxtest Python package. +# + +import sys +import os +from os.path import realpath, dirname +if sys.version_info < (3,0): + sys.path.insert(0, dirname(dirname(realpath(__file__)))+os.sep+'python') +else: + sys.path.insert(0, dirname(dirname(realpath(__file__)))+os.sep+'python'+os.sep+'python3') +sys.path.append(".") + +import cxxtest + +cxxtest.main(sys.argv) + diff --git a/tools/cxxtest/build_tools/SCons/AUTHORS b/tools/cxxtest/build_tools/SCons/AUTHORS new file mode 100644 index 0000000..1f3e7e4 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/AUTHORS @@ -0,0 +1,19 @@ +This file is meant to be a full credit of the people who helped make the CxxTest +builder what it is today. + + +Current maintainer: + GaÅ¡per Ažman (gasper dot azman at gmail.com) + + +Original author: + GaÅ¡per Ažman + +Additional patches and tests: + Diego Nieto Cid + Edmundo López Bobeda + John Darby Mitchell + Pavol Juhas + +Other helpful suggestions: + John Darby Mitchell diff --git a/tools/cxxtest/build_tools/SCons/cxxtest.py b/tools/cxxtest/build_tools/SCons/cxxtest.py new file mode 100644 index 0000000..2bcce0c --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/cxxtest.py @@ -0,0 +1,348 @@ +# coding=UTF-8 +# +# == Preamble == +# Authors of this script are in the Authors file in the same directory as this +# script. +# +# please send bugreports/praise/comments/criticism to +# gasper.azman at gmail.com or the cxxtest mailing list (dev at cxxtest.tigris.org) +# +# This file is maintained as a part of the CxxTest test suite. +# +# == About == +# +# This builder correctly tracks dependencies and supports just about every +# configuration option for CxxTest that I can think of. It automatically +# defines a target "check" (configurable), so all tests can be run with a +# % scons check +# This will first compile and then run the tests. +# +# The default configuration assumes that cxxtest is located at the base source +# directory (where SConstruct is), that the cxxtestgen is under +# cxxtest/bin/cxxtestgen and headers are in cxxtest/cxxtest/. The +# header include path is automatically added to CPPPATH. It, however, can also +# recognise that cxxtest is installed system-wide (based on redhat's RPM). +# +# For a list of environment variables and their defaults, see the generate() +# function. +# +# This should be in a file called cxxtest.py somewhere in the scons toolpath. +# (default: #/site_scons/site_tools/) +# +# == Usage: == +# +# For configuration options, check the comment of the generate() function. +# +# This builder has a variety of different possible usages, so bear with me. +# +# env.CxxTest('target') +# The simplest of them all, it models the Program call. This sees if target.t.h +# is around and passes it through the cxxtestgen and compiles it. Might only +# work on unix though, because target can't have a suffix right now. +# +# env.CxxTest(['target.t.h']) +# This compiles target.t.h as in the previous example, but now sees that it is a +# source file. It need not have the same suffix as the env['CXXTEST_SUFFIX'] +# variable dictates. The only file provided is taken as the test source file. +# +# env.CxxTest(['test1.t.h','test1_lib.cpp','test1_lib2.cpp','test2.t.h',...]) +# You may also specify multiple source files. In this case, the 1st file that +# ends with CXXTEST_SUFFIX (default: .t.h) will be taken as the default test +# file. All others will be run with the --part switch and linked in. All files +# *not* having the right suffix will be passed to the Program call verbatim. +# +# In the last two cases, you may also specify the desired name of the test as +# the 1st argument to the function. This will result in the end executable +# called that. Normal Program builder rules apply. +# + +from SCons.Script import * +from SCons.Builder import Builder +import os + +# A warning class to notify users of problems +class ToolCxxTestWarning(SCons.Warnings.Warning): + pass + +SCons.Warnings.enableWarningClass(ToolCxxTestWarning) + +def accumulateEnvVar(dicts, name, default = []): + """ + Accumulates the values under key 'name' from the list of dictionaries dict. + The default value is appended to the end list if 'name' does not exist in + the dict. + """ + final = [] + for d in dicts: + final += Split(d.get(name, default)) + return final + +def multiget(dictlist, key, default = None): + """ + Takes a list of dictionaries as its 1st argument. Checks if the key exists + in each one and returns the 1st one it finds. If the key is found in no + dictionaries, the default is returned. + """ + for dict in dictlist: + if dict.has_key(key): + return dict[key] + else: + return default + +def envget(env, key, default=None): + """Look in the env, then in os.environ. Otherwise same as multiget.""" + return multiget([env, os.environ], key, default) + +def UnitTest(env, target, source = [], **kwargs): + """ + Prepares the Program call arguments, calls Program and adds the result to + the check target. + """ + # get the c and cxx flags to process. + ccflags = Split( multiget([kwargs, env, os.environ], 'CCFLAGS' )) + cxxflags = Split( multiget([kwargs, env, os.environ], 'CXXFLAGS')) + # get the removal c and cxx flags + cxxremove = set( Split( multiget([kwargs, env, os.environ],'CXXTEST_CXXFLAGS_REMOVE'))) + ccremove = set( Split( multiget([kwargs, env, os.environ],'CXXTEST_CCFLAGS_REMOVE' ))) + # remove the required flags + ccflags = [item for item in ccflags if item not in ccremove] + cxxflags = [item for item in cxxflags if item not in cxxremove] + # fill the flags into kwargs + kwargs["CXXFLAGS"] = cxxflags + kwargs["CCFLAGS"] = ccflags + test = env.Program(target, source = source, **kwargs) + if multiget([kwargs, env, os.environ], 'CXXTEST_SKIP_ERRORS', False): + runner = env.Action(test[0].abspath, exitstatfunc=lambda x:0) + else: + runner = env.Action(test[0].abspath) + env.Alias(env['CXXTEST_TARGET'], test, runner) + env.AlwaysBuild(env['CXXTEST_TARGET']) + return test + +def isValidScriptPath(cxxtestgen): + """check keyword arg or environment variable locating cxxtestgen script""" + + if cxxtestgen and os.path.exists(cxxtestgen): + return True + else: + SCons.Warnings.warn(ToolCxxTestWarning, + "Invalid CXXTEST environment variable specified!") + return False + +def defaultCxxTestGenLocation(env): + return os.path.join( + envget(env, 'CXXTEST_CXXTESTGEN_DEFAULT_LOCATION'), + envget(env, 'CXXTEST_CXXTESTGEN_SCRIPT_NAME') + ) + +def findCxxTestGen(env): + """locate the cxxtestgen script by checking environment, path and project""" + + # check the SCons environment... + # Then, check the OS environment... + cxxtest = envget(env, 'CXXTEST', None) + + # check for common passing errors and provide diagnostics. + if isinstance(cxxtest, (list, tuple, dict)): + SCons.Warnings.warn( + ToolCxxTestWarning, + "The CXXTEST variable was specified as a list." + " This is not supported. Please pass a string." + ) + + if cxxtest: + try: + #try getting the absolute path of the file first. + # Required to expand '#' + cxxtest = env.File(cxxtest).abspath + except TypeError: + try: + #maybe only the directory was specified? + cxxtest = env.File( + os.path.join(cxxtest, defaultCxxTestGenLocation(env) + )).abspath + except TypeError: + pass + # If the user specified the location in the environment, + # make sure it was correct + if isValidScriptPath(cxxtest): + return os.path.realpath(cxxtest) + + # No valid environment variable found, so... + # Next, check the path... + # Next, check the project + check_path = os.path.join( + envget(env, 'CXXTEST_INSTALL_DIR'), + envget(env, 'CXXTEST_CXXTESTGEN_DEFAULT_LOCATION')) + + cxxtest = (env.WhereIs(envget(env, 'CXXTEST_CXXTESTGEN_SCRIPT_NAME')) or + env.WhereIs(envget(env, 'CXXTEST_CXXTESTGEN_SCRIPT_NAME'), + path=[Dir(check_path).abspath])) + + if cxxtest: + return cxxtest + else: + # If we weren't able to locate the cxxtestgen script, complain... + SCons.Warnings.warn( + ToolCxxTestWarning, + "Unable to locate cxxtestgen in environment, path or" + " project!\n" + "Please set the CXXTEST variable to the path of the" + " cxxtestgen script" + ) + return None + +def findCxxTestHeaders(env): + searchfile = 'TestSuite.h' + cxxtestgen_pathlen = len(defaultCxxTestGenLocation(env)) + + default_path = Dir(envget(env,'CXXTEST_INSTALL_DIR')).abspath + + os_cxxtestgen = os.path.realpath(File(env['CXXTEST']).abspath) + alt_path = os_cxxtestgen[:-cxxtestgen_pathlen] + + searchpaths = [default_path, alt_path] + for p in searchpaths: + if os.path.exists(os.path.join(p, 'cxxtest', searchfile)): + return p + +def generate(env, **kwargs): + """ + Keyword arguments (all can be set via environment variables as well): + CXXTEST - the path to the cxxtestgen script. + Default: searches SCons environment, OS environment, + path and project in that order. Instead of setting this, + you can also set CXXTEST_INSTALL_DIR + CXXTEST_RUNNER - the runner to use. Default: ErrorPrinter + CXXTEST_OPTS - other options to pass to cxxtest. Default: '' + CXXTEST_SUFFIX - the suffix of the test files. Default: '.t.h' + CXXTEST_TARGET - the target to append the tests to. Default: check + CXXTEST_CXXFLAGS_REMOVE - the flags that cxxtests can't compile with, + or give lots of warnings. Will be stripped. + Default: -pedantic -Weffc++ + CXXTEST_CCFLAGS_REMOVE - the same thing as CXXTEST_CXXFLAGS_REMOVE, just for + CCFLAGS. Default: same as CXXFLAGS. + CXXTEST_PYTHON - the path to the python binary. + Default: searches path for python + CXXTEST_SKIP_ERRORS - set to True to continue running the next test if one + test fails. Default: False + CXXTEST_CPPPATH - If you do not want to clutter your global CPPPATH with the + CxxTest header files and other stuff you only need for + your tests, this is the variable to set. Behaves as + CPPPATH does. + CXXTEST_INSTALL_DIR - this is where you tell the builder where CxxTest is + installed. The install directory has cxxtest, + python, docs and other subdirectories. + ... and all others that Program() accepts, like CPPPATH etc. + """ + + print "Loading CxxTest tool..." + + # + # Expected behaviour: keyword arguments override environment variables; + # environment variables override default settings. + # + env.SetDefault( CXXTEST_RUNNER = 'ErrorPrinter' ) + env.SetDefault( CXXTEST_OPTS = '' ) + env.SetDefault( CXXTEST_SUFFIX = '.t.h' ) + env.SetDefault( CXXTEST_TARGET = 'check' ) + env.SetDefault( CXXTEST_CPPPATH = ['#'] ) + env.SetDefault( CXXTEST_PYTHON = env.WhereIs('python') ) + env.SetDefault( CXXTEST_SKIP_ERRORS = False ) + env.SetDefault( CXXTEST_CXXFLAGS_REMOVE = + ['-pedantic','-Weffc++','-pedantic-errors'] ) + env.SetDefault( CXXTEST_CCFLAGS_REMOVE = + ['-pedantic','-Weffc++','-pedantic-errors'] ) + env.SetDefault( CXXTEST_INSTALL_DIR = '#/cxxtest/' ) + + # this one's not for public use - it documents where the cxxtestgen script + # is located in the CxxTest tree normally. + env.SetDefault( CXXTEST_CXXTESTGEN_DEFAULT_LOCATION = 'bin' ) + # the cxxtestgen script name. + env.SetDefault( CXXTEST_CXXTESTGEN_SCRIPT_NAME = 'cxxtestgen' ) + + #Here's where keyword arguments are applied + apply(env.Replace, (), kwargs) + + #If the user specified the path to CXXTEST, make sure it is correct + #otherwise, search for and set the default toolpath. + if (not kwargs.has_key('CXXTEST') or not isValidScriptPath(kwargs['CXXTEST']) ): + env["CXXTEST"] = findCxxTestGen(env) + + # find and add the CxxTest headers to the path. + env.AppendUnique( CXXTEST_CPPPATH = [findCxxTestHeaders(env)] ) + + cxxtest = env['CXXTEST'] + if cxxtest: + # + # Create the Builder (only if we have a valid cxxtestgen!) + # + cxxtest_builder = Builder( + action = + [["$CXXTEST_PYTHON",cxxtest,"--runner=$CXXTEST_RUNNER", + "$CXXTEST_OPTS","$CXXTEST_ROOT_PART","-o","$TARGET","$SOURCE"]], + suffix = ".cpp", + src_suffix = '$CXXTEST_SUFFIX' + ) + else: + cxxtest_builder = (lambda *a: sys.stderr.write("ERROR: CXXTESTGEN NOT FOUND!")) + + def CxxTest(env, target, source = None, **kwargs): + """Usage: + The function is modelled to be called as the Program() call is: + env.CxxTest('target_name') will build the test from the source + target_name + env['CXXTEST_SUFFIX'], + env.CxxTest('target_name', source = 'test_src.t.h') will build the test + from test_src.t.h source, + env.CxxTest('target_name, source = ['test_src.t.h', other_srcs] + builds the test from source[0] and links in other files mentioned in + sources, + You may also add additional arguments to the function. In that case, they + will be passed to the actual Program builder call unmodified. Convenient + for passing different CPPPATHs and the sort. This function also appends + CXXTEST_CPPPATH to CPPPATH. It does not clutter the environment's CPPPATH. + """ + if (source == None): + suffix = multiget([kwargs, env, os.environ], 'CXXTEST_SUFFIX', "") + source = [t + suffix for t in target] + sources = Flatten(Split(source)) + headers = [] + linkins = [] + for l in sources: + # check whether this is a file object or a string path + try: + s = l.abspath + except AttributeError: + s = l + + if s.endswith(multiget([kwargs, env, os.environ], 'CXXTEST_SUFFIX', None)): + headers.append(l) + else: + linkins.append(l) + + deps = [] + if len(headers) == 0: + if len(linkins) != 0: + # the 1st source specified is the test + deps.append(env.CxxTestCpp(linkins.pop(0), **kwargs)) + else: + deps.append(env.CxxTestCpp(headers.pop(0), **kwargs)) + deps.extend( + [env.CxxTestCpp(header, CXXTEST_RUNNER = 'none', + CXXTEST_ROOT_PART = '--part', **kwargs) + for header in headers] + ) + deps.extend(linkins) + kwargs['CPPPATH'] = list(set( + Split(kwargs.get('CPPPATH', [])) + + Split(env.get( 'CPPPATH', [])) + + Split(kwargs.get('CXXTEST_CPPPATH', [])) + + Split(env.get( 'CXXTEST_CPPPATH', [])) + )) + + return UnitTest(env, target, source = deps, **kwargs) + + env.Append( BUILDERS = { "CxxTest" : CxxTest, "CxxTestCpp" : cxxtest_builder } ) + +def exists(env): + return os.path.exists(env['CXXTEST']) diff --git a/tools/cxxtest/build_tools/SCons/test/default_env/README b/tools/cxxtest/build_tools/SCons/test/default_env/README new file mode 100644 index 0000000..d8c8b69 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/default_env/README @@ -0,0 +1,2 @@ +Tests if the 'default environment' defaults are sane and work out of the box. +by: GaÅ¡per Ažman diff --git a/tools/cxxtest/build_tools/SCons/test/default_env/SConstruct b/tools/cxxtest/build_tools/SCons/test/default_env/SConstruct new file mode 100644 index 0000000..637992e --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/default_env/SConstruct @@ -0,0 +1,10 @@ +env = Environment( + toolpath=['../../'], + tools=['default','cxxtest'] + ) + +env['CXXTEST_SKIP_ERRORS'] = True +env.CxxTest(['src/ThrowNoStd.h']) +env.CxxTest(['src/AborterNoThrow.h']) +env.CxxTest(['src/Comments.h']) + diff --git a/tools/cxxtest/build_tools/SCons/test/default_env/TestDef.py b/tools/cxxtest/build_tools/SCons/test/default_env/TestDef.py new file mode 100644 index 0000000..3283790 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/default_env/TestDef.py @@ -0,0 +1,9 @@ + +expect_success = True +type = 'scons' +links = { + 'cxxtest': '../../../../', + 'src' : '../../../../test/' + } + + diff --git a/tools/cxxtest/build_tools/SCons/test/empty_source_list/README b/tools/cxxtest/build_tools/SCons/test/empty_source_list/README new file mode 100644 index 0000000..419901b --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/empty_source_list/README @@ -0,0 +1,2 @@ +Tests if cxxtest behaves correctly if no sources are given. +by: GaÅ¡per Ažman diff --git a/tools/cxxtest/build_tools/SCons/test/empty_source_list/SConstruct b/tools/cxxtest/build_tools/SCons/test/empty_source_list/SConstruct new file mode 100644 index 0000000..9f1dda9 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/empty_source_list/SConstruct @@ -0,0 +1,4 @@ +env = Environment(toolpath=['../../'],tools=['default','cxxtest']) + +env.CxxTest('test_bar') +env.CxxTest('test_foo') diff --git a/tools/cxxtest/build_tools/SCons/test/empty_source_list/TestDef.py b/tools/cxxtest/build_tools/SCons/test/empty_source_list/TestDef.py new file mode 100644 index 0000000..4088646 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/empty_source_list/TestDef.py @@ -0,0 +1,2 @@ + +links = {'cxxtest' : '../../../../'} diff --git a/tools/cxxtest/build_tools/SCons/test/empty_source_list/requirement.hpp b/tools/cxxtest/build_tools/SCons/test/empty_source_list/requirement.hpp new file mode 100644 index 0000000..3a6f757 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/empty_source_list/requirement.hpp @@ -0,0 +1,12 @@ +/** + * @file requirement.cpp + * Implementation of the requirement function. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:09:42 AM + */ + +bool call_a_requirement() { + return true; +} diff --git a/tools/cxxtest/build_tools/SCons/test/empty_source_list/test_bar.t.h b/tools/cxxtest/build_tools/SCons/test/empty_source_list/test_bar.t.h new file mode 100644 index 0000000..4cd1ada --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/empty_source_list/test_bar.t.h @@ -0,0 +1,23 @@ +#ifndef TEST_BAR_T_H +#define TEST_BAR_T_H +/** + * @file test_bar.t.h + * Test one for the joint test ehm, test. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:04:06 AM + */ + +#include +#include "requirement.hpp" + +class TestBar : public CxxTest::TestSuite +{ +public: + void test_foo() { + TS_ASSERT(call_a_requirement()); + } +}; + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/empty_source_list/test_foo.t.h b/tools/cxxtest/build_tools/SCons/test/empty_source_list/test_foo.t.h new file mode 100644 index 0000000..2850447 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/empty_source_list/test_foo.t.h @@ -0,0 +1,23 @@ +#ifndef TEST_FOO_T_H +#define TEST_FOO_T_H +/** + * @file test_foo.t.h + * Test one for the joint test ehm, test. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:02:06 AM + */ + +#include "requirement.hpp" +#include + +class TestFoo : public CxxTest::TestSuite +{ +public: + void test_foo() { + TS_ASSERT(call_a_requirement()); + } +}; + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/eprouvette.py b/tools/cxxtest/build_tools/SCons/test/eprouvette.py new file mode 100644 index 0000000..9748aeb --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/eprouvette.py @@ -0,0 +1,204 @@ +#!/usr/bin/env python +# vim: fileencoding=utf-8 + +from __future__ import print_function +import os, sys +from os.path import isdir, isfile, islink, join +from optparse import OptionParser +from subprocess import check_call, CalledProcessError, PIPE + +options = None +args = [] +available_types = set(['scons']) +tool_stdout = PIPE + +def main(): + global options + global args + global tool_stdout + """Parse the options and execute the program.""" + usage = \ + """Usage: %prog [options] [test1 [test2 [...]]] + + If you provide one or more tests, this will run the provided tests. + Otherwise, it will look for tests in the current directory and run them all. + """ + # option parsing + parser = OptionParser(usage) + + parser.set_defaults( + action='run', + verbose=True) + + parser.add_option("-c", "--clean", + action='store_const', const='clean', dest='action', + help="deletes any generated files in the tests") + parser.add_option("--run", + action='store_const', const='run', dest='action', + help="sets up the environment, compiles and runs the tests") + parser.add_option("-v", "--verbose", + action='store_true', dest='verbose', + help="spew out more details") + parser.add_option("-q", "--quiet", + action='store_false', dest='verbose', + help="spew out only success/failure of tests") + parser.add_option("--target-dir", + dest='target_dir', action='store', default='./', + help='target directory to look for tests in. default: %default') + parser.add_option("--debug", + dest='debug', action='store_true', default=False, + help='turn on debug output.') + + (options, args) = parser.parse_args() + + if options.debug or options.verbose: + tool_stdout = None + # gather the tests + tests = [] + if len(args) == 0: + tests = crawl_tests(options.target_dir) + else: + tests = args + tests = purge_tests(tests) + + # run the tests + if options.action == 'run': + for t in tests: + run_test(t) + elif options.action == 'clean': + for t in tests: + clean_test(t) + +def crawl_tests(target): + """Gather the directories in the test directory.""" + files = os.listdir(target) + return [f for f in files if isdir(f) and f[0] != '.'] + +def purge_tests(dirs): + """Look at the test candidates and purge those that aren't from the list""" + tests = [] + for t in dirs: + if isfile(join(t, 'TestDef.py')): + tests.append(t) + else: + warn("{0} is not a test (missing TestDef.py file).".format(t)) + return tests + +def warn(msg): + """A general warning function.""" + if options.verbose: + print('[Warn]: ' + msg, file=sys.stderr) + +def notice(msg): + """A general print function.""" + if options.verbose: + print(msg) + +def debug(msg): + """A debugging function""" + if options.debug: + print(msg) + +def run_test(t): + """Runs the test in directory t.""" + opts = read_opts(t) + notice("-----------------------------------------------------") + notice("running test '{0}':\n".format(t)) + readme = join(t, 'README') + if isfile(readme): + notice(open(readme).read()) + notice("") + if opts['type'] not in available_types: + warn('{0} is not a recognised test type in {1}'.format(opts['type'], t)) + return + if not opts['expect_success']: + warn("tests that fail intentionally are not yet supported.") + return + + # set up the environment + setup_env(t, opts) + # run the test + try: + if opts['type'] == 'scons': + run_scons(t, opts) + except RuntimeError as e: + print("Test {0} failed.".format(t)) + return + + if not options.verbose: + print('.', end='') + sys.stdout.flush() + else: + print("test '{0}' successful.".format(t)) + +def read_opts(t): + """Read the test options and return them.""" + opts = { + 'expect_success' : True, + 'type' : 'scons', + 'links' : {} + } + f = open(join(t, "TestDef.py")) + exec(f.read(), opts) + return opts + +def setup_env(t, opts): + """Set up the environment for the test.""" + # symlinks + links = opts['links'] + for link in links: + frm = links[link] + to = join(t, link) + debug("Symlinking {0} to {1}".format(frm, to)) + if islink(to): + os.unlink(to) + os.symlink(frm, to) + +def teardown_env(t, opts): + """Remove all files generated for the test.""" + links = opts['links'] + for link in links: + to = join(t, link) + debug('removing link {0}'.format(to)) + os.unlink(to) + +def clean_test(t): + """Remove all generated files.""" + opts = read_opts(t) + notice("cleaning test {0}".format(t)) + if opts['type'] == 'scons': + setup_env(t, opts) # scons needs the environment links to work + clean_scons(t, opts) + teardown_env(t, opts) + +def clean_scons(t, opts): + """Make scons clean after itself.""" + cwd = os.getcwd() + os.chdir(t) + try: + check_call(['scons', '--clean'], stdout=tool_stdout, stderr=None) + except CalledProcessError as e: + warn("SCons failed with error {0}".format(e.returncode)) + os.chdir(cwd) + sconsign = join(t, '.sconsign.dblite') + if isfile(sconsign): + os.unlink(sconsign) + +def run_scons(t, opts): + """Run scons test.""" + cwd = os.getcwd() + os.chdir(t) + try: + check_call(['scons', '--clean'], stdout=tool_stdout) + check_call(['scons', '.'], stdout=tool_stdout) + check_call(['scons', 'check'], stdout=tool_stdout) + except CalledProcessError as e: + os.chdir(cwd) # clean up + raise e + os.chdir(cwd) + +if __name__ == "__main__": + main() + +if not options.verbose: + print() # quiet doesn't output newlines. diff --git a/tools/cxxtest/build_tools/SCons/test/expanding_#/README b/tools/cxxtest/build_tools/SCons/test/expanding_#/README new file mode 100644 index 0000000..eac1c92 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/expanding_#/README @@ -0,0 +1,3 @@ +Tests whether expanding '#' to the top-level directory works as intended in +scons. +by: GaÅ¡per Ažman diff --git a/tools/cxxtest/build_tools/SCons/test/expanding_#/SConstruct b/tools/cxxtest/build_tools/SCons/test/expanding_#/SConstruct new file mode 100644 index 0000000..bae8789 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/expanding_#/SConstruct @@ -0,0 +1,10 @@ +env = Environment( + toolpath=['../../'], + tools=['default','cxxtest'], + CXXTEST='./../../../../bin/cxxtestgen' + ) + +env['CXXTEST_SKIP_ERRORS'] = True +env.CxxTest(['src/ThrowNoStd.h']) +env.CxxTest(['src/AborterNoThrow.h']) +env.CxxTest(['src/Comments.h']) diff --git a/tools/cxxtest/build_tools/SCons/test/expanding_#/TestDef.py b/tools/cxxtest/build_tools/SCons/test/expanding_#/TestDef.py new file mode 100644 index 0000000..17997a2 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/expanding_#/TestDef.py @@ -0,0 +1,2 @@ + +links = {'src' : '../../../../test'} diff --git a/tools/cxxtest/build_tools/SCons/test/globbing/README b/tools/cxxtest/build_tools/SCons/test/globbing/README new file mode 100644 index 0000000..a83d021 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing/README @@ -0,0 +1,2 @@ +Tests whether we can swallow file nodes as sources as well as strings. +by: GaÅ¡per Ažman diff --git a/tools/cxxtest/build_tools/SCons/test/globbing/SConstruct b/tools/cxxtest/build_tools/SCons/test/globbing/SConstruct new file mode 100644 index 0000000..f647182 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing/SConstruct @@ -0,0 +1,3 @@ +env = Environment(toolpath=['../../'],tools=['default','cxxtest']) + +env.CxxTest('joint_tests',[Glob('src/*.t.h'), 'src/requirement.cpp']) diff --git a/tools/cxxtest/build_tools/SCons/test/globbing/TestDef.py b/tools/cxxtest/build_tools/SCons/test/globbing/TestDef.py new file mode 100644 index 0000000..4088646 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing/TestDef.py @@ -0,0 +1,2 @@ + +links = {'cxxtest' : '../../../../'} diff --git a/tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.cpp b/tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.cpp new file mode 100644 index 0000000..45d60ad --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.cpp @@ -0,0 +1,14 @@ +/** + * @file requirement.cpp + * Implementation of the requirement function. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:09:42 AM + */ + +#include "requirement.h" + +bool call_a_requirement() { + return true; +} diff --git a/tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.h b/tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.h new file mode 100644 index 0000000..9bb9437 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.h @@ -0,0 +1,14 @@ +#ifndef REQUIREMENT_H +#define REQUIREMENT_H +/** + * @file requirement.h + * Prototype for the call_a_requirement() function. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:08:35 AM + */ + +bool call_a_requirement(); + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/globbing/src/test_bar.t.h b/tools/cxxtest/build_tools/SCons/test/globbing/src/test_bar.t.h new file mode 100644 index 0000000..76e594d --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing/src/test_bar.t.h @@ -0,0 +1,23 @@ +#ifndef TEST_BAR_T_H +#define TEST_BAR_T_H +/** + * @file test_bar.t.h + * Test one for the joint test ehm, test. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:04:06 AM + */ + +#include +#include "requirement.h" + +class TestBar : public CxxTest::TestSuite +{ +public: + void test_foo() { + TS_ASSERT(call_a_requirement()); + } +}; + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/globbing/src/test_foo.t.h b/tools/cxxtest/build_tools/SCons/test/globbing/src/test_foo.t.h new file mode 100644 index 0000000..418a3ca --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing/src/test_foo.t.h @@ -0,0 +1,23 @@ +#ifndef TEST_FOO_T_H +#define TEST_FOO_T_H +/** + * @file test_foo.t.h + * Test one for the joint test ehm, test. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:02:06 AM + */ + +#include "requirement.h" +#include + +class TestFoo : public CxxTest::TestSuite +{ +public: + void test_foo() { + TS_ASSERT(call_a_requirement()); + } +}; + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/README b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/README new file mode 100644 index 0000000..188908b --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/README @@ -0,0 +1,2 @@ +Test for various things cxxtest failed to do, but now does. +by: Edmundo López B. diff --git a/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/SConstruct b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/SConstruct new file mode 100644 index 0000000..fdfd3bd --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/SConstruct @@ -0,0 +1,35 @@ +# What I want to do is the following: +# I have my class files ending with .cc and +# the main file ending with .cpp. This way it +# very easy to do the following line just to +# have all sources in that variable + +import os + +mySrc = Glob("*.cc") +myFlags = ['-I.'] + +myEnv = Environment( ENV = os.environ, tools = ['default', \ + 'cxxtest'], toolpath=['../../']) + +# Here is the first problem I corrected: +# Flags won't be correctly recognized by cxxtest +myEnv.Replace(CXXFLAGS = myFlags) + + +# Then I want to convert those sources to objects + +myObjs = myEnv.Object(mySrc) + +# Having the objects I can create my program +# this way: + +myEnv.Program('hello', ['main.cpp'] + myObjs) + +# Now I want to do the same thing with the tests +# target +# With the non corrected version you'll get 2 errors: +# The CXXFLAGS are not set correctly +# It won't even accept this construction, which as you see +# works perfectly with Program (and CxxTest should work like it) +myEnv.CxxTest('helloTest', ['hellotest.t.h'] + myObjs) diff --git a/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/TestDef.py b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/TestDef.py new file mode 100644 index 0000000..6597b0c --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/TestDef.py @@ -0,0 +1 @@ +links = {'cxxtest' : '../../../../'} diff --git a/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hello.cc b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hello.cc new file mode 100644 index 0000000..e18191d --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hello.cc @@ -0,0 +1,22 @@ +/** + * \file + * Implementation of class. + */ +/**************************************************** + * Author: Edmundo LOPEZ + * email: lopezed5@etu.unige.ch + * + * This code was written as a part of my bachelor + * thesis at the University of Geneva. + * + * $Id$ + * + * **************************************************/ + +#include + +int +Hello::foo(int x, int y) + { + return x + y; + } diff --git a/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hello.hh b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hello.hh new file mode 100644 index 0000000..7229995 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hello.hh @@ -0,0 +1,15 @@ +/** + * \file + * File containing a class + */ +/**************************************************** + * Author: Edmundo LOPEZ + * email: lopezed5@etu.unige.ch + * + * **************************************************/ + +class Hello + { + public: + int foo(int x, int y); + }; diff --git a/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hellotest.t.h b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hellotest.t.h new file mode 100644 index 0000000..e90f26b --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hellotest.t.h @@ -0,0 +1,23 @@ +/** + * \file + * The test file. + */ +/**************************************************** + * Author: Edmundo LOPEZ + * email: lopezed5@etu.unige.ch + * + * **************************************************/ + +#include +#include + + +class helloTestSuite : public CxxTest::TestSuite + { + public: + void testFoo() + { + Hello h; + TS_ASSERT_EQUALS (h.foo(2,2), 4); + } + }; diff --git a/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/main.cpp b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/main.cpp new file mode 100644 index 0000000..21f1938 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/globbing_edmundo/main.cpp @@ -0,0 +1,18 @@ +/** + * \file + * Main function comes here. + */ +/**************************************************** + * Author: Edmundo LOPEZ + * email: lopezed5@etu.unige.ch + * + * **************************************************/ + +#include +#include + +int main (int argc, char *argv[]) + { + Hello h; + std::cout << h.foo(2,3) << std::endl; + } diff --git a/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/README b/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/README new file mode 100644 index 0000000..64905b9 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/README @@ -0,0 +1,3 @@ +Tests: + - if CXXTEST_CXXFLAGS_REMOVE and CXXTEST_CCFLAGS_REMOVE flags work, + - if CCFLAGS and CXXFLAGS vars work. diff --git a/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/SConstruct b/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/SConstruct new file mode 100644 index 0000000..d946c33 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/SConstruct @@ -0,0 +1,12 @@ +flags = '-pedantic-errors -Weffc++ -Wall -Wextra -ansi' +env = Environment( + toolpath=['../../'], + tools=['default','cxxtest'], + CCFLAGS=flags, + CXXFLAGS=flags, + CXXTEST_CXXFLAGS_REMOVE=['-pedantic-errors','-Weffc++','-Wextra','-Wall','-W'], + CXXTEST_CCFLAGS_REMOVE=['-pedantic-errors','-Weffc++','-Wextra','-Wall','-W'] + ) + +env.CxxTest(['src/not-with-pedantic.h']) +env.CxxTest(['src/only_with_ansi.t.h']) diff --git a/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/TestDef.py b/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/TestDef.py new file mode 100644 index 0000000..6597b0c --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/TestDef.py @@ -0,0 +1 @@ +links = {'cxxtest' : '../../../../'} diff --git a/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/not-with-pedantic.h b/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/not-with-pedantic.h new file mode 100644 index 0000000..e7377bb --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/not-with-pedantic.h @@ -0,0 +1,20 @@ +/** + * @file not-with-pedantic.h + * Compiles, but not with -pedantic. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-09-30 13:33:50 + */ + + +#include + +class TestPedantic : public CxxTest::TestSuite +{ +public: + void testPedanticPresent() { + TS_ASSERT(true); + int f = (true)?:5; + } +}; diff --git a/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/only_with_ansi.t.h b/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/only_with_ansi.t.h new file mode 100644 index 0000000..4f6615e --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/only_with_ansi.t.h @@ -0,0 +1,22 @@ +/** + * @file only_with_ansi.t.h + * This test only runs correctly if -ansi was supplied as a g++ switch. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2009-02-11 06:26:59 PM + */ + +#include + +class TestAnsi : public CxxTest::TestSuite +{ +public: + void testAnsiPresent() { +#ifdef __STRICT_ANSI__ + TS_ASSERT(true); +#else + TS_ASSERT(false); +#endif + } +}; diff --git a/tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/README b/tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/README new file mode 100644 index 0000000..07a9947 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/README @@ -0,0 +1,5 @@ +This test tests whether variables that are put into the environment after it has +been initialised work as expected. + +If they do not, -pedantic-errors will appear in the gcc commandline and the +compilation WILL FAIL, failing the test. diff --git a/tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/SConstruct b/tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/SConstruct new file mode 100644 index 0000000..aefb439 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/SConstruct @@ -0,0 +1,16 @@ +flags = '-Weffc++ -Wall -Wextra -std=gnu++0x' +env = Environment( + toolpath=['../../'], + tools=['default','cxxtest'], + CCFLAGS = Split(flags) + ['-pedantic-errors'], + CXXFLAGS = Split(flags) + ['-pedantic-errors'] + ) + +env['CXXTEST_CXXFLAGS_REMOVE']=['-Weffc++','-Wextra','-Wall','-W'] +env['CXXTEST_CCFLAGS_REMOVE']='-Weffc++ -Wextra -Wall -W' +env['CCFLAGS'] = flags +env['CXXFLAGS'] = flags +env['CXXTEST_SKIP_ERRORS'] = True + +env.CxxTest(['src/not-with-pedantic.h']) + diff --git a/tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/TestDef.py b/tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/TestDef.py new file mode 100644 index 0000000..4088646 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/TestDef.py @@ -0,0 +1,2 @@ + +links = {'cxxtest' : '../../../../'} diff --git a/tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/src/not-with-pedantic.h b/tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/src/not-with-pedantic.h new file mode 100644 index 0000000..2b92cd6 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/src/not-with-pedantic.h @@ -0,0 +1,19 @@ +/** + * @file not-with-pedantic.h + * Compiles, but not with -pedantic. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-09-30 13:33:50 + */ + + +#include + +class TestPedantic : public CxxTest::TestSuite +{ +public: + void testPedanticPresent() { + int f = (true)?:5; + } +}; diff --git a/tools/cxxtest/build_tools/SCons/test/multifile_tests/SConstruct b/tools/cxxtest/build_tools/SCons/test/multifile_tests/SConstruct new file mode 100644 index 0000000..435b9cb --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/multifile_tests/SConstruct @@ -0,0 +1,8 @@ +env = Environment(toolpath=['../../'],tools=['default','cxxtest']) + +env.CxxTest('joint_tests', + Split('src/test_foo.t.h ' + 'src/test_bar.t.h ' + 'src/requirement.cpp' + ) + ) diff --git a/tools/cxxtest/build_tools/SCons/test/multifile_tests/TestDef.py b/tools/cxxtest/build_tools/SCons/test/multifile_tests/TestDef.py new file mode 100644 index 0000000..4088646 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/multifile_tests/TestDef.py @@ -0,0 +1,2 @@ + +links = {'cxxtest' : '../../../../'} diff --git a/tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.cpp b/tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.cpp new file mode 100644 index 0000000..45d60ad --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.cpp @@ -0,0 +1,14 @@ +/** + * @file requirement.cpp + * Implementation of the requirement function. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:09:42 AM + */ + +#include "requirement.h" + +bool call_a_requirement() { + return true; +} diff --git a/tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.h b/tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.h new file mode 100644 index 0000000..9bb9437 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.h @@ -0,0 +1,14 @@ +#ifndef REQUIREMENT_H +#define REQUIREMENT_H +/** + * @file requirement.h + * Prototype for the call_a_requirement() function. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:08:35 AM + */ + +bool call_a_requirement(); + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_bar.t.h b/tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_bar.t.h new file mode 100644 index 0000000..76e594d --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_bar.t.h @@ -0,0 +1,23 @@ +#ifndef TEST_BAR_T_H +#define TEST_BAR_T_H +/** + * @file test_bar.t.h + * Test one for the joint test ehm, test. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:04:06 AM + */ + +#include +#include "requirement.h" + +class TestBar : public CxxTest::TestSuite +{ +public: + void test_foo() { + TS_ASSERT(call_a_requirement()); + } +}; + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_foo.t.h b/tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_foo.t.h new file mode 100644 index 0000000..418a3ca --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_foo.t.h @@ -0,0 +1,23 @@ +#ifndef TEST_FOO_T_H +#define TEST_FOO_T_H +/** + * @file test_foo.t.h + * Test one for the joint test ehm, test. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:02:06 AM + */ + +#include "requirement.h" +#include + +class TestFoo : public CxxTest::TestSuite +{ +public: + void test_foo() { + TS_ASSERT(call_a_requirement()); + } +}; + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/need_cpppath/SConstruct b/tools/cxxtest/build_tools/SCons/test/need_cpppath/SConstruct new file mode 100644 index 0000000..d457e55 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/need_cpppath/SConstruct @@ -0,0 +1,9 @@ + +env = Environment( + toolpath=['../../'], + tools=['default','cxxtest'], + CXXTEST_INSTALL_DIR = '../../../../', + CPPPATH = ['src/cpppathdir/'] + ) + +env.CxxTest(['src/cpppath.t.h']) diff --git a/tools/cxxtest/build_tools/SCons/test/need_cpppath/TestDef.py b/tools/cxxtest/build_tools/SCons/test/need_cpppath/TestDef.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppath.t.h b/tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppath.t.h new file mode 100644 index 0000000..3c08c39 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppath.t.h @@ -0,0 +1,25 @@ +#ifndef CPPPATH_T_H +#define CPPPATH_T_H + +/** + * @file cpppath.t.h + * This file needs the include in the include dir. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-28 11:16:46 AM + */ + +// actual path cpppathdir/include.h +#include "include.h" +#include + +class CppPathTest : public CxxTest::TestSuite +{ +public: + void test_i_need_me_exists() { + TS_ASSERT(i_need_me() == 0); + } +}; + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppathdir/include.h b/tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppathdir/include.h new file mode 100644 index 0000000..93d3b03 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppathdir/include.h @@ -0,0 +1,16 @@ +#ifndef INCLUDE_H +#define INCLUDE_H +/** + * @file include.h + * Include file for this test. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-28 11:15:40 AM + */ + +int i_need_me() { + return 0; +} + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/nonstandard_cxxtest_dir/SConstruct b/tools/cxxtest/build_tools/SCons/test/nonstandard_cxxtest_dir/SConstruct new file mode 100644 index 0000000..9b81162 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/nonstandard_cxxtest_dir/SConstruct @@ -0,0 +1,10 @@ +env = Environment( + toolpath=['../../'], + tools=['default','cxxtest'], + CXXTEST_INSTALL_DIR = '../../../../' + ) + +env['CXXTEST_SKIP_ERRORS'] = True +env.CxxTest(['src/ThrowNoStd.h']) +env.CxxTest(['src/AborterNoThrow.h']) +env.CxxTest(['src/Comments.h']) diff --git a/tools/cxxtest/build_tools/SCons/test/nonstandard_cxxtest_dir/TestDef.py b/tools/cxxtest/build_tools/SCons/test/nonstandard_cxxtest_dir/TestDef.py new file mode 100644 index 0000000..811fe8d --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/nonstandard_cxxtest_dir/TestDef.py @@ -0,0 +1,2 @@ + +links = {'src' : '../../../../test/'} diff --git a/tools/cxxtest/build_tools/SCons/test/printer_propagation/SConstruct b/tools/cxxtest/build_tools/SCons/test/printer_propagation/SConstruct new file mode 100644 index 0000000..d87118f --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/printer_propagation/SConstruct @@ -0,0 +1,8 @@ + +env = Environment( + toolpath=['../../'], + tools=['default','cxxtest'], + CXXTEST_INSTALL_DIR = '../../../../', + ) + +env.CxxTest(['src/failtest.t.h'], CPPPATH=['#'], CXXTEST_RUNNER="CrazyRunner") diff --git a/tools/cxxtest/build_tools/SCons/test/printer_propagation/TestDef.py b/tools/cxxtest/build_tools/SCons/test/printer_propagation/TestDef.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/cxxtest/build_tools/SCons/test/printer_propagation/cxxtest/CrazyRunner.h b/tools/cxxtest/build_tools/SCons/test/printer_propagation/cxxtest/CrazyRunner.h new file mode 100644 index 0000000..6ceac42 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/printer_propagation/cxxtest/CrazyRunner.h @@ -0,0 +1,16 @@ +#ifndef __cxxtest_CrazyRunner_h__ +#define __cxxtest_CrazyRunner_h__ + + +/* + * This is not a proper runner. Just a simple class that looks like one. + */ +namespace CxxTest { + class CrazyRunner { + public: + int run() { return 0; } + void process_commandline(int argc, char** argv) { } + }; +} + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/printer_propagation/src/failtest.t.h b/tools/cxxtest/build_tools/SCons/test/printer_propagation/src/failtest.t.h new file mode 100644 index 0000000..ac8c829 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/printer_propagation/src/failtest.t.h @@ -0,0 +1,23 @@ +#ifndef FAILTEST_T_H +#define FAILTEST_T_H + +/** + * @file failtest.t.h + * This test will succed only with a CrazyRunner. + * + * @author + * @version 1.0 + * @since jue ago 28 14:18:57 ART 2008 + */ + +#include + +class CppPathTest : public CxxTest::TestSuite +{ +public: + void test_i_will_fail() { + TS_ASSERT(false); + } +}; + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/recursive_sources/README b/tools/cxxtest/build_tools/SCons/test/recursive_sources/README new file mode 100644 index 0000000..e1e6b74 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/recursive_sources/README @@ -0,0 +1,2 @@ +Tests whether we can swallow recursively supplied sources - a list of lists, for +instance. diff --git a/tools/cxxtest/build_tools/SCons/test/recursive_sources/SConstruct b/tools/cxxtest/build_tools/SCons/test/recursive_sources/SConstruct new file mode 100644 index 0000000..5ba8502 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/recursive_sources/SConstruct @@ -0,0 +1,3 @@ +env = Environment(toolpath=['../../'],tools=['default','cxxtest']) + +env.CxxTest('joint_tests',['src/test_foo.t.h',['src/test_bar.t.h','src/requirement.cpp']]) diff --git a/tools/cxxtest/build_tools/SCons/test/recursive_sources/TestDef.py b/tools/cxxtest/build_tools/SCons/test/recursive_sources/TestDef.py new file mode 100644 index 0000000..6597b0c --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/recursive_sources/TestDef.py @@ -0,0 +1 @@ +links = {'cxxtest' : '../../../../'} diff --git a/tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.cpp b/tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.cpp new file mode 100644 index 0000000..45d60ad --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.cpp @@ -0,0 +1,14 @@ +/** + * @file requirement.cpp + * Implementation of the requirement function. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:09:42 AM + */ + +#include "requirement.h" + +bool call_a_requirement() { + return true; +} diff --git a/tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.h b/tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.h new file mode 100644 index 0000000..9bb9437 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.h @@ -0,0 +1,14 @@ +#ifndef REQUIREMENT_H +#define REQUIREMENT_H +/** + * @file requirement.h + * Prototype for the call_a_requirement() function. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:08:35 AM + */ + +bool call_a_requirement(); + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_bar.t.h b/tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_bar.t.h new file mode 100644 index 0000000..76e594d --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_bar.t.h @@ -0,0 +1,23 @@ +#ifndef TEST_BAR_T_H +#define TEST_BAR_T_H +/** + * @file test_bar.t.h + * Test one for the joint test ehm, test. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:04:06 AM + */ + +#include +#include "requirement.h" + +class TestBar : public CxxTest::TestSuite +{ +public: + void test_foo() { + TS_ASSERT(call_a_requirement()); + } +}; + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_foo.t.h b/tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_foo.t.h new file mode 100644 index 0000000..418a3ca --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_foo.t.h @@ -0,0 +1,23 @@ +#ifndef TEST_FOO_T_H +#define TEST_FOO_T_H +/** + * @file test_foo.t.h + * Test one for the joint test ehm, test. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-29 10:02:06 AM + */ + +#include "requirement.h" +#include + +class TestFoo : public CxxTest::TestSuite +{ +public: + void test_foo() { + TS_ASSERT(call_a_requirement()); + } +}; + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/string_cpppath/SConstruct b/tools/cxxtest/build_tools/SCons/test/string_cpppath/SConstruct new file mode 100644 index 0000000..4e1e8fe --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/string_cpppath/SConstruct @@ -0,0 +1,9 @@ + +env = Environment( + toolpath=['../../'], + tools=['default','cxxtest'], + CXXTEST_INSTALL_DIR = '../../../../', + CPPPATH = 'src/cpppathdir/' + ) + +env.CxxTest(['src/cpppath.t.h']) diff --git a/tools/cxxtest/build_tools/SCons/test/string_cpppath/TestDef.py b/tools/cxxtest/build_tools/SCons/test/string_cpppath/TestDef.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppath.t.h b/tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppath.t.h new file mode 100644 index 0000000..3c08c39 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppath.t.h @@ -0,0 +1,25 @@ +#ifndef CPPPATH_T_H +#define CPPPATH_T_H + +/** + * @file cpppath.t.h + * This file needs the include in the include dir. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-28 11:16:46 AM + */ + +// actual path cpppathdir/include.h +#include "include.h" +#include + +class CppPathTest : public CxxTest::TestSuite +{ +public: + void test_i_need_me_exists() { + TS_ASSERT(i_need_me() == 0); + } +}; + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppathdir/include.h b/tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppathdir/include.h new file mode 100644 index 0000000..93d3b03 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppathdir/include.h @@ -0,0 +1,16 @@ +#ifndef INCLUDE_H +#define INCLUDE_H +/** + * @file include.h + * Include file for this test. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-28 11:15:40 AM + */ + +int i_need_me() { + return 0; +} + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/target_syntax/SConstruct b/tools/cxxtest/build_tools/SCons/test/target_syntax/SConstruct new file mode 100644 index 0000000..7a600bb --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/target_syntax/SConstruct @@ -0,0 +1,9 @@ + +env = Environment( + toolpath=['../../'], + tools=['default','cxxtest'], + CXXTEST_INSTALL_DIR = '../../../../', + CPPPATH = ['src/cpppathdir/'] + ) + +env.CxxTest('src/cpppath') diff --git a/tools/cxxtest/build_tools/SCons/test/target_syntax/TestDef.py b/tools/cxxtest/build_tools/SCons/test/target_syntax/TestDef.py new file mode 100644 index 0000000..e69de29 diff --git a/tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppath.t.h b/tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppath.t.h new file mode 100644 index 0000000..3c08c39 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppath.t.h @@ -0,0 +1,25 @@ +#ifndef CPPPATH_T_H +#define CPPPATH_T_H + +/** + * @file cpppath.t.h + * This file needs the include in the include dir. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-28 11:16:46 AM + */ + +// actual path cpppathdir/include.h +#include "include.h" +#include + +class CppPathTest : public CxxTest::TestSuite +{ +public: + void test_i_need_me_exists() { + TS_ASSERT(i_need_me() == 0); + } +}; + +#endif diff --git a/tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppathdir/include.h b/tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppathdir/include.h new file mode 100644 index 0000000..93d3b03 --- /dev/null +++ b/tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppathdir/include.h @@ -0,0 +1,16 @@ +#ifndef INCLUDE_H +#define INCLUDE_H +/** + * @file include.h + * Include file for this test. + * + * @author GaÅ¡per Ažman (GA), gasper.azman@gmail.com + * @version 1.0 + * @since 2008-08-28 11:15:40 AM + */ + +int i_need_me() { + return 0; +} + +#endif diff --git a/tools/cxxtest/cxxtest/Descriptions.cpp b/tools/cxxtest/cxxtest/Descriptions.cpp new file mode 100644 index 0000000..dc2b88b --- /dev/null +++ b/tools/cxxtest/cxxtest/Descriptions.cpp @@ -0,0 +1,69 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__Descriptions_cpp__ +#define __cxxtest__Descriptions_cpp__ + +#include + +namespace CxxTest +{ + TestDescription::~TestDescription() {} + SuiteDescription::~SuiteDescription() {} + WorldDescription::~WorldDescription() {} + + // + // Convert total tests to string + // +#ifndef _CXXTEST_FACTOR + char *WorldDescription::strTotalTests( char *s ) const + { + numberToString( numTotalTests(), s ); + return s; + } +#else // _CXXTEST_FACTOR + char *WorldDescription::strTotalTests( char *s ) const + { + char *p = numberToString( numTotalTests(), s ); + + if ( numTotalTests() <= 1 ) + return s; + + unsigned n = numTotalTests(); + unsigned numFactors = 0; + + for ( unsigned factor = 2; (factor * factor) <= n; factor += (factor == 2) ? 1 : 2 ) { + unsigned power; + + for ( power = 0; (n % factor) == 0; n /= factor ) + ++ power; + + if ( !power ) + continue; + + p = numberToString( factor, copyString( p, (numFactors == 0) ? " = " : " * " ) ); + if ( power > 1 ) + p = numberToString( power, copyString( p, "^" ) ); + ++ numFactors; + } + + if ( n > 1 ) { + if ( !numFactors ) + copyString( p, tracker().failedTests() ? " :(" : tracker().warnings() ? " :|" : " :)" ); + else + numberToString( n, copyString( p, " * " ) ); + } + return s; + } +#endif // _CXXTEST_FACTOR +} + +#endif // __cxxtest__Descriptions_cpp__ diff --git a/tools/cxxtest/cxxtest/Descriptions.h b/tools/cxxtest/cxxtest/Descriptions.h new file mode 100644 index 0000000..36f3003 --- /dev/null +++ b/tools/cxxtest/cxxtest/Descriptions.h @@ -0,0 +1,91 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__Descriptions_h__ +#define __cxxtest__Descriptions_h__ + +// +// TestDescription, SuiteDescription and WorldDescription +// hold information about tests so they can be run and reported. +// + +#include + +namespace CxxTest +{ + class TestSuite; + + class TestDescription : public Link + { + public: + virtual ~TestDescription(); + + virtual const char *file() const = 0; + virtual int line() const = 0; + virtual const char *testName() const = 0; + virtual const char *suiteName() const = 0; + + virtual void run() = 0; + virtual bool setUp() = 0; + virtual bool tearDown() = 0; + + virtual const TestDescription *next() const = 0; + virtual TestDescription *next() = 0; + }; + + class SuiteDescription : public Link + { + public: + virtual ~SuiteDescription(); + + virtual const char *file() const = 0; + virtual int line() const = 0; + virtual const char *suiteName() const = 0; + virtual TestSuite *suite() const = 0; + + virtual unsigned numTests() const = 0; + virtual const TestDescription &testDescription( unsigned /*i*/ ) const = 0; + + virtual TestDescription *firstTest() = 0; + virtual const TestDescription *firstTest() const = 0; + virtual SuiteDescription *next() = 0; + virtual const SuiteDescription *next() const = 0; + + virtual void activateAllTests() = 0; + virtual bool leaveOnly( const char * /*testName*/ ) = 0; + + virtual bool setUp() = 0; + virtual bool tearDown() = 0; + }; + + class WorldDescription : public Link + { + public: + virtual ~WorldDescription(); + + virtual const char *worldName() const { return "cxxtest"; } + virtual unsigned numSuites( void ) const = 0; + virtual unsigned numTotalTests( void ) const = 0; + virtual const SuiteDescription &suiteDescription( unsigned /*i*/ ) const = 0; + + enum { MAX_STRLEN_TOTAL_TESTS = 32 }; + char *strTotalTests( char * /*buffer*/ ) const; + + virtual SuiteDescription *firstSuite() = 0; + virtual const SuiteDescription *firstSuite() const = 0; + + virtual void activateAllTests() = 0; + virtual bool leaveOnly( const char * /*suiteName*/, const char * /*testName*/ = 0 ) = 0; + }; +} + +#endif // __cxxtest__Descriptions_h__ + diff --git a/tools/cxxtest/cxxtest/DummyDescriptions.cpp b/tools/cxxtest/cxxtest/DummyDescriptions.cpp new file mode 100644 index 0000000..0ca137d --- /dev/null +++ b/tools/cxxtest/cxxtest/DummyDescriptions.cpp @@ -0,0 +1,60 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#include + +namespace CxxTest +{ + DummyTestDescription::DummyTestDescription() {} + + const char *DummyTestDescription::file() const { return ""; } + int DummyTestDescription::line() const { return 0; } + const char *DummyTestDescription::testName() const { return ""; } + const char *DummyTestDescription::suiteName() const { return ""; } + bool DummyTestDescription::setUp() { return true;} + void DummyTestDescription::run() {} + bool DummyTestDescription::tearDown() { return true;} + + TestDescription *DummyTestDescription::next() { return 0; } + const TestDescription *DummyTestDescription::next() const { return 0; } + + DummySuiteDescription::DummySuiteDescription() : _test() {} + + const char *DummySuiteDescription::file() const { return ""; } + int DummySuiteDescription::line() const { return 0; } + const char *DummySuiteDescription::suiteName() const { return ""; } + TestSuite *DummySuiteDescription::suite() const { return 0; } + unsigned DummySuiteDescription::numTests() const { return 0; } + const TestDescription &DummySuiteDescription::testDescription( unsigned ) const { return _test; } + SuiteDescription *DummySuiteDescription::next() { return 0; } + TestDescription *DummySuiteDescription::firstTest() { return 0; } + const SuiteDescription *DummySuiteDescription::next() const { return 0; } + const TestDescription *DummySuiteDescription::firstTest() const { return 0; } + void DummySuiteDescription::activateAllTests() {} + bool DummySuiteDescription::leaveOnly( const char * /*testName*/ ) { return false; } + + bool DummySuiteDescription::setUp() { return true;} + bool DummySuiteDescription::tearDown() { return true;} + + DummyWorldDescription::DummyWorldDescription() : _suite() {} + + unsigned DummyWorldDescription::numSuites( void ) const { return 0; } + unsigned DummyWorldDescription::numTotalTests( void ) const { return 0; } + const SuiteDescription &DummyWorldDescription::suiteDescription( unsigned ) const { return _suite; } + SuiteDescription *DummyWorldDescription::firstSuite() { return 0; } + const SuiteDescription *DummyWorldDescription::firstSuite() const { return 0; } + void DummyWorldDescription::activateAllTests() {} + bool DummyWorldDescription::leaveOnly( const char * /*suiteName*/, const char * /*testName*/ ) { return false; } + + bool DummyWorldDescription::setUp() { return true;} + bool DummyWorldDescription::tearDown() { return true;} +} + diff --git a/tools/cxxtest/cxxtest/DummyDescriptions.h b/tools/cxxtest/cxxtest/DummyDescriptions.h new file mode 100644 index 0000000..75623cd --- /dev/null +++ b/tools/cxxtest/cxxtest/DummyDescriptions.h @@ -0,0 +1,87 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__DummyDescriptions_h__ +#define __cxxtest__DummyDescriptions_h__ + +// +// DummyTestDescription, DummySuiteDescription and DummyWorldDescription +// + +#include + +namespace CxxTest +{ + class DummyTestDescription : public TestDescription + { + public: + DummyTestDescription(); + + const char *file() const; + int line() const; + const char *testName() const; + const char *suiteName() const; + bool setUp(); + void run(); + bool tearDown(); + + TestDescription *next(); + const TestDescription *next() const; + }; + + class DummySuiteDescription : public SuiteDescription + { + public: + DummySuiteDescription(); + + const char *file() const; + int line() const; + const char *suiteName() const; + TestSuite *suite() const; + unsigned numTests() const; + const TestDescription &testDescription( unsigned ) const; + SuiteDescription *next(); + TestDescription *firstTest(); + const SuiteDescription *next() const; + const TestDescription *firstTest() const; + void activateAllTests(); + bool leaveOnly( const char * /*testName*/ ); + + bool setUp(); + bool tearDown(); + + private: + DummyTestDescription _test; + }; + + class DummyWorldDescription : public WorldDescription + { + public: + DummyWorldDescription(); + + unsigned numSuites( void ) const; + unsigned numTotalTests( void ) const; + const SuiteDescription &suiteDescription( unsigned ) const; + SuiteDescription *firstSuite(); + const SuiteDescription *firstSuite() const; + void activateAllTests(); + bool leaveOnly( const char * /*suiteName*/, const char * /*testName*/ = 0 ); + + bool setUp(); + bool tearDown(); + + private: + DummySuiteDescription _suite; + }; +} + +#endif // __cxxtest__DummyDescriptions_h__ + diff --git a/tools/cxxtest/cxxtest/ErrorFormatter.h b/tools/cxxtest/cxxtest/ErrorFormatter.h new file mode 100644 index 0000000..715012c --- /dev/null +++ b/tools/cxxtest/cxxtest/ErrorFormatter.h @@ -0,0 +1,304 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__ErrorFormatter_h__ +#define __cxxtest__ErrorFormatter_h__ + +// +// The ErrorFormatter is a TestListener that +// prints reports of the errors to an output +// stream. Since we cannot rely on the standard +// iostreams, this header defines a base class +// analogout to std::ostream. +// + +#include +#include +#include +#include +#include + +namespace CxxTest +{ + class OutputStream + { + public: + virtual ~OutputStream() {} + virtual void flush() {}; + virtual OutputStream &operator<<( unsigned /*number*/ ) { return *this; } + virtual OutputStream &operator<<( const char * /*string*/ ) { return *this; } + + typedef void (*Manipulator)( OutputStream & ); + + virtual OutputStream &operator<<( Manipulator m ) { m( *this ); return *this; } + static void endl( OutputStream &o ) { (o << "\n").flush(); } + }; + + class ErrorFormatter : public TestListener + { + public: + ErrorFormatter( OutputStream *o, const char *preLine = ":", const char *postLine = "" ) : + _dotting( true ), + _reported( false ), + _o(o), + _preLine(preLine), + _postLine(postLine) + { + } + + int run() + { + TestRunner::runAllTests( *this ); + return tracker().failedTests(); + } + + void enterWorld( const WorldDescription & /*desc*/ ) + { + (*_o) << "Running " << totalTests; + _o->flush(); + _dotting = true; + _reported = false; + } + + static void totalTests( OutputStream &o ) + { + char s[WorldDescription::MAX_STRLEN_TOTAL_TESTS]; + const WorldDescription &wd = tracker().world(); + o << wd.strTotalTests( s ) << (wd.numTotalTests() == 1 ? " test" : " tests"); + } + + void enterSuite( const SuiteDescription & ) + { + _reported = false; + } + + void enterTest( const TestDescription & ) + { + _reported = false; + } + + void leaveTest( const TestDescription & ) + { + if ( !tracker().testFailed() ) { + (*_o) << "."; + _o->flush(); + fflush(stdout); + _dotting = true; + } + } + + void leaveWorld( const WorldDescription &desc ) + { + if ( !tracker().failedTests() ) { + (*_o) << "OK!" << endl; + return; + } + newLine(); + (*_o) << "Failed " << tracker().failedTests() << " of " << totalTests << endl; + unsigned numPassed = desc.numTotalTests() - tracker().failedTests(); + (*_o) << "Success rate: " << (numPassed * 100 / desc.numTotalTests()) << "%" << endl; + } + + void trace( const char *file, int line, const char *expression ) + { + stop( file, line ) << "Trace: " << + expression << endl; + } + + void warning( const char *file, int line, const char *expression ) + { + stop( file, line ) << "Warning: " << + expression << endl; + } + + void failedTest( const char *file, int line, const char *expression ) + { + stop( file, line ) << "Error: Test failed: " << + expression << endl; + } + + void failedAssert( const char *file, int line, const char *expression ) + { + stop( file, line ) << "Error: Assertion failed: " << + expression << endl; + } + + void failedAssertEquals( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ) + { + stop( file, line ) << "Error: Expected (" << + xStr << " == " << yStr << "), found (" << + x << " != " << y << ")" << endl; + } + + void failedAssertSameData( const char *file, int line, + const char *xStr, const char *yStr, + const char *sizeStr, const void *x, + const void *y, unsigned size ) + { + stop( file, line ) << "Error: Expected " << sizeStr << " (" << size << ") bytes to be equal at (" << + xStr << ") and (" << yStr << "), found:" << endl; + dump( x, size ); + (*_o) << " differs from" << endl; + dump( y, size ); + } + + void failedAssertSameFiles( const char* file, int line, + const char*, const char*, + const char* explanation + ) + { + stop( file, line ) << "Error: " << explanation << endl; + } + + void failedAssertDelta( const char *file, int line, + const char *xStr, const char *yStr, const char *dStr, + const char *x, const char *y, const char *d ) + { + stop( file, line ) << "Error: Expected (" << + xStr << " == " << yStr << ") up to " << dStr << " (" << d << "), found (" << + x << " != " << y << ")" << endl; + } + + void failedAssertDiffers( const char *file, int line, + const char *xStr, const char *yStr, + const char *value ) + { + stop( file, line ) << "Error: Expected (" << + xStr << " != " << yStr << "), found (" << + value << ")" << endl; + } + + void failedAssertLessThan( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ) + { + stop( file, line ) << "Error: Expected (" << + xStr << " < " << yStr << "), found (" << + x << " >= " << y << ")" << endl; + } + + void failedAssertLessThanEquals( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ) + { + stop( file, line ) << "Error: Expected (" << + xStr << " <= " << yStr << "), found (" << + x << " > " << y << ")" << endl; + } + + void failedAssertRelation( const char *file, int line, + const char *relation, const char *xStr, const char *yStr, + const char *x, const char *y ) + { + stop( file, line ) << "Error: Expected " << relation << "( " << + xStr << ", " << yStr << " ), found !" << relation << "( " << x << ", " << y << " )" << endl; + } + + void failedAssertPredicate( const char *file, int line, + const char *predicate, const char *xStr, const char *x ) + { + stop( file, line ) << "Error: Expected " << predicate << "( " << + xStr << " ), found !" << predicate << "( " << x << " )" << endl; + } + + void failedAssertThrows( const char *file, int line, + const char *expression, const char *type, + bool otherThrown ) + { + stop( file, line ) << "Error: Expected (" << expression << ") to throw (" << + type << ") but it " << (otherThrown ? "threw something else" : "didn't throw") << + endl; + } + + void failedAssertThrowsNot( const char *file, int line, const char *expression ) + { + stop( file, line ) << "Error: Expected (" << expression << ") not to throw, but it did" << + endl; + } + + protected: + OutputStream *outputStream() const + { + return _o; + } + + private: + ErrorFormatter( const ErrorFormatter & ); + ErrorFormatter &operator=( const ErrorFormatter & ); + + OutputStream &stop( const char *file, int line ) + { + newLine(); + reportTest(); + return (*_o) << file << _preLine << line << _postLine << ": "; + } + + void newLine( void ) + { + if ( _dotting ) { + (*_o) << endl; + _dotting = false; + } + } + + void reportTest( void ) + { + if( _reported ) + return; + (*_o) << "In " << tracker().suite().suiteName() << "::" << tracker().test().testName() << ":" << endl; + _reported = true; + } + + void dump( const void *buffer, unsigned size ) + { + if ( !buffer ) + dumpNull(); + else + dumpBuffer( buffer, size ); + } + + void dumpNull() + { + (*_o) << " (null)" << endl; + } + + void dumpBuffer( const void *buffer, unsigned size ) + { + unsigned dumpSize = size; + if ( maxDumpSize() && dumpSize > maxDumpSize() ) + dumpSize = maxDumpSize(); + + const unsigned char *p = (const unsigned char *)buffer; + (*_o) << " { "; + for ( unsigned i = 0; i < dumpSize; ++ i ) + (*_o) << byteToHex( *p++ ) << " "; + if ( dumpSize < size ) + (*_o) << "... "; + (*_o) << "}" << endl; + } + + static void endl( OutputStream &o ) + { + OutputStream::endl( o ); + } + + bool _dotting; + bool _reported; + OutputStream *_o; + const char *_preLine; + const char *_postLine; + }; +} + +#endif // __cxxtest__ErrorFormatter_h__ + diff --git a/tools/cxxtest/cxxtest/ErrorPrinter.h b/tools/cxxtest/cxxtest/ErrorPrinter.h new file mode 100644 index 0000000..130df04 --- /dev/null +++ b/tools/cxxtest/cxxtest/ErrorPrinter.h @@ -0,0 +1,66 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__ErrorPrinter_h__ +#define __cxxtest__ErrorPrinter_h__ + +// +// The ErrorPrinter is a simple TestListener that +// just prints "OK" if everything goes well, otherwise +// reports the error in the format of compiler messages. +// The ErrorPrinter uses std::cout +// + +#include + +#ifndef _CXXTEST_HAVE_STD +# define _CXXTEST_HAVE_STD +#endif // _CXXTEST_HAVE_STD + +#include +#include + +#ifdef _CXXTEST_OLD_STD +# include +#else // !_CXXTEST_OLD_STD +# include +#endif // _CXXTEST_OLD_STD + +namespace CxxTest +{ + class ErrorPrinter : public ErrorFormatter + { + public: + ErrorPrinter( CXXTEST_STD(ostream) &o = CXXTEST_STD(cout), const char *preLine = ":", const char *postLine = "" ) : + ErrorFormatter( new Adapter(o), preLine, postLine ) {} + virtual ~ErrorPrinter() { delete outputStream(); } + + private: + class Adapter : public OutputStream + { + CXXTEST_STD(ostream) &_o; + public: + Adapter( CXXTEST_STD(ostream) &o ) : _o(o) {} + void flush() { _o.flush(); } + OutputStream &operator<<( const char *s ) { _o << s; return *this; } + OutputStream &operator<<( Manipulator m ) { return OutputStream::operator<<( m ); } + OutputStream &operator<<( unsigned i ) + { + char s[1 + 3 * sizeof(unsigned)]; + numberToString( i, s ); + _o << s; + return *this; + } + }; + }; +} + +#endif // __cxxtest__ErrorPrinter_h__ diff --git a/tools/cxxtest/cxxtest/Flags.h b/tools/cxxtest/cxxtest/Flags.h new file mode 100644 index 0000000..7e4e06b --- /dev/null +++ b/tools/cxxtest/cxxtest/Flags.h @@ -0,0 +1,154 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__Flags_h__ +#define __cxxtest__Flags_h__ + +// +// These are the flags that control CxxTest +// + +#if !defined(CXXTEST_FLAGS) +# define CXXTEST_FLAGS +#endif // !CXXTEST_FLAGS + +#if defined(CXXTEST_HAVE_EH) && !defined(_CXXTEST_HAVE_EH) +# define _CXXTEST_HAVE_EH +#endif // CXXTEST_HAVE_EH + +#if defined(CXXTEST_HAVE_STD) && !defined(_CXXTEST_HAVE_STD) +# define _CXXTEST_HAVE_STD +#endif // CXXTEST_HAVE_STD + +#if defined(CXXTEST_OLD_TEMPLATE_SYNTAX) && !defined(_CXXTEST_OLD_TEMPLATE_SYNTAX) +# define _CXXTEST_OLD_TEMPLATE_SYNTAX +#endif // CXXTEST_OLD_TEMPLATE_SYNTAX + +#if defined(CXXTEST_OLD_STD) && !defined(_CXXTEST_OLD_STD) +# define _CXXTEST_OLD_STD +#endif // CXXTEST_OLD_STD + +#if defined(CXXTEST_ABORT_TEST_ON_FAIL) && !defined(_CXXTEST_ABORT_TEST_ON_FAIL) +# define _CXXTEST_ABORT_TEST_ON_FAIL +#endif // CXXTEST_ABORT_TEST_ON_FAIL + +#if defined(CXXTEST_NO_COPY_CONST) && !defined(_CXXTEST_NO_COPY_CONST) +# define _CXXTEST_NO_COPY_CONST +#endif // CXXTEST_NO_COPY_CONST + +#if defined(CXXTEST_FACTOR) && !defined(_CXXTEST_FACTOR) +# define _CXXTEST_FACTOR +#endif // CXXTEST_FACTOR + +#if defined(CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION) && !defined(_CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION) +# define _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION +#endif // CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION + +#if defined(CXXTEST_LONGLONG) +# if defined(_CXXTEST_LONGLONG) +# undef _CXXTEST_LONGLONG +# endif +# define _CXXTEST_LONGLONG CXXTEST_LONGLONG +#endif // CXXTEST_LONGLONG + +#ifndef CXXTEST_MAX_DUMP_SIZE +# define CXXTEST_MAX_DUMP_SIZE 0 +#endif // CXXTEST_MAX_DUMP_SIZE + +#if defined(_CXXTEST_ABORT_TEST_ON_FAIL) && !defined(CXXTEST_DEFAULT_ABORT) +# define CXXTEST_DEFAULT_ABORT true +#endif // _CXXTEST_ABORT_TEST_ON_FAIL && !CXXTEST_DEFAULT_ABORT + +#if !defined(CXXTEST_DEFAULT_ABORT) +# define CXXTEST_DEFAULT_ABORT false +#endif // !CXXTEST_DEFAULT_ABORT + +#if defined(_CXXTEST_ABORT_TEST_ON_FAIL) && !defined(_CXXTEST_HAVE_EH) +# warning "CXXTEST_ABORT_TEST_ON_FAIL is meaningless without CXXTEST_HAVE_EH" +# undef _CXXTEST_ABORT_TEST_ON_FAIL +#endif // _CXXTEST_ABORT_TEST_ON_FAIL && !_CXXTEST_HAVE_EH + +// +// Some minimal per-compiler configuration to allow us to compile +// + +#ifdef __BORLANDC__ +# if __BORLANDC__ <= 0x520 // Borland C++ 5.2 or earlier +# ifndef _CXXTEST_OLD_STD +# define _CXXTEST_OLD_STD +# endif +# ifndef _CXXTEST_OLD_TEMPLATE_SYNTAX +# define _CXXTEST_OLD_TEMPLATE_SYNTAX +# endif +# endif +# if __BORLANDC__ >= 0x540 // C++ Builder 4.0 or later +# ifndef _CXXTEST_NO_COPY_CONST +# define _CXXTEST_NO_COPY_CONST +# endif +# ifndef _CXXTEST_LONGLONG +# define _CXXTEST_LONGLONG __int64 +# endif +# endif +#endif // __BORLANDC__ + +#ifdef _MSC_VER // Visual C++ +# ifndef _CXXTEST_LONGLONG +# define _CXXTEST_LONGLONG __int64 +# endif +# if (_MSC_VER >= 0x51E) +# ifndef _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION +# define _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION +# endif +# endif +# pragma warning( disable : 4127 ) +# pragma warning( disable : 4290 ) +# pragma warning( disable : 4511 ) +# pragma warning( disable : 4512 ) +# pragma warning( disable : 4514 ) +#endif // _MSC_VER + +#ifdef __GNUC__ +# if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 9) +# ifndef _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION +# define _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION +# endif +# endif +# if defined(__LONG_LONG_MAX__) && !defined(__cplusplus) +# define _CXXTEST_LONGLONG long long +# endif +#endif // __GNUC__ + +#ifdef __DMC__ // Digital Mars +# ifndef _CXXTEST_OLD_STD +# define _CXXTEST_OLD_STD +# endif +#endif + +#ifdef __SUNPRO_CC // Sun Studio C++ +# if __SUNPRO_CC >= 0x510 +# ifndef _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION +# define _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION +# endif +# endif +#endif + +#ifdef __xlC__ // IBM XL C/C++ +// Partial specialization may be supported before 7.0.0.3, but it is +// definitely supported after. +# if __xlC__ >= 0x0700 +# ifndef _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION +# define _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION +# endif +# endif +#endif + +#endif // __cxxtest__Flags_h__ + diff --git a/tools/cxxtest/cxxtest/GlobalFixture.cpp b/tools/cxxtest/cxxtest/GlobalFixture.cpp new file mode 100644 index 0000000..d5bcd84 --- /dev/null +++ b/tools/cxxtest/cxxtest/GlobalFixture.cpp @@ -0,0 +1,34 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__GlobalFixture_cpp__ +#define __cxxtest__GlobalFixture_cpp__ + +#include + +namespace CxxTest +{ + bool GlobalFixture::setUpWorld() { return true; } + bool GlobalFixture::tearDownWorld() { return true; } + bool GlobalFixture::setUp() { return true; } + bool GlobalFixture::tearDown() { return true; } + + GlobalFixture::GlobalFixture() { attach( _list ); } + GlobalFixture::~GlobalFixture() { detach( _list ); } + + GlobalFixture *GlobalFixture::firstGlobalFixture() { return (GlobalFixture *)_list.head(); } + GlobalFixture *GlobalFixture::lastGlobalFixture() { return (GlobalFixture *)_list.tail(); } + GlobalFixture *GlobalFixture::nextGlobalFixture() { return (GlobalFixture *)next(); } + GlobalFixture *GlobalFixture::prevGlobalFixture() { return (GlobalFixture *)prev(); } +} + +#endif // __cxxtest__GlobalFixture_cpp__ + diff --git a/tools/cxxtest/cxxtest/GlobalFixture.h b/tools/cxxtest/cxxtest/GlobalFixture.h new file mode 100644 index 0000000..ca73967 --- /dev/null +++ b/tools/cxxtest/cxxtest/GlobalFixture.h @@ -0,0 +1,41 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__GlobalFixture_h__ +#define __cxxtest__GlobalFixture_h__ + +#include + +namespace CxxTest +{ + class GlobalFixture : public Link + { + public: + virtual bool setUpWorld(); + virtual bool tearDownWorld(); + virtual bool setUp(); + virtual bool tearDown(); + + GlobalFixture(); + ~GlobalFixture(); + + static GlobalFixture *firstGlobalFixture(); + static GlobalFixture *lastGlobalFixture(); + GlobalFixture *nextGlobalFixture(); + GlobalFixture *prevGlobalFixture(); + + private: + static List _list; + }; +} + +#endif // __cxxtest__GlobalFixture_h__ + diff --git a/tools/cxxtest/cxxtest/Gui.h b/tools/cxxtest/cxxtest/Gui.h new file mode 100644 index 0000000..cbf534b --- /dev/null +++ b/tools/cxxtest/cxxtest/Gui.h @@ -0,0 +1,192 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __CXXTEST__GUI_H +#define __CXXTEST__GUI_H + +// +// GuiListener is a simple base class for the differes GUIs +// GuiTuiRunner combines a GUI with a text-mode error formatter +// + +#include + +namespace CxxTest +{ + class GuiListener : public TestListener + { + public: + GuiListener() : _state( GREEN_BAR ) {} + virtual ~GuiListener() {} + + virtual void runGui( int &argc, char **argv, TestListener &listener ) + { + enterGui( argc, argv ); + TestRunner::runAllTests( listener ); + leaveGui(); + } + + virtual void enterGui( int & /*argc*/, char ** /*argv*/ ) {} + virtual void leaveGui() {} + + // + // The easy way is to implement these functions: + // + virtual void guiEnterWorld( unsigned /*numTotalTests*/ ) {} + virtual void guiEnterSuite( const char * /*suiteName*/ ) {} + virtual void guiEnterTest( const char * /*suiteName*/, const char * /*testName*/ ) {} + virtual void yellowBar() {} + virtual void redBar() {} + + // + // The hard way is this: + // + void enterWorld( const WorldDescription &d ) { guiEnterWorld( d.numTotalTests() ); } + void enterSuite( const SuiteDescription &d ) { guiEnterSuite( d.suiteName() ); } + void enterTest( const TestDescription &d ) { guiEnterTest( d.suiteName(), d.testName() ); } + void leaveTest( const TestDescription & ) {} + void leaveSuite( const SuiteDescription & ) {} + void leaveWorld( const WorldDescription & ) {} + + void warning( const char * /*file*/, int /*line*/, const char * /*expression*/ ) + { + yellowBarSafe(); + } + + void failedTest( const char * /*file*/, int /*line*/, const char * /*expression*/ ) + { + redBarSafe(); + } + + void failedAssert( const char * /*file*/, int /*line*/, const char * /*expression*/ ) + { + redBarSafe(); + } + + void failedAssertEquals( const char * /*file*/, int /*line*/, + const char * /*xStr*/, const char * /*yStr*/, + const char * /*x*/, const char * /*y*/ ) + { + redBarSafe(); + } + + void failedAssertSameData( const char * /*file*/, int /*line*/, + const char * /*xStr*/, const char * /*yStr*/, + const char * /*sizeStr*/, const void * /*x*/, + const void * /*y*/, unsigned /*size*/ ) + { + redBarSafe(); + } + + void failedAssertDelta( const char * /*file*/, int /*line*/, + const char * /*xStr*/, const char * /*yStr*/, const char * /*dStr*/, + const char * /*x*/, const char * /*y*/, const char * /*d*/ ) + { + redBarSafe(); + } + + void failedAssertDiffers( const char * /*file*/, int /*line*/, + const char * /*xStr*/, const char * /*yStr*/, + const char * /*value*/ ) + { + redBarSafe(); + } + + void failedAssertLessThan( const char * /*file*/, int /*line*/, + const char * /*xStr*/, const char * /*yStr*/, + const char * /*x*/, const char * /*y*/ ) + { + redBarSafe(); + } + + void failedAssertLessThanEquals( const char * /*file*/, int /*line*/, + const char * /*xStr*/, const char * /*yStr*/, + const char * /*x*/, const char * /*y*/ ) + { + redBarSafe(); + } + + void failedAssertPredicate( const char * /*file*/, int /*line*/, + const char * /*predicate*/, const char * /*xStr*/, const char * /*x*/ ) + { + redBarSafe(); + } + + void failedAssertRelation( const char * /*file*/, int /*line*/, + const char * /*relation*/, const char * /*xStr*/, const char * /*yStr*/, + const char * /*x*/, const char * /*y*/ ) + { + redBarSafe(); + } + + void failedAssertThrows( const char * /*file*/, int /*line*/, + const char * /*expression*/, const char * /*type*/, + bool /*otherThrown*/ ) + { + redBarSafe(); + } + + void failedAssertThrowsNot( const char * /*file*/, int /*line*/, + const char * /*expression*/ ) + { + redBarSafe(); + } + + protected: + void yellowBarSafe() + { + if ( _state < YELLOW_BAR ) { + yellowBar(); + _state = YELLOW_BAR; + } + } + + void redBarSafe() + { + if ( _state < RED_BAR ) { + redBar(); + _state = RED_BAR; + } + } + + private: + enum { GREEN_BAR, YELLOW_BAR, RED_BAR } _state; + }; + + template + class GuiTuiRunner : public TeeListener + { + int* _argc; + char **_argv; + GuiT _gui; + TuiT _tui; + + public: + GuiTuiRunner() : _argc(0), _argv(0) {} + + void process_commandline( int& argc, char** argv ) + { + _argc=&argc; + _argv=argv; + setFirst( _gui ); + setSecond( _tui ); + } + + int run() + { + _gui.runGui( *_argc, _argv, *this ); + return tracker().failedTests(); + } + }; +} + +#endif //__CXXTEST__GUI_H + diff --git a/tools/cxxtest/cxxtest/LinkedList.cpp b/tools/cxxtest/cxxtest/LinkedList.cpp new file mode 100644 index 0000000..cb8eb99 --- /dev/null +++ b/tools/cxxtest/cxxtest/LinkedList.cpp @@ -0,0 +1,183 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__LinkedList_cpp__ +#define __cxxtest__LinkedList_cpp__ + +#include + +namespace CxxTest +{ + List GlobalFixture::_list = { 0, 0 }; + List RealSuiteDescription::_suites = { 0, 0 }; + + void List::initialize() + { + _head = _tail = 0; + } + + Link *List::head() + { + Link *l = _head; + while ( l && !l->active() ) + l = l->next(); + return l; + } + + const Link *List::head() const + { + Link *l = _head; + while ( l && !l->active() ) + l = l->next(); + return l; + } + + Link *List::tail() + { + Link *l = _tail; + while ( l && !l->active() ) + l = l->prev(); + return l; + } + + const Link *List::tail() const + { + Link *l = _tail; + while ( l && !l->active() ) + l = l->prev(); + return l; + } + + bool List::empty() const + { + return (_head == 0); + } + + unsigned List::size() const + { + unsigned count = 0; + for ( const Link *l = head(); l != 0; l = l->next() ) + ++ count; + return count; + } + + Link *List::nth( unsigned n ) + { + Link *l = head(); + while ( n -- ) + l = l->next(); + return l; + } + + void List::activateAll() + { + for ( Link *l = _head; l != 0; l = l->justNext() ) + l->setActive( true ); + } + + void List::leaveOnly( const Link &link ) + { + for ( Link *l = head(); l != 0; l = l->next() ) + if ( l != &link ) + l->setActive( false ); + } + + Link::Link() : + _next( 0 ), + _prev( 0 ), + _active( true ) + { + } + + Link::~Link() + { + } + + bool Link::active() const + { + return _active; + } + + void Link::setActive( bool value ) + { + _active = value; + } + + Link * Link::justNext() + { + return _next; + } + + Link * Link::justPrev() + { + return _prev; + } + + Link * Link::next() + { + Link *l = _next; + while ( l && !l->_active ) + l = l->_next; + return l; + } + + Link * Link::prev() + { + Link *l = _prev; + while ( l && !l->_active ) + l = l->_prev; + return l; + } + + const Link * Link::next() const + { + Link *l = _next; + while ( l && !l->_active ) + l = l->_next; + return l; + } + + const Link * Link::prev() const + { + Link *l = _prev; + while ( l && !l->_active ) + l = l->_prev; + return l; + } + + void Link::attach( List &l ) + { + if ( l._tail ) + l._tail->_next = this; + + _prev = l._tail; + _next = 0; + + if ( l._head == 0 ) + l._head = this; + l._tail = this; + } + + void Link::detach( List &l ) + { + if ( _prev ) + _prev->_next = _next; + else + l._head = _next; + + if ( _next ) + _next->_prev = _prev; + else + l._tail = _prev; + } +} + +#endif // __cxxtest__LinkedList_cpp__ diff --git a/tools/cxxtest/cxxtest/LinkedList.h b/tools/cxxtest/cxxtest/LinkedList.h new file mode 100644 index 0000000..fbd2f38 --- /dev/null +++ b/tools/cxxtest/cxxtest/LinkedList.h @@ -0,0 +1,73 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__LinkedList_h__ +#define __cxxtest__LinkedList_h__ + +#include + +namespace CxxTest +{ + struct List; + class Link; + + struct List + { + Link *_head; + Link *_tail; + + void initialize(); + + Link *head(); + const Link *head() const; + Link *tail(); + const Link *tail() const; + + bool empty() const; + unsigned size() const; + Link *nth( unsigned n ); + + void activateAll(); + void leaveOnly( const Link &link ); + }; + + class Link + { + public: + Link(); + virtual ~Link(); + + bool active() const; + void setActive( bool value = true ); + + Link *justNext(); + Link *justPrev(); + + Link *next(); + Link *prev(); + const Link *next() const; + const Link *prev() const; + + void attach( List &l ); + void detach( List &l ); + + private: + Link *_next; + Link *_prev; + bool _active; + + Link( const Link & ); + Link &operator=( const Link & ); + }; +} + +#endif // __cxxtest__LinkedList_h__ + diff --git a/tools/cxxtest/cxxtest/Mock.h b/tools/cxxtest/cxxtest/Mock.h new file mode 100644 index 0000000..2fc85c3 --- /dev/null +++ b/tools/cxxtest/cxxtest/Mock.h @@ -0,0 +1,375 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__Mock_h__ +#define __cxxtest__Mock_h__ + +namespace dummy_mock_ns {} + +// +// The default namespace is T:: +// +#ifndef CXXTEST_MOCK_NAMESPACE +# define CXXTEST_MOCK_NAMESPACE T +#endif // CXXTEST_MOCK_NAMESPACE + +// +// MockTraits: What to return when no mock object has been created +// +#define __CXXTEST_MOCK__TRAITS \ + namespace CXXTEST_MOCK_NAMESPACE \ + { \ + template \ + class MockTraits \ + { \ + public: \ + static T defaultValue() { return 0; } \ + }; \ + } + +// +// extern "C" when needed +// +#ifdef __cplusplus +# define CXXTEST_EXTERN_C extern "C" +#else +# define CXXTEST_EXTERN_C +#endif // __cplusplus + +// +// Prototypes: For "normal" headers +// +#define __CXXTEST_MOCK__PROTOTYPE( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + namespace CXXTEST_MOCK_NAMESPACE { TYPE NAME ARGS; } + +#define __CXXTEST_MOCK_VOID__PROTOTYPE( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK__PROTOTYPE( MOCK, void, NAME, ARGS, REAL, CALL ) + +#define __CXXTEST_SUPPLY__PROTOTYPE( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + TYPE REAL ARGS; + +#define __CXXTEST_SUPPLY_VOID__PROTOTYPE( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY__PROTOTYPE( MOCK, void, NAME, ARGS, REAL, CALL ) + +// +// Class declarations: For test files +// +#define __CXXTEST_MOCK__CLASS_DECLARATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + namespace CXXTEST_MOCK_NAMESPACE { \ + class Base_##MOCK : public CxxTest::Link \ + { \ + public: \ + Base_##MOCK(); \ + ~Base_##MOCK(); \ + bool setUp(); \ + bool tearDown(); \ + \ + static Base_##MOCK ¤t(); \ + \ + virtual TYPE NAME ARGS = 0; \ + \ + private: \ + static CxxTest::List _list; \ + }; \ + \ + class Real_##MOCK : public Base_##MOCK \ + { \ + public: \ + TYPE NAME ARGS; \ + }; \ + \ + class _Unimplemented_##MOCK : public Base_##MOCK \ + { \ + public: \ + TYPE NAME ARGS; \ + }; \ + } + +#define __CXXTEST_MOCK_VOID__CLASS_DECLARATION( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK__CLASS_DECLARATION( MOCK, void, NAME, ARGS, REAL, CALL ) + +#define __CXXTEST_SUPPLY__CLASS_DECLARATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + namespace CXXTEST_MOCK_NAMESPACE { \ + class Base_##MOCK : public CxxTest::Link \ + { \ + public: \ + Base_##MOCK(); \ + ~Base_##MOCK(); \ + bool setUp(); \ + bool tearDown(); \ + \ + static Base_##MOCK ¤t(); \ + \ + virtual TYPE NAME ARGS = 0; \ + \ + private: \ + static CxxTest::List _list; \ + }; \ + \ + class _Unimplemented_##MOCK : public Base_##MOCK \ + { \ + public: \ + TYPE NAME ARGS; \ + }; \ + } + +#define __CXXTEST_SUPPLY_VOID__CLASS_DECLARATION( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY__CLASS_DECLARATION( MOCK, void, NAME, ARGS, REAL, CALL ) + +// +// Class implementation: For test source files +// +#define __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ + namespace CXXTEST_MOCK_NAMESPACE { \ + \ + CxxTest::List Base_##MOCK::_list = { 0, 0 }; \ + \ + Base_##MOCK::Base_##MOCK() { attach( _list ); } \ + Base_##MOCK::~Base_##MOCK() { detach( _list ); } \ + bool Base_##MOCK::setUp() { return true; } \ + bool Base_##MOCK::tearDown() { return true; } \ + \ + Base_##MOCK &Base_##MOCK::current() \ + { \ + if ( _list.empty() ) \ + static _Unimplemented_##MOCK unimplemented; \ + return *(Base_##MOCK *)_list.tail(); \ + } \ + } + +#define __CXXTEST_MOCK__CLASS_IMPLEMENTATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ + namespace CXXTEST_MOCK_NAMESPACE { \ + TYPE Real_##MOCK::NAME ARGS \ + { \ + return REAL CALL; \ + } \ + \ + TYPE _Unimplemented_##MOCK::NAME ARGS \ + { \ + while ( false ) \ + return NAME CALL; \ + __CXXTEST_MOCK_UNIMPLEMENTED( NAME, ARGS ); \ + return MockTraits::defaultValue(); \ + } \ + \ + TYPE NAME ARGS \ + { \ + return Base_##MOCK::current().NAME CALL; \ + } \ + } + +#define __CXXTEST_MOCK_VOID__CLASS_IMPLEMENTATION( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ + namespace CXXTEST_MOCK_NAMESPACE { \ + void Real_##MOCK::NAME ARGS \ + { \ + REAL CALL; \ + } \ + \ + void _Unimplemented_##MOCK::NAME ARGS \ + { \ + while ( false ) \ + NAME CALL; \ + __CXXTEST_MOCK_UNIMPLEMENTED( NAME, ARGS ); \ + } \ + \ + void NAME ARGS \ + { \ + Base_##MOCK::current().NAME CALL; \ + } \ + } + +#define __CXXTEST_SUPPLY__CLASS_IMPLEMENTATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ + namespace CXXTEST_MOCK_NAMESPACE { \ + TYPE _Unimplemented_##MOCK::NAME ARGS \ + { \ + while ( false ) \ + return NAME CALL; \ + __CXXTEST_MOCK_UNIMPLEMENTED( NAME, ARGS ); \ + return MockTraits::defaultValue(); \ + } \ + } \ + \ + TYPE REAL ARGS \ + { \ + return CXXTEST_MOCK_NAMESPACE::Base_##MOCK::current().NAME CALL; \ + } + +#define __CXXTEST_SUPPLY_VOID__CLASS_IMPLEMENTATION( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ + namespace CXXTEST_MOCK_NAMESPACE { \ + void _Unimplemented_##MOCK::NAME ARGS \ + { \ + while ( false ) \ + NAME CALL; \ + __CXXTEST_MOCK_UNIMPLEMENTED( NAME, ARGS ); \ + } \ + } \ + \ + void REAL ARGS \ + { \ + CXXTEST_MOCK_NAMESPACE::Base_##MOCK::current().NAME CALL; \ + } \ + +// +// Error for calling mock function w/o object +// +#define __CXXTEST_MOCK_UNIMPLEMENTED( NAME, ARGS ) \ + TS_FAIL( CXXTEST_MOCK_NAMESPACE_STR #NAME #ARGS " called with no " \ + CXXTEST_MOCK_NAMESPACE_STR "Base_" #NAME " object" ); \ + +#define CXXTEST_MOCK_NAMESPACE_STR __CXXTEST_STR(CXXTEST_MOCK_NAMESPACE) "::" +#define __CXXTEST_STR(X) __CXXTEST_XSTR(X) +#define __CXXTEST_XSTR(X) #X + +#if defined(CXXTEST_MOCK_TEST_SOURCE_FILE) +// +// Test source file: Prototypes, class declarations and implementation +// +#include + +__CXXTEST_MOCK__TRAITS + +#define CXXTEST_MOCK( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK__PROTOTYPE( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK__CLASS_DECLARATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK__CLASS_IMPLEMENTATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + using namespace dummy_mock_ns + +#define CXXTEST_MOCK_VOID( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK_VOID__PROTOTYPE( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK_VOID__CLASS_DECLARATION( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK_VOID__CLASS_IMPLEMENTATION( MOCK, NAME, ARGS, REAL, CALL ) \ + using namespace dummy_mock_ns + +#define CXXTEST_SUPPLY( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY__PROTOTYPE( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY__CLASS_DECLARATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY__CLASS_IMPLEMENTATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + using namespace dummy_mock_ns + +#define CXXTEST_SUPPLY_VOID( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY_VOID__PROTOTYPE( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY_VOID__CLASS_DECLARATION( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY_VOID__CLASS_IMPLEMENTATION( MOCK, NAME, ARGS, REAL, CALL ) \ + using namespace dummy_mock_ns + +#elif defined(CXXTEST_FLAGS) || defined(CXXTEST_RUNNING) +// +// Test file other than source: Prototypes and class declarations +// +#include + +__CXXTEST_MOCK__TRAITS; + +#define CXXTEST_MOCK( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK__PROTOTYPE( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK__CLASS_DECLARATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + using namespace dummy_mock_ns + +#define CXXTEST_MOCK_VOID( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK_VOID__PROTOTYPE( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK_VOID__CLASS_DECLARATION( MOCK, NAME, ARGS, REAL, CALL ) \ + using namespace dummy_mock_ns + +#define CXXTEST_SUPPLY( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY__PROTOTYPE( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY__CLASS_DECLARATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + using namespace dummy_mock_ns + +#define CXXTEST_SUPPLY_VOID( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY_VOID__PROTOTYPE( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY_VOID__CLASS_DECLARATION( MOCK, NAME, ARGS, REAL, CALL ) \ + using namespace dummy_mock_ns + +#elif defined(CXXTEST_MOCK_REAL_SOURCE_FILE) +// +// Real source file: "Real" implementations +// +#define CXXTEST_MOCK( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + namespace CXXTEST_MOCK_NAMESPACE { TYPE NAME ARGS { return REAL CALL; } } using namespace dummy_mock_ns + +#define CXXTEST_MOCK_VOID( MOCK, NAME, ARGS, REAL, CALL ) \ + namespace CXXTEST_MOCK_NAMESPACE { void NAME ARGS { REAL CALL; } } using namespace dummy_mock_ns + +#else +// +// Ordinary header file: Just prototypes +// + +#define CXXTEST_MOCK( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK__PROTOTYPE( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + using namespace dummy_mock_ns + +#define CXXTEST_MOCK_VOID( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_MOCK_VOID__PROTOTYPE( MOCK, NAME, ARGS, REAL, CALL ) \ + using namespace dummy_mock_ns + +#define CXXTEST_SUPPLY( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY__PROTOTYPE( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + using namespace dummy_mock_ns + +#define CXXTEST_SUPPLY_VOID( MOCK, NAME, ARGS, REAL, CALL ) \ + __CXXTEST_SUPPLY_VOID__PROTOTYPE( MOCK, NAME, ARGS, REAL, CALL ) \ + using namespace dummy_mock_ns + +#endif // Ordinary header file + +// +// How to supply extern "C" functions +// +#define CXXTEST_SUPPLY_C( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + CXXTEST_EXTERN_C __CXXTEST_SUPPLY__PROTOTYPE( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ + CXXTEST_SUPPLY( MOCK, TYPE, NAME, ARGS, REAL, CALL ) + +#define CXXTEST_SUPPLY_VOID_C( MOCK, NAME, ARGS, REAL, CALL ) \ + CXXTEST_EXTERN_C __CXXTEST_SUPPLY_VOID__PROTOTYPE( MOCK, NAME, ARGS, REAL, CALL ) \ + CXXTEST_SUPPLY_VOID( MOCK, NAME, ARGS, REAL, CALL ) + +// +// Usually we mean the global namespace +// +#define CXXTEST_MOCK_GLOBAL( TYPE, NAME, ARGS, CALL ) \ + CXXTEST_MOCK( NAME, TYPE, NAME, ARGS, ::NAME, CALL ) + +#define CXXTEST_MOCK_VOID_GLOBAL( NAME, ARGS, CALL ) \ + CXXTEST_MOCK_VOID( NAME, NAME, ARGS, ::NAME, CALL ) + +#define CXXTEST_SUPPLY_GLOBAL( TYPE, NAME, ARGS, CALL ) \ + CXXTEST_SUPPLY( NAME, TYPE, NAME, ARGS, NAME, CALL ) + +#define CXXTEST_SUPPLY_VOID_GLOBAL( NAME, ARGS, CALL ) \ + CXXTEST_SUPPLY_VOID( NAME, NAME, ARGS, NAME, CALL ) + +#define CXXTEST_SUPPLY_GLOBAL_C( TYPE, NAME, ARGS, CALL ) \ + CXXTEST_SUPPLY_C( NAME, TYPE, NAME, ARGS, NAME, CALL ) + +#define CXXTEST_SUPPLY_VOID_GLOBAL_C( NAME, ARGS, CALL ) \ + CXXTEST_SUPPLY_VOID_C( NAME, NAME, ARGS, NAME, CALL ) + +// +// What to return when no mock object has been created. +// The default value of 0 usually works, but some cases may need this. +// +#define CXXTEST_MOCK_DEFAULT_VALUE( TYPE, VALUE ) \ + namespace CXXTEST_MOCK_NAMESPACE \ + { \ + template<> \ + class MockTraits \ + { \ + public: \ + static TYPE defaultValue() { return VALUE; } \ + }; \ + } using namespace dummy_mock_ns + +#endif // __cxxtest__Mock_h__ diff --git a/tools/cxxtest/cxxtest/ParenPrinter.h b/tools/cxxtest/cxxtest/ParenPrinter.h new file mode 100644 index 0000000..21b337a --- /dev/null +++ b/tools/cxxtest/cxxtest/ParenPrinter.h @@ -0,0 +1,32 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__ParenPrinter_h__ +#define __cxxtest__ParenPrinter_h__ + +// +// The ParenPrinter is identical to the ErrorPrinter, except it +// prints the line number in a format expected by some compilers +// (notably, MSVC). +// + +#include + +namespace CxxTest +{ + class ParenPrinter : public ErrorPrinter + { + public: + ParenPrinter( CXXTEST_STD(ostream) &o = CXXTEST_STD(cout) ) : ErrorPrinter( o, "(", ")" ) {} + }; +} + +#endif // __cxxtest__ParenPrinter_h__ diff --git a/tools/cxxtest/cxxtest/QtGui.h b/tools/cxxtest/cxxtest/QtGui.h new file mode 100644 index 0000000..9abce3d --- /dev/null +++ b/tools/cxxtest/cxxtest/QtGui.h @@ -0,0 +1,282 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__QtGui_h__ +#define __cxxtest__QtGui_h__ + +// +// The QtGui displays a simple progress bar using the Qt Toolkit. It +// has been tested with versions 2.x and 3.x. +// +// Apart from normal Qt command-line arguments, it accepts the following options: +// -minimized Start minimized, pop up on error +// -keep Don't close the window at the end +// -title TITLE Set the window caption +// +// If both are -minimized and -keep specified, GUI will only keep the +// window if it's in focus. +// + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CxxTest +{ + class QtGui : public GuiListener + { + public: + void enterGui( int &argc, char **argv ) + { + parseCommandLine( argc, argv ); + createApplication( argc, argv ); + } + + void enterWorld( const WorldDescription &wd ) + { + createWindow( wd ); + processEvents(); + } + + void guiEnterSuite( const char *suiteName ) + { + showSuiteName( suiteName ); + } + + void guiEnterTest( const char *suiteName, const char *testName ) + { + setCaption( suiteName, testName ); + advanceProgressBar(); + showTestName( testName ); + showTestsDone( _progressBar->progress() ); + processEvents(); + } + + void yellowBar() + { + setColor( 255, 255, 0 ); + setIcon( QMessageBox::Warning ); + getTotalTests(); + processEvents(); + } + + void redBar() + { + if ( _startMinimized && _mainWindow->isMinimized() ) + showNormal(); + setColor( 255, 0, 0 ); + setIcon( QMessageBox::Critical ); + getTotalTests(); + processEvents(); + } + + void leaveGui() + { + if ( keep() ) { + showSummary(); + _application->exec(); + } + else + _mainWindow->close( true ); + } + + private: + QString _title; + bool _startMinimized, _keep; + unsigned _numTotalTests; + QString _strTotalTests; + QApplication *_application; + QWidget *_mainWindow; + QVBoxLayout *_layout; + QProgressBar *_progressBar; + QStatusBar *_statusBar; + QLabel *_suiteName, *_testName, *_testsDone; + + void parseCommandLine( int argc, char **argv ) + { + _startMinimized = _keep = false; + _title = argv[0]; + + for ( int i = 1; i < argc; ++ i ) { + QString arg( argv[i] ); + if ( arg == "-minimized" ) + _startMinimized = true; + else if ( arg == "-keep" ) + _keep = true; + else if ( arg == "-title" && (i + 1 < argc) ) + _title = argv[++i]; + } + } + + void createApplication( int &argc, char **argv ) + { + _application = new QApplication( argc, argv ); + } + + void createWindow( const WorldDescription &wd ) + { + getTotalTests( wd ); + createMainWindow(); + createProgressBar(); + createStatusBar(); + setMainWidget(); + if ( _startMinimized ) + showMinimized(); + else + showNormal(); + } + + void getTotalTests() + { + getTotalTests( tracker().world() ); + } + + void getTotalTests( const WorldDescription &wd ) + { + _numTotalTests = wd.numTotalTests(); + char s[WorldDescription::MAX_STRLEN_TOTAL_TESTS]; + _strTotalTests = wd.strTotalTests( s ); + } + + void createMainWindow() + { + _mainWindow = new QWidget(); + _layout = new QVBoxLayout( _mainWindow ); + } + + void createProgressBar() + { + _layout->addWidget( _progressBar = new QProgressBar( _numTotalTests, _mainWindow ) ); + _progressBar->setProgress( 0 ); + setColor( 0, 255, 0 ); + setIcon( QMessageBox::Information ); + } + + void createStatusBar() + { + _layout->addWidget( _statusBar = new QStatusBar( _mainWindow ) ); + _statusBar->addWidget( _suiteName = new QLabel( _statusBar ), 2 ); + _statusBar->addWidget( _testName = new QLabel( _statusBar ), 4 ); + _statusBar->addWidget( _testsDone = new QLabel( _statusBar ), 1 ); + } + + void setMainWidget() + { + _application->setMainWidget( _mainWindow ); + } + + void showMinimized() + { + _mainWindow->showMinimized(); + } + + void showNormal() + { + _mainWindow->showNormal(); + centerWindow(); + } + + void setCaption( const QString &suiteName, const QString &testName ) + { + _mainWindow->setCaption( _title + " - " + suiteName + "::" + testName + "()" ); + } + + void showSuiteName( const QString &suiteName ) + { + _suiteName->setText( "class " + suiteName ); + } + + void advanceProgressBar() + { + _progressBar->setProgress( _progressBar->progress() + 1 ); + } + + void showTestName( const QString &testName ) + { + _testName->setText( testName + "()" ); + } + + void showTestsDone( unsigned testsDone ) + { + _testsDone->setText( asString( testsDone ) + " of " + _strTotalTests ); + } + + static QString asString( unsigned n ) + { + return QString::number( n ); + } + + void setColor( int r, int g, int b ) + { + QPalette palette = _progressBar->palette(); + palette.setColor( QColorGroup::Highlight, QColor( r, g, b ) ); + _progressBar->setPalette( palette ); + } + + void setIcon( QMessageBox::Icon icon ) + { +#if QT_VERSION >= 0x030000 + _mainWindow->setIcon( QMessageBox::standardIcon( icon ) ); +#else // Qt version < 3.0.0 + _mainWindow->setIcon( QMessageBox::standardIcon( icon, QApplication::style().guiStyle() ) ); +#endif // QT_VERSION + } + + void processEvents() + { + _application->processEvents(); + } + + void centerWindow() + { + QWidget *desktop = QApplication::desktop(); + int xCenter = desktop->x() + (desktop->width() / 2); + int yCenter = desktop->y() + (desktop->height() / 2); + + int windowWidth = (desktop->width() * 4) / 5; + int windowHeight = _mainWindow->height(); + _mainWindow->setGeometry( xCenter - (windowWidth / 2), yCenter - (windowHeight / 2), windowWidth, windowHeight ); + } + + bool keep() + { + if ( !_keep ) + return false; + if ( !_startMinimized ) + return true; + return (_mainWindow == _application->activeWindow()); + } + + void showSummary() + { + QString summary = _strTotalTests + (_numTotalTests == 1 ? " test" : " tests"); + if ( tracker().failedTests() ) + summary = "Failed " + asString( tracker().failedTests() ) + " of " + summary; + else + summary = summary + " passed"; + + _mainWindow->setCaption( _title + " - " + summary ); + + _statusBar->removeWidget( _suiteName ); + _statusBar->removeWidget( _testName ); + _testsDone->setText( summary ); + } + }; +} + +#endif // __cxxtest__QtGui_h__ diff --git a/tools/cxxtest/cxxtest/RealDescriptions.cpp b/tools/cxxtest/cxxtest/RealDescriptions.cpp new file mode 100644 index 0000000..91baa9e --- /dev/null +++ b/tools/cxxtest/cxxtest/RealDescriptions.cpp @@ -0,0 +1,330 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__RealDescriptions_cpp__ +#define __cxxtest__RealDescriptions_cpp__ + +// +// NOTE: If an error occur during world construction/deletion, CxxTest cannot +// know where the error originated. +// + +#include + +namespace CxxTest +{ + RealTestDescription::RealTestDescription() + { + } + + RealTestDescription::RealTestDescription( List &argList, + SuiteDescription &argSuite, + unsigned argLine, + const char *argTestName ) + { + initialize( argList, argSuite, argLine, argTestName ); + } + + void RealTestDescription::initialize( List &argList, + SuiteDescription &argSuite, + unsigned argLine, + const char *argTestName ) + { + _suite = &argSuite; + _line = argLine; + _testName = argTestName; + attach( argList ); + } + + bool RealTestDescription::setUp() + { + if ( !suite() ) + return false; + + for ( GlobalFixture *gf = GlobalFixture::firstGlobalFixture(); gf != 0; gf = gf->nextGlobalFixture() ) { + bool ok; + _TS_TRY { ok = gf->setUp(); } + _TS_LAST_CATCH( { ok = false; } ); + + if ( !ok ) { + doFailTest( file(), line(), "Error in GlobalFixture::setUp()" ); + return false; + } + } + + _TS_TRY { + bool ok = false; + _TSM_ASSERT_THROWS_NOTHING( file(), line(), "Exception thrown from setUp()", suite()->setUp(); ok=true ); + if (ok == false) return ok; + } + _TS_CATCH_ABORT( { return false; } ); + + return true; + } + + bool RealTestDescription::tearDown() + { + if ( !suite() ) + return false; + + _TS_TRY { + _TSM_ASSERT_THROWS_NOTHING( file(), line(), "Exception thrown from tearDown()", suite()->tearDown() ); + } + _TS_CATCH_ABORT( { return false; } ); + + for ( GlobalFixture *gf = GlobalFixture::lastGlobalFixture(); gf != 0; gf = gf->prevGlobalFixture() ) { + bool ok; + _TS_TRY { ok = gf->tearDown(); } + _TS_LAST_CATCH( { ok = false; } ); + + if ( !ok ) { + doFailTest( file(), line(), "Error in GlobalFixture::tearDown()" ); + return false; + } + } + + return true; + } + + const char *RealTestDescription::file() const { return _suite->file(); } + int RealTestDescription::line() const { return _line; } + const char *RealTestDescription::testName() const { return _testName; } + const char *RealTestDescription::suiteName() const { return _suite->suiteName(); } + + TestDescription *RealTestDescription::next() { return (RealTestDescription *)Link::next(); } + const TestDescription *RealTestDescription::next() const { return (const RealTestDescription *)Link::next(); } + + TestSuite *RealTestDescription::suite() const { return _suite->suite(); } + + void RealTestDescription::run() + { + _TS_TRY { runTest(); } + _TS_CATCH_ABORT( {} ) + ___TSM_CATCH( file(), line(), "Exception thrown from test" ); + } + + RealSuiteDescription::RealSuiteDescription() {} + RealSuiteDescription::RealSuiteDescription( const char *argFile, + unsigned argLine, + const char *argSuiteName, + List &argTests ) + { + initialize( argFile, argLine, argSuiteName, argTests ); + } + + void RealSuiteDescription::initialize( const char *argFile, + unsigned argLine, + const char *argSuiteName, + List &argTests ) + { + _file = argFile; + _line = argLine; + _suiteName = argSuiteName; + _tests = &argTests; + + attach( _suites ); + } + + const char *RealSuiteDescription::file() const { return _file; } + int RealSuiteDescription::line() const { return _line; } + const char *RealSuiteDescription::suiteName() const { return _suiteName; } + + TestDescription *RealSuiteDescription::firstTest() { return (RealTestDescription *)_tests->head(); } + const TestDescription *RealSuiteDescription::firstTest() const { return (const RealTestDescription *)_tests->head(); } + SuiteDescription *RealSuiteDescription::next() { return (RealSuiteDescription *)Link::next(); } + const SuiteDescription *RealSuiteDescription::next() const { return (const RealSuiteDescription *)Link::next(); } + + unsigned RealSuiteDescription::numTests() const { return _tests->size(); } + + const TestDescription &RealSuiteDescription::testDescription( unsigned i ) const + { + return *(RealTestDescription *)_tests->nth( i ); + } + + void RealSuiteDescription::activateAllTests() + { + _tests->activateAll(); + } + + bool RealSuiteDescription::leaveOnly( const char *testName ) + { + for ( TestDescription *td = firstTest(); td != 0; td = td->next() ) { + if ( stringsEqual( td->testName(), testName ) ) { + _tests->leaveOnly( *td ); + return true; + } + } + return false; + } + + StaticSuiteDescription::StaticSuiteDescription() {} + StaticSuiteDescription::StaticSuiteDescription( const char *argFile, unsigned argLine, + const char *argSuiteName, TestSuite &argSuite, + List &argTests ) : + RealSuiteDescription( argFile, argLine, argSuiteName, argTests ) + { + doInitialize( argSuite ); + } + + void StaticSuiteDescription::initialize( const char *argFile, unsigned argLine, + const char *argSuiteName, TestSuite &argSuite, + List &argTests ) + { + RealSuiteDescription::initialize( argFile, argLine, argSuiteName, argTests ); + doInitialize( argSuite ); + } + + void StaticSuiteDescription::doInitialize( TestSuite &argSuite ) + { + _suite = &argSuite; + } + + TestSuite *StaticSuiteDescription::suite() const + { + return _suite; + } + + bool StaticSuiteDescription::setUp() { return true; } + bool StaticSuiteDescription::tearDown() { return true; } + + CommonDynamicSuiteDescription::CommonDynamicSuiteDescription() {} + CommonDynamicSuiteDescription::CommonDynamicSuiteDescription( const char *argFile, unsigned argLine, + const char *argSuiteName, List &argTests, + unsigned argCreateLine, unsigned argDestroyLine ) : + RealSuiteDescription( argFile, argLine, argSuiteName, argTests ) + { + doInitialize( argCreateLine, argDestroyLine ); + } + + void CommonDynamicSuiteDescription::initialize( const char *argFile, unsigned argLine, + const char *argSuiteName, List &argTests, + unsigned argCreateLine, unsigned argDestroyLine ) + { + RealSuiteDescription::initialize( argFile, argLine, argSuiteName, argTests ); + doInitialize( argCreateLine, argDestroyLine ); + } + + void CommonDynamicSuiteDescription::doInitialize( unsigned argCreateLine, unsigned argDestroyLine ) + { + _createLine = argCreateLine; + _destroyLine = argDestroyLine; + } + + List &RealWorldDescription::suites() + { + return RealSuiteDescription::_suites; + } + + unsigned RealWorldDescription::numSuites( void ) const + { + return suites().size(); + } + + unsigned RealWorldDescription::numTotalTests( void ) const + { + unsigned count = 0; + for ( const SuiteDescription *sd = firstSuite(); sd != 0; sd = sd->next() ) + count += sd->numTests(); + return count; + } + + SuiteDescription *RealWorldDescription::firstSuite() + { + return (RealSuiteDescription *)suites().head(); + } + + const SuiteDescription *RealWorldDescription::firstSuite() const + { + return (const RealSuiteDescription *)suites().head(); + } + + const SuiteDescription &RealWorldDescription::suiteDescription( unsigned i ) const + { + return *(const RealSuiteDescription *)suites().nth( i ); + } + + void RealWorldDescription::activateAllTests() + { + suites().activateAll(); + for ( SuiteDescription *sd = firstSuite(); sd != 0; sd = sd->next() ) + sd->activateAllTests(); + } + + bool RealWorldDescription::leaveOnly( const char *suiteName, const char *testName ) + { + for ( SuiteDescription *sd = firstSuite(); sd != 0; sd = sd->next() ) { + if ( stringsEqual( sd->suiteName(), suiteName ) ) { + if ( testName ) + if ( !sd->leaveOnly( testName ) ) + return false; + suites().leaveOnly( *sd ); + return true; + } + } + return false; + } + + bool RealWorldDescription::setUp() + { + for ( GlobalFixture *gf = GlobalFixture::firstGlobalFixture(); gf != 0; gf = gf->nextGlobalFixture() ) { + bool ok; + _TS_TRY { + ok = gf->setUpWorld(); + if (tracker().testFailed()) { + tracker().initialize(); + ok = false; + } + } + _TS_LAST_CATCH( { ok = false; } ); + + if ( !ok ) { + reportError( "Error setting up world" ); + return false; + } + } + + return true; + } + + bool RealWorldDescription::tearDown() + { + for ( GlobalFixture *gf = GlobalFixture::lastGlobalFixture(); gf != 0; gf = gf->prevGlobalFixture() ) { + bool ok; + _TS_TRY { ok = gf->tearDownWorld(); } + _TS_LAST_CATCH( { ok = false; } ); + + if ( !ok ) { + reportError( "Error tearing down world" ); + return false; + } + } + + return true; + } + + void RealWorldDescription::reportError( const char *message ) + { + doWarn( __FILE__, 5, message ); + } + + void activateAllTests() + { + RealWorldDescription().activateAllTests(); + } + + bool leaveOnly( const char *suiteName, const char *testName ) + { + return RealWorldDescription().leaveOnly( suiteName, testName ); + } +} + +#endif // __cxxtest__RealDescriptions_cpp__ + diff --git a/tools/cxxtest/cxxtest/RealDescriptions.h b/tools/cxxtest/cxxtest/RealDescriptions.h new file mode 100644 index 0000000..9875175 --- /dev/null +++ b/tools/cxxtest/cxxtest/RealDescriptions.h @@ -0,0 +1,237 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__RealDescriptions_h__ +#define __cxxtest__RealDescriptions_h__ + +// +// The "real" description classes +// + +#include +#include +#include + +namespace CxxTest +{ + class RealTestDescription : public TestDescription + { + public: + RealTestDescription(); + RealTestDescription( List &argList, SuiteDescription &argSuite, unsigned argLine, const char *argTestName ); + void initialize( List &argList, SuiteDescription &argSuite, unsigned argLine, const char *argTestName ); + + const char *file() const; + int line() const; + const char *testName() const; + const char *suiteName() const; + + TestDescription *next(); + const TestDescription *next() const; + + TestSuite *suite() const; + + bool setUp(); + void run(); + bool tearDown(); + + private: + RealTestDescription( const RealTestDescription & ); + RealTestDescription &operator=( const RealTestDescription & ); + + virtual void runTest() = 0; + + SuiteDescription *_suite; + int _line; + const char *_testName; + }; + + class RealSuiteDescription : public SuiteDescription + { + public: + RealSuiteDescription(); + RealSuiteDescription( const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests ); + + void initialize( const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests ); + + const char *file() const; + int line() const; + const char *suiteName() const; + + TestDescription *firstTest(); + const TestDescription *firstTest() const; + SuiteDescription *next(); + const SuiteDescription *next() const; + + unsigned numTests() const; + const TestDescription &testDescription( unsigned i ) const; + + void activateAllTests(); + bool leaveOnly( const char *testName ); + + private: + RealSuiteDescription( const RealSuiteDescription & ); + RealSuiteDescription &operator=( const RealSuiteDescription & ); + + const char *_file; + int _line; + const char *_suiteName; + List *_tests; + + static List _suites; + friend class RealWorldDescription; + }; + + class StaticSuiteDescription : public RealSuiteDescription + { + public: + StaticSuiteDescription(); + StaticSuiteDescription( const char *argFile, unsigned argLine, + const char *argSuiteName, TestSuite &argSuite, + List &argTests ); + + void initialize( const char *argFile, unsigned argLine, + const char *argSuiteName, TestSuite &argSuite, + List &argTests ); + TestSuite *suite() const; + + bool setUp(); + bool tearDown(); + + private: + StaticSuiteDescription( const StaticSuiteDescription & ); + StaticSuiteDescription &operator=( const StaticSuiteDescription & ); + + void doInitialize( TestSuite &argSuite ); + + TestSuite *_suite; + }; + + class CommonDynamicSuiteDescription : public RealSuiteDescription + { + public: + CommonDynamicSuiteDescription(); + CommonDynamicSuiteDescription( const char *argFile, unsigned argLine, + const char *argSuiteName, List &argTests, + unsigned argCreateLine, unsigned argDestroyLine ); + + void initialize( const char *argFile, unsigned argLine, + const char *argSuiteName, List &argTests, + unsigned argCreateLine, unsigned argDestroyLine ); + + protected: + unsigned _createLine, _destroyLine; + + private: + void doInitialize( unsigned argCreateLine, unsigned argDestroyLine ); + }; + + template + class DynamicSuiteDescription : public CommonDynamicSuiteDescription + { + public: + DynamicSuiteDescription() {} + DynamicSuiteDescription( const char *argFile, unsigned argLine, + const char *argSuiteName, List &argTests, + S *&argSuite, unsigned argCreateLine, + unsigned argDestroyLine ) : + CommonDynamicSuiteDescription( argFile, argLine, argSuiteName, argTests, argCreateLine, argDestroyLine ) + { + _suite = &argSuite; + } + + void initialize( const char *argFile, unsigned argLine, + const char *argSuiteName, List &argTests, + S *&argSuite, unsigned argCreateLine, + unsigned argDestroyLine ) + { + CommonDynamicSuiteDescription::initialize( argFile, argLine, + argSuiteName, argTests, + argCreateLine, argDestroyLine ); + _suite = &argSuite; + } + + TestSuite *suite() const { return realSuite(); } + + bool setUp(); + bool tearDown(); + + private: + S *realSuite() const { return *_suite; } + void setSuite( S *s ) { *_suite = s; } + + void createSuite() + { + setSuite( S::createSuite() ); + } + + void destroySuite() + { + S *s = realSuite(); + setSuite( 0 ); + S::destroySuite( s ); + } + + S **_suite; + }; + + template + bool DynamicSuiteDescription::setUp() + { + _TS_TRY { + _TSM_ASSERT_THROWS_NOTHING( file(), _createLine, "Exception thrown from createSuite()", createSuite() ); + _TSM_ASSERT( file(), _createLine, "createSuite() failed", suite() != 0 ); + } + _TS_CATCH_ABORT( { return false; } ); + + return (suite() != 0); + } + + template + bool DynamicSuiteDescription::tearDown() + { + if ( !_suite ) + return true; + + _TS_TRY { + _TSM_ASSERT_THROWS_NOTHING( file(), _destroyLine, "destroySuite() failed", destroySuite() ); + } + _TS_CATCH_ABORT( { return false; } ); + + return true; + } + + class RealWorldDescription : public WorldDescription + { + public: + static List &suites(); + const char *worldName() const { return _worldName;} + unsigned numSuites( void ) const; + unsigned numTotalTests( void ) const; + SuiteDescription *firstSuite(); + const SuiteDescription *firstSuite() const; + const SuiteDescription &suiteDescription( unsigned i ) const; + void activateAllTests(); + bool leaveOnly( const char *suiteName, const char *testName = 0 ); + + bool setUp(); + bool tearDown(); + static void reportError( const char *message ); + + static const char *_worldName; + }; + + void activateAllTests(); + bool leaveOnly( const char *suiteName, const char *testName = 0 ); +} + +#endif // __cxxtest__RealDescriptions_h__ + diff --git a/tools/cxxtest/cxxtest/Root.cpp b/tools/cxxtest/cxxtest/Root.cpp new file mode 100644 index 0000000..6faa5fd --- /dev/null +++ b/tools/cxxtest/cxxtest/Root.cpp @@ -0,0 +1,29 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__Root_cpp__ +#define __cxxtest__Root_cpp__ + +// +// This file holds the "root" of CxxTest, i.e. +// the parts that must be in a source file file. +// + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // __cxxtest__Root_cpp__ diff --git a/tools/cxxtest/cxxtest/SelfTest.h b/tools/cxxtest/cxxtest/SelfTest.h new file mode 100644 index 0000000..ee59fd1 --- /dev/null +++ b/tools/cxxtest/cxxtest/SelfTest.h @@ -0,0 +1,18 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest_SelfTest_h__ +#define __cxxtest_SelfTest_h__ + +#define CXXTEST_SUITE(name) +#define CXXTEST_CODE(member) + +#endif // __cxxtest_SelfTest_h__ diff --git a/tools/cxxtest/cxxtest/StdHeaders.h b/tools/cxxtest/cxxtest/StdHeaders.h new file mode 100644 index 0000000..991f16a --- /dev/null +++ b/tools/cxxtest/cxxtest/StdHeaders.h @@ -0,0 +1,36 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest_StdHeaders_h__ +#define __cxxtest_StdHeaders_h__ + +// +// This file basically #includes the STL headers. +// It exists to support warning level 4 in Visual C++ +// + +#ifdef _MSC_VER +# pragma warning( push, 1 ) +#endif // _MSC_VER + +#include +#include +#include +#include +#include +#include +#include + +#ifdef _MSC_VER +# pragma warning( pop ) +#endif // _MSC_VER + +#endif // __cxxtest_StdHeaders_h__ diff --git a/tools/cxxtest/cxxtest/StdTestSuite.h b/tools/cxxtest/cxxtest/StdTestSuite.h new file mode 100644 index 0000000..9b77a37 --- /dev/null +++ b/tools/cxxtest/cxxtest/StdTestSuite.h @@ -0,0 +1,61 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__StdTestSuite_h__ +#define __cxxtest__StdTestSuite_h__ + +// +// This provides explicit partial specializations for STL-based +// TestSuite comparison functions +// + +namespace CxxTest { + +#ifdef _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION + +template +struct delta, std::vector, D> +{ + static bool test(std::vector x, std::vector y, D d) + { + if ( x.size() != y.size() ) + return false; + for(size_t i = 0; i::test(x[i], y[i], d) ) + return false; + return true; + } +}; + +template +struct delta, std::list, D> +{ + static bool test(std::list x, std::list y, D d) + { + typename std::list::const_iterator x_it = x.begin(); + typename std::list::const_iterator y_it = y.begin(); + for(; x_it != x.end(); ++x_it, ++y_it) + { + if ( y_it == y.end() ) + return false; + if ( ! delta::test(*x_it, *y_it, d) ) + return false; + } + return y_it == y.end(); + } +}; + +#endif + +} // namespace CxxTest + +#endif // __cxxtest__StdTestSuite_h__ + diff --git a/tools/cxxtest/cxxtest/StdValueTraits.h b/tools/cxxtest/cxxtest/StdValueTraits.h new file mode 100644 index 0000000..2c9060c --- /dev/null +++ b/tools/cxxtest/cxxtest/StdValueTraits.h @@ -0,0 +1,246 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest_StdValueTraits_h__ +#define __cxxtest_StdValueTraits_h__ + +// +// This file defines ValueTraits for std:: stuff. +// It is #included by if you +// define CXXTEST_HAVE_STD +// + +#include +#include + +#ifdef _CXXTEST_OLD_STD +# define CXXTEST_STD(x) x +#else // !_CXXTEST_OLD_STD +# define CXXTEST_STD(x) std::x +#endif // _CXXTEST_OLD_STD + +#ifndef CXXTEST_USER_VALUE_TRAITS + +namespace CxxTest +{ + // + // NOTE: This should have been + // template + // class ValueTraits< std::basic_string > {}; + // But MSVC doesn't support it (yet). + // + + // + // If we have std::string, we might as well use it + // + class StdTraitsBase + { + public: + StdTraitsBase &operator<<( const CXXTEST_STD(string) &s ) { _s += s; return *this; } + const char *asString() const { return _s.c_str(); } + + private: + CXXTEST_STD(string) _s; + }; + + // + // std::string + // + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits : public StdTraitsBase + { + public: + ValueTraits( const CXXTEST_STD(string) &s ) + { + *this << "\""; + for ( unsigned i = 0; i < s.length(); ++ i ) { + char c[sizeof("\\xXX")]; + charToString( s[i], c ); + *this << c; + } + *this << "\""; + } + }; + + CXXTEST_COPY_CONST_TRAITS( CXXTEST_STD(string) ); + +#ifndef _CXXTEST_OLD_STD + // + // std::wstring + // + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits)> : public StdTraitsBase + { + public: + ValueTraits( const CXXTEST_STD(basic_string) &s ) + { + *this << "L\""; + for ( unsigned i = 0; i < s.length(); ++ i ) { + char c[sizeof("\\x12345678")]; + charToString( (unsigned long)s[i], c ); + *this << c; + } + *this << "\""; + } + }; + + CXXTEST_COPY_CONST_TRAITS( CXXTEST_STD(basic_string) ); +#endif // _CXXTEST_OLD_STD + + // + // Convert a range defined by iterators to a string + // This is useful for almost all STL containers + // + template + void dumpRange( Stream &s, Iterator first, Iterator last ) + { + if ( first == last ) { + s << "{}"; + return; + } + + s << "{ "; + while ( first != last ) { + s << TS_AS_STRING(*first); + if ( ++ first != last ) + s << ", "; + } + s << " }"; + } + +#ifdef _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION + // + // std::pair + // + template + class ValueTraits< CXXTEST_STD(pair) > : public StdTraitsBase + { + public: + ValueTraits( const CXXTEST_STD(pair) &p ) + { + *this << "<" << TS_AS_STRING( p.first ) << ", " << TS_AS_STRING( p.second ) << ">"; + } + }; + + // + // std::vector + // + template + class ValueTraits< CXXTEST_STD(vector) > : public StdTraitsBase + { + public: + ValueTraits( const CXXTEST_STD(vector) &v ) + { + dumpRange( *this, v.begin(), v.end() ); + } + }; + + // + // std::list + // + template + class ValueTraits< CXXTEST_STD(list) > : public StdTraitsBase + { + public: + ValueTraits( const CXXTEST_STD(list) &l ) + { + dumpRange( *this, l.begin(), l.end() ); + } + }; + + // + // std::set + // + template + class ValueTraits< CXXTEST_STD(set) > : public StdTraitsBase + { + public: + ValueTraits( const CXXTEST_STD(set) &s ) + { + dumpRange( *this, s.begin(), s.end() ); + } + }; + + // + // std::map + // + template + class ValueTraits< CXXTEST_STD(map) > : public StdTraitsBase + { + public: + ValueTraits( const CXXTEST_STD(map) &m ) + { + dumpRange( *this, m.begin(), m.end() ); + } + }; + + // + // std::deque + // + template + class ValueTraits< CXXTEST_STD(deque) > : public StdTraitsBase + { + public: + ValueTraits( const CXXTEST_STD(deque) &d ) + { + dumpRange( *this, d.begin(), d.end() ); + } + }; + + // + // std::multiset + // + template + class ValueTraits< CXXTEST_STD(multiset) > : public StdTraitsBase + { + public: + ValueTraits( const CXXTEST_STD(multiset) &ms ) + { + dumpRange( *this, ms.begin(), ms.end() ); + } + }; + + // + // std::multimap + // + template + class ValueTraits< CXXTEST_STD(multimap) > : public StdTraitsBase + { + public: + ValueTraits( const CXXTEST_STD(multimap) &mm ) + { + dumpRange( *this, mm.begin(), mm.end() ); + } + }; + + // + // std::complex + // + template + class ValueTraits< CXXTEST_STD(complex) > : public StdTraitsBase + { + public: + ValueTraits( const CXXTEST_STD(complex) &c ) + { + if ( !c.imag() ) + *this << TS_AS_STRING(c.real()); + else if ( !c.real() ) + *this << "(" << TS_AS_STRING(c.imag()) << " * i)"; + else + *this << "(" << TS_AS_STRING(c.real()) << " + " << TS_AS_STRING(c.imag()) << " * i)"; + } + }; +#endif // _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION +} + +#endif // CXXTEST_USER_VALUE_TRAITS + +#endif // __cxxtest_StdValueTraits_h__ diff --git a/tools/cxxtest/cxxtest/StdioFilePrinter.h b/tools/cxxtest/cxxtest/StdioFilePrinter.h new file mode 100644 index 0000000..0d64171 --- /dev/null +++ b/tools/cxxtest/cxxtest/StdioFilePrinter.h @@ -0,0 +1,52 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__StdioFilePrinter_h__ +#define __cxxtest__StdioFilePrinter_h__ + +// +// The StdioFilePrinter is a simple TestListener that +// just prints "OK" if everything goes well, otherwise +// reports the error in the format of compiler messages. +// This class uses , i.e. FILE * and fprintf(). +// + +#include +#include + +namespace CxxTest +{ + class StdioFilePrinter : public ErrorFormatter + { + public: + StdioFilePrinter( FILE *o, const char *preLine = ":", const char *postLine = "" ) : + ErrorFormatter( new Adapter(o), preLine, postLine ) {} + virtual ~StdioFilePrinter() { delete outputStream(); } + + private: + class Adapter : public OutputStream + { + Adapter( const Adapter & ); + Adapter &operator=( const Adapter & ); + + FILE *_o; + + public: + Adapter( FILE *o ) : _o(o) {} + void flush() { fflush( _o ); } + OutputStream &operator<<( unsigned i ) { fprintf( _o, "%u", i ); return *this; } + OutputStream &operator<<( const char *s ) { fputs( s, _o ); return *this; } + OutputStream &operator<<( Manipulator m ) { return OutputStream::operator<<( m ); } + }; + }; +} + +#endif // __cxxtest__StdioFilePrinter_h__ diff --git a/tools/cxxtest/cxxtest/StdioPrinter.h b/tools/cxxtest/cxxtest/StdioPrinter.h new file mode 100644 index 0000000..88f8551 --- /dev/null +++ b/tools/cxxtest/cxxtest/StdioPrinter.h @@ -0,0 +1,33 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__StdioPrinter_h__ +#define __cxxtest__StdioPrinter_h__ + +// +// The StdioPrinter is an StdioFilePrinter which defaults to stdout. +// This should have been called StdOutPrinter or something, but the name +// has been historically used. +// + +#include + +namespace CxxTest +{ + class StdioPrinter : public StdioFilePrinter + { + public: + StdioPrinter( FILE *o = stdout, const char *preLine = ":", const char *postLine = "" ) : + StdioFilePrinter( o, preLine, postLine ) {} + }; +} + +#endif // __cxxtest__StdioPrinter_h__ diff --git a/tools/cxxtest/cxxtest/TeeListener.h b/tools/cxxtest/cxxtest/TeeListener.h new file mode 100644 index 0000000..153a625 --- /dev/null +++ b/tools/cxxtest/cxxtest/TeeListener.h @@ -0,0 +1,199 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__TeeListener_h__ +#define __cxxtest__TeeListener_h__ + +// +// A TeeListener notifies two "regular" TestListeners +// + +#include +#include + +namespace CxxTest +{ + class TeeListener : public TestListener + { + public: + TeeListener() + { + setFirst( _dummy ); + setSecond( _dummy ); + } + + virtual ~TeeListener() + { + } + + void setFirst( TestListener &first ) + { + _first = &first; + } + + void setSecond( TestListener &second ) + { + _second = &second; + } + + void enterWorld( const WorldDescription &d ) + { + _first->enterWorld( d ); + _second->enterWorld( d ); + } + + void enterSuite( const SuiteDescription &d ) + { + _first->enterSuite( d ); + _second->enterSuite( d ); + } + + void enterTest( const TestDescription &d ) + { + _first->enterTest( d ); + _second->enterTest( d ); + } + + void trace( const char *file, int line, const char *expression ) + { + _first->trace( file, line, expression ); + _second->trace( file, line, expression ); + } + + void warning( const char *file, int line, const char *expression ) + { + _first->warning( file, line, expression ); + _second->warning( file, line, expression ); + } + + void failedTest( const char *file, int line, const char *expression ) + { + _first->failedTest( file, line, expression ); + _second->failedTest( file, line, expression ); + } + + void failedAssert( const char *file, int line, const char *expression ) + { + _first->failedAssert( file, line, expression ); + _second->failedAssert( file, line, expression ); + } + + void failedAssertEquals( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ) + { + _first->failedAssertEquals( file, line, xStr, yStr, x, y ); + _second->failedAssertEquals( file, line, xStr, yStr, x, y ); + } + + void failedAssertSameData( const char *file, int line, + const char *xStr, const char *yStr, + const char *sizeStr, const void *x, + const void *y, unsigned size ) + { + _first->failedAssertSameData( file, line, xStr, yStr, sizeStr, x, y, size ); + _second->failedAssertSameData( file, line, xStr, yStr, sizeStr, x, y, size ); + } + + void failedAssertSameFiles( const char* file, int line, const char* file1, const char* file2, const char* explanation) + { + _first->failedAssertSameFiles( file, line, file1, file2, explanation ); + _second->failedAssertSameFiles( file, line, file1, file2, explanation ); + } + + void failedAssertDelta( const char *file, int line, + const char *xStr, const char *yStr, const char *dStr, + const char *x, const char *y, const char *d ) + { + _first->failedAssertDelta( file, line, xStr, yStr, dStr, x, y, d ); + _second->failedAssertDelta( file, line, xStr, yStr, dStr, x, y, d ); + } + + void failedAssertDiffers( const char *file, int line, + const char *xStr, const char *yStr, + const char *value ) + { + _first->failedAssertDiffers( file, line, xStr, yStr, value ); + _second->failedAssertDiffers( file, line, xStr, yStr, value ); + } + + void failedAssertLessThan( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ) + { + _first->failedAssertLessThan( file, line, xStr, yStr, x, y ); + _second->failedAssertLessThan( file, line, xStr, yStr, x, y ); + } + + void failedAssertLessThanEquals( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ) + { + _first->failedAssertLessThanEquals( file, line, xStr, yStr, x, y ); + _second->failedAssertLessThanEquals( file, line, xStr, yStr, x, y ); + } + + void failedAssertPredicate( const char *file, int line, + const char *predicate, const char *xStr, const char *x ) + { + _first->failedAssertPredicate( file, line, predicate, xStr, x ); + _second->failedAssertPredicate( file, line, predicate, xStr, x ); + } + + void failedAssertRelation( const char *file, int line, + const char *relation, const char *xStr, const char *yStr, + const char *x, const char *y ) + { + _first->failedAssertRelation( file, line, relation, xStr, yStr, x, y ); + _second->failedAssertRelation( file, line, relation, xStr, yStr, x, y ); + } + + void failedAssertThrows( const char *file, int line, + const char *expression, const char *type, + bool otherThrown ) + { + _first->failedAssertThrows( file, line, expression, type, otherThrown ); + _second->failedAssertThrows( file, line, expression, type, otherThrown ); + } + + void failedAssertThrowsNot( const char *file, int line, + const char *expression ) + { + _first->failedAssertThrowsNot( file, line, expression ); + _second->failedAssertThrowsNot( file, line, expression ); + } + + void leaveTest( const TestDescription &d ) + { + _first->leaveTest(d); + _second->leaveTest(d); + } + + void leaveSuite( const SuiteDescription &d ) + { + _first->leaveSuite(d); + _second->leaveSuite(d); + } + + void leaveWorld( const WorldDescription &d ) + { + _first->leaveWorld(d); + _second->leaveWorld(d); + } + + private: + TestListener *_first, *_second; + TestListener _dummy; + }; +} + + +#endif // __cxxtest__TeeListener_h__ diff --git a/tools/cxxtest/cxxtest/TestListener.h b/tools/cxxtest/cxxtest/TestListener.h new file mode 100644 index 0000000..4881e97 --- /dev/null +++ b/tools/cxxtest/cxxtest/TestListener.h @@ -0,0 +1,85 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__TestListener_h__ +#define __cxxtest__TestListener_h__ + +// +// TestListener is the base class for all "listeners", +// i.e. classes that receive notifications of the +// testing process. +// +// The names of the parameters are in comments to avoid +// "unused parameter" warnings. +// + +#include + +namespace CxxTest +{ + class TestListener + { + public: + TestListener() {} + virtual ~TestListener() {} + virtual void process_commandline(int& /*argc*/, char** /*argv*/) {} + + virtual void enterWorld( const WorldDescription & /*desc*/ ) {} + virtual void enterSuite( const SuiteDescription & /*desc*/ ) {} + virtual void enterTest( const TestDescription & /*desc*/ ) {} + virtual void trace( const char * /*file*/, int /*line*/, + const char * /*expression*/ ) {} + virtual void warning( const char * /*file*/, int /*line*/, + const char * /*expression*/ ) {} + virtual void failedTest( const char * /*file*/, int /*line*/, + const char * /*expression*/ ) {} + virtual void failedAssert( const char * /*file*/, int /*line*/, + const char * /*expression*/ ) {} + virtual void failedAssertEquals( const char * /*file*/, int /*line*/, + const char * /*xStr*/, const char * /*yStr*/, + const char * /*x*/, const char * /*y*/ ) {} + virtual void failedAssertSameData( const char * /*file*/, int /*line*/, + const char * /*xStr*/, const char * /*yStr*/, + const char * /*sizeStr*/, const void * /*x*/, + const void * /*y*/, unsigned /*size*/ ) {} + virtual void failedAssertDelta( const char * /*file*/, int /*line*/, + const char * /*xStr*/, const char * /*yStr*/, + const char * /*dStr*/, const char * /*x*/, + const char * /*y*/, const char * /*d*/ ) {} + virtual void failedAssertDiffers( const char * /*file*/, int /*line*/, + const char * /*xStr*/, const char * /*yStr*/, + const char * /*value*/ ) {} + virtual void failedAssertLessThan( const char * /*file*/, int /*line*/, + const char * /*xStr*/, const char * /*yStr*/, + const char * /*x*/, const char * /*y*/ ) {} + virtual void failedAssertLessThanEquals( const char * /*file*/, int /*line*/, + const char * /*xStr*/, const char * /*yStr*/, + const char * /*x*/, const char * /*y*/ ) {} + virtual void failedAssertPredicate( const char * /*file*/, int /*line*/, + const char * /*predicate*/, const char * /*xStr*/, const char * /*x*/ ) {} + virtual void failedAssertRelation( const char * /*file*/, int /*line*/, + const char * /*relation*/, const char * /*xStr*/, const char * /*yStr*/, + const char * /*x*/, const char * /*y*/ ) {} + virtual void failedAssertThrows( const char * /*file*/, int /*line*/, + const char * /*expression*/, const char * /*type*/, + bool /*otherThrown*/ ) {} + virtual void failedAssertThrowsNot( const char * /*file*/, int /*line*/, + const char * /*expression*/ ) {} + virtual void failedAssertSameFiles( const char* /*file*/, int /*line*/, + const char* , const char*, const char* ) {} + virtual void leaveTest( const TestDescription & /*desc*/ ) {} + virtual void leaveSuite( const SuiteDescription & /*desc*/ ) {} + virtual void leaveWorld( const WorldDescription & /*desc*/ ) {} + }; +} + +#endif // __cxxtest__TestListener_h__ + diff --git a/tools/cxxtest/cxxtest/TestMain.h b/tools/cxxtest/cxxtest/TestMain.h new file mode 100644 index 0000000..343c22b --- /dev/null +++ b/tools/cxxtest/cxxtest/TestMain.h @@ -0,0 +1,114 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __CxxTestMain_h +#define __CxxTestMain_h + +#include +#include + +#ifndef _CXXTEST_HAVE_STD +# define _CXXTEST_HAVE_STD +#endif // _CXXTEST_HAVE_STD + +#include + +#ifdef _CXXTEST_OLD_STD +# include +# include +#else // !_CXXTEST_OLD_STD +# include +# include +#endif // _CXXTEST_OLD_STD + +namespace CxxTest +{ + +inline void print_help(const char* name) +{ + CXXTEST_STD(cerr) << name << " " << CXXTEST_STD(endl); + CXXTEST_STD(cerr) << name << " " << CXXTEST_STD(endl); + CXXTEST_STD(cerr) << name << " -h" << CXXTEST_STD(endl); + CXXTEST_STD(cerr) << name << " --help" << CXXTEST_STD(endl); + CXXTEST_STD(cerr) << name << " --help-tests" << CXXTEST_STD(endl); + CXXTEST_STD(cerr) << name << " -v Enable tracing output." << CXXTEST_STD(endl); +} + + +template +int Main(TesterT& tmp, int argc, char* argv[]) +{ +// +// Parse the command-line arguments. The default behavior is to run all tests +// +// This is a primitive parser, but I'm not sure what sort of portable +// parser should be used in cxxtest. +// + +// +// Print command-line syntax +// +for (int i=1; inext() ) + for ( TestDescription *td = sd->firstTest(); td; td = td->next() ) + CXXTEST_STD(cout) << td->suiteName() << " " << td->testName() << CXXTEST_STD(endl); + return 0; + } +} + +// +// Process command-line options here. +// +while ((argc > 1) && (argv[1][0] == '-')) { + if (CXXTEST_STD(strcmp)(argv[1],"-v") == 0) { + tracker().print_tracing = true; + } + else { + CXXTEST_STD(cerr) << "ERROR: unknown option '" << argv[1] << "'" << CXXTEST_STD(endl); + return -1; + } + for (int i=1; i<(argc-1); i++) + argv[i] = argv[i+1]; + argc--; + } + +// +// Run experiments +// +bool status=false; +if ((argc==2) && (argv[1][0] != '-')) { + status=leaveOnly(argv[1]); + if (!status) { + CXXTEST_STD(cerr) << "ERROR: unknown suite '" << argv[1] << "'" << CXXTEST_STD(endl); + return -1; + } + } +if ((argc==3) && (argv[1][0] != '-')) { + status=leaveOnly(argv[1],argv[2]); + if (!status) { + CXXTEST_STD(cerr) << "ERROR: unknown test '" << argv[1] << "::" << argv[2] << "'" << CXXTEST_STD(endl); + return -1; + } + } + +tmp.process_commandline(argc,argv); +return tmp.run(); +} + +} +#endif + diff --git a/tools/cxxtest/cxxtest/TestRunner.h b/tools/cxxtest/cxxtest/TestRunner.h new file mode 100644 index 0000000..17866a6 --- /dev/null +++ b/tools/cxxtest/cxxtest/TestRunner.h @@ -0,0 +1,136 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest_TestRunner_h__ +#define __cxxtest_TestRunner_h__ + +// +// TestRunner is the class that runs all the tests. +// To use it, create an object that implements the TestListener +// interface and call TestRunner::runAllTests( myListener ); +// + +#include +#include +#include +#include + +namespace CxxTest +{ + class TestRunner + { + public: + static void runAllTests( TestListener &listener ) + { + tracker().setListener( &listener ); + _TS_TRY { TestRunner().runWorld(); } + _TS_LAST_CATCH( { tracker().failedTest( __FILE__, __LINE__, "Exception thrown from world" ); } ); + tracker().setListener( 0 ); + } + + static void runAllTests( TestListener *listener ) + { + if ( listener ) { + listener->warning( __FILE__, __LINE__, "Deprecated; Use runAllTests( TestListener & )" ); + runAllTests( *listener ); + } + } + + private: + void runWorld() + { + RealWorldDescription wd; + WorldGuard sg; + + tracker().enterWorld( wd ); + if ( wd.setUp() ) { + for ( SuiteDescription *sd = wd.firstSuite(); sd; sd = sd->next() ) + if ( sd->active() ) + runSuite( *sd ); + + wd.tearDown(); + } + tracker().leaveWorld( wd ); + } + + void runSuite( SuiteDescription &sd ) + { + StateGuard sg; + + tracker().enterSuite( sd ); + if ( sd.setUp() ) { + for ( TestDescription *td = sd.firstTest(); td; td = td->next() ) + if ( td->active() ) + runTest( *td ); + + sd.tearDown(); + } + tracker().leaveSuite( sd ); + } + + void runTest( TestDescription &td ) + { + StateGuard sg; + + tracker().enterTest( td ); + if ( td.setUp() ) { + td.run(); + td.tearDown(); + } + tracker().leaveTest( td ); + } + + class StateGuard + { +#ifdef _CXXTEST_HAVE_EH + bool _abortTestOnFail; +#endif // _CXXTEST_HAVE_EH + unsigned _maxDumpSize; + + public: + StateGuard() + { +#ifdef _CXXTEST_HAVE_EH + _abortTestOnFail = abortTestOnFail(); +#endif // _CXXTEST_HAVE_EH + _maxDumpSize = maxDumpSize(); + } + + ~StateGuard() + { +#ifdef _CXXTEST_HAVE_EH + setAbortTestOnFail( _abortTestOnFail ); +#endif // _CXXTEST_HAVE_EH + setMaxDumpSize( _maxDumpSize ); + } + }; + + class WorldGuard : public StateGuard + { + public: + WorldGuard() : StateGuard() + { +#ifdef _CXXTEST_HAVE_EH + setAbortTestOnFail( CXXTEST_DEFAULT_ABORT ); +#endif // _CXXTEST_HAVE_EH + setMaxDumpSize( CXXTEST_MAX_DUMP_SIZE ); + } + }; + }; + + // + // For --no-static-init + // + void initialize(); +} + + +#endif // __cxxtest_TestRunner_h__ diff --git a/tools/cxxtest/cxxtest/TestSuite.cpp b/tools/cxxtest/cxxtest/TestSuite.cpp new file mode 100644 index 0000000..eef2cce --- /dev/null +++ b/tools/cxxtest/cxxtest/TestSuite.cpp @@ -0,0 +1,264 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__TestSuite_cpp__ +#define __cxxtest__TestSuite_cpp__ + +#include +#if defined(_CXXTEST_HAVE_STD) +#include +#endif + +namespace CxxTest +{ + // + // TestSuite members + // + TestSuite::~TestSuite() {} + void TestSuite::setUp() {} + void TestSuite::tearDown() {} + + // + // Test-aborting stuff + // + static bool currentAbortTestOnFail = false; + + bool abortTestOnFail() + { + return currentAbortTestOnFail; + } + + void setAbortTestOnFail( bool value ) + { + currentAbortTestOnFail = value; + } + + void doAbortTest() + { +# if defined(_CXXTEST_HAVE_EH) + if ( currentAbortTestOnFail ) + throw AbortTest(); +# endif // _CXXTEST_HAVE_EH + } + + // + // Max dump size + // + static unsigned currentMaxDumpSize = CXXTEST_MAX_DUMP_SIZE; + + unsigned maxDumpSize() + { + return currentMaxDumpSize; + } + + void setMaxDumpSize( unsigned value ) + { + currentMaxDumpSize = value; + } + + // + // Some non-template functions + // + void doTrace( const char *file, int line, const char *message ) + { + if (tracker().print_tracing) { + tracker().trace( file, line, message ); + } + } + + void doWarn( const char *file, int line, const char *message ) + { + tracker().warning( file, line, message ); + } + + void doFailTest( const char *file, int line, const char *message ) + { + tracker().failedTest( file, line, message ); + TS_ABORT(); + } + + void doFailAssert( const char *file, int line, + const char *expression, const char *message ) + { + if ( message ) + tracker().failedTest( file, line, message ); + tracker().failedAssert( file, line, expression ); + TS_ABORT(); + } + + bool sameData( const void *x, const void *y, unsigned size ) + { + if ( size == 0 ) + return true; + + if ( x == y ) + return true; + + if ( !x || !y ) + return false; + + const char *cx = (const char *)x; + const char *cy = (const char *)y; + while ( size -- ) + if ( *cx++ != *cy++ ) + return false; + + return true; + } + + void doAssertSameData( const char *file, int line, + const char *xExpr, const void *x, + const char *yExpr, const void *y, + const char *sizeExpr, unsigned size, + const char *message ) + { + if ( !sameData( x, y, size ) ) { + if ( message ) + tracker().failedTest( file, line, message ); + tracker().failedAssertSameData( file, line, xExpr, yExpr, sizeExpr, x, y, size ); + TS_ABORT(); + } + } + +//#if defined(_CXXTEST_HAVE_STD) + bool sameFiles( const char* file1, const char* file2, std::ostringstream& explanation) + { + std::string ppprev_line; + std::string pprev_line; + std::string prev_line; + std::string curr_line; + + std::ifstream is1; + is1.open(file1); + std::ifstream is2; + is2.open(file2); + if (!is1) { + explanation << "File '" << file1 << "' does not exist!"; + return false; + } + if (!is2) { + explanation << "File '" << file2 << "' does not exist!"; + return false; + } + + int nline=1; + char c1, c2; + while (1) { + is1.get(c1); + is2.get(c2); + if (!is1 && !is2) return true; + if (!is1) { + explanation << "File '" << file1 << "' ended before file '" << file2 << "' (line " << nline << ")"; + explanation << std::endl << "= " << ppprev_line << std::endl << "= " << pprev_line << std::endl << "= " << prev_line << std::endl << "< " << curr_line; + is1.get(c1); + while (is1 && (c1 != '\n')) { + explanation << c1; + is1.get(c1); + } + explanation << std::endl; + return false; + } + if (!is2) { + explanation << "File '" << file2 << "' ended before file '" << file1 << "' (line " << nline << ")"; + explanation << std::endl << "= " << ppprev_line << std::endl << "= " << pprev_line << std::endl << "= " << prev_line << std::endl << "> " << curr_line; + is2.get(c2); + while (is2 && (c2 != '\n')) { + explanation << c2; + is2.get(c2); + } + explanation << std::endl; + return false; + } + if (c1 != c2) { + explanation << "Files '" << file1 << "' and '" << file2 << "' differ at line " << nline; + explanation << std::endl << "= " << ppprev_line << std::endl << "= " << pprev_line << std::endl << "= " << prev_line; + + explanation << std::endl << "< " << curr_line; + is2.get(c1); + while (is1 && (c1 != '\n')) { + explanation << c1; + is2.get(c1); + } + explanation << std::endl; + + explanation << std::endl << "> " << curr_line; + is2.get(c2); + while (is2 && (c2 != '\n')) { + explanation << c2; + is2.get(c2); + } + explanation << std::endl; + + return false; + } + if (c1 == '\n') { + ppprev_line = pprev_line; + pprev_line = prev_line; + prev_line = curr_line; + curr_line = ""; + nline++; + } + else { + curr_line += c1; + } + } + } +//#endif + + void doAssertSameFiles( const char* file, int line, + const char* file1, const char* file2, + const char* message) + { +#if defined(_CXXTEST_HAVE_STD) + std::ostringstream explanation; + if ( !sameFiles( file1, file2, explanation ) ) { + if ( message ) + tracker().failedTest( file, line, message ); + tracker().failedAssertSameFiles( file, line, file1, file2, explanation.str().c_str()); + TS_ABORT(); + } +#else + tracker().failedAssertSameFiles( file, line, file1, file2, "This test is only supported when --have-std is enabled"); + TS_ABORT(); +#endif + } + + void doFailAssertThrows( const char *file, int line, + const char *expr, const char *type, + bool otherThrown, + const char *message, + const char *exception ) + { + if ( exception ) + tracker().failedTest( file, line, exception ); + if ( message ) + tracker().failedTest( file, line, message ); + + tracker().failedAssertThrows( file, line, expr, type, otherThrown ); + TS_ABORT(); + } + + void doFailAssertThrowsNot( const char *file, int line, + const char *expression, const char *message, + const char *exception ) + { + if ( exception ) + tracker().failedTest( file, line, exception ); + if ( message ) + tracker().failedTest( file, line, message ); + + tracker().failedAssertThrowsNot( file, line, expression ); + TS_ABORT(); + } +} + +#endif // __cxxtest__TestSuite_cpp__ + diff --git a/tools/cxxtest/cxxtest/TestSuite.h b/tools/cxxtest/cxxtest/TestSuite.h new file mode 100644 index 0000000..eeec0b3 --- /dev/null +++ b/tools/cxxtest/cxxtest/TestSuite.h @@ -0,0 +1,601 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__TestSuite_h__ +#define __cxxtest__TestSuite_h__ + +// +// class TestSuite is the base class for all test suites. +// To define a test suite, derive from this class and add +// member functions called void test*(); +// + +#include +#include +#include +#include +#include + +#if defined(_CXXTEST_HAVE_STD) +# include +#endif // _CXXTEST_HAVE_STD + +namespace CxxTest +{ + class TestSuite + { + public: + virtual ~TestSuite(); + virtual void setUp(); + virtual void tearDown(); + }; + + class AbortTest {}; + void doAbortTest(); +# define TS_ABORT() CxxTest::doAbortTest() + + bool abortTestOnFail(); + void setAbortTestOnFail( bool value = CXXTEST_DEFAULT_ABORT ); + + unsigned maxDumpSize(); + void setMaxDumpSize( unsigned value = CXXTEST_MAX_DUMP_SIZE ); + + void doTrace( const char *file, int line, const char *message ); + void doWarn( const char *file, int line, const char *message ); + void doFailTest( const char *file, int line, const char *message ); + void doFailAssert( const char *file, int line, const char *expression, const char *message ); + + template + struct equals { + static bool test( X x, Y y ) + { + return (x == y); + } + }; + + template + void doAssertEquals( const char *file, int line, + const char *xExpr, X x, + const char *yExpr, Y y, + const char *message ) + { + if ( !equals::test( x, y ) ) { + if ( message ) + tracker().failedTest( file, line, message ); + tracker().failedAssertEquals( file, line, xExpr, yExpr, TS_AS_STRING(x), TS_AS_STRING(y) ); + TS_ABORT(); + } + } + + bool sameData( const void *x, const void *y, unsigned size ); + + void doAssertSameData( const char *file, int line, + const char *xExpr, const void *x, + const char *yExpr, const void *y, + const char *sizeExpr, unsigned size, + const char *message ); + +//#if defined(_CXXTEST_HAVE_STD) + bool sameFiles( const char* file1, const char* file2, std::ostringstream& explanation); +//#endif + + template + struct differs { + static bool test( X x, Y y ) + { + return !(x == y); + } + }; + + template + void doAssertDiffers( const char *file, int line, + const char *xExpr, X x, + const char *yExpr, Y y, + const char *message ) + { + if ( !differs::test( x, y ) ) { + if ( message ) + tracker().failedTest( file, line, message ); + tracker().failedAssertDiffers( file, line, xExpr, yExpr, TS_AS_STRING(x) ); + TS_ABORT(); + } + } + + template + struct lessThan { + static bool test( X x, Y y ) + { + return (x < y); + } + }; + + template + void doAssertLessThan( const char *file, int line, + const char *xExpr, X x, + const char *yExpr, Y y, + const char *message ) + { + if ( !lessThan::test(x, y) ) { + if ( message ) + tracker().failedTest( file, line, message ); + tracker().failedAssertLessThan( file, line, xExpr, yExpr, TS_AS_STRING(x), TS_AS_STRING(y) ); + TS_ABORT(); + } + } + + template + struct lessThanEquals { + static bool test( X x, Y y ) + { + return (x <= y); + } + }; + + template + void doAssertLessThanEquals( const char *file, int line, + const char *xExpr, X x, + const char *yExpr, Y y, + const char *message ) + { + if ( !lessThanEquals::test( x, y ) ) { + if ( message ) + tracker().failedTest( file, line, message ); + tracker().failedAssertLessThanEquals( file, line, xExpr, yExpr, TS_AS_STRING(x), TS_AS_STRING(y) ); + TS_ABORT(); + } + } + + template + void doAssertPredicate( const char *file, int line, + const char *pExpr, const P &p, + const char *xExpr, X x, + const char *message ) + { + if ( !p( x ) ) { + if ( message ) + tracker().failedTest( file, line, message ); + tracker().failedAssertPredicate( file, line, pExpr, xExpr, TS_AS_STRING(x) ); + TS_ABORT(); + } + } + + template + void doAssertRelation( const char *file, int line, + const char *rExpr, const R &r, + const char *xExpr, X x, + const char *yExpr, Y y, + const char *message ) + { + if ( !r( x, y ) ) { + if ( message ) + tracker().failedTest( file, line, message ); + tracker().failedAssertRelation( file, line, rExpr, xExpr, yExpr, TS_AS_STRING(x), TS_AS_STRING(y) ); + TS_ABORT(); + } + } + + // An indirection template so the compiler can determine what type + // "X +/- D" should be + template + bool delta_le_helper( X x, Y y ) + { + return lessThanEquals::test(x,y); + } + + template + struct delta { + static bool test( X x, Y y, D d ) + { + return delta_le_helper(x-d, y) && delta_le_helper(y, x+d); + //(y >= x - d) && (y <= x + d)); + } + }; + + template + void doAssertDelta( const char *file, int line, + const char *xExpr, X x, + const char *yExpr, Y y, + const char *dExpr, D d, + const char *message ) + { + if ( !delta::test( x, y, d ) ) { + if ( message ) + tracker().failedTest( file, line, message ); + + tracker().failedAssertDelta( file, line, xExpr, yExpr, dExpr, + TS_AS_STRING(x), TS_AS_STRING(y), TS_AS_STRING(d) ); + TS_ABORT(); + } + } + + void doFailAssertThrows( const char *file, int line, + const char *expr, const char *type, + bool otherThrown, + const char *message, + const char *exception = 0 ); + + void doFailAssertThrowsNot( const char *file, int line, + const char *expression, const char *message, + const char *exception = 0 ); + + void doAssertSameFiles( const char* file, int line, + const char* file1, const char* file2, + const char* message); + +# ifdef _CXXTEST_HAVE_EH +# define _TS_TRY try +# define _TS_CATCH_TYPE(t, b) catch t b +# define _TS_CATCH_ABORT(b) _TS_CATCH_TYPE( (const CxxTest::AbortTest &), b ) +# define _TS_LAST_CATCH(b) _TS_CATCH_TYPE( (...), b ) +# define _TSM_LAST_CATCH(f,l,m) _TS_LAST_CATCH( { (CxxTest::tracker()).failedTest(f,l,m); TS_ABORT(); } ) +# ifdef _CXXTEST_HAVE_STD +# define _TS_CATCH_STD(e,b) _TS_CATCH_TYPE( (const std::exception& e), b ) +# else // !_CXXTEST_HAVE_STD +# define _TS_CATCH_STD(e,b) +# endif // _CXXTEST_HAVE_STD +# define ___TSM_CATCH(f,l,m) \ + _TS_CATCH_STD(e, { (CxxTest::tracker()).failedTest(f,l,e.what()); TS_ABORT(); }) \ + _TSM_LAST_CATCH(f,l,m) +# define __TSM_CATCH(f,l,m) \ + _TS_CATCH_ABORT( { throw; } ) \ + ___TSM_CATCH(f,l,m) +# define __TS_CATCH(f,l) __TSM_CATCH(f,l,"Unhandled exception") +# define _TS_CATCH __TS_CATCH(__FILE__,__LINE__) +# else // !_CXXTEST_HAVE_EH +# define _TS_TRY +# define ___TSM_CATCH(f,l,m) +# define __TSM_CATCH(f,l,m) +# define __TS_CATCH(f,l) +# define _TS_CATCH +# define _TS_CATCH_TYPE(t, b) +# define _TS_LAST_CATCH(b) +# define _TS_CATCH_STD(e,b) +# define _TS_CATCH_ABORT(b) +# endif // _CXXTEST_HAVE_EH + + // TS_TRACE +# define _TS_TRACE(f,l,e) CxxTest::doTrace( (f), (l), TS_AS_STRING(e) ) +# define TS_TRACE(e) _TS_TRACE( __FILE__, __LINE__, e ) + + // TS_WARN +# define _TS_WARN(f,l,e) CxxTest::doWarn( (f), (l), TS_AS_STRING(e) ) +# define TS_WARN(e) _TS_WARN( __FILE__, __LINE__, e ) + + // TS_FAIL +# define _TS_FAIL(f,l,e) CxxTest::doFailTest( (f), (l), TS_AS_STRING(e) ) +# define TS_FAIL(e) _TS_FAIL( __FILE__, __LINE__, e ) + + // TS_ASSERT +# define ___ETS_ASSERT(f,l,e,m) { if ( !(e) ) CxxTest::doFailAssert( (f), (l), #e, (m) ); } +# define ___TS_ASSERT(f,l,e,m) { _TS_TRY { ___ETS_ASSERT(f,l,e,m); } __TS_CATCH(f,l) } + +# define _ETS_ASSERT(f,l,e) ___ETS_ASSERT(f,l,e,0) +# define _TS_ASSERT(f,l,e) ___TS_ASSERT(f,l,e,0) + +# define ETS_ASSERT(e) _ETS_ASSERT(__FILE__,__LINE__,e) +# define TS_ASSERT(e) _TS_ASSERT(__FILE__,__LINE__,e) + +# define _ETSM_ASSERT(f,l,m,e) ___ETS_ASSERT(f,l,e,TS_AS_STRING(m) ) +# define _TSM_ASSERT(f,l,m,e) ___TS_ASSERT(f,l,e,TS_AS_STRING(m) ) + +# define ETSM_ASSERT(m,e) _ETSM_ASSERT(__FILE__,__LINE__,m,e) +# define TSM_ASSERT(m,e) _TSM_ASSERT(__FILE__,__LINE__,m,e) + + // TS_ASSERT_EQUALS +# define ___ETS_ASSERT_EQUALS(f,l,x,y,m) CxxTest::doAssertEquals( (f), (l), #x, (x), #y, (y), (m) ) +# define ___TS_ASSERT_EQUALS(f,l,x,y,m) { _TS_TRY { ___ETS_ASSERT_EQUALS(f,l,x,y,m); } __TS_CATCH(f,l) } + +# define _ETS_ASSERT_EQUALS(f,l,x,y) ___ETS_ASSERT_EQUALS(f,l,x,y,0) +# define _TS_ASSERT_EQUALS(f,l,x,y) ___TS_ASSERT_EQUALS(f,l,x,y,0) + +# define ETS_ASSERT_EQUALS(x,y) _ETS_ASSERT_EQUALS(__FILE__,__LINE__,x,y) +# define TS_ASSERT_EQUALS(x,y) _TS_ASSERT_EQUALS(__FILE__,__LINE__,x,y) + +# define _ETSM_ASSERT_EQUALS(f,l,m,x,y) ___ETS_ASSERT_EQUALS(f,l,x,y,TS_AS_STRING(m)) +# define _TSM_ASSERT_EQUALS(f,l,m,x,y) ___TS_ASSERT_EQUALS(f,l,x,y,TS_AS_STRING(m)) + +# define ETSM_ASSERT_EQUALS(m,x,y) _ETSM_ASSERT_EQUALS(__FILE__,__LINE__,m,x,y) +# define TSM_ASSERT_EQUALS(m,x,y) _TSM_ASSERT_EQUALS(__FILE__,__LINE__,m,x,y) + + // TS_ASSERT_SAME_DATA +# define ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,m) CxxTest::doAssertSameData( (f), (l), #x, (x), #y, (y), #s, (s), (m) ) +# define ___TS_ASSERT_SAME_DATA(f,l,x,y,s,m) { _TS_TRY { ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,m); } __TS_CATCH(f,l) } + +# define _ETS_ASSERT_SAME_DATA(f,l,x,y,s) ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,0) +# define _TS_ASSERT_SAME_DATA(f,l,x,y,s) ___TS_ASSERT_SAME_DATA(f,l,x,y,s,0) + +# define ETS_ASSERT_SAME_DATA(x,y,s) _ETS_ASSERT_SAME_DATA(__FILE__,__LINE__,x,y,s) +# define TS_ASSERT_SAME_DATA(x,y,s) _TS_ASSERT_SAME_DATA(__FILE__,__LINE__,x,y,s) + +# define _ETSM_ASSERT_SAME_DATA(f,l,m,x,y,s) ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,TS_AS_STRING(m)) +# define _TSM_ASSERT_SAME_DATA(f,l,m,x,y,s) ___TS_ASSERT_SAME_DATA(f,l,x,y,s,TS_AS_STRING(m)) + +# define ETSM_ASSERT_SAME_DATA(m,x,y,s) _ETSM_ASSERT_SAME_DATA(__FILE__,__LINE__,m,x,y,s) +# define TSM_ASSERT_SAME_DATA(m,x,y,s) _TSM_ASSERT_SAME_DATA(__FILE__,__LINE__,m,x,y,s) + + // TS_ASSERT_DIFFERS +# define ___ETS_ASSERT_DIFFERS(f,l,x,y,m) CxxTest::doAssertDiffers( (f), (l), #x, (x), #y, (y), (m) ) +# define ___TS_ASSERT_DIFFERS(f,l,x,y,m) { _TS_TRY { ___ETS_ASSERT_DIFFERS(f,l,x,y,m); } __TS_CATCH(f,l) } + +# define _ETS_ASSERT_DIFFERS(f,l,x,y) ___ETS_ASSERT_DIFFERS(f,l,x,y,0) +# define _TS_ASSERT_DIFFERS(f,l,x,y) ___TS_ASSERT_DIFFERS(f,l,x,y,0) + +# define ETS_ASSERT_DIFFERS(x,y) _ETS_ASSERT_DIFFERS(__FILE__,__LINE__,x,y) +# define TS_ASSERT_DIFFERS(x,y) _TS_ASSERT_DIFFERS(__FILE__,__LINE__,x,y) + +# define _ETSM_ASSERT_DIFFERS(f,l,m,x,y) ___ETS_ASSERT_DIFFERS(f,l,x,y,TS_AS_STRING(m)) +# define _TSM_ASSERT_DIFFERS(f,l,m,x,y) ___TS_ASSERT_DIFFERS(f,l,x,y,TS_AS_STRING(m)) + +# define ETSM_ASSERT_DIFFERS(m,x,y) _ETSM_ASSERT_DIFFERS(__FILE__,__LINE__,m,x,y) +# define TSM_ASSERT_DIFFERS(m,x,y) _TSM_ASSERT_DIFFERS(__FILE__,__LINE__,m,x,y) + + // TS_ASSERT_LESS_THAN +# define ___ETS_ASSERT_LESS_THAN(f,l,x,y,m) CxxTest::doAssertLessThan( (f), (l), #x, (x), #y, (y), (m) ) +# define ___TS_ASSERT_LESS_THAN(f,l,x,y,m) { _TS_TRY { ___ETS_ASSERT_LESS_THAN(f,l,x,y,m); } __TS_CATCH(f,l) } + +# define _ETS_ASSERT_LESS_THAN(f,l,x,y) ___ETS_ASSERT_LESS_THAN(f,l,x,y,0) +# define _TS_ASSERT_LESS_THAN(f,l,x,y) ___TS_ASSERT_LESS_THAN(f,l,x,y,0) + +# define ETS_ASSERT_LESS_THAN(x,y) _ETS_ASSERT_LESS_THAN(__FILE__,__LINE__,x,y) +# define TS_ASSERT_LESS_THAN(x,y) _TS_ASSERT_LESS_THAN(__FILE__,__LINE__,x,y) + +# define _ETSM_ASSERT_LESS_THAN(f,l,m,x,y) ___ETS_ASSERT_LESS_THAN(f,l,x,y,TS_AS_STRING(m)) +# define _TSM_ASSERT_LESS_THAN(f,l,m,x,y) ___TS_ASSERT_LESS_THAN(f,l,x,y,TS_AS_STRING(m)) + +# define ETSM_ASSERT_LESS_THAN(m,x,y) _ETSM_ASSERT_LESS_THAN(__FILE__,__LINE__,m,x,y) +# define TSM_ASSERT_LESS_THAN(m,x,y) _TSM_ASSERT_LESS_THAN(__FILE__,__LINE__,m,x,y) + + // TS_ASSERT_LESS_THAN_EQUALS +# define ___ETS_ASSERT_LESS_THAN_EQUALS(f,l,x,y,m) \ + CxxTest::doAssertLessThanEquals( (f), (l), #x, (x), #y, (y), (m) ) +# define ___TS_ASSERT_LESS_THAN_EQUALS(f,l,x,y,m) \ + { _TS_TRY { ___ETS_ASSERT_LESS_THAN_EQUALS(f,l,x,y,m); } __TS_CATCH(f,l) } + +# define _ETS_ASSERT_LESS_THAN_EQUALS(f,l,x,y) ___ETS_ASSERT_LESS_THAN_EQUALS(f,l,x,y,0) +# define _TS_ASSERT_LESS_THAN_EQUALS(f,l,x,y) ___TS_ASSERT_LESS_THAN_EQUALS(f,l,x,y,0) + +# define ETS_ASSERT_LESS_THAN_EQUALS(x,y) _ETS_ASSERT_LESS_THAN_EQUALS(__FILE__,__LINE__,x,y) +# define TS_ASSERT_LESS_THAN_EQUALS(x,y) _TS_ASSERT_LESS_THAN_EQUALS(__FILE__,__LINE__,x,y) + +# define _ETSM_ASSERT_LESS_THAN_EQUALS(f,l,m,x,y) ___ETS_ASSERT_LESS_THAN_EQUALS(f,l,x,y,TS_AS_STRING(m)) +# define _TSM_ASSERT_LESS_THAN_EQUALS(f,l,m,x,y) ___TS_ASSERT_LESS_THAN_EQUALS(f,l,x,y,TS_AS_STRING(m)) + +# define ETSM_ASSERT_LESS_THAN_EQUALS(m,x,y) _ETSM_ASSERT_LESS_THAN_EQUALS(__FILE__,__LINE__,m,x,y) +# define TSM_ASSERT_LESS_THAN_EQUALS(m,x,y) _TSM_ASSERT_LESS_THAN_EQUALS(__FILE__,__LINE__,m,x,y) + + // TS_ASSERT_PREDICATE +# define ___ETS_ASSERT_PREDICATE(f,l,p,x,m) \ + CxxTest::doAssertPredicate( (f), (l), #p, p(), #x, (x), (m) ) +# define ___TS_ASSERT_PREDICATE(f,l,p,x,m) \ + { _TS_TRY { ___ETS_ASSERT_PREDICATE(f,l,p,x,m); } __TS_CATCH(f,l) } + +# define _ETS_ASSERT_PREDICATE(f,l,p,x) ___ETS_ASSERT_PREDICATE(f,l,p,x,0) +# define _TS_ASSERT_PREDICATE(f,l,p,x) ___TS_ASSERT_PREDICATE(f,l,p,x,0) + +# define ETS_ASSERT_PREDICATE(p,x) _ETS_ASSERT_PREDICATE(__FILE__,__LINE__,p,x) +# define TS_ASSERT_PREDICATE(p,x) _TS_ASSERT_PREDICATE(__FILE__,__LINE__,p,x) + +# define _ETSM_ASSERT_PREDICATE(f,l,m,p,x) ___ETS_ASSERT_PREDICATE(f,l,p,x,TS_AS_STRING(m)) +# define _TSM_ASSERT_PREDICATE(f,l,m,p,x) ___TS_ASSERT_PREDICATE(f,l,p,x,TS_AS_STRING(m)) + +# define ETSM_ASSERT_PREDICATE(m,p,x) _ETSM_ASSERT_PREDICATE(__FILE__,__LINE__,m,p,x) +# define TSM_ASSERT_PREDICATE(m,p,x) _TSM_ASSERT_PREDICATE(__FILE__,__LINE__,m,p,x) + + // TS_ASSERT_RELATION +# define ___ETS_ASSERT_RELATION(f,l,r,x,y,m) \ + CxxTest::doAssertRelation( (f), (l), #r, r(), #x, (x), #y, (y), (m) ) +# define ___TS_ASSERT_RELATION(f,l,r,x,y,m) \ + { _TS_TRY { ___ETS_ASSERT_RELATION(f,l,r,x,y,m); } __TS_CATCH(f,l) } + +# define _ETS_ASSERT_RELATION(f,l,r,x,y) ___ETS_ASSERT_RELATION(f,l,r,x,y,0) +# define _TS_ASSERT_RELATION(f,l,r,x,y) ___TS_ASSERT_RELATION(f,l,r,x,y,0) + +# define ETS_ASSERT_RELATION(r,x,y) _ETS_ASSERT_RELATION(__FILE__,__LINE__,r,x,y) +# define TS_ASSERT_RELATION(r,x,y) _TS_ASSERT_RELATION(__FILE__,__LINE__,r,x,y) + +# define _ETSM_ASSERT_RELATION(f,l,m,r,x,y) ___ETS_ASSERT_RELATION(f,l,r,x,y,TS_AS_STRING(m)) +# define _TSM_ASSERT_RELATION(f,l,m,r,x,y) ___TS_ASSERT_RELATION(f,l,r,x,y,TS_AS_STRING(m)) + +# define ETSM_ASSERT_RELATION(m,r,x,y) _ETSM_ASSERT_RELATION(__FILE__,__LINE__,m,r,x,y) +# define TSM_ASSERT_RELATION(m,r,x,y) _TSM_ASSERT_RELATION(__FILE__,__LINE__,m,r,x,y) + + // TS_ASSERT_DELTA +# define ___ETS_ASSERT_DELTA(f,l,x,y,d,m) CxxTest::doAssertDelta( (f), (l), #x, (x), #y, (y), #d, (d), (m) ) +# define ___TS_ASSERT_DELTA(f,l,x,y,d,m) { _TS_TRY { ___ETS_ASSERT_DELTA(f,l,x,y,d,m); } __TS_CATCH(f,l) } + +# define _ETS_ASSERT_DELTA(f,l,x,y,d) ___ETS_ASSERT_DELTA(f,l,x,y,d,0) +# define _TS_ASSERT_DELTA(f,l,x,y,d) ___TS_ASSERT_DELTA(f,l,x,y,d,0) + +# define ETS_ASSERT_DELTA(x,y,d) _ETS_ASSERT_DELTA(__FILE__,__LINE__,x,y,d) +# define TS_ASSERT_DELTA(x,y,d) _TS_ASSERT_DELTA(__FILE__,__LINE__,x,y,d) + +# define _ETSM_ASSERT_DELTA(f,l,m,x,y,d) ___ETS_ASSERT_DELTA(f,l,x,y,d,TS_AS_STRING(m)) +# define _TSM_ASSERT_DELTA(f,l,m,x,y,d) ___TS_ASSERT_DELTA(f,l,x,y,d,TS_AS_STRING(m)) + +# define ETSM_ASSERT_DELTA(m,x,y,d) _ETSM_ASSERT_DELTA(__FILE__,__LINE__,m,x,y,d) +# define TSM_ASSERT_DELTA(m,x,y,d) _TSM_ASSERT_DELTA(__FILE__,__LINE__,m,x,y,d) + + // TS_ASSERT_SAME_FILES +# define ___ETS_ASSERT_SAME_FILES(f,l,x,y,m) CxxTest::doAssertSameFiles( (f), (l), (x), (y), (m) ) +# define ___TS_ASSERT_SAME_FILES(f,l,x,y,m) { _TS_TRY { ___ETS_ASSERT_SAME_FILES(f,l,x,y,m); } __TS_CATCH(f,l) } + +# define _ETS_ASSERT_SAME_FILES(f,l,x,y) ___ETS_ASSERT_SAME_FILES(f,l,x,y,0) +# define _TS_ASSERT_SAME_FILES(f,l,x,y) ___TS_ASSERT_SAME_FILES(f,l,x,y,0) + +# define ETS_ASSERT_SAME_FILES(x,y) _ETS_ASSERT_SAME_FILES(__FILE__,__LINE__,x,y) +# define TS_ASSERT_SAME_FILES(x,y) _TS_ASSERT_SAME_FILES(__FILE__,__LINE__,x,y) + +# define _ETSM_ASSERT_SAME_FILES(f,l,m,x,y) ___ETS_ASSERT_SAME_FILES(f,l,x,y,TS_AS_STRING(m)) +# define _TSM_ASSERT_SAME_FILES(f,l,m,x,y) ___TS_ASSERT_SAME_FILES(f,l,x,y,TS_AS_STRING(m)) + +# define ETSM_ASSERT_SAME_FILES(m,x,y) _ETSM_ASSERT_SAME_FILES(__FILE__,__LINE__,m,x,y) +# define TSM_ASSERT_SAME_FILES(m,x,y) _TSM_ASSERT_SAME_FILES(__FILE__,__LINE__,m,x,y) + + + // TS_ASSERT_THROWS +# define ___TS_ASSERT_THROWS(f,l,e,t,m) ___TS_ASSERT_THROWS_ASSERT(f,l,e,t,(void)0,m) + +# define _TS_ASSERT_THROWS(f,l,e,t) ___TS_ASSERT_THROWS(f,l,e,t,0) +# define TS_ASSERT_THROWS(e,t) _TS_ASSERT_THROWS(__FILE__,__LINE__,e,t) + +# define _TSM_ASSERT_THROWS(f,l,m,e,t) ___TS_ASSERT_THROWS(f,l,e,t,TS_AS_STRING(m)) +# define TSM_ASSERT_THROWS(m,e,t) _TSM_ASSERT_THROWS(__FILE__,__LINE__,m,e,t) + + // TS_ASSERT_THROWS_ASSERT +# define ___TS_ASSERT_THROWS_ASSERT(f,l,e,t,a,m) { \ + bool _ts_threw_expected = false, _ts_threw_else = false; \ + _TS_TRY { e; } \ + _TS_CATCH_TYPE( (t), { a; _ts_threw_expected = true; } ) \ + _TS_CATCH_ABORT( { throw; } ) \ + _TS_CATCH_STD( ex, { _ts_threw_expected = true; CxxTest::doFailAssertThrows((f), (l), #e, #t, true, (m), ex.what() ); } ) \ + _TS_LAST_CATCH( { _ts_threw_else = true; } ) \ + if ( !_ts_threw_expected ) { CxxTest::doFailAssertThrows( (f), (l), #e, #t, _ts_threw_else, (m), 0 ); } } + +# define _TS_ASSERT_THROWS_ASSERT(f,l,e,t,a) ___TS_ASSERT_THROWS_ASSERT(f,l,e,t,a,0) +# define TS_ASSERT_THROWS_ASSERT(e,t,a) _TS_ASSERT_THROWS_ASSERT(__FILE__,__LINE__,e,t,a) + +# define _TSM_ASSERT_THROWS_ASSERT(f,l,m,e,t,a) ___TS_ASSERT_THROWS_ASSERT(f,l,e,t,a,TS_AS_STRING(m)) +# define TSM_ASSERT_THROWS_ASSERT(m,e,t,a) _TSM_ASSERT_THROWS_ASSERT(__FILE__,__LINE__,m,e,t,a) + + // TS_ASSERT_THROWS_EQUALS +# define TS_ASSERT_THROWS_EQUALS(e,t,x,y) TS_ASSERT_THROWS_ASSERT(e,t,TS_ASSERT_EQUALS(x,y)) +# define TSM_ASSERT_THROWS_EQUALS(m,e,t,x,y) TSM_ASSERT_THROWS_ASSERT(m,e,t,TSM_ASSERT_EQUALS(m,x,y)) + + // TS_ASSERT_THROWS_DIFFERS +# define TS_ASSERT_THROWS_DIFFERS(e,t,x,y) TS_ASSERT_THROWS_ASSERT(e,t,TS_ASSERT_DIFFERS(x,y)) +# define TSM_ASSERT_THROWS_DIFFERS(m,e,t,x,y) TSM_ASSERT_THROWS_ASSERT(m,e,t,TSM_ASSERT_DIFFERS(m,x,y)) + + // TS_ASSERT_THROWS_DELTA +# define TS_ASSERT_THROWS_DELTA(e,t,x,y,d) TS_ASSERT_THROWS_ASSERT(e,t,TS_ASSERT_DELTA(x,y,d)) +# define TSM_ASSERT_THROWS_DELTA(m,e,t,x,y,d) TSM_ASSERT_THROWS_ASSERT(m,e,t,TSM_ASSERT_DELTA(m,x,y,d)) + + // TS_ASSERT_THROWS_SAME_DATA +# define TS_ASSERT_THROWS_SAME_DATA(e,t,x,y,s) TS_ASSERT_THROWS_ASSERT(e,t,TS_ASSERT_SAME_DATA(x,y,s)) +# define TSM_ASSERT_THROWS_SAME_DATA(m,e,t,x,y,s) TSM_ASSERT_THROWS_ASSERT(m,e,t,TSM_ASSERT_SAME_DATA(m,x,y,s)) + + // TS_ASSERT_THROWS_LESS_THAN +# define TS_ASSERT_THROWS_LESS_THAN(e,t,x,y) TS_ASSERT_THROWS_ASSERT(e,t,TS_ASSERT_LESS_THAN(x,y)) +# define TSM_ASSERT_THROWS_LESS_THAN(m,e,t,x,y) TSM_ASSERT_THROWS_ASSERT(m,e,t,TSM_ASSERT_LESS_THAN(m,x,y)) + + // TS_ASSERT_THROWS_LESS_THAN_EQUALS +# define TS_ASSERT_THROWS_LESS_THAN_EQUALS(e,t,x,y) TS_ASSERT_THROWS_ASSERT(e,t,TS_ASSERT_LESS_THAN_EQUALS(x,y)) +# define TSM_ASSERT_THROWS_LESS_THAN_EQUALS(m,e,t,x,y) TSM_ASSERT_THROWS_ASSERT(m,e,t,TSM_ASSERT_LESS_THAN_EQUALS(m,x,y)) + + // TS_ASSERT_THROWS_PREDICATE +# define TS_ASSERT_THROWS_PREDICATE(e,t,p,v) TS_ASSERT_THROWS_ASSERT(e,t,TS_ASSERT_PREDICATE(p,v)) +# define TSM_ASSERT_THROWS_PREDICATE(m,e,t,p,v) TSM_ASSERT_THROWS_ASSERT(m,e,t,TSM_ASSERT_PREDICATE(m,p,v)) + + // TS_ASSERT_THROWS_RELATION +# define TS_ASSERT_THROWS_RELATION(e,t,r,x,y) TS_ASSERT_THROWS_ASSERT(e,t,TS_ASSERT_RELATION(r,x,y)) +# define TSM_ASSERT_THROWS_RELATION(m,e,t,r,x,y) TSM_ASSERT_THROWS_ASSERT(m,e,t,TSM_ASSERT_RELATION(m,r,x,y)) + + // TS_ASSERT_THROWS_ANYTHING +# define ___TS_ASSERT_THROWS_ANYTHING(f,l,e,m) { \ + bool _ts_threw = false; \ + _TS_TRY { e; } \ + _TS_LAST_CATCH( { _ts_threw = true; } ) \ + if ( !_ts_threw ) { CxxTest::doFailAssertThrows( (f), (l), #e, "...", false, (m) ); } } + +# define _TS_ASSERT_THROWS_ANYTHING(f,l,e) ___TS_ASSERT_THROWS_ANYTHING(f,l,e,0) +# define TS_ASSERT_THROWS_ANYTHING(e) _TS_ASSERT_THROWS_ANYTHING(__FILE__, __LINE__, e) + +# define _TSM_ASSERT_THROWS_ANYTHING(f,l,m,e) ___TS_ASSERT_THROWS_ANYTHING(f,l,e,TS_AS_STRING(m)) +# define TSM_ASSERT_THROWS_ANYTHING(m,e) _TSM_ASSERT_THROWS_ANYTHING(__FILE__,__LINE__,m,e) + + // TS_ASSERT_THROWS_NOTHING +# define ___TS_ASSERT_THROWS_NOTHING(f,l,e,m) { \ + _TS_TRY { e; } \ + _TS_CATCH_ABORT( { throw; } ) \ + _TS_CATCH_STD(ex, { CxxTest::doFailAssertThrowsNot( (f), (l), #e, (m), ex.what() ); } ) \ + _TS_LAST_CATCH( { CxxTest::doFailAssertThrowsNot( (f), (l), #e, (m), 0 ); } ) } + +# define _TS_ASSERT_THROWS_NOTHING(f,l,e) ___TS_ASSERT_THROWS_NOTHING(f,l,e,0) +# define TS_ASSERT_THROWS_NOTHING(e) _TS_ASSERT_THROWS_NOTHING(__FILE__,__LINE__,e) + +# define _TSM_ASSERT_THROWS_NOTHING(f,l,m,e) ___TS_ASSERT_THROWS_NOTHING(f,l,e,TS_AS_STRING(m)) +# define TSM_ASSERT_THROWS_NOTHING(m,e) _TSM_ASSERT_THROWS_NOTHING(__FILE__,__LINE__,m,e) + + + // + // This takes care of "signed <-> unsigned" warnings + // +# define CXXTEST_COMPARISONS(CXXTEST_X, CXXTEST_Y, CXXTEST_T) \ + template<> struct equals { \ + static bool test(CXXTEST_X x,CXXTEST_Y y) { \ + return equals::test((CXXTEST_T)x,(CXXTEST_T)y); } }; \ + template<> struct equals { \ + static bool test(CXXTEST_Y x,CXXTEST_X y) { \ + return equals::test((CXXTEST_T)x,(CXXTEST_T)y); } }; \ + template<> struct differs { \ + static bool test(CXXTEST_X x,CXXTEST_Y y) { \ + return differs::test((CXXTEST_T)x,(CXXTEST_T)y); } }; \ + template<> struct differs { \ + static bool test(CXXTEST_Y x,CXXTEST_X y) { \ + return differs::test((CXXTEST_T)x,(CXXTEST_T)y); } }; \ + template<> struct lessThan { \ + static bool test(CXXTEST_X x,CXXTEST_Y y) { \ + return lessThan::test((CXXTEST_T)x,(CXXTEST_T)y); } }; \ + template<> struct lessThan { \ + static bool test(CXXTEST_Y x,CXXTEST_X y) { \ + return lessThan::test((CXXTEST_T)x,(CXXTEST_T)y); } }; \ + template<> struct lessThanEquals { \ + static bool test(CXXTEST_X x,CXXTEST_Y y) { \ + return lessThanEquals::test((CXXTEST_T)x,(CXXTEST_T)y); } }; \ + template<> struct lessThanEquals { \ + static bool test(CXXTEST_Y x,CXXTEST_X y) { \ + return lessThanEquals::test((CXXTEST_T)x,(CXXTEST_T)y); } } +#if 0 + // These specializations are not needed because delta makes use of + // CxxTest::lessThanEquals for the actual comparison + template struct delta { \ + static bool test(CXXTEST_X x,CXXTEST_Y y, D d) { \ + return delta::test((CXXTEST_T)x,(CXXTEST_T)y, d); } }; \ + template struct delta { \ + static bool test(CXXTEST_Y x,CXXTEST_X y, D d) { \ + return delta::test((CXXTEST_T)x,(CXXTEST_T)y, d); } } +#endif + +# define CXXTEST_INTEGRAL(CXXTEST_T) \ + CXXTEST_COMPARISONS( signed CXXTEST_T, unsigned CXXTEST_T, unsigned CXXTEST_T ) + + CXXTEST_INTEGRAL( char ); + CXXTEST_INTEGRAL( short ); + CXXTEST_INTEGRAL( int ); + CXXTEST_INTEGRAL( long ); +# ifdef _CXXTEST_LONGLONG + CXXTEST_INTEGRAL( _CXXTEST_LONGLONG ); +# endif // _CXXTEST_LONGLONG + +# define CXXTEST_SMALL_BIG(CXXTEST_SMALL, CXXTEST_BIG) \ + CXXTEST_COMPARISONS( signed CXXTEST_SMALL, unsigned CXXTEST_BIG, unsigned CXXTEST_BIG ); \ + CXXTEST_COMPARISONS( signed CXXTEST_BIG, unsigned CXXTEST_SMALL, unsigned CXXTEST_BIG ) + + CXXTEST_SMALL_BIG( char, short ); + CXXTEST_SMALL_BIG( char, int ); + CXXTEST_SMALL_BIG( short, int ); + CXXTEST_SMALL_BIG( char, long ); + CXXTEST_SMALL_BIG( short, long ); + CXXTEST_SMALL_BIG( int, long ); + +# ifdef _CXXTEST_LONGLONG + CXXTEST_SMALL_BIG( char, _CXXTEST_LONGLONG ); + CXXTEST_SMALL_BIG( short, _CXXTEST_LONGLONG ); + CXXTEST_SMALL_BIG( int, _CXXTEST_LONGLONG ); + CXXTEST_SMALL_BIG( long, _CXXTEST_LONGLONG ); +# endif // _CXXTEST_LONGLONG +} + +#ifdef _CXXTEST_HAVE_STD +# include +#endif // _CXXTEST_HAVE_STD + +#endif // __cxxtest__TestSuite_h__ + diff --git a/tools/cxxtest/cxxtest/TestTracker.cpp b/tools/cxxtest/cxxtest/TestTracker.cpp new file mode 100644 index 0000000..bb051c4 --- /dev/null +++ b/tools/cxxtest/cxxtest/TestTracker.cpp @@ -0,0 +1,267 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__TestTracker_cpp__ +#define __cxxtest__TestTracker_cpp__ + +#include + +namespace CxxTest +{ + bool TestTracker::_created = false; + bool TestTracker::print_tracing = false; + + TestTracker::TestTracker() + { + if ( !_created ) { + initialize(); + setListener( 0 ); + _created = true; + } + } + + TestTracker::~TestTracker() + { + } + + TestTracker & TestTracker::tracker() + { + static TestTracker theTracker; + return theTracker; + } + + void TestTracker::initialize() + { + _warnings = 0; + _failedTests = 0; + _testFailedAsserts = 0; + _suiteFailedTests = 0; + _failedSuites = 0; + _world = 0; + _suite = 0; + _test = 0; + } + + const TestDescription *TestTracker::fixTest( const TestDescription *d ) const + { + return d ? d : &dummyTest(); + } + + const SuiteDescription *TestTracker::fixSuite( const SuiteDescription *d ) const + { + return d ? d : &dummySuite(); + } + + const WorldDescription *TestTracker::fixWorld( const WorldDescription *d ) const + { + return d ? d : &dummyWorld(); + } + + const TestDescription &TestTracker::dummyTest() const + { + return dummySuite().testDescription(0); + } + + const SuiteDescription &TestTracker::dummySuite() const + { + return dummyWorld().suiteDescription(0); + } + + const WorldDescription &TestTracker::dummyWorld() const + { + return _dummyWorld; + } + + void TestTracker::setListener( TestListener *l ) + { + _l = l ? l : &_dummyListener; + } + + void TestTracker::enterWorld( const WorldDescription &wd ) + { + setWorld( &wd ); + _warnings = _failedTests = _testFailedAsserts = _suiteFailedTests = _failedSuites = 0; + _l->enterWorld( wd ); + } + + void TestTracker::enterSuite( const SuiteDescription &sd ) + { + setSuite( &sd ); + _testFailedAsserts = _suiteFailedTests = 0; + _l->enterSuite(sd); + } + + void TestTracker::enterTest( const TestDescription &td ) + { + setTest( &td ); + _testFailedAsserts = false; + _l->enterTest(td); + } + + void TestTracker::leaveTest( const TestDescription &td ) + { + _l->leaveTest( td ); + setTest( 0 ); + } + + void TestTracker::leaveSuite( const SuiteDescription &sd ) + { + _l->leaveSuite( sd ); + setSuite( 0 ); + } + + void TestTracker::leaveWorld( const WorldDescription &wd ) + { + _l->leaveWorld( wd ); + setWorld( 0 ); + } + + void TestTracker::trace( const char *file, int line, const char *expression ) + { + _l->trace( file, line, expression ); + } + + void TestTracker::warning( const char *file, int line, const char *expression ) + { + countWarning(); + _l->warning( file, line, expression ); + } + + void TestTracker::failedTest( const char *file, int line, const char *expression ) + { + countFailure(); + _l->failedTest( file, line, expression ); + } + + void TestTracker::failedAssert( const char *file, int line, const char *expression ) + { + countFailure(); + _l->failedAssert( file, line, expression ); + } + + void TestTracker::failedAssertEquals( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ) + { + countFailure(); + _l->failedAssertEquals( file, line, xStr, yStr, x, y ); + } + + void TestTracker::failedAssertSameData( const char *file, int line, + const char *xStr, const char *yStr, + const char *sizeStr, const void *x, + const void *y, unsigned size ) + { + countFailure(); + _l->failedAssertSameData( file, line, xStr, yStr, sizeStr, x, y, size ); + } + + void TestTracker::failedAssertDelta( const char *file, int line, + const char *xStr, const char *yStr, const char *dStr, + const char *x, const char *y, const char *d ) + { + countFailure(); + _l->failedAssertDelta( file, line, xStr, yStr, dStr, x, y, d ); + } + + void TestTracker::failedAssertDiffers( const char *file, int line, + const char *xStr, const char *yStr, + const char *value ) + { + countFailure(); + _l->failedAssertDiffers( file, line, xStr, yStr, value ); + } + + void TestTracker::failedAssertLessThan( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ) + { + countFailure(); + _l->failedAssertLessThan( file, line, xStr, yStr, x, y ); + } + + void TestTracker::failedAssertLessThanEquals( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ) + { + countFailure(); + _l->failedAssertLessThanEquals( file, line, xStr, yStr, x, y ); + } + + void TestTracker::failedAssertPredicate( const char *file, int line, + const char *predicate, const char *xStr, const char *x ) + { + countFailure(); + _l->failedAssertPredicate( file, line, predicate, xStr, x ); + } + + void TestTracker::failedAssertRelation( const char *file, int line, + const char *relation, const char *xStr, const char *yStr, + const char *x, const char *y ) + { + countFailure(); + _l->failedAssertRelation( file, line, relation, xStr, yStr, x, y ); + } + + void TestTracker::failedAssertThrows( const char *file, int line, + const char *expression, const char *type, + bool otherThrown ) + { + countFailure(); + _l->failedAssertThrows( file, line, expression, type, otherThrown ); + } + + void TestTracker::failedAssertThrowsNot( const char *file, int line, const char *expression ) + { + countFailure(); + _l->failedAssertThrowsNot( file, line, expression ); + } + + void TestTracker::failedAssertSameFiles( const char *file, int line, const char *file1, const char* file2, const char* explanation ) + { + countFailure(); + _l->failedAssertSameFiles( file, line, file1, file2, explanation ); + } + + void TestTracker::setWorld( const WorldDescription *w ) + { + _world = fixWorld( w ); + setSuite( 0 ); + } + + void TestTracker::setSuite( const SuiteDescription *s ) + { + _suite = fixSuite( s ); + setTest( 0 ); + } + + void TestTracker::setTest( const TestDescription *t ) + { + _test = fixTest( t ); + } + + void TestTracker::countWarning() + { + ++ _warnings; + } + + void TestTracker::countFailure() + { + if ( ++ _testFailedAsserts == 1 ) { + ++ _failedTests; + if ( ++ _suiteFailedTests == 1 ) + ++ _failedSuites; + } + } +} + +#endif // __cxxtest__TestTracker_cpp__ + diff --git a/tools/cxxtest/cxxtest/TestTracker.h b/tools/cxxtest/cxxtest/TestTracker.h new file mode 100644 index 0000000..28de524 --- /dev/null +++ b/tools/cxxtest/cxxtest/TestTracker.h @@ -0,0 +1,129 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__TestTracker_h__ +#define __cxxtest__TestTracker_h__ + +// +// The TestTracker tracks running tests +// The actual work is done in CountingListenerProxy, +// but this way avoids cyclic references TestListener<->CountingListenerProxy +// + +#include +#include + +namespace CxxTest +{ + class TestListener; + + class TestTracker : public TestListener + { + public: + virtual ~TestTracker(); + + static TestTracker &tracker(); + static bool print_tracing; + + const TestDescription *fixTest( const TestDescription *d ) const; + const SuiteDescription *fixSuite( const SuiteDescription *d ) const; + const WorldDescription *fixWorld( const WorldDescription *d ) const; + + const TestDescription &test() const { return *_test; } + const SuiteDescription &suite() const { return *_suite; } + const WorldDescription &world() const { return *_world; } + + bool testFailed() const { return (testFailedAsserts() > 0); } + bool suiteFailed() const { return (suiteFailedTests() > 0); } + bool worldFailed() const { return (failedSuites() > 0); } + + unsigned warnings() const { return _warnings; } + unsigned failedTests() const { return _failedTests; } + unsigned testFailedAsserts() const { return _testFailedAsserts; } + unsigned suiteFailedTests() const { return _suiteFailedTests; } + unsigned failedSuites() const { return _failedSuites; } + + void enterWorld( const WorldDescription &wd ); + void enterSuite( const SuiteDescription &sd ); + void enterTest( const TestDescription &td ); + void leaveTest( const TestDescription &td ); + void leaveSuite( const SuiteDescription &sd ); + void leaveWorld( const WorldDescription &wd ); + void trace( const char *file, int line, const char *expression ); + void warning( const char *file, int line, const char *expression ); + void failedTest( const char *file, int line, const char *expression ); + void failedAssert( const char *file, int line, const char *expression ); + void failedAssertEquals( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ); + void failedAssertSameData( const char *file, int line, + const char *xStr, const char *yStr, + const char *sizeStr, const void *x, + const void *y, unsigned size ); + void failedAssertDelta( const char *file, int line, + const char *xStr, const char *yStr, const char *dStr, + const char *x, const char *y, const char *d ); + void failedAssertDiffers( const char *file, int line, + const char *xStr, const char *yStr, + const char *value ); + void failedAssertLessThan( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ); + void failedAssertLessThanEquals( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ); + void failedAssertPredicate( const char *file, int line, + const char *predicate, const char *xStr, const char *x ); + void failedAssertRelation( const char *file, int line, + const char *relation, const char *xStr, const char *yStr, + const char *x, const char *y ); + void failedAssertThrows( const char *file, int line, + const char *expression, const char *type, + bool otherThrown ); + void failedAssertThrowsNot( const char *file, int line, const char *expression ); + void failedAssertSameFiles( const char* file, int line, const char* file1, const char* file2, const char* explanation); + + void initialize(); + + private: + TestTracker( const TestTracker & ); + TestTracker &operator=( const TestTracker & ); + + static bool _created; + TestListener _dummyListener; + DummyWorldDescription _dummyWorld; + unsigned _warnings, _failedTests, _testFailedAsserts, _suiteFailedTests, _failedSuites; + TestListener *_l; + const WorldDescription *_world; + const SuiteDescription *_suite; + const TestDescription *_test; + + const TestDescription &dummyTest() const; + const SuiteDescription &dummySuite() const; + const WorldDescription &dummyWorld() const; + + void setWorld( const WorldDescription *w ); + void setSuite( const SuiteDescription *s ); + void setTest( const TestDescription *t ); + void countWarning(); + void countFailure(); + + friend class TestRunner; + + TestTracker(); + void setListener( TestListener *l ); + }; + + inline TestTracker &tracker() { return TestTracker::tracker(); } +} + +#endif // __cxxtest__TestTracker_h__ + diff --git a/tools/cxxtest/cxxtest/ValueTraits.cpp b/tools/cxxtest/cxxtest/ValueTraits.cpp new file mode 100644 index 0000000..f19b684 --- /dev/null +++ b/tools/cxxtest/cxxtest/ValueTraits.cpp @@ -0,0 +1,164 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__ValueTraits_cpp__ +#define __cxxtest__ValueTraits_cpp__ + +#include + +namespace CxxTest +{ + // + // Non-inline functions from ValueTraits.h + // + + char digitToChar( unsigned digit ) + { + if ( digit < 10 ) + return (char)('0' + digit); + if ( digit <= 10 + 'Z' - 'A' ) + return (char)('A' + digit - 10); + return '?'; + } + + const char *byteToHex( unsigned char byte ) + { + static char asHex[3]; + asHex[0] = digitToChar( byte >> 4 ); + asHex[1] = digitToChar( byte & 0x0F ); + asHex[2] = '\0'; + return asHex; + } + + char *copyString( char *dst, const char *src ) + { + while ( (*dst = *src) != '\0' ) { + ++ dst; + ++ src; + } + return dst; + } + + bool stringsEqual( const char *s1, const char *s2 ) + { + char c; + while ( (c = *s1++) == *s2++ ) + if ( c == '\0' ) + return true; + return false; + } + + char *charToString( unsigned long c, char *s ) + { + switch( c ) { + case '\\': return copyString( s, "\\\\" ); + case '\"': return copyString( s, "\\\"" ); + case '\'': return copyString( s, "\\\'" ); + case '\0': return copyString( s, "\\0" ); + case '\a': return copyString( s, "\\a" ); + case '\b': return copyString( s, "\\b" ); + case '\n': return copyString( s, "\\n" ); + case '\r': return copyString( s, "\\r" ); + case '\t': return copyString( s, "\\t" ); + } + if ( c >= 32 && c <= 127 ) { + s[0] = (char)c; + s[1] = '\0'; + return s + 1; + } + else { + s[0] = '\\'; + s[1] = 'x'; + if ( c < 0x10 ) { + s[2] = '0'; + ++ s; + } + return numberToString( c, s + 2, 16UL ); + } + } + + char *charToString( char c, char *s ) + { + return charToString( (unsigned long)(unsigned char)c, s ); + } + + char *bytesToString( const unsigned char *bytes, unsigned numBytes, unsigned maxBytes, char *s ) + { + bool truncate = (numBytes > maxBytes); + if ( truncate ) + numBytes = maxBytes; + + s = copyString( s, "{ " ); + for ( unsigned i = 0; i < numBytes; ++ i, ++ bytes ) + s = copyString( copyString( s, byteToHex( *bytes ) ), " " ); + if ( truncate ) + s = copyString( s, "..." ); + return copyString( s, " }" ); + } + +#ifndef CXXTEST_USER_VALUE_TRAITS + unsigned ValueTraits::requiredDigitsOnLeft( double t ) + { + unsigned digits = 1; + for ( t = (t < 0.0) ? -t : t; t > 1.0; t /= BASE ) + ++ digits; + return digits; + } + + char *ValueTraits::doNegative( double &t ) + { + if ( t >= 0 ) + return _asString; + _asString[0] = '-'; + t = -t; + return _asString + 1; + } + + void ValueTraits::hugeNumber( double t ) + { + char *s = doNegative( t ); + s = doubleToString( t, s, 0, 1 ); + s = copyString( s, "." ); + s = doubleToString( t, s, 1, DIGITS_ON_RIGHT ); + s = copyString( s, "E" ); + s = numberToString( requiredDigitsOnLeft( t ) - 1, s ); + } + + void ValueTraits::normalNumber( double t ) + { + char *s = doNegative( t ); + s = doubleToString( t, s ); + s = copyString( s, "." ); + for ( unsigned i = 0; i < DIGITS_ON_RIGHT; ++ i ) + s = numberToString( (unsigned)(t *= BASE) % BASE, s ); + } + + void ValueTraits::nonFiniteNumber( double t ) + { + char *s = _asString; + if ( t != t ) + s = copyString( s, "nan" ); + //else if ( t == 1.0/0.0 ) + else if ( t >= HUGE_VAL ) + s = copyString( s, "-inf" ); + else if ( t <= -HUGE_VAL ) + //else if ( t == -1.0/0.0 ) + s = copyString( s, "inf" ); + } + + char *ValueTraits::doubleToString( double t, char *s, unsigned skip, unsigned max ) + { + return numberToString( t, s, BASE, skip, max ); + } +#endif // !CXXTEST_USER_VALUE_TRAITS +} + +#endif // __cxxtest__ValueTraits_cpp__ diff --git a/tools/cxxtest/cxxtest/ValueTraits.h b/tools/cxxtest/cxxtest/ValueTraits.h new file mode 100644 index 0000000..9e24cd4 --- /dev/null +++ b/tools/cxxtest/cxxtest/ValueTraits.h @@ -0,0 +1,401 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__ValueTraits_h__ +#define __cxxtest__ValueTraits_h__ + +// +// ValueTraits are used by CxxTest to convert arbitrary +// values used in TS_ASSERT_EQUALS() to a string representation. +// +// This header file contains value traits for builtin integral types. +// To declare value traits for new types you should instantiate the class +// ValueTraits. +// + +#include + +#ifdef _CXXTEST_OLD_TEMPLATE_SYNTAX +# define CXXTEST_TEMPLATE_INSTANTIATION +#else // !_CXXTEST_OLD_TEMPLATE_SYNTAX +# define CXXTEST_TEMPLATE_INSTANTIATION template<> +#endif // _CXXTEST_OLD_TEMPLATE_SYNTAX + +#ifdef _CXXTEST_HAVE_STD +#include +#else +#include +#endif + +namespace CxxTest +{ + // + // This is how we use the value traits + // +# define TS_AS_STRING(x) CxxTest::traits(x).asString() + + // + // Char representation of a digit + // + char digitToChar( unsigned digit ); + + // + // Convert byte value to hex digits + // Returns pointer to internal buffer + // + const char *byteToHex( unsigned char byte ); + + // + // Convert byte values to string + // Returns one past the copied data + // + char *bytesToString( const unsigned char *bytes, unsigned numBytes, unsigned maxBytes, char *s ); + + // + // Copy a string. + // Returns one past the end of the destination string + // Remember -- we can't use the standard library! + // + char *copyString( char *dst, const char *src ); + + // + // Compare two strings. + // Remember -- we can't use the standard library! + // + bool stringsEqual( const char *s1, const char *s2 ); + + // + // Represent a character value as a string + // Returns one past the end of the string + // This will be the actual char if printable or '\xXXXX' otherwise + // + char *charToString( unsigned long c, char *s ); + + // + // Prevent problems with negative (signed char)s + // + char *charToString( char c, char *s ); + + // + // The default ValueTraits class dumps up to 8 bytes as hex values + // + template + class ValueTraits + { + enum { MAX_BYTES = 8 }; + char _asString[sizeof("{ ") + sizeof("XX ") * MAX_BYTES + sizeof("... }")]; + + public: + ValueTraits( const T &t ) { bytesToString( (const unsigned char *)&t, sizeof(T), MAX_BYTES, _asString ); } + const char *asString( void ) const { return _asString; } + }; + + // + // traits( T t ) + // Creates an object of type ValueTraits + // + template + inline ValueTraits traits( T t ) + { + return ValueTraits( t ); + } + + // + // You can duplicate the implementation of an existing ValueTraits + // +# define CXXTEST_COPY_TRAITS(CXXTEST_NEW_CLASS, CXXTEST_OLD_CLASS) \ + CXXTEST_TEMPLATE_INSTANTIATION \ + class ValueTraits< CXXTEST_NEW_CLASS > \ + { \ + ValueTraits< CXXTEST_OLD_CLASS > _old; \ + public: \ + ValueTraits( CXXTEST_NEW_CLASS n ) : _old( (CXXTEST_OLD_CLASS)n ) {} \ + const char *asString( void ) const { return _old.asString(); } \ + } + + // + // Certain compilers need separate declarations for T and const T + // +# ifdef _CXXTEST_NO_COPY_CONST +# define CXXTEST_COPY_CONST_TRAITS(CXXTEST_CLASS) +# else // !_CXXTEST_NO_COPY_CONST +# define CXXTEST_COPY_CONST_TRAITS(CXXTEST_CLASS) CXXTEST_COPY_TRAITS(CXXTEST_CLASS, const CXXTEST_CLASS) +# endif // _CXXTEST_NO_COPY_CONST + + // + // Avoid compiler warnings about unsigned types always >= 0 + // + template inline bool negative( N n ) { return n < 0; } + template inline N abs( N n ) { return negative(n) ? -n : n; } + +# define CXXTEST_NON_NEGATIVE(Type) \ + CXXTEST_TEMPLATE_INSTANTIATION \ + inline bool negative( Type ) { return false; } \ + CXXTEST_TEMPLATE_INSTANTIATION \ + inline Type abs( Type value ) { return value; } + + CXXTEST_NON_NEGATIVE( bool ) + CXXTEST_NON_NEGATIVE( unsigned char ) + CXXTEST_NON_NEGATIVE( unsigned short int ) + CXXTEST_NON_NEGATIVE( unsigned int ) + CXXTEST_NON_NEGATIVE( unsigned long int ) +# ifdef _CXXTEST_LONGLONG + CXXTEST_NON_NEGATIVE( unsigned _CXXTEST_LONGLONG ) +# endif // _CXXTEST_LONGLONG + + // + // Represent (integral) number as a string + // Returns one past the end of the string + // Remember -- we can't use the standard library! + // + template + char *numberToString( N n, char *s, + N base = 10, + unsigned skipDigits = 0, + unsigned maxDigits = (unsigned)-1 ) + { + if ( negative(n) ) { + *s++ = '-'; + n = abs(n); + } + + N digit = 1; + while ( digit <= (n / base) ) + digit *= base; + N digitValue; + for ( ; digit >= 1 && skipDigits; n -= digit * digitValue, digit /= base, -- skipDigits ) + digitValue = (unsigned)(n / digit); + for ( ; digit >= 1 && maxDigits; n -= digit * digitValue, digit /= base, -- maxDigits ) + *s++ = digitToChar( (unsigned)(digitValue = (unsigned)(n / digit)) ); + + *s = '\0'; + return s; + } + + // + // All the specific ValueTraits follow. + // You can #define CXXTEST_USER_VALUE_TRAITS if you don't want them + // + +#ifndef CXXTEST_USER_VALUE_TRAITS + // + // ValueTraits: const char * const & + // This is used for printing strings, as in TS_FAIL( "Message" ) + // + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits + { + ValueTraits &operator=( const ValueTraits & ); + const char *_asString; + + public: + ValueTraits( const char * const &value ) : _asString( value ) {} + ValueTraits( const ValueTraits &other ) : _asString( other._asString ) {} + const char *asString( void ) const { return _asString; } + }; + + CXXTEST_COPY_TRAITS( const char *, const char * const & ); + CXXTEST_COPY_TRAITS( char *, const char * const & ); + + // + // ValueTraits: bool + // + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits + { + bool _value; + + public: + ValueTraits( const bool value ) : _value( value ) {} + const char *asString( void ) const { return _value ? "true" : "false"; } + }; + + CXXTEST_COPY_CONST_TRAITS( bool ); + +# ifdef _CXXTEST_LONGLONG + // + // ValueTraits: signed long long + // + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits + { + typedef _CXXTEST_LONGLONG T; + char _asString[2 + 3 * sizeof(T)]; + public: + ValueTraits( T t ) { numberToString( t, _asString ); } + const char *asString( void ) const { return _asString; } + }; + + CXXTEST_COPY_CONST_TRAITS( signed _CXXTEST_LONGLONG ); + + // + // ValueTraits: unsigned long long + // + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits + { + typedef unsigned _CXXTEST_LONGLONG T; + char _asString[1 + 3 * sizeof(T)]; + public: + ValueTraits( T t ) { numberToString( t, _asString ); } + const char *asString( void ) const { return _asString; } + }; + + CXXTEST_COPY_CONST_TRAITS( unsigned _CXXTEST_LONGLONG ); +# endif // _CXXTEST_LONGLONG + + // + // ValueTraits: signed long + // + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits + { + typedef signed long int T; + char _asString[2 + 3 * sizeof(T)]; + public: + ValueTraits( T t ) { numberToString( t, _asString ); } + const char *asString( void ) const { return _asString; } + }; + + CXXTEST_COPY_CONST_TRAITS( signed long int ); + + // + // ValueTraits: unsigned long + // + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits + { + typedef unsigned long int T; + char _asString[1 + 3 * sizeof(T)]; + public: + ValueTraits( T t ) { numberToString( t, _asString ); } + const char *asString( void ) const { return _asString; } + }; + + CXXTEST_COPY_CONST_TRAITS( unsigned long int ); + + // + // All decimals are the same as the long version + // + + CXXTEST_COPY_TRAITS( const signed int, const signed long int ); + CXXTEST_COPY_TRAITS( const unsigned int, const unsigned long int ); + CXXTEST_COPY_TRAITS( const signed short int, const signed long int ); + CXXTEST_COPY_TRAITS( const unsigned short int, const unsigned long int ); + CXXTEST_COPY_TRAITS( const unsigned char, const unsigned long int ); + + CXXTEST_COPY_CONST_TRAITS( signed int ); + CXXTEST_COPY_CONST_TRAITS( unsigned int ); + CXXTEST_COPY_CONST_TRAITS( signed short int ); + CXXTEST_COPY_CONST_TRAITS( unsigned short int ); + CXXTEST_COPY_CONST_TRAITS( unsigned char ); + + // + // ValueTraits: char + // Returns 'x' for printable chars, '\x??' for others + // + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits + { + char _asString[sizeof("'\\xXX'")]; + public: + ValueTraits( char c ) { copyString( charToString( c, copyString( _asString, "'" ) ), "'" ); } + const char *asString( void ) const { return _asString; } + }; + + CXXTEST_COPY_CONST_TRAITS( char ); + + // + // ValueTraits: signed char + // Same as char, some compilers need it + // + CXXTEST_COPY_TRAITS( const signed char, const char ); + CXXTEST_COPY_CONST_TRAITS( signed char ); + + // + // ValueTraits: double + // + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits + { + public: + ValueTraits( double t ) + { + //if ( ( t != t ) || ( t >= 1.0/0.0 ) || ( t == -1.0/0.0 ) ) + if ( ( t != t ) || ( t >= HUGE_VAL ) || ( t == -HUGE_VAL ) ) + nonFiniteNumber( t ); + else if ( requiredDigitsOnLeft( t ) > MAX_DIGITS_ON_LEFT ) + hugeNumber( t ); + else + normalNumber( t ); + } + + const char *asString( void ) const { return _asString; } + + private: + enum { MAX_DIGITS_ON_LEFT = 24, DIGITS_ON_RIGHT = 4, BASE = 10 }; + char _asString[1 + MAX_DIGITS_ON_LEFT + 1 + DIGITS_ON_RIGHT + 1]; + + static unsigned requiredDigitsOnLeft( double t ); + char *doNegative( double &t ); + void hugeNumber( double t ); + void normalNumber( double t ); + void nonFiniteNumber( double t ); + char *doubleToString( double t, char *s, unsigned skip = 0, unsigned max = (unsigned)-1 ); + }; + + CXXTEST_COPY_CONST_TRAITS( double ); + + // + // ValueTraits: float + // + CXXTEST_COPY_TRAITS( const float, const double ); + CXXTEST_COPY_CONST_TRAITS( float ); +#endif // !CXXTEST_USER_VALUE_TRAITS +} + +#ifdef _CXXTEST_HAVE_STD +# include +#endif // _CXXTEST_HAVE_STD + +namespace dummy_enum_ns {} + +// +// CXXTEST_ENUM_TRAITS +// +#define CXXTEST_ENUM_TRAITS( TYPE, VALUES ) \ + namespace CxxTest \ + { \ + CXXTEST_TEMPLATE_INSTANTIATION \ + class ValueTraits \ + { \ + TYPE _value; \ + char _fallback[sizeof("(" #TYPE ")") + 3 * sizeof(TYPE)]; \ + public: \ + ValueTraits( TYPE value ) { \ + _value = value; \ + numberToString( _value, copyString( _fallback, "(" #TYPE ")" ) ); \ + } \ + const char *asString( void ) const \ + { \ + switch ( _value ) \ + { \ + VALUES \ + default: return _fallback; \ + } \ + } \ + }; \ + } using namespace dummy_enum_ns + +#define CXXTEST_ENUM_MEMBER( MEMBER ) \ + case MEMBER: return #MEMBER; + +#endif // __cxxtest__ValueTraits_h__ diff --git a/tools/cxxtest/cxxtest/Win32Gui.h b/tools/cxxtest/cxxtest/Win32Gui.h new file mode 100644 index 0000000..ec47771 --- /dev/null +++ b/tools/cxxtest/cxxtest/Win32Gui.h @@ -0,0 +1,542 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__Win32Gui_h__ +#define __cxxtest__Win32Gui_h__ + +// +// The Win32Gui displays a simple progress bar using the Win32 API. +// +// It accepts the following command line options: +// -minimized Start minimized, pop up on error +// -keep Don't close the window at the end +// -title TITLE Set the window caption +// +// If both -minimized and -keep are specified, GUI will only keep the +// window if it's in focus. +// +// N.B. If you're wondering why this class doesn't use any standard +// library or STL ( would have been nice) it's because it only +// uses "straight" Win32 API. +// + +#include + +#include +#include + +namespace CxxTest +{ + class Win32Gui : public GuiListener + { + public: + void enterGui( int &argc, char **argv ) + { + parseCommandLine( argc, argv ); + } + + void enterWorld( const WorldDescription &wd ) + { + getTotalTests( wd ); + _testsDone = 0; + startGuiThread(); + } + + void guiEnterSuite( const char *suiteName ) + { + showSuiteName( suiteName ); + reset( _suiteStart ); + } + + void guiEnterTest( const char *suiteName, const char *testName ) + { + ++ _testsDone; + setTestCaption( suiteName, testName ); + showTestName( testName ); + showTestsDone(); + progressBarMessage( PBM_STEPIT ); + reset( _testStart ); + } + + void yellowBar() + { + setColor( 255, 255, 0 ); + setIcon( IDI_WARNING ); + getTotalTests(); + } + + void redBar() + { + if ( _startMinimized ) + showMainWindow( SW_SHOWNORMAL ); + setColor( 255, 0, 0 ); + setIcon( IDI_ERROR ); + getTotalTests(); + } + + void leaveGui() + { + if ( keep() ) + { + showSummary(); + WaitForSingleObject( _gui, INFINITE ); + } + DestroyWindow( _mainWindow ); + } + + private: + const char *_title; + bool _startMinimized, _keep; + HANDLE _gui; + WNDCLASSEX _windowClass; + HWND _mainWindow, _progressBar, _statusBar; + HANDLE _canStartTests; + unsigned _numTotalTests, _testsDone; + char _strTotalTests[WorldDescription::MAX_STRLEN_TOTAL_TESTS]; + enum { + STATUS_SUITE_NAME, STATUS_SUITE_TIME, + STATUS_TEST_NAME, STATUS_TEST_TIME, + STATUS_TESTS_DONE, STATUS_WORLD_TIME, + STATUS_TOTAL_PARTS + }; + int _statusWidths[STATUS_TOTAL_PARTS]; + unsigned _statusOffsets[STATUS_TOTAL_PARTS]; + unsigned _statusTotal; + char _statusTestsDone[sizeof("1000000000 of (100%)") + WorldDescription::MAX_STRLEN_TOTAL_TESTS]; + DWORD _worldStart, _suiteStart, _testStart; + char _timeString[sizeof("00:00:00")]; + + void parseCommandLine( int argc, char **argv ) + { + _startMinimized = _keep = false; + _title = argv[0]; + + for ( int i = 1; i < argc; ++ i ) + { + if ( !lstrcmpA( argv[i], "-minimized" ) ) + _startMinimized = true; + else if ( !lstrcmpA( argv[i], "-keep" ) ) + _keep = true; + else if ( !lstrcmpA( argv[i], "-title" ) && (i + 1 < argc) ) + _title = argv[++i]; + } + } + + void getTotalTests() + { + getTotalTests( tracker().world() ); + } + + void getTotalTests( const WorldDescription &wd ) + { + _numTotalTests = wd.numTotalTests(); + wd.strTotalTests( _strTotalTests ); + } + + void startGuiThread() + { + _canStartTests = CreateEvent( NULL, TRUE, FALSE, NULL ); + DWORD threadId; + _gui = CreateThread( NULL, 0, &(Win32Gui::guiThread), (LPVOID)this, 0, &threadId ); + WaitForSingleObject( _canStartTests, INFINITE ); + } + + static DWORD WINAPI guiThread( LPVOID parameter ) + { + ((Win32Gui *)parameter)->gui(); + return 0; + } + + void gui() + { + registerWindowClass(); + createMainWindow(); + initCommonControls(); + createProgressBar(); + createStatusBar(); + centerMainWindow(); + showMainWindow(); + startTimer(); + startTests(); + + messageLoop(); + } + + void registerWindowClass() + { + _windowClass.cbSize = sizeof(_windowClass); + _windowClass.style = CS_HREDRAW | CS_VREDRAW; + _windowClass.lpfnWndProc = &(Win32Gui::windowProcedure); + _windowClass.cbClsExtra = 0; + _windowClass.cbWndExtra = sizeof(LONG); + _windowClass.hInstance = (HINSTANCE)NULL; + _windowClass.hIcon = (HICON)NULL; + _windowClass.hCursor = (HCURSOR)NULL; + _windowClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); + _windowClass.lpszMenuName = NULL; + _windowClass.lpszClassName = TEXT("CxxTest Window Class"); + _windowClass.hIconSm = (HICON)NULL; + + RegisterClassEx( &_windowClass ); + } + + void createMainWindow() + { + _mainWindow = createWindow( _windowClass.lpszClassName, WS_OVERLAPPEDWINDOW ); + } + + void initCommonControls() + { + HMODULE dll = LoadLibraryA( "comctl32.dll" ); + if ( !dll ) + return; + + typedef void (WINAPI *FUNC)( void ); + FUNC func = (FUNC)GetProcAddress( dll, "InitCommonControls" ); + if ( !func ) + return; + + func(); + } + + void createProgressBar() + { + _progressBar = createWindow( PROGRESS_CLASS, WS_CHILD | WS_VISIBLE | PBS_SMOOTH, _mainWindow ); + +#ifdef PBM_SETRANGE32 + progressBarMessage( PBM_SETRANGE32, 0, _numTotalTests ); +#else // No PBM_SETRANGE32, use PBM_SETRANGE + progressBarMessage( PBM_SETRANGE, 0, MAKELPARAM( 0, (WORD)_numTotalTests ) ); +#endif // PBM_SETRANGE32 + progressBarMessage( PBM_SETPOS, 0 ); + progressBarMessage( PBM_SETSTEP, 1 ); + greenBar(); + UpdateWindow( _progressBar ); + } + + void createStatusBar() + { + _statusBar = createWindow( STATUSCLASSNAME, WS_CHILD | WS_VISIBLE, _mainWindow ); + setRatios( 4, 1, 3, 1, 3, 1 ); + } + + void setRatios( unsigned suiteNameRatio, unsigned suiteTimeRatio, + unsigned testNameRatio, unsigned testTimeRatio, + unsigned testsDoneRatio, unsigned worldTimeRatio ) + { + _statusTotal = 0; + _statusOffsets[STATUS_SUITE_NAME] = (_statusTotal += suiteNameRatio); + _statusOffsets[STATUS_SUITE_TIME] = (_statusTotal += suiteTimeRatio); + _statusOffsets[STATUS_TEST_NAME] = (_statusTotal += testNameRatio); + _statusOffsets[STATUS_TEST_TIME] = (_statusTotal += testTimeRatio); + _statusOffsets[STATUS_TESTS_DONE] = (_statusTotal += testsDoneRatio); + _statusOffsets[STATUS_WORLD_TIME] = (_statusTotal += worldTimeRatio); + } + + HWND createWindow( LPCTSTR className, DWORD style, HWND parent = (HWND)NULL ) + { + return CreateWindow( className, NULL, style, 0, 0, 0, 0, parent, + (HMENU)NULL, (HINSTANCE)NULL, (LPVOID)this ); + } + + void progressBarMessage( UINT message, WPARAM wParam = 0, LPARAM lParam = 0 ) + { + SendMessage( _progressBar, message, wParam, lParam ); + } + + void centerMainWindow() + { + RECT screen; + getScreenArea( screen ); + + LONG screenWidth = screen.right - screen.left; + LONG screenHeight = screen.bottom - screen.top; + + LONG xCenter = (screen.right + screen.left) / 2; + LONG yCenter = (screen.bottom + screen.top) / 2; + + LONG windowWidth = (screenWidth * 4) / 5; + LONG windowHeight = screenHeight / 10; + LONG minimumHeight = 2 * (GetSystemMetrics( SM_CYCAPTION ) + GetSystemMetrics( SM_CYFRAME )); + if ( windowHeight < minimumHeight ) + windowHeight = minimumHeight; + + SetWindowPos( _mainWindow, HWND_TOP, + xCenter - (windowWidth / 2), yCenter - (windowHeight / 2), + windowWidth, windowHeight, 0 ); + } + + void getScreenArea( RECT &area ) + { + if ( !getScreenAreaWithoutTaskbar( area ) ) + getWholeScreenArea( area ); + } + + bool getScreenAreaWithoutTaskbar( RECT &area ) + { + return (SystemParametersInfo( SPI_GETWORKAREA, sizeof(RECT), &area, 0 ) != 0); + } + + void getWholeScreenArea( RECT &area ) + { + area.left = area.top = 0; + area.right = GetSystemMetrics( SM_CXSCREEN ); + area.bottom = GetSystemMetrics( SM_CYSCREEN ); + } + + void showMainWindow() + { + showMainWindow( _startMinimized ? SW_MINIMIZE : SW_SHOWNORMAL ); + UpdateWindow( _mainWindow ); + } + + void showMainWindow( int mode ) + { + ShowWindow( _mainWindow, mode ); + } + + enum { TIMER_ID = 1, TIMER_DELAY = 1000 }; + + void startTimer() + { + reset( _worldStart ); + reset( _suiteStart ); + reset( _testStart ); + SetTimer( _mainWindow, TIMER_ID, TIMER_DELAY, 0 ); + } + + void reset( DWORD &tick ) + { + tick = GetTickCount(); + } + + void startTests() + { + SetEvent( _canStartTests ); + } + + void messageLoop() + { + MSG message; + while ( BOOL haveMessage = GetMessage( &message, NULL, 0, 0 ) ) + if ( haveMessage != -1 ) + DispatchMessage( &message ); + } + + static LRESULT CALLBACK windowProcedure( HWND window, UINT message, WPARAM wParam, LPARAM lParam ) + { + if ( message == WM_CREATE ) + setUp( window, (LPCREATESTRUCT)lParam ); + + Win32Gui *that = (Win32Gui *)GetWindowLong( window, GWL_USERDATA ); + return that->handle( window, message, wParam, lParam ); + } + + static void setUp( HWND window, LPCREATESTRUCT create ) + { + SetWindowLong( window, GWL_USERDATA, (LONG)create->lpCreateParams ); + } + + LRESULT handle( HWND window, UINT message, WPARAM wParam, LPARAM lParam ) + { + switch ( message ) + { + case WM_SIZE: resizeControls(); break; + + case WM_TIMER: updateTime(); break; + + case WM_CLOSE: + case WM_DESTROY: + case WM_QUIT: + ExitProcess( tracker().failedTests() ); + + default: return DefWindowProc( window, message, wParam, lParam ); + } + return 0; + } + + void resizeControls() + { + RECT r; + GetClientRect( _mainWindow, &r ); + LONG width = r.right - r.left; + LONG height = r.bottom - r.top; + + GetClientRect( _statusBar, &r ); + LONG statusHeight = r.bottom - r.top; + LONG resizeGripWidth = statusHeight; + LONG progressHeight = height - statusHeight; + + SetWindowPos( _progressBar, HWND_TOP, 0, 0, width, progressHeight, 0 ); + SetWindowPos( _statusBar, HWND_TOP, 0, progressHeight, width, statusHeight, 0 ); + setStatusParts( width - resizeGripWidth ); + } + + void setStatusParts( LONG width ) + { + for ( unsigned i = 0; i < STATUS_TOTAL_PARTS; ++ i ) + _statusWidths[i] = (width * _statusOffsets[i]) / _statusTotal; + + statusBarMessage( SB_SETPARTS, STATUS_TOTAL_PARTS, _statusWidths ); + } + + void statusBarMessage( UINT message, WPARAM wParam = 0, const void *lParam = 0 ) + { + SendMessage( _statusBar, message, wParam, (LPARAM)lParam ); + } + + void greenBar() + { + setColor( 0, 255, 0 ); + setIcon( IDI_INFORMATION ); + } + +#ifdef PBM_SETBARCOLOR + void setColor( BYTE red, BYTE green, BYTE blue ) + { + progressBarMessage( PBM_SETBARCOLOR, 0, RGB( red, green, blue ) ); + } +#else // !PBM_SETBARCOLOR + void setColor( BYTE, BYTE, BYTE ) + { + } +#endif // PBM_SETBARCOLOR + + void setIcon( LPCTSTR icon ) + { + SendMessage( _mainWindow, WM_SETICON, ICON_BIG, (LPARAM)loadStandardIcon( icon ) ); + } + + HICON loadStandardIcon( LPCTSTR icon ) + { + return LoadIcon( (HINSTANCE)NULL, icon ); + } + + void setTestCaption( const char *suiteName, const char *testName ) + { + setCaption( suiteName, "::", testName, "()" ); + } + + void setCaption( const char *a = "", const char *b = "", const char *c = "", const char *d = "" ) + { + unsigned length = lstrlenA( _title ) + sizeof( " - " ) + + lstrlenA( a ) + lstrlenA( b ) + lstrlenA( c ) + lstrlenA( d ); + char *name = allocate( length ); + lstrcpyA( name, _title ); + lstrcatA( name, " - " ); + lstrcatA( name, a ); + lstrcatA( name, b ); + lstrcatA( name, c ); + lstrcatA( name, d ); + SetWindowTextA( _mainWindow, name ); + deallocate( name ); + } + + void showSuiteName( const char *suiteName ) + { + setStatusPart( STATUS_SUITE_NAME, suiteName ); + } + + void showTestName( const char *testName ) + { + setStatusPart( STATUS_TEST_NAME, testName ); + } + + void showTestsDone() + { + wsprintfA( _statusTestsDone, "%u of %s (%u%%)", + _testsDone, _strTotalTests, + (_testsDone * 100) / _numTotalTests ); + setStatusPart( STATUS_TESTS_DONE, _statusTestsDone ); + } + + void updateTime() + { + setStatusTime( STATUS_WORLD_TIME, _worldStart ); + setStatusTime( STATUS_SUITE_TIME, _suiteStart ); + setStatusTime( STATUS_TEST_TIME, _testStart ); + } + + void setStatusTime( unsigned part, DWORD start ) + { + unsigned total = (GetTickCount() - start) / 1000; + unsigned hours = total / 3600; + unsigned minutes = (total / 60) % 60; + unsigned seconds = total % 60; + + if ( hours ) + wsprintfA( _timeString, "%u:%02u:%02u", hours, minutes, seconds ); + else + wsprintfA( _timeString, "%02u:%02u", minutes, seconds ); + + setStatusPart( part, _timeString ); + } + + bool keep() + { + if ( !_keep ) + return false; + if ( !_startMinimized ) + return true; + return (_mainWindow == GetForegroundWindow()); + } + + void showSummary() + { + stopTimer(); + setSummaryStatusBar(); + setSummaryCaption(); + } + + void setStatusPart( unsigned part, const char *text ) + { + statusBarMessage( SB_SETTEXTA, part, text ); + } + + void stopTimer() + { + KillTimer( _mainWindow, TIMER_ID ); + setStatusTime( STATUS_WORLD_TIME, _worldStart ); + } + + void setSummaryStatusBar() + { + setRatios( 0, 0, 0, 0, 1, 1 ); + resizeControls(); + + const char *tests = (_numTotalTests == 1) ? "test" : "tests"; + if ( tracker().failedTests() ) + wsprintfA( _statusTestsDone, "Failed %u of %s %s", + tracker().failedTests(), _strTotalTests, tests ); + else + wsprintfA( _statusTestsDone, "%s %s passed", _strTotalTests, tests ); + + setStatusPart( STATUS_TESTS_DONE, _statusTestsDone ); + } + + void setSummaryCaption() + { + setCaption( _statusTestsDone ); + } + + char *allocate( unsigned length ) + { + return (char *)HeapAlloc( GetProcessHeap(), 0, length ); + } + + void deallocate( char *data ) + { + HeapFree( GetProcessHeap(), 0, data ); + } + }; +} + +#endif // __cxxtest__Win32Gui_h__ diff --git a/tools/cxxtest/cxxtest/X11Gui.h b/tools/cxxtest/cxxtest/X11Gui.h new file mode 100644 index 0000000..55e70ec --- /dev/null +++ b/tools/cxxtest/cxxtest/X11Gui.h @@ -0,0 +1,338 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__X11Gui_h__ +#define __cxxtest__X11Gui_h__ + +// +// X11Gui displays a simple progress bar using X11 +// +// It accepts the following command-line arguments: +// -title - Sets the application title +// -fn or -font <font> - Sets the font +// -bg or -background <color> - Sets the background color (default=Grey) +// -fg or -foreground <color> - Sets the text color (default=Black) +// -green/-yellow/-red <color> - Sets the colors of the bar +// + +#include <cxxtest/Gui.h> + +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +namespace CxxTest +{ + class X11Gui : public GuiListener + { + public: + void enterGui( int &argc, char **argv ) + { + parseCommandLine( argc, argv ); + } + + void enterWorld( const WorldDescription &wd ) + { + openDisplay(); + if ( _display ) { + createColors(); + createWindow(); + createGc(); + createFont(); + centerWindow(); + initializeEvents(); + initializeBar( wd ); + processEvents(); + } + } + + void guiEnterTest( const char *suiteName, const char *testName ) + { + if ( _display ) { + ++ _testsDone; + setWindowName( suiteName, testName ); + redraw(); + } + } + + void yellowBar() + { + if ( _display ) { + _barColor = getColor( _yellowName ); + getTotalTests(); + processEvents(); + } + } + + void redBar() + { + if ( _display ) { + _barColor = getColor( _redName ); + getTotalTests(); + processEvents(); + } + } + + void leaveGui() + { + if ( _display ) { + freeFontInfo(); + destroyGc(); + destroyWindow(); + closeDisplay(); + } + } + + private: + const char *_programName; + Display *_display; + Window _window; + unsigned _numTotalTests, _testsDone; + char _strTotalTests[WorldDescription::MAX_STRLEN_TOTAL_TESTS]; + const char *_foregroundName, *_backgroundName; + const char *_greenName, *_yellowName, *_redName; + unsigned long _foreground, _background, _barColor; + int _width, _height; + GC _gc; + const char *_fontName; + XID _fontId; + XFontStruct *_fontInfo; + int _textHeight, _textDescent; + long _eventMask; + Colormap _colormap; + + void parseCommandLine( int &argc, char **argv ) + { + _programName = argv[0]; + + _fontName = 0; + _foregroundName = "Black"; + _backgroundName = "Grey"; + _greenName = "Green"; + _yellowName = "Yellow"; + _redName = "Red"; + + for ( int i = 1; i + 1 < argc; ++ i ) { + if ( !strcmp( argv[i], "-title" ) ) + _programName = argv[++ i]; + else if ( !strcmp( argv[i], "-fn" ) || !strcmp( argv[i], "-font" ) ) + _fontName = argv[++ i]; + else if ( !strcmp( argv[i], "-fg" ) || !strcmp( argv[i], "-foreground" ) ) + _foregroundName = argv[++ i]; + else if ( !strcmp( argv[i], "-bg" ) || !strcmp( argv[i], "-background" ) ) + _backgroundName = argv[++ i]; + else if ( !strcmp( argv[i], "-green" ) ) + _greenName = argv[++ i]; + else if ( !strcmp( argv[i], "-yellow" ) ) + _yellowName = argv[++ i]; + else if ( !strcmp( argv[i], "-red" ) ) + _redName = argv[++ i]; + } + } + + void openDisplay() + { + _display = XOpenDisplay( NULL ); + } + + void createColors() + { + _colormap = DefaultColormap( _display, 0 ); + _foreground = getColor( _foregroundName ); + _background = getColor( _backgroundName ); + } + + unsigned long getColor( const char *colorName ) + { + XColor color; + XParseColor( _display, _colormap, colorName, &color ); + XAllocColor( _display, _colormap, &color ); + return color.pixel; + } + + void createWindow() + { + _window = XCreateSimpleWindow( _display, RootWindow( _display, 0 ), 0, 0, 1, 1, 0, 0, _background ); + } + + void createGc() + { + _gc = XCreateGC( _display, _window, 0, 0 ); + } + + void createFont() + { + if ( !loadFont() ) + useDefaultFont(); + getFontInfo(); + _textHeight = _fontInfo->ascent + _fontInfo->descent; + _textDescent = _fontInfo->descent; + } + + bool loadFont() + { + if ( !_fontName ) + return false; + _fontId = XLoadFont( _display, _fontName ); + return (XSetFont( _display, _gc, _fontId ) == Success); + } + + void useDefaultFont() + { + _fontId = XGContextFromGC( _gc ); + } + + void getFontInfo() + { + _fontInfo = XQueryFont( _display, _fontId ); + } + + void freeFontInfo() + { + XFreeFontInfo( NULL, _fontInfo, 1 ); + } + + void initializeEvents() + { + _eventMask = ExposureMask; + XSelectInput( _display, _window, _eventMask ); + } + + void initializeBar( const WorldDescription &wd ) + { + getTotalTests( wd ); + _testsDone = 0; + _barColor = getColor( _greenName ); + } + + void getTotalTests() + { + getTotalTests( tracker().world() ); + } + + void getTotalTests( const WorldDescription &wd ) + { + _numTotalTests = wd.numTotalTests(); + wd.strTotalTests( _strTotalTests ); + } + + void centerWindow() + { + XMapWindow( _display, _window ); + + Screen *screen = XDefaultScreenOfDisplay( _display ); + int screenWidth = WidthOfScreen( screen ); + int screenHeight = HeightOfScreen( screen ); + int xCenter = screenWidth / 2; + int yCenter = screenHeight / 2; + + _width = (screenWidth * 4) / 5; + _height = screenHeight / 14; + + XMoveResizeWindow( _display, _window, xCenter - (_width / 2), yCenter - (_height / 2), _width, _height ); + } + + void processEvents() + { + redraw(); + + XEvent event; + while( XCheckMaskEvent( _display, _eventMask, &event ) ) + redraw(); + } + + void setWindowName( const char *suiteName, const char *testName ) + { + unsigned length = strlen( _programName ) + strlen( suiteName ) + strlen( testName ) + sizeof( " - ::()" ); + char *name = (char *)malloc( length ); + sprintf( name, "%s - %s::%s()", _programName, suiteName, testName ); + XSetStandardProperties( _display, _window, name, 0, 0, 0, 0, 0 ); + free( name ); + } + + void redraw() + { + getWindowSize(); + drawSolidBar(); + drawDividers(); + drawPercentage(); + flush(); + } + + void getWindowSize() + { + XWindowAttributes attributes; + XGetWindowAttributes( _display, _window, &attributes ); + _width = attributes.width; + _height = attributes.height; + } + + void drawSolidBar() + { + unsigned barWidth = (_width * _testsDone) / _numTotalTests; + + XSetForeground( _display, _gc, _barColor ); + XFillRectangle( _display, _window, _gc, 0, 0, barWidth, _height ); + + XSetForeground( _display, _gc, _background ); + XFillRectangle( _display, _window, _gc, barWidth, 0, _width + 1 - barWidth, _height ); + } + + void drawDividers() + { + if(_width / _numTotalTests < 5) + return; + for ( unsigned i = 1; i < _testsDone; ++ i ) { + int x = (_width * i) / _numTotalTests; + XDrawLine( _display, _window, _gc, x, 0, x, _height); + } + } + + void drawPercentage() + { + XSetForeground( _display, _gc, _foreground ); + + char str[sizeof("1000000000 of ") + sizeof(_strTotalTests) + sizeof(" (100%)")]; + sprintf( str, "%u of %s (%u%%)", _testsDone, _strTotalTests, (_testsDone * 100) / _numTotalTests ); + unsigned len = strlen( str ); + + int textWidth = XTextWidth( _fontInfo, str, len ); + + XDrawString( _display, _window, _gc, + (_width - textWidth) / 2, ((_height + _textHeight) / 2) - _textDescent, + str, len ); + } + + void flush() + { + XFlush( _display ); + } + + void destroyGc() + { + XFreeGC( _display, _gc ); + } + + void destroyWindow() + { + XDestroyWindow( _display, _window ); + } + + void closeDisplay() + { + XCloseDisplay( _display ); + } + }; +} + +#endif //__cxxtest__X11Gui_h__ diff --git a/tools/cxxtest/cxxtest/XUnitPrinter.h b/tools/cxxtest/cxxtest/XUnitPrinter.h new file mode 100644 index 0000000..116c37d --- /dev/null +++ b/tools/cxxtest/cxxtest/XUnitPrinter.h @@ -0,0 +1,48 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __CXXTEST__XUNIT_PRINTER_H +#define __CXXTEST__XUNIT_PRINTER_H + +// +// XUnitPrinter combines an ErrorPrinter with an XML formatter. +// + +#include <cxxtest/TeeListener.h> +#include <cxxtest/ErrorPrinter.h> +#include <cxxtest/XmlPrinter.h> + +namespace CxxTest +{ + class XUnitPrinter : public TeeListener + { + public: + + XmlPrinter xml_printer; + ErrorPrinter error_printer; + + XUnitPrinter( CXXTEST_STD(ostream) &o = CXXTEST_STD(cout) ) + : xml_printer(o) + { + setFirst( error_printer ); + setSecond( xml_printer ); + } + + int run() + { + TestRunner::runAllTests( *this ); + return tracker().failedTests(); + } + }; +} + +#endif //__CXXTEST__XUNIT_PRINTER_H + diff --git a/tools/cxxtest/cxxtest/XmlFormatter.h b/tools/cxxtest/cxxtest/XmlFormatter.h new file mode 100644 index 0000000..126b513 --- /dev/null +++ b/tools/cxxtest/cxxtest/XmlFormatter.h @@ -0,0 +1,575 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +// Licensed under the LGPL, see http://www.gnu.org/licenses/lgpl.html + +#ifndef __CXXTEST__XMLFORMATTER_H +#define __CXXTEST__XMLFORMATTER_H + +// +// The XmlFormatter is a TestListener that +// prints reports of the errors to an output +// stream in the form of an XML document. +// + +// The following definitions are used if stack trace support is enabled, +// to give the traces an easily-parsable XML format. If stack tracing is +// not enabled, then these definitions will be ignored. +#define CXXTEST_STACK_TRACE_ESCAPE_AS_XML +#define CXXTEST_STACK_TRACE_NO_ESCAPE_FILELINE_AFFIXES + +#define CXXTEST_STACK_TRACE_INITIAL_PREFIX "<stack-frame function=\"" +#define CXXTEST_STACK_TRACE_INITIAL_SUFFIX "\"/>\n" +#define CXXTEST_STACK_TRACE_OTHER_PREFIX CXXTEST_STACK_TRACE_INITIAL_PREFIX +#define CXXTEST_STACK_TRACE_OTHER_SUFFIX CXXTEST_STACK_TRACE_INITIAL_SUFFIX +#define CXXTEST_STACK_TRACE_ELLIDED_MESSAGE "" +#define CXXTEST_STACK_TRACE_FILELINE_PREFIX "\" location=\"" +#define CXXTEST_STACK_TRACE_FILELINE_SUFFIX "" + + +#include <cxxtest/TestRunner.h> +#include <cxxtest/TestListener.h> +#include <cxxtest/TestTracker.h> +#include <cxxtest/ValueTraits.h> +#include <cxxtest/ErrorFormatter.h> +#include <cxxtest/StdHeaders.h> +#include <iostream> +#include <sstream> +#include <cstring> +#include <cstdio> + +namespace CxxTest +{ + class TeeOutputStreams + { + private: + class teebuffer : public std::basic_streambuf<char> + { + typedef std::basic_streambuf<char> streambuf_t; + public: + teebuffer(streambuf_t * buf1, streambuf_t * buf2) + : buffer1(buf1), buffer2(buf2) + {} + + virtual int overflow(int c) + { + if (c == EOF) + return !EOF; + else + { + int const ans1 = buffer1->sputc(c); + int const ans2 = buffer2->sputc(c); + return ans1 == EOF || ans2 == EOF ? EOF : c; + } + } + + virtual int sync() + { + int ans1 = buffer1->pubsync(); + int ans2 = buffer2->pubsync(); + return ans1 || ans2 ? -1 : 0; + } + + streambuf_t * buffer1; + streambuf_t * buffer2; + }; + + public: + TeeOutputStreams(std::ostream& _cout, std::ostream& _cerr) + : out(), + err(), + orig_cout(_cout), + orig_cerr(_cerr), + tee_out(out.rdbuf(), _cout.rdbuf()), + tee_err(err.rdbuf(), _cerr.rdbuf()) + { + orig_cout.rdbuf(&tee_out); + orig_cerr.rdbuf(&tee_err); + } + + ~TeeOutputStreams() + { + orig_cout.rdbuf(tee_out.buffer2); + orig_cerr.rdbuf(tee_err.buffer2); + } + + std::stringstream out; + std::stringstream err; + + private: + std::ostream& orig_cout; + std::ostream& orig_cerr; + teebuffer tee_out; + teebuffer tee_err; + }; + + class ElementInfo + { + public: + std::string name; + std::stringstream value; + std::map<std::string,std::string> attribute; + + ElementInfo() + : name(), value(), attribute() + {} + + ElementInfo(const ElementInfo& rhs) + : name(rhs.name), value(rhs.value.str()), attribute(rhs.attribute) + {} + + ElementInfo& operator=(const ElementInfo& rhs) + { + name = rhs.name; + value.str(rhs.value.str()); + attribute = rhs.attribute; + return *this; + } + + template <class Type> + void add(const std::string& name_, Type& value_) + { + std::ostringstream os; + os << value_; + attribute[name_] = os.str(); + } + + void write(OutputStream& os) { + os << " <" << name.c_str() << " "; + std::map<std::string,std::string>::iterator curr=attribute.begin(); + std::map<std::string,std::string>::iterator end =attribute.end(); + while (curr != end) { + os << curr->first.c_str() + << "=\"" << curr->second.c_str() << "\" "; + curr++; + } + if (value.str().empty()) { + os << "/>"; + } + else { + os << ">" << escape(value.str()).c_str() + << "</" << name.c_str() << ">"; + } + os.endl(os); + } + + std::string escape(const std::string& str) + { + std::string escStr = ""; + for(size_t i = 0; i < str.length(); i++) + { + switch(str[i]) + { + case '"': escStr += """; break; + case '\'': escStr += "'"; break; + case '<': escStr += "<"; break; + case '>': escStr += ">"; break; + case '&': escStr += "&"; break; + default: escStr += str[i]; break; + } + } + return escStr; + } + + }; + + class TestCaseInfo + { + public: + + TestCaseInfo() : fail(false), error(false), runtime(0.0) {} + std::string className; + std::string testName; + std::string line; + bool fail; + bool error; + double runtime; + std::list<ElementInfo> elements; + typedef std::list<ElementInfo>::iterator element_t; + std::string world; + + element_t add_element(const std::string& name) + { + element_t elt = elements.insert(elements.end(), ElementInfo()); + elt->name=name; + return elt; + } + + element_t update_element(const std::string& name) + { + element_t elt = elements.begin(); + while ( elt != elements.end() ) + { + if ( elt->name == name ) + return elt; + } + return add_element(name); + } + + void write( OutputStream &o ) + { + o << " <testcase classname=\"" << className.c_str() + << "\" name=\"" << testName.c_str() + << "\" line=\"" << line.c_str() << "\""; + bool elts=false; + element_t curr = elements.begin(); + element_t end = elements.end(); + while (curr != end) { + if (!elts) { + o << ">"; + o.endl(o); + elts=true; + } + curr->write(o); + curr++; + } + if (elts) + o << " </testcase>"; + else + o << " />"; + o.endl(o); + } + + }; + + class XmlFormatter : public TestListener + { + public: + XmlFormatter( OutputStream *o, OutputStream *ostr, std::ostringstream *os) + : _o(o), _ostr(ostr), _os(os), stream_redirect(NULL) + {} + + std::list<TestCaseInfo> info; + std::list<TestCaseInfo>::iterator testcase; + typedef std::list<ElementInfo>::iterator element_t; + std::string classname; + int ntests; + int nfail; + int nerror; + double totaltime; + + int run() + { + TestRunner::runAllTests( *this ); + return tracker().failedTests(); + } + + void enterWorld( const WorldDescription & /*desc*/ ) + { + ntests=0; + nfail=0; + nerror=0; + totaltime=0; + } + + static void totalTests( OutputStream &o ) + { + char s[WorldDescription::MAX_STRLEN_TOTAL_TESTS]; + const WorldDescription &wd = tracker().world(); + o << wd.strTotalTests( s ) + << (wd.numTotalTests() == 1 ? " test" : " tests"); + } + + void enterSuite( const SuiteDescription& desc ) + { + classname = desc.suiteName(); + // replace "::" namespace with java-style "." + size_t pos = 0; + while( (pos = classname.find("::", pos)) != + CXXTEST_STD(string::npos) ) + classname.replace(pos, 2, "."); + while ( ! classname.empty() && classname[0] == '.' ) + classname.erase(0,1); + + //CXXTEST_STD(cout) << "HERE " << desc.file() << " " + // << classname << CXXTEST_STD(endl); + + //classname=desc.suiteName(); + //(*_o) << "file=\"" << desc.file() << "\" "; + //(*_o) << "line=\"" << desc.line() << "\""; + //_o->flush(); + } + + void leaveSuite( const SuiteDescription & ) + { + std::list<TestCaseInfo>::iterator curr = info.begin(); + std::list<TestCaseInfo>::iterator end = info.end(); + while (curr != end) { + if (curr->fail) nfail++; + if (curr->error) nerror++; + totaltime += curr->runtime; + ntests++; + curr++; + } + curr = info.begin(); + end = info.end(); + while (curr != end) { + (*curr).write(*_ostr); + curr++; + } + info.clear(); + } + + void enterTest( const TestDescription & desc ) + { + testcase = info.insert(info.end(),TestCaseInfo()); + testcase->testName = desc.testName(); + testcase->className = classname; + std::ostringstream os; + os << desc.line(); + testcase->line = os.str(); + + if ( stream_redirect ) + CXXTEST_STD(cerr) << "ERROR: The stream_redirect != NULL" + << CXXTEST_STD(endl); + + stream_redirect = + new TeeOutputStreams(CXXTEST_STD(cout), CXXTEST_STD(cerr)); + } + + void leaveTest( const TestDescription & ) + { + if ( stream_redirect != NULL ) + { + std::string out = stream_redirect->out.str(); + if ( ! out.empty() ) + { + // silently ignore the '.' + if ( out[0] != '.' || out.size() > 1 ) + testcase->add_element("system-out")->value << out; + } + if ( ! stream_redirect->err.str().empty() ) + testcase->add_element("system-err")->value << stream_redirect->err.str(); + + delete stream_redirect; + stream_redirect = NULL; + } + } + + void leaveWorld( const WorldDescription& desc ) + { + std::ostringstream os; + os << totaltime; + (*_o) << "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" << endl; + (*_o) << "<testsuite name=\"" << desc.worldName() << "\" "; + (*_o) << " tests=\"" << ntests + << "\" errors=\"" << nerror + << "\" failures=\"" << nfail + << "\" time=\"" << os.str().c_str() << "\" >"; + _o->endl(*_o); + (*_o) << _os->str().c_str(); + _os->clear(); + (*_o) << "</testsuite>" << endl; + _o->flush(); + } + + void trace( const char* /*file*/, int line, const char *expression ) + { + element_t elt = testcase->add_element("trace"); + elt->add("line",line); + elt->value << expression; + } + + void warning( const char* /*file*/, int line, const char *expression ) + { + element_t elt = testcase->add_element("warning"); + elt->add("line",line); + elt->value << expression; + } + + void failedTest( const char* file, int line, const char* expression ) + { + testFailure( file, line, "failure") << "Test failed: " << expression; + } + + void failedAssert( const char *file, int line, const char *expression ) + { + testFailure( file, line, "failedAssert" ) + << "Assertion failed: " << expression; + } + + void failedAssertEquals( const char *file, int line, + const char* xStr, const char* yStr, + const char *x, const char *y ) + { + testFailure( file, line, "failedAssertEquals" ) + << "Error: Expected (" + << xStr << " == " << yStr << "), found (" + << x << " != " << y << ")"; + } + + void failedAssertSameData( const char *file, int line, + const char *xStr, const char *yStr, const char *sizeStr, + const void* /*x*/, const void* /*y*/, unsigned size ) + { + testFailure( file, line, "failedAssertSameData") + << "Error: Expected " << sizeStr + << " (" << size << ") bytes to be equal at (" + << xStr << ") and (" << yStr << "), found"; + } + + void failedAssertSameFiles( const char *file, int line, + const char *, const char *, + const char* explanation + ) + { + testFailure( file, line, "failedAssertSameFiles" ) + << "Error: " << explanation; + } + + void failedAssertDelta( const char *file, int line, + const char *xStr, const char *yStr, const char *dStr, + const char *x, const char *y, const char *d ) + { + testFailure( file, line, "failedAssertDelta" ) + << "Error: Expected (" + << xStr << " == " << yStr << ") up to " << dStr + << " (" << d << "), found (" + << x << " != " << y << ")"; + } + + void failedAssertDiffers( const char *file, int line, + const char *xStr, const char *yStr, + const char *value ) + { + testFailure( file, line, "failedAssertDiffers" ) + << "Error: Expected (" + << xStr << " != " << yStr << "), found (" + << value << ")"; + } + + void failedAssertLessThan( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ) + { + testFailure( file, line, "failedAssertLessThan" ) + << "Error: Expected (" << + xStr << " < " << yStr << "), found (" << + x << " >= " << y << ")"; + } + + void failedAssertLessThanEquals( const char *file, int line, + const char *xStr, const char *yStr, + const char *x, const char *y ) + { + testFailure( file, line, "failedAssertLessThanEquals" ) + << "Error: Expected (" << + xStr << " <= " << yStr << "), found (" << + x << " > " << y << ")"; + } + + void failedAssertRelation( const char *file, int line, + const char *relation, const char *xStr, const char *yStr, + const char *x, const char *y ) + { + testFailure( file, line, "failedAssertRelation" ) + << "Error: Expected " << relation << "( " << + xStr << ", " << yStr << " ), found !" << relation + << "( " << x << ", " << y << " )"; + } + + void failedAssertPredicate( const char *file, int line, + const char *predicate, const char *xStr, const char *x ) + { + testFailure( file, line, "failedAssertPredicate" ) + << "Error: Expected " << predicate << "( " << + xStr << " ), found !" << predicate << "( " << x << " )"; + } + + void failedAssertThrows( const char *file, int line, + const char *expression, const char *type, + bool otherThrown ) + { + testFailure( file, line, "failedAssertThrows" ) + << "Error: Expected (" << expression << ") to throw (" << + type << ") but it " + << (otherThrown ? "threw something else" : "didn't throw"); + } + + void failedAssertThrowsNot( const char *file, int line, const char *expression ) + { + testFailure( file, line, "failedAssertThrowsNot" ) + << "Error: Expected (" << expression + << ") not to throw, but it did"; + } + + protected: + + OutputStream *outputStream() const + { + return _o; + } + + OutputStream *outputFileStream() const + { + return _ostr; + } + + private: + XmlFormatter( const XmlFormatter & ); + XmlFormatter &operator=( const XmlFormatter & ); + + std::stringstream& testFailure( const char* file, int line, const char *failureType) + { + testcase->fail=true; + element_t elt = testcase->update_element("failure"); + if ( elt->value.str().empty() ) + { + elt->add("type",failureType); + elt->add("line",line); + elt->add("file",file); + } + else + elt->value << CXXTEST_STD(endl); + return elt->value; + //failedTest(file,line,message.c_str()); + } + +#if 0 + void attributeBinary( const char* name, const void *value, unsigned size ) + { + (*_o) << name; + (*_o) << "=\""; + dump(value, size); + (*_o) << "\" "; + } + + void dump( const void *buffer, unsigned size ) + { + if (!buffer) return; + + unsigned dumpSize = size; + if ( maxDumpSize() && dumpSize > maxDumpSize() ) + dumpSize = maxDumpSize(); + + const unsigned char *p = (const unsigned char *)buffer; + for ( unsigned i = 0; i < dumpSize; ++ i ) + (*_o) << byteToHex( *p++ ) << " "; + if ( dumpSize < size ) + (*_o) << "... "; + } +#endif + + static void endl( OutputStream &o ) + { + OutputStream::endl( o ); + } + + OutputStream *_o; + OutputStream *_ostr; + std::ostringstream *_os; + + TeeOutputStreams *stream_redirect; + }; +} + +#endif // __CXXTEST__XMLFORMATTER_H + diff --git a/tools/cxxtest/cxxtest/XmlPrinter.h b/tools/cxxtest/cxxtest/XmlPrinter.h new file mode 100644 index 0000000..bee8010 --- /dev/null +++ b/tools/cxxtest/cxxtest/XmlPrinter.h @@ -0,0 +1,75 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__XmlPrinter_h__ +#define __cxxtest__XmlPrinter_h__ + +// +// The XmlPrinter is a simple TestListener that +// prints JUnit style xml to the output stream +// + + +#include <cxxtest/Flags.h> + +#ifndef _CXXTEST_HAVE_STD +# define _CXXTEST_HAVE_STD +#endif // _CXXTEST_HAVE_STD + +#include <cxxtest/XmlFormatter.h> +#include <cxxtest/StdValueTraits.h> + +#include <sstream> +#ifdef _CXXTEST_OLD_STD +# include <iostream.h> +#else // !_CXXTEST_OLD_STD +# include <iostream> +#endif // _CXXTEST_OLD_STD + +namespace CxxTest +{ + class XmlPrinter : public XmlFormatter + { + public: + XmlPrinter( CXXTEST_STD(ostream) &o = CXXTEST_STD(cout), const char* /*preLine*/ = ":", const char* /*postLine*/ = "" ) : + XmlFormatter( new Adapter(o), new Adapter(ostr), &ostr ) {} + + virtual ~XmlPrinter() + { + delete outputStream(); + delete outputFileStream(); + } + + private: + + std::ostringstream ostr; + + class Adapter : public OutputStream + { + CXXTEST_STD(ostream) &_o; + public: + Adapter( CXXTEST_STD(ostream) &o ) : _o(o) {} + void flush() { _o.flush(); } + OutputStream &operator<<( const char *s ) { _o << s; return *this; } + OutputStream &operator<<( Manipulator m ) { return OutputStream::operator<<( m ); } + OutputStream &operator<<( unsigned i ) + { + char s[1 + 3 * sizeof(unsigned)]; + numberToString( i, s ); + _o << s; + return *this; + } + }; + }; +} + +#endif // __cxxtest__XmlPrinter_h__ + diff --git a/tools/cxxtest/cxxtest/YesNoRunner.h b/tools/cxxtest/cxxtest/YesNoRunner.h new file mode 100644 index 0000000..daec671 --- /dev/null +++ b/tools/cxxtest/cxxtest/YesNoRunner.h @@ -0,0 +1,40 @@ +/* +------------------------------------------------------------------------- + CxxTest: A lightweight C++ unit testing library. + Copyright (c) 2008 Sandia Corporation. + This software is distributed under the LGPL License v2.1 + For more information, see the COPYING file in the top CxxTest directory. + Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, + the U.S. Government retains certain rights in this software. +------------------------------------------------------------------------- +*/ + +#ifndef __cxxtest__YesNoRunner_h__ +#define __cxxtest__YesNoRunner_h__ + +// +// The YesNoRunner is a simple TestListener that +// just returns true iff all tests passed. +// + +#include <cxxtest/TestRunner.h> +#include <cxxtest/TestListener.h> + +namespace CxxTest +{ + class YesNoRunner : public TestListener + { + public: + YesNoRunner() + { + } + + int run() + { + TestRunner::runAllTests( *this ); + return tracker().failedTests(); + } + }; +} + +#endif // __cxxtest__YesNoRunner_h__ diff --git a/tools/cxxtest/doc/Makefile b/tools/cxxtest/doc/Makefile new file mode 100644 index 0000000..ca0b7da --- /dev/null +++ b/tools/cxxtest/doc/Makefile @@ -0,0 +1,22 @@ + +html: guide.txt anchors outputs + asciidoc -v -b html -d article -n -a toc guide.txt + +pdf: guide.txt anchors outputs + a2x -a toc -L -d article -f pdf -v --dblatex-opts "-P latex.output.revhistory=0 -P doc.collab.show=1 -P toc.section.depth=2" guide.txt + +epub: guide.txt anchors outputs + export XML_CATALOG_FILES=export XML_CATALOG_FILES="catalog.xml"; a2x -L -f epub -d article --verbose --xsltproc-opts "--stringparam toc.section.depth 2 --stringparam generate.section.toc.level 1" guide.txt + +all: html pdf epub + +anchors: + python include_anchors.py guide.txt + +outputs: + ../bin/cxxtestgen -h > examples/cxxtestgen.out + +clean: + - \rm -f guide.xml + - \rm -f examples/.*.py examples/.*.h examples/.*.cpp examples/.*.sh examples/runner examples/TEST*.xml examples/parsetab.py examples/*.orig examples/runner.cpp + diff --git a/tools/cxxtest/doc/README.txt b/tools/cxxtest/doc/README.txt new file mode 100644 index 0000000..921019d --- /dev/null +++ b/tools/cxxtest/doc/README.txt @@ -0,0 +1,34 @@ +This directory supports the creation of the CxxTest User Guide using +asciidoc and a2x commands. + +HTML + +The command + + make html + +creates the guide.html file. + + +PDF + +The command + + make pdf + +creates the guide.tex file, which generates the guide.pdf file using +dblatex. + + + +EPUB + +The command + + make epub + +creates the file make.epub. Note that the `catalog.xml` file is +used, which configures asciidoc to use the docbook XML data in the +`epub` directory. This is a bit of a hack. It apparently works +around a limitation of the MacPorts installation of asciidoc. + diff --git a/tools/cxxtest/doc/catalog.xml b/tools/cxxtest/doc/catalog.xml new file mode 100644 index 0000000..fde98a7 --- /dev/null +++ b/tools/cxxtest/doc/catalog.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" + "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> + +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> +<nextCatalog catalog="/opt/local/etc/xml/catalog" /> +<nextCatalog catalog="/opt/local/share/xsl/docbook-xsl/catalog.xml" /> +</catalog> diff --git a/tools/cxxtest/doc/epub/README b/tools/cxxtest/doc/epub/README new file mode 100644 index 0000000..5e2587a --- /dev/null +++ b/tools/cxxtest/doc/epub/README @@ -0,0 +1,88 @@ +---------------------------------------------------------------------- + README file for the DocBook XSL Stylesheets +---------------------------------------------------------------------- + +These are XSL stylesheets for transforming DocBook XML document +instances into .epub format. + +.epub is an open standard of the The International Digital Publishing Forum (IDPF), +a the trade and standards association for the digital publishing industry. + +An alpha-quality reference implementation (dbtoepub) for a DocBook to .epub +converter (written in Ruby) is available under bin/. + +From http://idpf.org + What is EPUB, .epub, OPS/OCF & OEB? + + ".epub" is the file extension of an XML format for reflowable digital + books and publications. ".epub" is composed of three open standards, + the Open Publication Structure (OPS), Open Packaging Format (OPF) and + Open Container Format (OCF), produced by the IDPF. "EPUB" allows + publishers to produce and send a single digital publication file + through distribution and offers consumers interoperability between + software/hardware for unencrypted reflowable digital books and other + publications. The Open eBook Publication Structure or "OEB", + originally produced in 1999, is the precursor to OPS. + +---------------------------------------------------------------------- +.epub Constraints +---------------------------------------------------------------------- + +.epub does not support all of the image formats that DocBook supports. +When an image is available in an accepted format, it will be used. The +accepted @formats are: 'GIF','GIF87a','GIF89a','JPEG','JPG','PNG','SVG' +A mime-type for the image will be guessed from the file extension, +which may not work if your file extensions are non-standard. + +Non-supported elements: + * <mediaobjectco> + * <inlinegraphic>, <graphic>, <textdata>, <imagedata> with text/XML + @filerefs + * <olink> + * <cmdsynopsis> in lists (generic XHTML rendering inability) + * <footnote><para><programlisting> (just make your programlistings + siblings, rather than descendents of paras) + +---------------------------------------------------------------------- +dbtoepub Reference Implementation +---------------------------------------------------------------------- + +An alpha-quality DocBook to .epub conversion program, dbtoepub, is provided +in bin/dbtoepub. + +This tool requires: + - 'xsltproc' in your PATH + - 'zip' in your PATH + - Ruby 1.8.4+ + +Windows compatibility has not been extensively tested; bug reports encouraged. +[See http://www.zlatkovic.com/libxml.en.html and http://unxutils.sourceforge.net/] + +$ dbtoepub --help + Usage: dbtoepub [OPTIONS] [DocBook Files] + + dbtoepub converts DocBook <book> and <article>s into to .epub files. + + .epub is defined by the IDPF at www.idpf.org and is made up of 3 standards: + - Open Publication Structure (OPS) + - Open Packaging Format (OPF) + - Open Container Format (OCF) + + Specific options: + -d, --debug Show debugging output. + -h, --help Display usage info + -v, --verbose Make output verbose + + +---------------------------------------------------------------------- +Validation +---------------------------------------------------------------------- + +The epubcheck project provides limited validation for .epub documents. +See http://code.google.com/p/epubcheck/ for details. + +---------------------------------------------------------------------- +Copyright information +---------------------------------------------------------------------- +See the accompanying file named COPYING. + diff --git a/tools/cxxtest/doc/epub/bin/dbtoepub b/tools/cxxtest/doc/epub/bin/dbtoepub new file mode 100644 index 0000000..9976f81 --- /dev/null +++ b/tools/cxxtest/doc/epub/bin/dbtoepub @@ -0,0 +1,76 @@ +#!/usr/bin/env ruby +# This program converts DocBook documents into .epub files. +# +# Usage: dbtoepub [OPTIONS] [DocBook Files] +# +# .epub is defined by the IDPF at www.idpf.org and is made up of 3 standards: +# - Open Publication Structure (OPS) +# - Open Packaging Format (OPF) +# - Open Container Format (OCF) +# +# Specific options: +# -c, --css [FILE] Use FILE for CSS on generated XHTML. +# -d, --debug Show debugging output. +# -f, --font [OTF FILE] Embed OTF FILE in .epub. +# -h, --help Display usage info. +# -s, --stylesheet [XSL FILE] Use XSL FILE as a customization +# layer (imports epub/docbook.xsl). +# -v, --verbose Make output verbose. + +lib = File.expand_path(File.join(File.dirname(__FILE__), 'lib')) +$LOAD_PATH.unshift(lib) if File.exist?(lib) + +require 'fileutils' +require 'optparse' +require 'tmpdir' + +require 'docbook' + +verbose = false +debug = false +css_file = nil +otf_files = [] +customization_layer = nil +output_file = nil + +#$DEBUG=true + +# Set up the OptionParser +opts = OptionParser.new +opts.banner = "Usage: #{File.basename($0)} [OPTIONS] [DocBook Files] + +#{File.basename($0)} converts DocBook <book> and <article>s into to .epub files. + +.epub is defined by the IDPF at www.idpf.org and is made up of 3 standards: +- Open Publication Structure (OPS) +- Open Packaging Format (OPF) +- Open Container Format (OCF) + +Specific options:" +opts.on("-c", "--css [FILE]", "Use FILE for CSS on generated XHTML.") {|f| css_file = f} +opts.on("-d", "--debug", "Show debugging output.") {debug = true; verbose = true} +opts.on("-f", "--font [OTF FILE]", "Embed OTF FILE in .epub.") {|f| otf_files << f} +opts.on("-h", "--help", "Display usage info.") {puts opts.to_s; exit 0} +opts.on("-o", "--output [OUTPUT FILE]", "Output ePub file as OUTPUT FILE.") {|f| output_file = f} +opts.on("-s", "--stylesheet [XSL FILE]", "Use XSL FILE as a customization layer (imports epub/docbook.xsl).") {|f| customization_layer = f} +opts.on("-v", "--verbose", "Make output verbose.") {verbose = true} + +db_files = opts.parse(ARGV) +if db_files.size == 0 + puts opts.to_s + exit 0 +end + +db_files.each {|docbook_file| + dir = File.expand_path(File.join(Dir.tmpdir, ".epubtmp#{Time.now.to_f.to_s}")) + FileUtils.mkdir_p(dir) + e = DocBook::Epub.new(docbook_file, dir, css_file, customization_layer, otf_files) + + if output_file + epub_file = output_file + else + epub_file = File.basename(docbook_file, ".xml") + ".epub" + end + puts "Rendering DocBook file #{docbook_file} to #{epub_file}" if verbose + e.render_to_file(epub_file) +} diff --git a/tools/cxxtest/doc/epub/bin/lib/docbook.rb b/tools/cxxtest/doc/epub/bin/lib/docbook.rb new file mode 100644 index 0000000..14110d6 --- /dev/null +++ b/tools/cxxtest/doc/epub/bin/lib/docbook.rb @@ -0,0 +1,227 @@ +require 'fileutils' +require 'rexml/parsers/pullparser' + +module DocBook + + class Epub + CHECKER = "epubcheck" + STYLESHEET = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', "docbook.xsl")) + CALLOUT_PATH = File.join('images', 'callouts') + CALLOUT_FULL_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', CALLOUT_PATH)) + CALLOUT_LIMIT = 15 + CALLOUT_EXT = ".png" + XSLT_PROCESSOR = "xsltproc" + OUTPUT_DIR = ".epubtmp#{Time.now.to_f.to_s}" + MIMETYPE = "application/epub+zip" + META_DIR = "META-INF" + OEBPS_DIR = "OEBPS" + ZIPPER = "zip" + + attr_reader :output_dir + + def initialize(docbook_file, output_dir=OUTPUT_DIR, css_file=nil, customization_layer=nil, embedded_fonts=[]) + @docbook_file = docbook_file + @output_dir = output_dir + @meta_dir = File.join(@output_dir, META_DIR) + @oebps_dir = File.join(@output_dir, OEBPS_DIR) + @css_file = css_file ? File.expand_path(css_file) : css_file + @embedded_fonts = embedded_fonts + @to_delete = [] + + if customization_layer + @stylesheet = File.expand_path(customization_layer) + else + @stylesheet = STYLESHEET + end + + unless File.exist?(@docbook_file) + raise ArgumentError.new("File #{@docbook_file} does not exist") + end + end + + def render_to_file(output_file, verbose=false) + render_to_epub(output_file, verbose) + bundle_epub(output_file, verbose) + cleanup_files(@to_delete) + end + + def self.invalid?(file) + # Obnoxiously, we can't just check for a non-zero output... + cmd = %Q(#{CHECKER} "#{file}") + output = `#{cmd} 2>&1` + + if $?.to_i == 0 + return false + else + STDERR.puts output if $DEBUG + return output + end + end + + private + def render_to_epub(output_file, verbose) + @collapsed_docbook_file = collapse_docbook() + + chunk_quietly = "--stringparam chunk.quietly " + (verbose ? '0' : '1') + callout_path = "--stringparam callout.graphics.path #{CALLOUT_PATH}/" + callout_limit = "--stringparam callout.graphics.number.limit #{CALLOUT_LIMIT}" + callout_ext = "--stringparam callout.graphics.extension #{CALLOUT_EXT}" + html_stylesheet = "--stringparam html.stylesheet #{File.basename(@css_file)}" if @css_file + base = "--stringparam base.dir #{OEBPS_DIR}/" + unless @embedded_fonts.empty? + embedded_fonts = @embedded_fonts.map {|f| File.basename(f)}.join(',') + font = "--stringparam epub.embedded.fonts \"#{embedded_fonts}\"" + end + meta = "--stringparam epub.metainf.dir #{META_DIR}/" + oebps = "--stringparam epub.oebps.dir #{OEBPS_DIR}/" + options = [chunk_quietly, + callout_path, + callout_limit, + callout_ext, + base, + font, + meta, + oebps, + html_stylesheet, + ].join(" ") + # Double-quote stylesheet & file to help Windows cmd.exe + db2epub_cmd = %Q(cd "#{@output_dir}" && #{XSLT_PROCESSOR} #{options} "#{@stylesheet}" "#{@collapsed_docbook_file}") + STDERR.puts db2epub_cmd if $DEBUG + success = system(db2epub_cmd) + raise "Could not render as .epub to #{output_file} (#{db2epub_cmd})" unless success + @to_delete << Dir["#{@meta_dir}/*"] + @to_delete << Dir["#{@oebps_dir}/*"] + end + + def bundle_epub(output_file, verbose) + + quiet = verbose ? "" : "-q" + mimetype_filename = write_mimetype() + meta = File.basename(@meta_dir) + oebps = File.basename(@oebps_dir) + images = copy_images() + csses = copy_csses() + fonts = copy_fonts() + callouts = copy_callouts() + # zip -X -r ../book.epub mimetype META-INF OEBPS + # Double-quote stylesheet & file to help Windows cmd.exe + zip_cmd = %Q(cd "#{@output_dir}" && #{ZIPPER} #{quiet} -X -r "#{File.expand_path(output_file)}" "#{mimetype_filename}" "#{meta}" "#{oebps}") + puts zip_cmd if $DEBUG + success = system(zip_cmd) + raise "Could not bundle into .epub file to #{output_file}" unless success + end + + # Input must be collapsed because REXML couldn't find figures in files that + # were XIncluded or added by ENTITY + # http://sourceforge.net/tracker/?func=detail&aid=2750442&group_id=21935&atid=373747 + def collapse_docbook + # Double-quote stylesheet & file to help Windows cmd.exe + collapsed_file = File.join(File.expand_path(File.dirname(@docbook_file)), + '.collapsed.' + File.basename(@docbook_file)) + entity_collapse_command = %Q(xmllint --loaddtd --noent -o "#{collapsed_file}" "#{@docbook_file}") + entity_success = system(entity_collapse_command) + raise "Could not collapse named entites in #{@docbook_file}" unless entity_success + + xinclude_collapse_command = %Q(xmllint --xinclude -o "#{collapsed_file}" "#{collapsed_file}") + xinclude_success = system(xinclude_collapse_command) + raise "Could not collapse XIncludes in #{@docbook_file}" unless xinclude_success + + @to_delete << collapsed_file + return collapsed_file + end + + def copy_callouts + new_callout_images = [] + if has_callouts? + calloutglob = "#{CALLOUT_FULL_PATH}/*#{CALLOUT_EXT}" + Dir.glob(calloutglob).each {|img| + img_new_filename = File.join(@oebps_dir, CALLOUT_PATH, File.basename(img)) + + # TODO: What to rescue for these two? + FileUtils.mkdir_p(File.dirname(img_new_filename)) + FileUtils.cp(img, img_new_filename) + @to_delete << img_new_filename + new_callout_images << img + } + end + return new_callout_images + end + + def copy_fonts + new_fonts = [] + @embedded_fonts.each {|font_file| + font_new_filename = File.join(@oebps_dir, File.basename(font_file)) + FileUtils.cp(font_file, font_new_filename) + new_fonts << font_file + } + return new_fonts + end + + def copy_csses + if @css_file + css_new_filename = File.join(@oebps_dir, File.basename(@css_file)) + FileUtils.cp(@css_file, css_new_filename) + end + end + + def copy_images + image_references = get_image_refs() + new_images = [] + image_references.each {|img| + # TODO: It'd be cooler if we had a filetype lookup rather than just + # extension + if img =~ /\.(svg|png|gif|jpe?g|xml)/i + img_new_filename = File.join(@oebps_dir, img) + img_full = File.join(File.expand_path(File.dirname(@docbook_file)), img) + + # TODO: What to rescue for these two? + FileUtils.mkdir_p(File.dirname(img_new_filename)) + puts(img_full + ": " + img_new_filename) if $DEBUG + FileUtils.cp(img_full, img_new_filename) + @to_delete << img_new_filename + new_images << img_full + end + } + return new_images + end + + def write_mimetype + mimetype_filename = File.join(@output_dir, "mimetype") + File.open(mimetype_filename, "w") {|f| f.print MIMETYPE} + @to_delete << mimetype_filename + return File.basename(mimetype_filename) + end + + def cleanup_files(file_list) + file_list.flatten.each {|f| + # Yikes + FileUtils.rm_r(f, :force => true ) + } + end + + # Returns an Array of all of the (image) @filerefs in a document + def get_image_refs + parser = REXML::Parsers::PullParser.new(File.new(@collapsed_docbook_file)) + image_refs = [] + while parser.has_next? + el = parser.pull + if el.start_element? and (el[0] == "imagedata" or el[0] == "graphic") + image_refs << el[1]['fileref'] + end + end + return image_refs.uniq + end + + # Returns true if the document has code callouts + def has_callouts? + parser = REXML::Parsers::PullParser.new(File.new(@collapsed_docbook_file)) + while parser.has_next? + el = parser.pull + if el.start_element? and (el[0] == "calloutlist" or el[0] == "co") + return true + end + end + return false + end + end +end diff --git a/tools/cxxtest/doc/epub/bin/xslt/obfuscate.xsl b/tools/cxxtest/doc/epub/bin/xslt/obfuscate.xsl new file mode 100644 index 0000000..4ea4cd5 --- /dev/null +++ b/tools/cxxtest/doc/epub/bin/xslt/obfuscate.xsl @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> + <xsl:output method="xml" omit-xml-declaration="no" doctype-public="-//OASIS//DTD DocBook XML V4.4//EN" doctype-system="http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" indent="no"/> + <xsl:template match="@*|*|comment()|processing-instruction()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> + <xsl:template match="text()"> + <xsl:value-of select="replace(replace(., '[a-z]', 'x'), '[0-9]', 'd')"/> + </xsl:template> +</xsl:stylesheet> diff --git a/tools/cxxtest/doc/epub/docbook.xsl b/tools/cxxtest/doc/epub/docbook.xsl new file mode 100644 index 0000000..753fcd0 --- /dev/null +++ b/tools/cxxtest/doc/epub/docbook.xsl @@ -0,0 +1,1690 @@ +<?xml version="1.0"?> +<xsl:stylesheet + xmlns:db="http://docbook.org/ns/docbook" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:exsl="http://exslt.org/common" + xmlns:h="http://www.w3.org/1999/xhtml" + xmlns:ncx="http://www.daisy.org/z3986/2005/ncx/" + xmlns:ng="http://docbook.org/docbook-ng" + xmlns:opf="http://www.idpf.org/2007/opf" + xmlns:stext="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.TextFactory" + xmlns:str="http://exslt.org/strings" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:xtext="xalan://com.nwalsh.xalan.Text" + + extension-element-prefixes="stext xtext" + exclude-result-prefixes="exsl db dc h ncx ng opf stext str xtext" + + version="1.0"> + + <xsl:import href="../xhtml-1_1/docbook.xsl" /> + <xsl:import href="../xhtml-1_1/chunk-common.xsl" /> + <xsl:include href="../xhtml-1_1/chunk-code.xsl" /> + + + <!-- We want a separate TOC file, please --> + <xsl:param name="chunk.tocs.and.lots">1</xsl:param> + <xsl:param name="toc.section.depth">2</xsl:param> + <xsl:param name="generate.toc"> + book toc,title + </xsl:param> + + <xsl:param name="ade.extensions" select="0"/> + <xsl:param name="epub.autolabel" select="'1'"/> + <xsl:param name="epub.ncx.depth">4</xsl:param> <!-- Not functional until http://code.google.com/p/epubcheck/issues/detail?id=70 is resolved --> + + + <xsl:param name="manifest.in.base.dir" select="'1'"/> + <xsl:param name="base.dir" select="$epub.oebps.dir"/> + + <xsl:param name="epub.oebps.dir" select="'OEBPS/'"/> + <xsl:param name="epub.ncx.filename" select="'toc.ncx'"/> + <xsl:param name="epub.container.filename" select="'container.xml'"/> + <xsl:param name="epub.opf.filename" select="concat($epub.oebps.dir, 'content.opf')"/> + <xsl:param name="epub.cover.filename" select="concat($epub.oebps.dir, 'cover', $html.ext)"/> + <xsl:param name="epub.cover.id" select="'cover'"/> + <xsl:param name="epub.cover.html" select="'cover.html'" /> + <xsl:param name="epub.cover.image.id" select="'cover-image'"/> + <xsl:param name="epub.cover.linear" select="0" /> + <xsl:param name="epub.ncx.toc.id">ncxtoc</xsl:param> + <xsl:param name="epub.html.toc.id">htmltoc</xsl:param> + <xsl:param name="epub.metainf.dir" select="'META-INF/'"/> + + <xsl:param name="epub.embedded.fonts"></xsl:param> + + <!-- Turning this on crashes ADE, which is unbelievably awesome --> + <xsl:param name="formal.object.break.after">0</xsl:param> + + + <!-- Per Bob Stayton: + """Process your documents with the css.decoration parameter set to zero. + That will avoid the use of style attributes in XHTML elements where they are not permitted.""" + http://www.sagehill.net/docbookxsl/OtherOutputForms.html#StrictXhtmlValid --> + <xsl:param name="css.decoration" select="0"/> + <xsl:param name="custom.css.source"></xsl:param> <!-- FIXME: Align with current CSS parameter design --> + + <xsl:param name="callout.graphics" select="1"/> + <xsl:param name="callout.graphics.extension">.png</xsl:param> + <xsl:param name="callout.graphics.number.limit" select="15"/> + <xsl:param name="callout.graphics.path" select="'images/callouts/'"/> + + <!-- no navigation in .epub --> + <xsl:param name="suppress.navigation" select="'1'"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="node" select="/*"/> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="root.is.a.chunk"> + <xsl:choose> + <xsl:when test="/*[not(self::book)][not(sect1) or not(section)]"> + <xsl:text>1</xsl:text> + </xsl:when> + <xsl:when test="/book[*[last()][self::bookinfo]]|book[bookinfo]"> + <xsl:text>1</xsl:text> + </xsl:when> + <xsl:when test="/book[*[last()][self::info]]|book[info]"> + <xsl:text>1</xsl:text> + </xsl:when> + <xsl:when test="/bibliography"> + <xsl:text>1</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>0</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:key name="image-filerefs" match="graphic|inlinegraphic|imagedata" use="@fileref"/> + + <xsl:template match="/"> + <!-- * Get a title for current doc so that we let the user --> + <!-- * know what document we are processing at this point. --> + <xsl:variable name="doc.title"> + <xsl:call-template name="get.doc.title" /> + </xsl:variable> + <xsl:choose> + <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document, + toss the namespace and continue. Use the docbook5 namespaced + stylesheets for DocBook5 if you don't want to use this feature.--> + <!-- include extra test for Xalan quirk --> + <xsl:when test="$exsl.node.set.available != 0 + and (*/self::ng:* or */self::db:*)"> + <xsl:call-template name="log.message"> + <xsl:with-param name="level">Note</xsl:with-param> + <xsl:with-param name="source" select="$doc.title" /> + <xsl:with-param name="context-desc"> + <xsl:text>namesp. cut</xsl:text> + </xsl:with-param> + <xsl:with-param name="message"> + <xsl:text>stripped namespace before processing</xsl:text> + </xsl:with-param> + </xsl:call-template> + <xsl:variable name="nons"> + <xsl:apply-templates mode="stripNS" /> + </xsl:variable> + <xsl:call-template name="log.message"> + <xsl:with-param name="level">Note</xsl:with-param> + <xsl:with-param name="source" select="$doc.title" /> + <xsl:with-param name="context-desc"> + <xsl:text>namesp. cut</xsl:text> + </xsl:with-param> + <xsl:with-param name="message"> + <xsl:text>processing stripped document</xsl:text> + </xsl:with-param> + </xsl:call-template> + <xsl:apply-templates select="exsl:node-set($nons)" /> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$rootid != ''"> + <xsl:choose> + <xsl:when + test="count(key('id',$rootid)) = 0"> + <xsl:message terminate="yes"> + <xsl:text>ID '</xsl:text> + <xsl:value-of select="$rootid" /> + <xsl:text>' not found in document.</xsl:text> + </xsl:message> + </xsl:when> + <xsl:otherwise> + <xsl:if + test="$collect.xref.targets = 'yes' or + $collect.xref.targets = 'only'"> + <xsl:apply-templates + select="key('id', $rootid)" mode="collect.targets" /> + </xsl:if> + <xsl:if + test="$collect.xref.targets != 'only'"> + <xsl:message> + Formatting from + <xsl:value-of select="$rootid" /> + </xsl:message> + <xsl:apply-templates + select="key('id',$rootid)" mode="process.root" /> + <xsl:call-template name="ncx" /> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:if + test="$collect.xref.targets = 'yes' or + $collect.xref.targets = 'only'"> + <xsl:apply-templates select="/" + mode="collect.targets" /> + </xsl:if> + <xsl:if + test="$collect.xref.targets != 'only'"> + <xsl:apply-templates select="/" + mode="process.root" /> + <xsl:call-template name="ncx" /> + <xsl:call-template name="opf" /> + <xsl:call-template name="cover" /> + <xsl:call-template name="container" /> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="package-identifier"> + <xsl:choose> + <xsl:when test="/*/*[contains(name(.), 'info')]/biblioid"> + <xsl:if test="/*/*[contains(name(.), 'info')][1]/biblioid[1][@class = 'doi' or + @class = 'isbn' or + @class = 'isrn' or + @class = 'issn']"> + <xsl:text>urn:</xsl:text> + <xsl:value-of select="/*/*[contains(name(.), 'info')][1]/biblioid[1]/@class"/> + <xsl:text>:</xsl:text> + </xsl:if> + <xsl:value-of select="/*/*[contains(name(.), 'info')][1]/biblioid[1]"/> + </xsl:when> + <xsl:when test="/*/*[contains(name(.), 'info')]/isbn"> + <xsl:text>urn:isbn:</xsl:text> + <xsl:value-of select="/*/*[contains(name(.), 'info')][1]/isbn[1]"/> + </xsl:when> + <xsl:when test="/*/*[contains(name(.), 'info')]/issn"> + <xsl:text>urn:issn:</xsl:text> + <xsl:value-of select="/*/*[contains(name(.), 'info')][1]/issn[1]"/> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="/*/*[contains(name(.), 'info')]/invpartnumber"> <xsl:value-of select="/*/*[contains(name(.), 'info')][1]/invpartnumber[1]"/> </xsl:when> + <xsl:when test="/*/*[contains(name(.), 'info')]/issuenum"> <xsl:value-of select="/*/*[contains(name(.), 'info')][1]/issuenum[1]"/> </xsl:when> + <xsl:when test="/*/*[contains(name(.), 'info')]/productnumber"> <xsl:value-of select="/*/*[contains(name(.), 'info')][1]/productnumber[1]"/> </xsl:when> + <xsl:when test="/*/*[contains(name(.), 'info')]/seriesvolnums"> <xsl:value-of select="/*/*[contains(name(.), 'info')][1]/seriesvolnums[1]"/> </xsl:when> + <xsl:when test="/*/*[contains(name(.), 'info')]/volumenum"> <xsl:value-of select="/*/*[contains(name(.), 'info')][1]/volumenum[1]"/> </xsl:when> + <!-- Deprecated --> + <xsl:when test="/*/*[contains(name(.), 'info')]/pubsnumber"> <xsl:value-of select="/*/*[contains(name(.), 'info')][1]/pubsnumber[1]"/> </xsl:when> + </xsl:choose> + <xsl:text>_</xsl:text> + <xsl:choose> + <xsl:when test="/*/@id"> + <xsl:value-of select="/*/@id"/> + </xsl:when> + <xsl:when test="/*/@xml:id"> + <xsl:value-of select="/*/@xml:id"/> + </xsl:when> + <xsl:otherwise> + <!-- TODO: Do UUIDs here --> + <xsl:value-of select="generate-id(/*)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="opf"> + <xsl:variable name="package-identifier-id"><xsl:value-of select="concat(name(/*), 'id')"/></xsl:variable> + <xsl:variable name="doc.title"> + <xsl:call-template name="get.doc.title" /> + </xsl:variable> + <xsl:call-template name="write.chunk"> + <xsl:with-param name="filename"> + <xsl:value-of select="$epub.opf.filename" /> + </xsl:with-param> + <xsl:with-param name="method" select="'xml'" /> + <xsl:with-param name="encoding" select="'utf-8'" /> + <xsl:with-param name="indent" select="'no'" /> + <xsl:with-param name="quiet" select="$chunk.quietly" /> + <xsl:with-param name="doctype-public" select="''"/> <!-- intentionally blank --> + <xsl:with-param name="doctype-system" select="''"/> <!-- intentionally blank --> + <xsl:with-param name="content"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="package"> + <xsl:attribute name="version">2.0</xsl:attribute> + <xsl:attribute name="unique-identifier"> <xsl:value-of select="$package-identifier-id"/> </xsl:attribute> + + <xsl:element namespace="http://www.idpf.org/2007/opf" name="metadata"> + <xsl:element name="dc:identifier"> + <xsl:attribute name="id"><xsl:value-of select="$package-identifier-id"/></xsl:attribute> + <xsl:call-template name="package-identifier"/> + </xsl:element> + + <xsl:element name="dc:title"> + <xsl:value-of select="normalize-space($doc.title)"/> + </xsl:element> + + <xsl:apply-templates select="/*/*[contains(name(.), 'info')]/*" + mode="opf.metadata"/> + <xsl:element name="dc:language"> + <xsl:call-template name="l10n.language"> + <xsl:with-param name="target" select="/*"/> + </xsl:call-template> + </xsl:element> + + <xsl:if test="/*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="meta"> + <xsl:attribute name="name">cover</xsl:attribute> + <xsl:attribute name="content"> + <xsl:value-of select="$epub.cover.image.id"/> + </xsl:attribute> + </xsl:element> + </xsl:if> + + </xsl:element> + <xsl:call-template name="opf.manifest"/> + <xsl:call-template name="opf.spine"/> + <xsl:call-template name="opf.guide"/> + + </xsl:element> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <xsl:template name="container"> + <xsl:call-template name="write.chunk"> + <xsl:with-param name="filename"> + <xsl:value-of select="$epub.metainf.dir" /> + <xsl:value-of select="$epub.container.filename" /> + </xsl:with-param> + <xsl:with-param name="method" select="'xml'" /> + <xsl:with-param name="encoding" select="'utf-8'" /> + <xsl:with-param name="indent" select="'no'" /> + <xsl:with-param name="quiet" select="$chunk.quietly" /> + <xsl:with-param name="doctype-public" select="''"/> <!-- intentionally blank --> + <xsl:with-param name="doctype-system" select="''"/> <!-- intentionally blank --> + + <xsl:with-param name="content"> + <xsl:element namespace="urn:oasis:names:tc:opendocument:xmlns:container" name="container"> + <xsl:attribute name="version">1.0</xsl:attribute> + <xsl:element namespace="urn:oasis:names:tc:opendocument:xmlns:container" name="rootfiles"> + <xsl:element namespace="urn:oasis:names:tc:opendocument:xmlns:container" name="rootfile"> + <xsl:attribute name="full-path"> + <xsl:value-of select="$epub.opf.filename" /> + </xsl:attribute> + <xsl:attribute name="media-type"> + <xsl:text>application/oebps-package+xml</xsl:text> + </xsl:attribute> + </xsl:element> + </xsl:element> + </xsl:element> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <xsl:template name="ncx"> + <xsl:call-template name="write.chunk"> + <xsl:with-param name="filename"> + <xsl:if test="$manifest.in.base.dir != 0"> + <xsl:value-of select="$base.dir" /> + </xsl:if> + <xsl:value-of select="$epub.ncx.filename" /> + </xsl:with-param> + <xsl:with-param name="method" select="'xml'" /> + <xsl:with-param name="encoding" select="'utf-8'" /> + <xsl:with-param name="indent" select="'no'" /> + <xsl:with-param name="quiet" select="$chunk.quietly" /> + <xsl:with-param name="doctype-public" select="''"/> <!-- intentionally blank --> + <xsl:with-param name="doctype-system" select="''"/> <!-- intentionally blank --> + <xsl:with-param name="content"> + <xsl:element name="ncx" namespace="http://www.daisy.org/z3986/2005/ncx/"> + <xsl:attribute name="version">2005-1</xsl:attribute> + + <!-- Via Martin Goerner: On covers: the IDPF2.0 standard unfortunately does not have a provision for + covers. We had to add one and we did so in conjunction with the IDPF and + various publishers. The tag chosen to define the covers is: + <meta name="cover" content="-reference to a manifest item-"> + Then, we also added a bit of logic to get rid cleanly of the HTML cover + people usually add because the logical cover is not specced by the IDPF. So, + if the HTML cover item is marked linear="no" AND there is a guide item of + type="cover" pointing to it AND there is a logical cover specified in a + <meta name="cover"> tag, THEN, the HTML cover is discarded. --> + <xsl:element name="head" namespace="http://www.daisy.org/z3986/2005/ncx/"> + <xsl:if test="/*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"> + <xsl:element name="meta" namespace="http://www.daisy.org/z3986/2005/ncx/"> + <xsl:attribute name="name">cover</xsl:attribute> + <xsl:attribute name="content"> + <xsl:value-of select="$epub.cover.id"/> + </xsl:attribute> + </xsl:element> + </xsl:if> + <xsl:element name="meta" namespace="http://www.daisy.org/z3986/2005/ncx/"> + <xsl:attribute name="name">dtb:uid</xsl:attribute> + <xsl:attribute name="content"><xsl:call-template name="package-identifier"/></xsl:attribute> + </xsl:element> + </xsl:element> + + <xsl:choose> + <xsl:when test="$rootid != ''"> + <xsl:variable name="title"> + <xsl:if test="$epub.autolabel != 0"> + <xsl:variable name="label.markup"> + <xsl:apply-templates select="key('id',$rootid)" mode="label.markup" /> + </xsl:variable> + <xsl:if test="normalize-space($label.markup)"> + <xsl:value-of select="concat($label.markup,$autotoc.label.separator)" /> + </xsl:if> + </xsl:if> + <xsl:apply-templates select="key('id',$rootid)" mode="title.markup" /> + </xsl:variable> + <xsl:variable name="href"> + <xsl:call-template name="href.target.with.base.dir"> + <xsl:with-param name="object" select="key('id',$rootid)" /> + </xsl:call-template> + </xsl:variable> + <xsl:element name="docTitle" namespace="http://www.daisy.org/z3986/2005/ncx/"> + <xsl:element name="text" namespace="http://www.daisy.org/z3986/2005/ncx/"><xsl:value-of select="normalize-space($title)" /> </xsl:element> + </xsl:element> + <xsl:element name="navMap" namespace="http://www.daisy.org/z3986/2005/ncx/"> + <xsl:apply-templates select="key('id',$rootid)/*" mode="ncx" /> + </xsl:element> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="title"> + <xsl:if test="$epub.autolabel != 0"> + <xsl:variable name="label.markup"> + <xsl:apply-templates select="/*" mode="label.markup" /> + </xsl:variable> + <xsl:if test="normalize-space($label.markup)"> + <xsl:value-of select="concat($label.markup,$autotoc.label.separator)" /> + </xsl:if> + </xsl:if> + <xsl:apply-templates select="/*" mode="title.markup" /> + </xsl:variable> + <xsl:variable name="href"> + <xsl:call-template name="href.target.with.base.dir"> + <xsl:with-param name="object" select="/" /> + </xsl:call-template> + </xsl:variable> + <xsl:element name="docTitle" namespace="http://www.daisy.org/z3986/2005/ncx/"> + <xsl:element name="text" namespace="http://www.daisy.org/z3986/2005/ncx/"> + <xsl:value-of select="normalize-space($title)" /> + </xsl:element> + </xsl:element> + <xsl:element name="navMap" namespace="http://www.daisy.org/z3986/2005/ncx/"> + <xsl:choose> + <xsl:when test="$root.is.a.chunk != '0'"> + <xsl:apply-templates select="/*" mode="ncx" /> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="/*/*" mode="ncx" /> + </xsl:otherwise> + </xsl:choose> + </xsl:element> + </xsl:otherwise> + + </xsl:choose> + </xsl:element> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <xsl:template match="book| + article| + part| + reference| + preface| + chapter| + bibliography| + appendix| + glossary| + section| + sect1| + sect2| + sect3| + sect4| + sect5| + refentry| + colophon| + bibliodiv[title]| + setindex| + index" + mode="ncx"> + <xsl:variable name="depth" select="count(ancestor::*)"/> + <xsl:variable name="title"> + <xsl:if test="$epub.autolabel != 0"> + <xsl:variable name="label.markup"> + <xsl:apply-templates select="." mode="label.markup" /> + </xsl:variable> + <xsl:if test="normalize-space($label.markup)"> + <xsl:value-of + select="concat($label.markup,$autotoc.label.separator)" /> + </xsl:if> + </xsl:if> + <xsl:apply-templates select="." mode="title.markup" /> + </xsl:variable> + + <xsl:variable name="href"> + <xsl:call-template name="href.target.with.base.dir"> + <xsl:with-param name="context" select="/" /> + <!-- Generate links relative to the location of root file/toc.xml file --> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="id"> + <xsl:value-of select="generate-id(.)"/> + </xsl:variable> + <xsl:variable name="order"> + <xsl:value-of select="$depth + + count(preceding::part| + preceding::reference| + preceding::book[parent::set]| + preceding::preface| + preceding::chapter| + preceding::bibliography| + preceding::appendix| + preceding::article| + preceding::glossary| + preceding::section[not(parent::partintro)]| + preceding::sect1[not(parent::partintro)]| + preceding::sect2[not(ancestor::partintro)]| + preceding::sect3[not(ancestor::partintro)]| + preceding::sect4[not(ancestor::partintro)]| + preceding::sect5[not(ancestor::partintro)]| + preceding::refentry| + preceding::colophon| + preceding::bibliodiv[title]| + preceding::index)"/> + </xsl:variable> + + <xsl:element name="navPoint" namespace="http://www.daisy.org/z3986/2005/ncx/"> + <xsl:attribute name="id"> + <xsl:value-of select="$id"/> + </xsl:attribute> + + <xsl:attribute name="playOrder"> + <xsl:choose> + <xsl:when test="/*[self::set]"> + <xsl:value-of select="$order"/> + </xsl:when> + <xsl:when test="$root.is.a.chunk != '0'"> + <xsl:value-of select="$order + 1"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$order - 0"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:element name="navLabel" namespace="http://www.daisy.org/z3986/2005/ncx/"> + <xsl:element name="text" namespace="http://www.daisy.org/z3986/2005/ncx/"><xsl:value-of select="normalize-space($title)"/> </xsl:element> + </xsl:element> + <xsl:element name="content" namespace="http://www.daisy.org/z3986/2005/ncx/"> + <xsl:attribute name="src"> + <xsl:value-of select="$href"/> + </xsl:attribute> + </xsl:element> + <xsl:apply-templates select="book[parent::set]|part|reference|preface|chapter|bibliography|appendix|article|glossary|section|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv[title]|setindex|index" mode="ncx"/> + </xsl:element> + + </xsl:template> + + <xsl:template match="*" mode="opf.metadata"> + <!-- override if you care --> + </xsl:template> + + <xsl:template match="authorgroup" mode="opf.metadata"> + <xsl:apply-templates select="author|corpauthor" mode="opf.metadata"/> + </xsl:template> + + <xsl:template match="author|corpauthor" mode="opf.metadata"> + <xsl:variable name="n"> + <xsl:call-template name="person.name"> + <xsl:with-param name="node" select="."/> + </xsl:call-template> + </xsl:variable> + <xsl:element name="dc:creator"> + <xsl:attribute name="opf:file-as"> + <xsl:call-template name="person.name.last-first"> + <xsl:with-param name="node" select="."/> + </xsl:call-template> + </xsl:attribute> + <xsl:value-of select="normalize-space(string($n))"/> + </xsl:element> + </xsl:template> + + <xsl:template match="date" mode="opf.metadata"> + <xsl:element name="dc:date"> + <xsl:value-of select="normalize-space(string(.))"/> + </xsl:element> + </xsl:template> + + + <!-- Space separate the compontents of the abstract (dropping the inline markup, sadly) --> + <xsl:template match="abstract" mode="opf.metadata"> + <xsl:element name="dc:description"> + <xsl:for-each select="formalpara|para|simpara|title"> + <xsl:choose> + <xsl:when test="self::formalpara"> + <xsl:value-of select="normalize-space(string(title))"/> + <xsl:text>: </xsl:text> + <xsl:value-of select="normalize-space(string(para))"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="normalize-space(string(.))"/> + </xsl:otherwise> + </xsl:choose> + <xsl:if test="self::title"> + <xsl:text>:</xsl:text> + </xsl:if> + <xsl:if test="not(position() = last())"> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:for-each> + </xsl:element> + </xsl:template> + + <xsl:template match="subjectset" mode="opf.metadata"> + <xsl:apply-templates select="subject/subjectterm" mode="opf.metadata"/> + </xsl:template> + + <xsl:template match="subjectterm" mode="opf.metadata"> + <xsl:element name="dc:subject"> + <xsl:value-of select="normalize-space(string(.))"/> + </xsl:element> + </xsl:template> + + <xsl:template match="publisher" mode="opf.metadata"> + <xsl:apply-templates select="publishername" mode="opf.metadata"/> + </xsl:template> + + <xsl:template match="publishername" mode="opf.metadata"> + <xsl:element name="dc:publisher"> + <xsl:value-of select="normalize-space(string(.))"/> + </xsl:element> + </xsl:template> + + <xsl:template match="copyright" mode="opf.metadata"> + <xsl:variable name="copyright.date"> + <xsl:call-template name="copyright.years"> + <xsl:with-param name="years" select="year"/> + <xsl:with-param name="print.ranges" select="$make.year.ranges"/> + <xsl:with-param name="single.year.ranges" select="$make.single.year.ranges"/> + </xsl:call-template> + </xsl:variable> + <xsl:if test="not(../date)"> + <xsl:element name="dc:date"> + <xsl:call-template name="copyright.years"> + <xsl:with-param name="years" select="year[last()]"/> + <xsl:with-param name="print.ranges" select="0"/> + <xsl:with-param name="single.year.ranges" select="0"/> + </xsl:call-template> + </xsl:element> + </xsl:if> + <xsl:element name="dc:rights"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'Copyright'"/> + </xsl:call-template> + <xsl:call-template name="gentext.space"/> + <xsl:text>©</xsl:text> + <xsl:call-template name="gentext.space"/> + <xsl:value-of select="$copyright.date"/> + <xsl:call-template name="gentext.space"/> + <xsl:apply-templates select="holder" mode="titlepage.mode"/> + </xsl:element> + </xsl:template> + + <xsl:template name="opf.guide"> + <xsl:if test="contains($toc.params, 'toc') or + /*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="guide"> + <xsl:if test="/*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="reference"> + <xsl:attribute name="href"> + <xsl:value-of select="$epub.cover.html" /> + </xsl:attribute> + <xsl:attribute name="type">cover</xsl:attribute> + <xsl:attribute name="title">Cover</xsl:attribute> + </xsl:element> + </xsl:if> + + <xsl:if test="contains($toc.params, 'toc')"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="reference"> + <xsl:attribute name="href"> + <xsl:call-template name="toc-href"> + <xsl:with-param name="node" select="/*"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="type">toc</xsl:attribute> + <xsl:attribute name="title">Table of Contents</xsl:attribute> + </xsl:element> + </xsl:if> + </xsl:element> + </xsl:if> + </xsl:template> + + <xsl:template name="opf.spine"> + + <xsl:element namespace="http://www.idpf.org/2007/opf" name="spine"> + <xsl:attribute name="toc"> + <xsl:value-of select="$epub.ncx.toc.id"/> + </xsl:attribute> + + <xsl:if test="/*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="itemref"> + <xsl:attribute name="idref"> + <xsl:value-of select="$epub.cover.id"/> + </xsl:attribute> + <xsl:attribute name="linear"> + <xsl:choose> + <xsl:when test="$epub.cover.linear"> + <xsl:text>yes</xsl:text> + </xsl:when> + <xsl:otherwise>no</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:element> + </xsl:if> + + + <xsl:if test="contains($toc.params, 'toc')"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="itemref"> + <xsl:attribute name="idref"> <xsl:value-of select="$epub.html.toc.id"/> </xsl:attribute> + <xsl:attribute name="linear">yes</xsl:attribute> + </xsl:element> + </xsl:if> + + <!-- TODO: be nice to have a idref="titlepage" here --> + <xsl:choose> + <xsl:when test="$root.is.a.chunk != '0'"> + <xsl:apply-templates select="/*" mode="opf.spine"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="/*/*" mode="opf.spine"/> + </xsl:otherwise> + </xsl:choose> + + </xsl:element> + </xsl:template> + + <xsl:template match="*" mode="opf.spine"> + <xsl:variable name="is.chunk"> + <xsl:call-template name="chunk"> + <xsl:with-param name="node" select="."/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="$is.chunk != 0"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="itemref"> + <xsl:attribute name="idref"> + <xsl:value-of select="generate-id(.)"/> + </xsl:attribute> + </xsl:element> + <xsl:apply-templates select="*|.//refentry" mode="opf.spine"/> + </xsl:if> + </xsl:template> + + <xsl:template name="opf.manifest"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="manifest"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="item"> + <xsl:attribute name="id"> <xsl:value-of select="$epub.ncx.toc.id"/> </xsl:attribute> + <xsl:attribute name="media-type">application/x-dtbncx+xml</xsl:attribute> + <xsl:attribute name="href"><xsl:value-of select="$epub.ncx.filename"/> </xsl:attribute> + </xsl:element> + + <xsl:if test="contains($toc.params, 'toc')"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="item"> + <xsl:attribute name="id"> <xsl:value-of select="$epub.html.toc.id"/> </xsl:attribute> + <xsl:attribute name="media-type">application/xhtml+xml</xsl:attribute> + <xsl:attribute name="href"> + <xsl:call-template name="toc-href"> + <xsl:with-param name="node" select="/*"/> + </xsl:call-template> + </xsl:attribute> + </xsl:element> + </xsl:if> + + <xsl:if test="$html.stylesheet != ''"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="item"> + <xsl:attribute name="media-type">text/css</xsl:attribute> + <xsl:attribute name="id">css</xsl:attribute> + <xsl:attribute name="href"><xsl:value-of select="$html.stylesheet"/></xsl:attribute> + </xsl:element> + </xsl:if> + + <xsl:if test="/*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="item"> + <xsl:attribute name="id"> <xsl:value-of select="$epub.cover.id"/> </xsl:attribute> + <xsl:attribute name="href"> + <xsl:value-of select="$epub.cover.html"/> + </xsl:attribute> + <xsl:attribute name="media-type">application/xhtml+xml</xsl:attribute> + </xsl:element> + </xsl:if> + + <xsl:choose> + <xsl:when test="$epub.embedded.fonts != '' and not(contains($epub.embedded.fonts, ','))"> + <xsl:call-template name="embedded-font-item"> + <xsl:with-param name="font.file" select="$epub.embedded.fonts"/> <!-- There is just one --> + </xsl:call-template> + </xsl:when> + <xsl:when test="$epub.embedded.fonts != ''"> + <xsl:variable name="font.file.tokens" select="str:tokenize($epub.embedded.fonts, ',')"/> + <xsl:for-each select="exsl:node-set($font.file.tokens)"> + <xsl:call-template name="embedded-font-item"> + <xsl:with-param name="font.file" select="."/> + <xsl:with-param name="font.order" select="position()"/> + </xsl:call-template> + </xsl:for-each> + </xsl:when> + </xsl:choose> + + <!-- TODO: be nice to have a id="titlepage" here --> + <xsl:apply-templates select="//part| + //book[*[last()][self::bookinfo]]| + //book[bookinfo]| + /set| + /set/book| + //reference| + //preface| + //chapter| + //bibliography| + //appendix| + //article| + //glossary| + //section| + //sect1| + //sect2| + //sect3| + //sect4| + //sect5| + //refentry| + //colophon| + //bibliodiv[title]| + //index| + //setindex| + //graphic| + //inlinegraphic| + //mediaobject| + //mediaobjectco| + //inlinemediaobject" + mode="opf.manifest"/> + <xsl:call-template name="opf.calloutlist"/> + </xsl:element> + </xsl:template> + + <xsl:template name="opf.calloutlist"> + <xsl:variable name="format"> + <xsl:call-template name="guess-media-type"> + <xsl:with-param name="ext" select="$callout.graphics.extension"/> + </xsl:call-template> + </xsl:variable> + <xsl:if test="(//calloutlist|//co)"> + <xsl:call-template name="opf.reference.callout"> + <xsl:with-param name="conum" select="1"/> + <xsl:with-param name="format" select="$format"/> + </xsl:call-template> + </xsl:if> + </xsl:template> + + <xsl:template name="opf.reference.callout"> + <xsl:param name="conum"/> + <xsl:param name="format"/> + + <xsl:variable name="filename" select="concat($callout.graphics.path, $conum, $callout.graphics.extension)"/> + + <xsl:element namespace="http://www.idpf.org/2007/opf" name="item"> + <xsl:attribute name="id"> <xsl:value-of select="concat(generate-id(.), 'callout', $conum)"/> </xsl:attribute> + <xsl:attribute name="href"> <xsl:value-of select="$filename"/> </xsl:attribute> + <xsl:attribute name="media-type"> + <xsl:value-of select="$format"/> + </xsl:attribute> + </xsl:element> + <xsl:if test="($conum < $callout.graphics.number.limit)"> + <xsl:call-template name="opf.reference.callout"> + <xsl:with-param name="conum" select="$conum + 1"/> + <xsl:with-param name="format" select="$format"/> + </xsl:call-template> + </xsl:if> + </xsl:template> + + <xsl:template name="guess-media-type"> + <xsl:param name="ext"></xsl:param> + <xsl:choose> + <xsl:when test="contains($ext, '.gif')"> + <xsl:text>image/gif</xsl:text> + </xsl:when> + <xsl:when test="contains($ext, 'GIF')"> + <xsl:text>image/gif</xsl:text> + </xsl:when> + <xsl:when test="contains($ext, '.png')"> + <xsl:text>image/png</xsl:text> + </xsl:when> + <xsl:when test="contains($ext, 'PNG')"> + <xsl:text>image/png</xsl:text> + </xsl:when> + <xsl:when test="contains($ext, '.jpeg')"> + <xsl:text>image/jpeg</xsl:text> + </xsl:when> + <xsl:when test="contains($ext, 'JPEG')"> + <xsl:text>image/jpeg</xsl:text> + </xsl:when> + <xsl:when test="contains($ext, '.jpg')"> + <xsl:text>image/jpeg</xsl:text> + </xsl:when> + <xsl:when test="contains($ext, 'JPG')"> + <xsl:text>image/jpeg</xsl:text> + </xsl:when> + <xsl:when test="contains($ext, '.svg')"> + <xsl:text>image/svg+xml</xsl:text> + </xsl:when> + <xsl:when test="contains($ext, 'SVG')"> + <xsl:text>image/svg+xml</xsl:text> + </xsl:when> + <xsl:otherwise> + <!-- we failed --> + <xsl:text></xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="mediaobject| + mediaobjectco| + inlinemediaobject" + mode="opf.manifest"> + + <xsl:variable name="olist" select="imageobject|imageobjectco |videoobject|audioobject |textobject"/> + + <xsl:variable name="object.index"> + <xsl:call-template name="select.mediaobject.index"> + <xsl:with-param name="olist" select="$olist"/> + <xsl:with-param name="count" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="object" select="$olist[position() = $object.index]"/> + + <xsl:choose> + <xsl:when test="$object/descendant::imagedata[@format = 'GIF' or + @format = 'GIF87a' or + @format = 'GIF89a' or + @format = 'JPEG' or + @format = 'JPG' or + @format = 'PNG' or + @format = 'SVG']"> + <xsl:apply-templates select="$object[descendant::imagedata[@format = 'GIF' or + @format = 'GIF87a' or + @format = 'GIF89a' or + @format = 'JPEG' or + @format = 'JPG' or + @format = 'PNG' or + @format = 'SVG']][1]/imagedata" + mode="opf.manifest"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$object/imagedata[1]" + mode="opf.manifest"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="cover/mediaobject| + mediaobject[@role='cover']" + mode="opf.manifest"> + <xsl:choose> + <xsl:when test="imageobject[@role='front-large']"> + <xsl:apply-templates select="imageobject[@role='front-large']/imagedata" + mode="opf.manifest"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="imageobject/imagedata[1]" + mode="opf.manifest"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="mediaobjectco" + mode="opf.manifest"> + <xsl:message>WARNING: mediaobjectco almost certainly will not render as expected in .epub!</xsl:message> + <xsl:apply-templates select="imageobjectco/imageobject/imagedata" + mode="opf.manifest"/> + </xsl:template> + + <!-- TODO: Barf (xsl:message terminate=yes) if you find a graphic with no reasonable format or a mediaobject w/o same? [option to not die?] --> + + <!-- wish I had XSLT2 ...--> + <!-- TODO: priority a hack --> + <xsl:template match="graphic[not(@format)]| + inlinegraphic[not(@format)]| + imagedata[not(@format)]" + mode="opf.manifest"> + <xsl:variable name="filename"> + <xsl:choose> + <xsl:when test="contains(name(.), 'graphic')"> + <xsl:choose> + <xsl:when test="@entityref"> + <xsl:value-of select="unparsed-entity-uri(@entityref)"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="@fileref"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="mediaobject.filename"> + <xsl:with-param name="object" select=".."/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="format"> + <xsl:call-template name="guess-media-type"> + <xsl:with-param name="ext" select="@fileref"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="fr" select="@fileref"/> + <xsl:if test="$format != ''"> + <!-- only do this if we're the first file to match --> + <!-- TODO: Why can't this be simple equality?? (I couldn't get it to work) --> + <xsl:if test="generate-id(.) = generate-id(key('image-filerefs', $fr)[1])"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="item"> + <xsl:attribute name="id"> + <xsl:choose> + <xsl:when test="ancestor::mediaobject[@role='cover'] and parent::*[@role='front-large']"> + <xsl:value-of select="$epub.cover.image.id"/> + </xsl:when> + <xsl:when test="ancestor::mediaobject[@role='cover'] and (count(ancestor::mediaobject//imageobject) = 1)"> + <xsl:value-of select="$epub.cover.image.id"/> + </xsl:when> + <xsl:when test="ancestor::cover"> + <xsl:value-of select="$epub.cover.image.id"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="generate-id(.)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:attribute name="href"> <xsl:value-of select="$filename"/> </xsl:attribute> + <xsl:attribute name="media-type"> + <xsl:value-of select="$format"/> + </xsl:attribute> + </xsl:element> + </xsl:if> + </xsl:if> + </xsl:template> + + <!-- Note: Selection of the first interesting imagedata is done in the select --> + <xsl:template match="graphic[@format = 'GIF' or @format = 'GIF87a' or @format = 'GIF89a' or @format = 'JPEG' or @format = 'JPG' or @format = 'PNG' or @format = 'SVG']| + inlinegraphic[@format = 'GIF' or @format = 'GIF87a' or @format = 'GIF89a' or @format = 'JPEG' or @format = 'JPG' or @format = 'PNG' or @format = 'SVG']| + imagedata[@format]" + mode="opf.manifest"> + <xsl:variable name="filename"> + <xsl:choose> + <xsl:when test="contains(name(.), 'graphic')"> + <xsl:choose> + <xsl:when test="@entityref"> + <xsl:value-of select="unparsed-entity-uri(@entityref)"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="@fileref"/> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="mediaobject.filename"> + <xsl:with-param name="object" select=".."/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="fr" select="@fileref"/> + <!-- only do this if we're the first file to match --> + <!-- TODO: Why can't this be simple equality?? (I couldn't get it to work) --> + <xsl:if test="generate-id(.) = generate-id(key('image-filerefs', $fr)[1])"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="item"> + <xsl:attribute name="id"> + <xsl:choose> + <xsl:when test="ancestor::mediaobject[@role='cover'] and parent::*[@role='front-large']"> + <xsl:value-of select="$epub.cover.image.id"/> + </xsl:when> + <xsl:when test="ancestor::mediaobject[@role='cover'] and (count(ancestor::mediaobject//imageobject) = 1)"> + <xsl:value-of select="$epub.cover.image.id"/> + </xsl:when> + <xsl:when test="ancestor::cover"> + <xsl:value-of select="$epub.cover.image.id"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="generate-id(.)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:attribute name="href"> <xsl:value-of select="$filename"/> </xsl:attribute> + <xsl:attribute name="media-type"> + <xsl:call-template name="guess-media-type"> + <xsl:with-param name="ext" select="@format"/> + </xsl:call-template> + </xsl:attribute> + </xsl:element> + </xsl:if> + </xsl:template> + + <!-- Warning: While the test indicate this match list is accurate, it may + need further tweaking to ensure _never_ dropping generated content (XHTML) + from the manifest (OPF file) --> + <xsl:template + match="set| + book[parent::set]| + book[*[last()][self::bookinfo]]| + book[bookinfo]| + article| + part| + reference| + preface| + chapter| + bibliography| + appendix| + glossary| + section| + sect1| + sect2| + sect3| + sect4| + sect5| + refentry| + colophon| + bibliodiv[title]| + setindex| + index" + mode="opf.manifest"> + <xsl:variable name="href"> + <xsl:call-template name="href.target.with.base.dir"> + <xsl:with-param name="context" select="/" /> + <!-- Generate links relative to the location of root file/toc.xml file --> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="id"> + <xsl:value-of select="generate-id(.)"/> + </xsl:variable> + + <xsl:variable name="is.chunk"> + <xsl:call-template name="chunk"> + <xsl:with-param name="node" select="."/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="$is.chunk != 0"> + <xsl:element namespace="http://www.idpf.org/2007/opf" name="item"> + <xsl:attribute name="id"> <xsl:value-of select="$id"/> </xsl:attribute> + <xsl:attribute name="href"> <xsl:value-of select="$href"/> </xsl:attribute> + <xsl:attribute name="media-type">application/xhtml+xml</xsl:attribute> + </xsl:element> + </xsl:if> + </xsl:template> + + <xsl:template match="text()" mode="ncx" /> + + <xsl:template name="html.head"> + <xsl:param name="prev" select="/foo"/> + <xsl:param name="next" select="/foo"/> + <xsl:variable name="this" select="."/> + <xsl:variable name="home" select="/*[1]"/> + <xsl:variable name="up" select="parent::*"/> + + <head xmlns="http://www.w3.org/1999/xhtml"> + <xsl:call-template name="system.head.content"/> + <xsl:call-template name="head.content"/> + + <xsl:call-template name="user.head.content"/> + </head> + </xsl:template> + + <!-- OVERRIDES xhtml-1_1/graphics.xsl --> + <!-- we can't deal with no img/@alt, because it's required. Try grabbing a title before it instead (hopefully meaningful) --> + <xsl:template name="process.image.attributes"> + <xsl:param name="alt"/> + <xsl:param name="html.width"/> + <xsl:param name="html.depth"/> + <xsl:param name="longdesc"/> + <xsl:param name="scale"/> + <xsl:param name="scalefit"/> + <xsl:param name="scaled.contentdepth"/> + <xsl:param name="scaled.contentwidth"/> + <xsl:param name="viewport"/> + + <xsl:choose> + <xsl:when test="@contentwidth or @contentdepth"> + <!-- ignore @width/@depth, @scale, and @scalefit if specified --> + <xsl:if test="@contentwidth and $scaled.contentwidth != ''"> + <xsl:attribute name="width"> + <xsl:value-of select="$scaled.contentwidth"/> + </xsl:attribute> + </xsl:if> + <xsl:if test="@contentdepth and $scaled.contentdepth != ''"> + <xsl:attribute name="height"> + <xsl:value-of select="$scaled.contentdepth"/> + </xsl:attribute> + </xsl:if> + </xsl:when> + + <xsl:when test="number($scale) != 1.0"> + <!-- scaling is always uniform, so we only have to specify one dimension --> + <!-- ignore @scalefit if specified --> + <xsl:attribute name="width"> + <xsl:value-of select="$scaled.contentwidth"/> + </xsl:attribute> + </xsl:when> + + <xsl:when test="$scalefit != 0"> + <xsl:choose> + <xsl:when test="contains($html.width, '%')"> + <xsl:choose> + <xsl:when test="$viewport != 0"> + <!-- The *viewport* will be scaled, so use 100% here! --> + <xsl:attribute name="width"> + <xsl:value-of select="'100%'"/> + </xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="width"> + <xsl:value-of select="$html.width"/> + </xsl:attribute> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:when test="contains($html.depth, '%')"> + <!-- HTML doesn't deal with this case very well...do nothing --> + </xsl:when> + + <xsl:when test="$scaled.contentwidth != '' and $html.width != '' and $scaled.contentdepth != '' and $html.depth != ''"> + <!-- scalefit should not be anamorphic; figure out which direction --> + <!-- has the limiting scale factor and scale in that direction --> + <xsl:choose> + <xsl:when test="$html.width div $scaled.contentwidth > $html.depth div $scaled.contentdepth"> + <xsl:attribute name="height"> + <xsl:value-of select="$html.depth"/> + </xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:attribute name="width"> + <xsl:value-of select="$html.width"/> + </xsl:attribute> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + + <xsl:when test="$scaled.contentwidth != '' and $html.width != ''"> + <xsl:attribute name="width"> + <xsl:value-of select="$html.width"/> + </xsl:attribute> + </xsl:when> + + <xsl:when test="$scaled.contentdepth != '' and $html.depth != ''"> + <xsl:attribute name="height"> + <xsl:value-of select="$html.depth"/> + </xsl:attribute> + </xsl:when> + </xsl:choose> + </xsl:when> + </xsl:choose> + + <!-- AN OVERRIDE --> + <xsl:if test="not(@format ='SVG')"> + <xsl:attribute name="alt"> + <xsl:choose> + <xsl:when test="$alt != ''"> + <xsl:value-of select="normalize-space($alt)"/> + </xsl:when> + <xsl:when test="preceding::title[1]"> + <xsl:value-of select="normalize-space(preceding::title[1])"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>(missing alt)</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> + <!-- END OF OVERRIDE --> + + <xsl:if test="$longdesc != ''"> + <xsl:attribute name="longdesc"> + <xsl:value-of select="$longdesc"/> + </xsl:attribute> + </xsl:if> + + <xsl:if test="@align and $viewport = 0"> + <xsl:attribute name="style"><xsl:text>text-align: </xsl:text> + <xsl:choose> + <xsl:when test="@align = 'center'">middle</xsl:when> + <xsl:otherwise> + <xsl:value-of select="@align"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:if> + </xsl:template> + + <!-- OVERRIDES xhtml-1_1/chunk-common.xsl --> + <!-- make a bibliography always a chunk --> + <xsl:template name="chunk" + priority="1"> + <xsl:param name="node" select="."/> + <!-- returns 1 if $node is a chunk --> + + <!-- ==================================================================== --> + <!-- What's a chunk? + + The root element + appendix + article + bibliography ### NO LONGER TRUE in article or part or book + book + chapter + colophon + glossary in article or part or book + index in article or part or book + part + preface + refentry + reference + sect{1,2,3,4,5} if position()>1 && depth < chunk.section.depth + section if position()>1 && depth < chunk.section.depth + set + setindex + --> + <!-- ==================================================================== --> + + <!-- + <xsl:message> + <xsl:text>chunk: </xsl:text> + <xsl:value-of select="name($node)"/> + <xsl:text>(</xsl:text> + <xsl:value-of select="$node/@id"/> + <xsl:text>)</xsl:text> + <xsl:text> csd: </xsl:text> + <xsl:value-of select="$chunk.section.depth"/> + <xsl:text> cfs: </xsl:text> + <xsl:value-of select="$chunk.first.sections"/> + <xsl:text> ps: </xsl:text> + <xsl:value-of select="count($node/parent::section)"/> + <xsl:text> prs: </xsl:text> + <xsl:value-of select="count($node/preceding-sibling::section)"/> + </xsl:message> + --> + + <xsl:choose> + <xsl:when test="not($node/parent::*)">1</xsl:when> + + <xsl:when test="local-name($node) = 'sect1' and $chunk.section.depth >= 1 and ($chunk.first.sections != 0 or count($node/preceding-sibling::sect1) > 0)"> + <xsl:text>1</xsl:text> + </xsl:when> + <xsl:when test="local-name($node) = 'sect2' and $chunk.section.depth >= 2 and ($chunk.first.sections != 0 or count($node/preceding-sibling::sect2) > 0)"> + <xsl:call-template name="chunk"> + <xsl:with-param name="node" select="$node/parent::*"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="local-name($node) = 'sect3' and $chunk.section.depth >= 3 and ($chunk.first.sections != 0 or count($node/preceding-sibling::sect3) > 0)"> + <xsl:call-template name="chunk"> + <xsl:with-param name="node" select="$node/parent::*"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="local-name($node) = 'sect4' and $chunk.section.depth >= 4 and ($chunk.first.sections != 0 or count($node/preceding-sibling::sect4) > 0)"> + <xsl:call-template name="chunk"> + <xsl:with-param name="node" select="$node/parent::*"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="local-name($node) = 'sect5' and $chunk.section.depth >= 5 and ($chunk.first.sections != 0 or count($node/preceding-sibling::sect5) > 0)"> + <xsl:call-template name="chunk"> + <xsl:with-param name="node" select="$node/parent::*"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="local-name($node) = 'section' and $chunk.section.depth >= count($node/ancestor::section)+1 and ($chunk.first.sections != 0 or count($node/preceding-sibling::section) > 0)"> + <xsl:call-template name="chunk"> + <xsl:with-param name="node" select="$node/parent::*"/> + </xsl:call-template> + </xsl:when> + + <xsl:when test="local-name($node)='preface'">1</xsl:when> + <xsl:when test="local-name($node)='chapter'">1</xsl:when> + <xsl:when test="local-name($node)='appendix'">1</xsl:when> + <xsl:when test="local-name($node)='article'">1</xsl:when> + <xsl:when test="local-name($node)='part'">1</xsl:when> + <xsl:when test="local-name($node)='reference'">1</xsl:when> + <xsl:when test="local-name($node)='refentry'">1</xsl:when> + <xsl:when test="local-name($node)='index' and ($generate.index != 0 or count($node/*) > 0) and (local-name($node/parent::*) = 'article' or local-name($node/parent::*) = 'book' or local-name($node/parent::*) = 'part' )">1</xsl:when> + <!-- AN OVERRIDE --> + <xsl:when test="local-name($node)='bibliography'">1</xsl:when> + <!-- END OF OVERRIDE --> + <xsl:when test="local-name($node)='glossary' and (local-name($node/parent::*) = 'article' or local-name($node/parent::*) = 'book' or local-name($node/parent::*) = 'part' )">1</xsl:when> + <xsl:when test="local-name($node)='colophon'">1</xsl:when> + <xsl:when test="local-name($node)='book'">1</xsl:when> + <xsl:when test="local-name($node)='set'">1</xsl:when> + <xsl:when test="local-name($node)='setindex'">1</xsl:when> + <xsl:when test="local-name($node)='legalnotice' and $generate.legalnotice.link != 0">1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> + </xsl:template> + + <!-- OVERRIDES xhtml-1_1/chunk-code.xsl --> + <!-- Add chunking for bibliography as root element --> + <!-- AN OVERRIDE --> + <xsl:template match="set| + book| + part| + preface| + chapter| + appendix| + article| + reference| + refentry| + book/glossary| + article/glossary| + part/glossary| + bibliography| + colophon" + priority="1"> + <!-- END OF OVERRIDE --> + <xsl:choose> + <xsl:when test="$onechunk != 0 and parent::*"> + <xsl:apply-imports/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="process-chunk-element"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <!-- OVERRIDES xhtml-1_1/graphics.xsl --> + <!-- Do _NOT_ output any xlink garbage, so if you don't have + processor with extensions, you're screwed and we're terminating --> + <xsl:template match="inlinegraphic"> + <xsl:variable name="filename"> + <xsl:choose> + <xsl:when test="@entityref"> + <xsl:value-of select="unparsed-entity-uri(@entityref)"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="@fileref"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:call-template name="anchor"/> + + <xsl:choose> + <xsl:when test="@format='linespecific'"> + <xsl:choose> + <xsl:when test="$use.extensions != '0' and $textinsert.extension != '0'"> + <xsl:choose> + <xsl:when test="element-available('stext:insertfile')"> + <stext:insertfile href="{$filename}" encoding="{$textdata.default.encoding}"/> + </xsl:when> + <xsl:when test="element-available('xtext:insertfile')"> + <xtext:insertfile href="{$filename}"/> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>No insertfile extension available.</xsl:text> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <!-- AN OVERRIDE --> + <xsl:message terminate="yes"> + <xsl:text>No insertfile extension available. Use a different processor (with extensions) or turn on $use.extensions and $textinsert.extension (see docs for more). </xsl:text> + </xsl:message> + <!-- END OF OVERRIDE --> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="process.image"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="cover"> + <xsl:apply-templates select="/*/*[contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"/> + </xsl:template> + + <xsl:template match="/*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"> + <xsl:call-template name="write.chunk"> + <xsl:with-param name="filename"> + <xsl:value-of select="$epub.cover.filename" /> + </xsl:with-param> + <xsl:with-param name="method" select="'xml'" /> + <xsl:with-param name="encoding" select="'utf-8'" /> + <xsl:with-param name="indent" select="'no'" /> + <xsl:with-param name="quiet" select="$chunk.quietly" /> + <xsl:with-param name="content"> + <xsl:element namespace="http://www.w3.org/1999/xhtml" name="html"> + <xsl:element namespace="http://www.w3.org/1999/xhtml" name="head"> + <xsl:element namespace="http://www.w3.org/1999/xhtml" name="title">Cover</xsl:element> + <xsl:element namespace="http://www.w3.org/1999/xhtml" name="style"> + <xsl:attribute name="type">text/css</xsl:attribute> + <!-- Help the cover image scale nicely in the CSS then apply a max-width to look better in Adobe Digital Editions --> + <xsl:text> img { max-width: 100%; }</xsl:text> + </xsl:element> + </xsl:element> + <xsl:element namespace="http://www.w3.org/1999/xhtml" name="body"> + <xsl:element namespace="http://www.w3.org/1999/xhtml" name="div"> + <xsl:attribute name="id"> + <xsl:value-of select="$epub.cover.image.id"/> + </xsl:attribute> + <xsl:choose> + <xsl:when test="imageobject[@role='front-large']"> + <xsl:apply-templates select="imageobject[@role='front-large']"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="imageobject[1]"/> + </xsl:otherwise> + </xsl:choose> + </xsl:element> + <!-- If this is defined as an explicit cover page, then process + any remaining text --> + <xsl:if test="ancestor::cover"> + <xsl:apply-templates select="ancestor::cover/para"/> + </xsl:if> + </xsl:element> + </xsl:element> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <xsl:template name="cover-svg"> + <xsl:param name="node"/> + </xsl:template> + + <xsl:template name="toc-href"> + <xsl:param name="node" select="."/> + <xsl:apply-templates select="$node" mode="recursive-chunk-filename"> + <xsl:with-param name="recursive" select="true()"/> + </xsl:apply-templates> + <xsl:text>-toc</xsl:text> + <xsl:value-of select="$html.ext"/> + </xsl:template> + + <xsl:template match="bibliodiv[title]" mode="label.markup"> + </xsl:template> + + <xsl:template match="token" mode="opf.manifest.font"> + <xsl:call-template name="embedded-font-item"> + <xsl:with-param name="font.file" select="."/> + </xsl:call-template> + </xsl:template> + + <xsl:template name="embedded-font-item"> + <xsl:param name="font.file"/> + <xsl:param name="font.order" select="1"/> + + <xsl:element namespace="http://www.idpf.org/2007/opf" name="item"> + <xsl:attribute name="id"> + <xsl:value-of select="concat('epub.embedded.font.', $font.order)"/> + </xsl:attribute> + <xsl:attribute name="href"><xsl:value-of select="$font.file"/></xsl:attribute> + <xsl:choose> + <xsl:when test="contains($font.file, 'otf')"> + <xsl:attribute name="media-type">font/opentype</xsl:attribute> + </xsl:when> + <xsl:otherwise> + <xsl:message> + <xsl:text>WARNING: OpenType fonts should be supplied! (</xsl:text> + <xsl:value-of select="$font.file"/> + <xsl:text>)</xsl:text> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:element> + </xsl:template> + +<!-- Change section.heading to improve SEO on generated HTML by doing heading levels + "correctly". SEO rules are sometimes silly silly, but this does actually create + a semantic improvement. + Note: This template needs to be manually maintained outside of the html/sections.xsl + code, so make sure important changes get reintegrated. --> +<xsl:template name="section.heading"> + <xsl:param name="section" select="."/> + <xsl:param name="level" select="1"/> + <xsl:param name="allow-anchors" select="1"/> + <xsl:param name="title"/> + <xsl:param name="class" select="'title'"/> + + <xsl:variable name="id"> + <xsl:choose> + <!-- Make sure the subtitle doesn't get the same id as the title --> + <xsl:when test="self::subtitle"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="."/> + </xsl:call-template> + </xsl:when> + <!-- if title is in an *info wrapper, get the grandparent --> + <xsl:when test="contains(local-name(..), 'info')"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="../.."/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select=".."/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- For SEO, we try to actually ensure we *always* output one and only one h1, + so unlike the regular stylesheets, we don't add one to the section level and + we get the right behavior because of chunking. --> + <xsl:variable name="hlevel"> + <xsl:choose> + <!-- highest valid HTML H level is H6; so anything nested deeper + than 7 levels down just becomes H6 --> + <xsl:when test="$level > 6">6</xsl:when> + <xsl:otherwise> + <xsl:value-of select="$level"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml"> + <xsl:attribute name="class"><xsl:value-of select="$class"/></xsl:attribute> + <xsl:if test="$css.decoration != '0'"> + <xsl:if test="$hlevel<3"> + <xsl:attribute name="style">clear: both</xsl:attribute> + </xsl:if> + </xsl:if> + <xsl:if test="$allow-anchors != 0 and $generate.id.attributes = 0"> + <xsl:call-template name="anchor"> + <xsl:with-param name="node" select="$section"/> + <xsl:with-param name="conditional" select="0"/> + </xsl:call-template> + </xsl:if> + <xsl:if test="$generate.id.attributes != 0 and not(local-name(.) = 'appendix')"> + <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute> + </xsl:if> + <xsl:copy-of select="$title"/> + </xsl:element> +</xsl:template> + +<!-- ==================================================================== --> + +<xsl:template match="bridgehead"> + <xsl:variable name="container" select="(ancestor::appendix |ancestor::article |ancestor::bibliography |ancestor::chapter |ancestor::glossary |ancestor::glossdiv |ancestor::index |ancestor::partintro |ancestor::preface |ancestor::refsect1 |ancestor::refsect2 |ancestor::refsect3 |ancestor::sect1 |ancestor::sect2 |ancestor::sect3 |ancestor::sect4 |ancestor::sect5 |ancestor::section |ancestor::setindex |ancestor::simplesect)[last()]"/> + + <xsl:variable name="clevel"> + <xsl:choose> + <xsl:when test="local-name($container) = 'appendix' or local-name($container) = 'chapter' or local-name($container) = 'article' or local-name($container) = 'bibliography' or local-name($container) = 'glossary' or local-name($container) = 'index' or local-name($container) = 'partintro' or local-name($container) = 'preface' or local-name($container) = 'setindex'">1</xsl:when> + <xsl:when test="local-name($container) = 'glossdiv'"> + <xsl:value-of select="count(ancestor::glossdiv)+1"/> + </xsl:when> + <xsl:when test="local-name($container) = 'sect1' or local-name($container) = 'sect2' or local-name($container) = 'sect3' or local-name($container) = 'sect4' or local-name($container) = 'sect5' or local-name($container) = 'refsect1' or local-name($container) = 'refsect2' or local-name($container) = 'refsect3' or local-name($container) = 'section' or local-name($container) = 'simplesect'"> + <xsl:variable name="slevel"> + <xsl:call-template name="section.level"> + <xsl:with-param name="node" select="$container"/> + </xsl:call-template> + </xsl:variable> + <xsl:value-of select="$slevel + 1"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- HTML H level is one higher than section level --> + <xsl:variable name="hlevel"> + <xsl:choose> + <xsl:when test="@renderas = 'sect1'">1</xsl:when> + <xsl:when test="@renderas = 'sect2'">2</xsl:when> + <xsl:when test="@renderas = 'sect3'">3</xsl:when> + <xsl:when test="@renderas = 'sect4'">4</xsl:when> + <xsl:when test="@renderas = 'sect5'">5</xsl:when> + <xsl:otherwise> + <xsl:value-of select="$clevel + 1"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:element name="h{$hlevel}" namespace="http://www.w3.org/1999/xhtml"> + <xsl:call-template name="anchor"> + <xsl:with-param name="conditional" select="0"/> + </xsl:call-template> + <xsl:apply-templates/> + </xsl:element> +</xsl:template> + +<!-- SEO customization #2 --> +<xsl:template name="component.title"> + <xsl:param name="node" select="."/> + + <xsl:variable name="level"> + <xsl:choose> + <xsl:when test="ancestor::section"> + <xsl:value-of select="count(ancestor::section)+1"/> + </xsl:when> + <xsl:when test="ancestor::sect5">6</xsl:when> + <xsl:when test="ancestor::sect4">5</xsl:when> + <xsl:when test="ancestor::sect3">4</xsl:when> + <xsl:when test="ancestor::sect2">3</xsl:when> + <xsl:when test="ancestor::sect1">2</xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:element name="h{$level}" namespace="http://www.w3.org/1999/xhtml"> + <xsl:attribute name="class">title</xsl:attribute> + <xsl:if test="$generate.id.attributes = 0"> + <xsl:call-template name="anchor"> + <xsl:with-param name="node" select="$node"/> + <xsl:with-param name="conditional" select="0"/> + </xsl:call-template> + </xsl:if> + <xsl:apply-templates select="$node" mode="object.title.markup"> + <xsl:with-param name="allow-anchors" select="1"/> + </xsl:apply-templates> + </xsl:element> +</xsl:template> + +</xsl:stylesheet> diff --git a/tools/cxxtest/doc/examples/Assertions.h b/tools/cxxtest/doc/examples/Assertions.h new file mode 100644 index 0000000..b8b4a25 --- /dev/null +++ b/tools/cxxtest/doc/examples/Assertions.h @@ -0,0 +1,148 @@ +// Assertions.h +#include <cxxtest/TestSuite.h> + +class Test : public CxxTest::TestSuite +{ +public: + +// @assert: + void test_assert(void) + { + TS_ASSERT(1 + 1 > 1); + } +// @:assert + +// @assertDelta: + void test_assert_delta(void) + { + TS_ASSERT_DELTA(sqrt(4.0), 2.0, 1e-7); + } +// @:assertDelta + +// @assertDiffers: + void test_assert_differs(void) + { + TS_ASSERT_DIFFERS(1, 2); + } +// @:assertDiffers + +// @assertEquals: + void test_assert_equals(void) + { + TS_ASSERT_EQUALS(21 % 5, 1); + } +// @:assertEquals + +// @assertLessThan: + void test_assert_less_than(void) + { + TS_ASSERT_LESS_THAN(0, 1); + } +// @:assertLessThan + +// @assertLessThanEquals: + void test_assert_less_than_equals(void) + { + TS_ASSERT_LESS_THAN_EQUALS(0, 0); + } +// @:assertLessThanEquals + +// @assertPredicate: + class IsOdd + { + public: + bool operator()(int x) const { return x % 2 == 1; } + }; + + void test_assert_predicate(void) + { + TS_ASSERT_PREDICATE(IsOdd, 29); + } +// @:assertPredicate + +// @assertRelation: + void test_assert_relation(void) + { + TS_ASSERT_RELATION(std::greater<double>, 1e6, 1000.0); + } +// @:assertRelation + +// @assertSameData: + void test_assert_same_data(void) + { + char input = "The quick brown fox ran over the lazy dog"; + char output[26]; + memcopy(output, input, 26); + TS_ASSERT_SAME_DATA(input, output, 26); + } +// @:assertSameData + +// @assertThrows: + void throws_runtime_error(void) + { + raise std::runtime_error, "This method simply generates an exception"; + } + + void test_assert_throws(void) + { + TS_ASSERT_THROWS(self.throws_runtime_error(), std::runtime_error); + } +// @:assertThrows + +// @assertThrowsAnything: + void test_assert_throws_anything(void) + { + TS_ASSERT_THROWS_ANYTHING(self.throws_runtime_error()); + } +// @:assertThrowsAnything + +// @assertThrowsAssert: + void throws_value(void) + { + raise 1; + } + + void test_assert_throws_assert(void) + { + TS_ASSERT_THROWS_ASSERT(self.throws_value(), const Error & e, TS_ASSERT_EQUALS(e, 1)); + } +// @:assertThrowsAssert + +// @assertThrowsEquals: + void test_assert_throws_equals(void) + { + TS_ASSERT_THROWS_EQUALS(self.throws_value(), const Error & e, e.what(), 1); + } +// @:assertThrowsEquals + +// @assertThrowsNothing: + void throws_nothing(void) + { } + + void test_assert_throws_nothing(void) + { + TS_ASSERT_THROWS_ASSERT(self.throws_nothing()); + } +// @:assertThrowsNothing + +// @fail: + void test_fail(void) + { + TS_FAIL("This test has failed."); + } +// @:fail + +// @trace: + void test_trace(void) + { + TS_TRACE("This is a test tracing message."); + } +// @:trace + +// @warn: + void test_warn(void) + { + TS_WARN("This is a warning message."); + } +// @:warn +}; diff --git a/tools/cxxtest/doc/examples/BadTestSuite1.h b/tools/cxxtest/doc/examples/BadTestSuite1.h new file mode 100644 index 0000000..21cd8fc --- /dev/null +++ b/tools/cxxtest/doc/examples/BadTestSuite1.h @@ -0,0 +1,19 @@ +// BadTestSuite1.h +#include <cxxtest/TestSuite.h> + +class BadTestSuite1 : public CxxTest::TestSuite +{ +public: + void testAddition(void) + { + TS_ASSERT(1 + 1 > 1); + TS_ASSERT_EQUALS(1 + 1, 2); + } +#if 0 + void testSubtraction(void) + { + TS_ASSERT(1 - 1 < 1); + TS_ASSERT_EQUALS(1 - 1, 0); + } +#endif +}; diff --git a/tools/cxxtest/doc/examples/GetGlobals.sh b/tools/cxxtest/doc/examples/GetGlobals.sh new file mode 100644 index 0000000..27d59f8 --- /dev/null +++ b/tools/cxxtest/doc/examples/GetGlobals.sh @@ -0,0 +1,4 @@ +if [[ "x$CXXTEST" -eq "x" ]] +then + CXXTEST="../../" +fi diff --git a/tools/cxxtest/doc/examples/MockTestSuite.h b/tools/cxxtest/doc/examples/MockTestSuite.h new file mode 100644 index 0000000..a9f4b2d --- /dev/null +++ b/tools/cxxtest/doc/examples/MockTestSuite.h @@ -0,0 +1,26 @@ +// MockTestSuite.h +#include <cxxtest/TestSuite.h> +#include <time_mock.h> + +int generateRandomNumber(); + + +class MockObject : public T::Base_time +{ +public: + MockObject(int initial) : counter(initial) {} + int counter; + time_t time( time_t * ) { return counter++; } +}; + +class TestRandom : public CxxTest::TestSuite +{ +public: + void test_generateRandomNumber() + { + MockObject t(1); + TS_ASSERT_EQUALS( generateRandomNumber(), 3 ); + TS_ASSERT_EQUALS( generateRandomNumber(), 6 ); + TS_ASSERT_EQUALS( generateRandomNumber(), 9 ); + } +}; diff --git a/tools/cxxtest/doc/examples/MyClass.h b/tools/cxxtest/doc/examples/MyClass.h new file mode 100644 index 0000000..706ac8b --- /dev/null +++ b/tools/cxxtest/doc/examples/MyClass.h @@ -0,0 +1,38 @@ +// MyClass.h + +class MyClass +{ +public: + + int value; + + MyClass(int value_) : value(value_) {} + + // CxxTest requires a copy constructor + MyClass(const MyClass& other) : value(other.value) {} + + // This is required if you want to use TS_ASSERT_EQUALS + bool operator==(const MyClass& other) const { return value == other.value; } + + // If you want to use TS_ASSERT_LESS_THAN + bool operator<(const MyClass& other) const { return value < other.value; } +}; + +#ifdef CXXTEST_RUNNING +// This declaration is only activated when building a CxxTest test suite +#include <cxxtest/ValueTraits.h> +#include <stdio.h> + +namespace CxxTest +{ + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits<MyClass> + { + char _s[256]; + + public: + ValueTraits( const MyClass& m ) { sprintf( _s, "MyClass( %i )", m.value ); } + const char *asString() const { return _s; } + }; +}; +#endif // CXXTEST_RUNNING diff --git a/tools/cxxtest/doc/examples/MyTestSuite1.h b/tools/cxxtest/doc/examples/MyTestSuite1.h new file mode 100644 index 0000000..f437d11 --- /dev/null +++ b/tools/cxxtest/doc/examples/MyTestSuite1.h @@ -0,0 +1,12 @@ +// MyTestSuite1.h +#include <cxxtest/TestSuite.h> + +class MyTestSuite1 : public CxxTest::TestSuite +{ +public: + void testAddition(void) + { + TS_ASSERT(1 + 1 > 1); + TS_ASSERT_EQUALS(1 + 1, 2); + } +}; diff --git a/tools/cxxtest/doc/examples/MyTestSuite10.h b/tools/cxxtest/doc/examples/MyTestSuite10.h new file mode 100644 index 0000000..dc8e488 --- /dev/null +++ b/tools/cxxtest/doc/examples/MyTestSuite10.h @@ -0,0 +1,20 @@ +// MyTestSuite10.h +#include <cxxtest/TestSuite.h> +#include <MyClass.h> + +class MyTestSuite10 : public CxxTest::TestSuite +{ +public: + void test_le() + { + MyClass x(1), y(2); + TS_ASSERT_LESS_THAN( x, y ); + } + + void test_eq() + { + MyClass x(1), y(2); + TS_ASSERT_EQUALS( x, y ); + } +}; + diff --git a/tools/cxxtest/doc/examples/MyTestSuite11.h b/tools/cxxtest/doc/examples/MyTestSuite11.h new file mode 100644 index 0000000..ecd7c3c --- /dev/null +++ b/tools/cxxtest/doc/examples/MyTestSuite11.h @@ -0,0 +1,20 @@ +// MyTestSuite11.h +#include <cxxtest/TestSuite.h> +#include <TMyClass.h> + +class MyTestSuite11 : public CxxTest::TestSuite +{ +public: + void test_le() + { + TMyClass<int> x(1), y(2); + TS_ASSERT_LESS_THAN( x, y ); + } + + void test_eq() + { + TMyClass<int> x(1), y(2); + TS_ASSERT_EQUALS( x, y ); + } +}; + diff --git a/tools/cxxtest/doc/examples/MyTestSuite2.h b/tools/cxxtest/doc/examples/MyTestSuite2.h new file mode 100644 index 0000000..b5def59 --- /dev/null +++ b/tools/cxxtest/doc/examples/MyTestSuite2.h @@ -0,0 +1,19 @@ +// MyTestSuite2.h +#include <cxxtest/TestSuite.h> + +class MyTestSuite2 : public CxxTest::TestSuite +{ +public: + void testAddition(void) + { + TS_ASSERT(1 + 1 > 1); + TS_ASSERT_EQUALS(1 + 1, 2); + } + + void testMultiplication(void) + { + TS_TRACE("Starting multiplication test"); + TS_ASSERT_EQUALS(2 * 2, 5); + TS_TRACE("Finishing multiplication test"); + } +}; diff --git a/tools/cxxtest/doc/examples/MyTestSuite3.h b/tools/cxxtest/doc/examples/MyTestSuite3.h new file mode 100644 index 0000000..cb90643 --- /dev/null +++ b/tools/cxxtest/doc/examples/MyTestSuite3.h @@ -0,0 +1,32 @@ +// MyTestSuite3.h +#include <cxxtest/TestSuite.h> + +class MyTestSuite3 : public CxxTest::TestSuite +{ +public: + void testAddition(void) + { + TS_ASSERT(1 + 1 > 1); + TS_ASSERT_EQUALS(1 + 1, 2); + } + +// void testMultiplication( void ) +// { +// TS_ASSERT( 1 * 1 < 2 ); +// TS_ASSERT_EQUALS( 1 * 1, 2 ); +// } + +/* + void testSubtraction( void ) + { + TS_ASSERT( 1 - 1 < 1 ); + TS_ASSERT_EQUALS( 1 - 1, 0 ); + } +*/ + + void XtestDivision(void) + { + TS_ASSERT(1 / 1 < 2); + TS_ASSERT_EQUALS(1 / 1, 1); + } +}; diff --git a/tools/cxxtest/doc/examples/MyTestSuite4.h b/tools/cxxtest/doc/examples/MyTestSuite4.h new file mode 100644 index 0000000..89236ee --- /dev/null +++ b/tools/cxxtest/doc/examples/MyTestSuite4.h @@ -0,0 +1,14 @@ +// MyTestSuite4.h +#include <cxxtest/TestSuite.h> + +class MyTestSuite4 + : +public CxxTest::TestSuite +{ +public: + void testAddition(void) + { + TS_ASSERT(1 + 1 > 1); + TS_ASSERT_EQUALS(1 + 1, 2); + } +}; diff --git a/tools/cxxtest/doc/examples/MyTestSuite5.h b/tools/cxxtest/doc/examples/MyTestSuite5.h new file mode 100644 index 0000000..788c2ec --- /dev/null +++ b/tools/cxxtest/doc/examples/MyTestSuite5.h @@ -0,0 +1,35 @@ +// MyTestSuite5.h +#include <cxxtest/TestSuite.h> +#include <string.h> + +class MyTestSuite5 : public CxxTest::TestSuite +{ + char *_buffer; + +public: + + void setUp() + { + _buffer = new char[1024]; + } + + void tearDown() + { + delete [] _buffer; + } + + void test_strcpy() + { + strcpy(_buffer, "Hello, world!"); + TS_ASSERT_EQUALS(_buffer[0], 'H'); + TS_ASSERT_EQUALS(_buffer[1], 'e'); + } + + void test_memcpy() + { + memcpy(_buffer, "Hello, world!", sizeof(char)); + TS_ASSERT_EQUALS(_buffer[0], 'H'); + TS_ASSERT_EQUALS(_buffer[1], 'e'); + } +}; + diff --git a/tools/cxxtest/doc/examples/MyTestSuite6.h b/tools/cxxtest/doc/examples/MyTestSuite6.h new file mode 100644 index 0000000..3401609 --- /dev/null +++ b/tools/cxxtest/doc/examples/MyTestSuite6.h @@ -0,0 +1,24 @@ +// MyTestSuite6.h +#include <cxxtest/TestSuite.h> + +class MyTestSuite6 : public CxxTest::TestSuite +{ +public: + + static MyTestSuite6* createSuite() + { + #ifdef _MSC_VER + return new MyTestSuite6(); + #else + return 0; + #endif + } + + static void destroySuite( MyTestSuite6* suite ) + { delete suite; } + + void test_nothing() + { + TS_FAIL( "Nothing to test" ); + } +}; diff --git a/tools/cxxtest/doc/examples/MyTestSuite7.h b/tools/cxxtest/doc/examples/MyTestSuite7.h new file mode 100644 index 0000000..dd0fa4a --- /dev/null +++ b/tools/cxxtest/doc/examples/MyTestSuite7.h @@ -0,0 +1,35 @@ +// MyTestSuite7.h +#include <cxxtest/TestSuite.h> +#include <iostream> + +class MyTestSuite7 : public CxxTest::TestSuite +{ +public: + + struct Data + { + char data[3]; + bool operator==(Data o) { + return (memcmp(this, &o, sizeof(o)) == 0); + } + }; + + struct Data2 + { + char data[3]; + }; + + void testCompareData() + { + Data x, y; + memset( x.data, 0x12, sizeof(x.data) ); + memset( y.data, 0xF6, sizeof(y.data) ); + TS_ASSERT_EQUALS( x, y ); + + Data2 z, w; + memset( z.data, 0x12, sizeof(x.data) ); + memset( w.data, 0xF6, sizeof(y.data) ); + TS_ASSERT_SAME_DATA( &z, &w, sizeof(z) ) + } +}; + diff --git a/tools/cxxtest/doc/examples/MyTestSuite8.h b/tools/cxxtest/doc/examples/MyTestSuite8.h new file mode 100644 index 0000000..e1c92c5 --- /dev/null +++ b/tools/cxxtest/doc/examples/MyTestSuite8.h @@ -0,0 +1,71 @@ +// MyTestSuite8.h +#include <cstdio> +#include <cxxtest/TestSuite.h> +#include <cxxtest/GlobalFixture.h> + +// +// Fixture1 counts its setUp()s and tearDown()s +// +class Fixture1 : public CxxTest::GlobalFixture +{ +public: + unsigned setUpCount; + unsigned tearDownCount; + + Fixture1() { setUpCount = tearDownCount = 0; } + + bool setUp() { ++ setUpCount; return true; } + bool tearDown() { ++ tearDownCount; return true; } + + bool setUpWorld() { printf( "Starting a test suite\n" ); return true;} + bool tearDownWorld() { printf( "Finishing a test suite\n" ); return true;} +}; +static Fixture1 fixture1; + + +// +// Fixture2 counts its setUp()s and tearDown()s and makes sure +// its setUp() is called after Fixture1 and its tearDown() before. +// +class Fixture2 : public Fixture1 +{ +public: + bool setUp() + { + TS_ASSERT_EQUALS(setUpCount, fixture1.setUpCount - 1); + TS_ASSERT_EQUALS(tearDownCount, fixture1.tearDownCount); + return Fixture1::setUp(); + } + + bool tearDown() + { + TS_ASSERT_EQUALS(setUpCount, fixture1.setUpCount); + TS_ASSERT_EQUALS(tearDownCount, fixture1.tearDownCount); + return Fixture1::tearDown(); + } +}; +static Fixture2 fixture2; + + +// +// Verify the counts for the global fixtures +// +class MyTestSuite8 : public CxxTest::TestSuite +{ +public: + void testCountsFirstTime() + { + TS_ASSERT_EQUALS(fixture1.setUpCount, 1); + TS_ASSERT_EQUALS(fixture1.tearDownCount, 0); + TS_ASSERT_EQUALS(fixture2.setUpCount, 1); + TS_ASSERT_EQUALS(fixture2.tearDownCount, 0); + } + + void testCountsSecondTime() + { + TS_ASSERT_EQUALS(fixture1.setUpCount, 2); + TS_ASSERT_EQUALS(fixture1.tearDownCount, 1); + TS_ASSERT_EQUALS(fixture2.setUpCount, 2); + TS_ASSERT_EQUALS(fixture2.tearDownCount, 1); + } +}; diff --git a/tools/cxxtest/doc/examples/MyTestSuite9.h b/tools/cxxtest/doc/examples/MyTestSuite9.h new file mode 100644 index 0000000..300b691 --- /dev/null +++ b/tools/cxxtest/doc/examples/MyTestSuite9.h @@ -0,0 +1,33 @@ +// MyTestSuite9.h +#include <cxxtest/TestSuite.h> + +enum Answer { + Yes, + No, + Maybe, + DontKnow, + DontCare +}; + +// Declare value traits for the Answer enumeration +CXXTEST_ENUM_TRAITS( Answer, + CXXTEST_ENUM_MEMBER( Yes ) + CXXTEST_ENUM_MEMBER( No ) + CXXTEST_ENUM_MEMBER( Maybe ) + CXXTEST_ENUM_MEMBER( DontKnow ) + CXXTEST_ENUM_MEMBER( DontCare ) ); + +// Test the trait values +class EnumTraits : public CxxTest::TestSuite +{ +public: + void test_Enum_traits() + { + TS_FAIL( Yes ); + TS_FAIL( No ); + TS_FAIL( Maybe ); + TS_FAIL( DontKnow ); + TS_FAIL( DontCare ); + TS_FAIL( (Answer)1000 ); + } +}; diff --git a/tools/cxxtest/doc/examples/TMyClass.h b/tools/cxxtest/doc/examples/TMyClass.h new file mode 100644 index 0000000..e60978c --- /dev/null +++ b/tools/cxxtest/doc/examples/TMyClass.h @@ -0,0 +1,43 @@ +// TMyClass.h + +template<class T> +class TMyClass +{ +public: + + T value; + + TMyClass(const T& value_) : value(value_) {} + + // CxxTest requires a copy constructor + TMyClass(const TMyClass<T>& other) : value(other.value) {} + + // This is required if you want to use TS_ASSERT_EQUALS + bool operator==(const TMyClass<T>& other) const { return value == other.value; } + + // If you want to use TS_ASSERT_LESS_THAN + bool operator<(const TMyClass<T>& other) const { return value < other.value; } +}; + +#ifdef CXXTEST_RUNNING +// This declaration is only activated when building a CxxTest test suite +#include <cxxtest/ValueTraits.h> +#include <typeinfo> +#include <sstream> + +namespace CxxTest +{ + template <class T> + class ValueTraits< TMyClass<T> > + { + public: + std::ostringstream _s; + + ValueTraits( const TMyClass<T>& t ) { _s << typeid(t).name() << "( " << t.value << " )"; } + + ValueTraits( const ValueTraits< TMyClass<T> >& value ) { _s << value._s.rdbuf(); } + + const char *asString() const { return _s.str().c_str(); } + }; +}; +#endif // CXXTEST_RUNNING diff --git a/tools/cxxtest/doc/examples/buildRunner.sh b/tools/cxxtest/doc/examples/buildRunner.sh new file mode 100644 index 0000000..b8153a1 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --error-printer -o runner.cpp MyTestSuite1.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner.txt b/tools/cxxtest/doc/examples/buildRunner.txt new file mode 100644 index 0000000..d924af7 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner.txt @@ -0,0 +1 @@ +Running 1 test.OK! diff --git a/tools/cxxtest/doc/examples/buildRunner10.sh b/tools/cxxtest/doc/examples/buildRunner10.sh new file mode 100644 index 0000000..eab8528 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner10.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen -o runner.cpp --template runner10.tpl MyTestSuite2.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner10.txt b/tools/cxxtest/doc/examples/buildRunner10.txt new file mode 100644 index 0000000..e0e5efb --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner10.txt @@ -0,0 +1,7 @@ +Starting test runner +Running 2 tests. +In MyTestSuite2::testMultiplication: +MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5) +Failed 1 of 2 tests +Success rate: 50% +Stopping test runner diff --git a/tools/cxxtest/doc/examples/buildRunner11.sh b/tools/cxxtest/doc/examples/buildRunner11.sh new file mode 100644 index 0000000..dd354f9 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner11.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +. GetGlobals.sh + +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen -f --error-printer -o runner.cpp MyTestSuite3.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner11.txt b/tools/cxxtest/doc/examples/buildRunner11.txt new file mode 100644 index 0000000..62b72cc --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner11.txt @@ -0,0 +1,2 @@ +Parsing file MyTestSuite3.hdone. +Running 1 test.OK! diff --git a/tools/cxxtest/doc/examples/buildRunner12.sh b/tools/cxxtest/doc/examples/buildRunner12.sh new file mode 100644 index 0000000..3c4278e --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner12.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +. GetGlobals.sh + +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen -f --error-printer -o runner.cpp MyTestSuite4.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner12.txt b/tools/cxxtest/doc/examples/buildRunner12.txt new file mode 100644 index 0000000..5e738c6 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner12.txt @@ -0,0 +1,2 @@ +Parsing file MyTestSuite4.h done. +Running 1 test.OK! diff --git a/tools/cxxtest/doc/examples/buildRunner13.sh b/tools/cxxtest/doc/examples/buildRunner13.sh new file mode 100644 index 0000000..ae3e5ba --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner13.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen -f --error-printer -o runner.cpp MyTestSuite1.h MyTestSuite2.h MyTestSuite4.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +# @help: +./runner --help +# @:help +./runner --help &> runner13.help.txt + +# @helpTests: +./runner --help-tests +# @:helpTests +./runner --help-tests &> runner13.helpTests.txt + +# @MyTestSuite2: +./runner MyTestSuite2 +# @:MyTestSuite2 +./runner MyTestSuite2 &> runner13.MyTestSuite2.txt + +# @testMultiplication: +./runner MyTestSuite2 testMultiplication +# @:testMultiplication +./runner MyTestSuite2 testMultiplication &> runner13.testMultiplication.txt + +# @testMultiplicationVerbose: +./runner -v MyTestSuite2 testMultiplication +# @:testMultiplicationVerbose +./runner -v MyTestSuite2 testMultiplication &> runner13.testMultiplicationVerbose.txt + +\rm -f runner runner.cpp + diff --git a/tools/cxxtest/doc/examples/buildRunner14.sh b/tools/cxxtest/doc/examples/buildRunner14.sh new file mode 100644 index 0000000..215b2ce --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner14.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --error-printer -o runner.cpp MyTestSuite5.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner14.txt b/tools/cxxtest/doc/examples/buildRunner14.txt new file mode 100644 index 0000000..9850f82 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner14.txt @@ -0,0 +1 @@ +Running 2 tests..OK! diff --git a/tools/cxxtest/doc/examples/buildRunner15.sh b/tools/cxxtest/doc/examples/buildRunner15.sh new file mode 100644 index 0000000..20c0ce0 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner15.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --error-printer -o runner.cpp MyTestSuite6.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner15.txt b/tools/cxxtest/doc/examples/buildRunner15.txt new file mode 100644 index 0000000..7132442 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner15.txt @@ -0,0 +1,6 @@ +Running 1 test +In MyTestSuite6::<no test>: +MyTestSuite6.h:8: Error: Test failed: createSuite() failed +MyTestSuite6.h:8: Error: Assertion failed: suite() != 0 +Failed 1 of 1 test +Success rate: 0% diff --git a/tools/cxxtest/doc/examples/buildRunner16.sh b/tools/cxxtest/doc/examples/buildRunner16.sh new file mode 100644 index 0000000..ba420e6 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner16.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --error-printer -o runner.cpp MockTestSuite.h +# @:main + +# @compile: +g++ -o runner -I. -I$CXXTEST runner.cpp time_mock.cpp rand_example.cpp +# @:compile + +./runner +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner16.txt b/tools/cxxtest/doc/examples/buildRunner16.txt new file mode 100644 index 0000000..d924af7 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner16.txt @@ -0,0 +1 @@ +Running 1 test.OK! diff --git a/tools/cxxtest/doc/examples/buildRunner17.sh b/tools/cxxtest/doc/examples/buildRunner17.sh new file mode 100644 index 0000000..649da61 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner17.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --error-printer -o runner.cpp MyTestSuite7.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp + diff --git a/tools/cxxtest/doc/examples/buildRunner17.txt b/tools/cxxtest/doc/examples/buildRunner17.txt new file mode 100644 index 0000000..8bf2270 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner17.txt @@ -0,0 +1,9 @@ +Running 1 test +In MyTestSuite7::testCompareData: +MyTestSuite7.h:27: Error: Expected (x == y), found ({ 12 12 12 } != { F6 F6 F6 }) +MyTestSuite7.h:32: Error: Expected sizeof(z) (3) bytes to be equal at (&z) and (&w), found: + { 12 12 12 } + differs from + { F6 F6 F6 } +Failed 1 of 1 test +Success rate: 0% diff --git a/tools/cxxtest/doc/examples/buildRunner18.sh b/tools/cxxtest/doc/examples/buildRunner18.sh new file mode 100644 index 0000000..d34b913 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner18.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --error-printer -o runner.cpp MyTestSuite8.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp + diff --git a/tools/cxxtest/doc/examples/buildRunner18.txt b/tools/cxxtest/doc/examples/buildRunner18.txt new file mode 100644 index 0000000..6b072d6 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner18.txt @@ -0,0 +1,5 @@ +Running 2 testsStarting a test suite +Starting a test suite +..Finishing a test suite +Finishing a test suite +OK! diff --git a/tools/cxxtest/doc/examples/buildRunner19.sh b/tools/cxxtest/doc/examples/buildRunner19.sh new file mode 100644 index 0000000..64402fc --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner19.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --error-printer -o runner.cpp MyTestSuite9.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp + diff --git a/tools/cxxtest/doc/examples/buildRunner19.txt b/tools/cxxtest/doc/examples/buildRunner19.txt new file mode 100644 index 0000000..ac58c17 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner19.txt @@ -0,0 +1,10 @@ +Running 1 test +In EnumTraits::test_Enum_traits: +MyTestSuite9.h:26: Error: Test failed: Yes +MyTestSuite9.h:27: Error: Test failed: No +MyTestSuite9.h:28: Error: Test failed: Maybe +MyTestSuite9.h:29: Error: Test failed: DontKnow +MyTestSuite9.h:30: Error: Test failed: DontCare +MyTestSuite9.h:31: Error: Test failed: (Answer)1000 +Failed 1 of 1 test +Success rate: 0% diff --git a/tools/cxxtest/doc/examples/buildRunner2.sh b/tools/cxxtest/doc/examples/buildRunner2.sh new file mode 100644 index 0000000..d90b3b6 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner2.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --error-printer -o runner.cpp MyTestSuite2.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner2.txt b/tools/cxxtest/doc/examples/buildRunner2.txt new file mode 100644 index 0000000..677991c --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner2.txt @@ -0,0 +1,5 @@ +Running 2 tests. +In MyTestSuite2::testMultiplication: +MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5) +Failed 1 of 2 tests +Success rate: 50% diff --git a/tools/cxxtest/doc/examples/buildRunner20.sh b/tools/cxxtest/doc/examples/buildRunner20.sh new file mode 100644 index 0000000..55c4794 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner20.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --error-printer -o runner.cpp MyTestSuite10.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST -I. runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp + diff --git a/tools/cxxtest/doc/examples/buildRunner20.txt b/tools/cxxtest/doc/examples/buildRunner20.txt new file mode 100644 index 0000000..d4e03b2 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner20.txt @@ -0,0 +1,5 @@ +Running 2 tests. +In MyTestSuite10::test_eq: +MyTestSuite10.h:17: Error: Expected (x == y), found (MyClass( 1 ) != MyClass( 2 )) +Failed 1 of 2 tests +Success rate: 50% diff --git a/tools/cxxtest/doc/examples/buildRunner21.sh b/tools/cxxtest/doc/examples/buildRunner21.sh new file mode 100644 index 0000000..a9f1daf --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner21.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --error-printer -o runner.cpp MyTestSuite11.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST -I. runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp + diff --git a/tools/cxxtest/doc/examples/buildRunner21.txt b/tools/cxxtest/doc/examples/buildRunner21.txt new file mode 100644 index 0000000..683b7bb --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner21.txt @@ -0,0 +1,5 @@ +Running 2 tests. +In MyTestSuite11::test_eq: +MyTestSuite11.h:17: Error: Expected (x == y), found (8TMyClassIiE( 1 ) != 8TMyClassIiE( 1 )) +Failed 1 of 2 tests +Success rate: 50% diff --git a/tools/cxxtest/doc/examples/buildRunner3.sh b/tools/cxxtest/doc/examples/buildRunner3.sh new file mode 100644 index 0000000..f5f5c69 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner3.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --runner=ParenPrinter -o runner.cpp MyTestSuite2.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner3.txt b/tools/cxxtest/doc/examples/buildRunner3.txt new file mode 100644 index 0000000..0c183b6 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner3.txt @@ -0,0 +1,5 @@ +Running 2 tests. +In MyTestSuite2::testMultiplication: +MyTestSuite2.h(16): Error: Expected (2 * 2 == 5), found (4 != 5) +Failed 1 of 2 tests +Success rate: 50% diff --git a/tools/cxxtest/doc/examples/buildRunner4.sh b/tools/cxxtest/doc/examples/buildRunner4.sh new file mode 100644 index 0000000..44a6d53 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner4.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --runner=StdioPrinter -o runner.cpp MyTestSuite2.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner4.txt b/tools/cxxtest/doc/examples/buildRunner4.txt new file mode 100644 index 0000000..677991c --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner4.txt @@ -0,0 +1,5 @@ +Running 2 tests. +In MyTestSuite2::testMultiplication: +MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5) +Failed 1 of 2 tests +Success rate: 50% diff --git a/tools/cxxtest/doc/examples/buildRunner5.sh b/tools/cxxtest/doc/examples/buildRunner5.sh new file mode 100644 index 0000000..f3c5db0 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner5.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --runner=YesNoRunner -o runner.cpp MyTestSuite2.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +echo $? + +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner5.txt b/tools/cxxtest/doc/examples/buildRunner5.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner5.txt @@ -0,0 +1 @@ +1 diff --git a/tools/cxxtest/doc/examples/buildRunner6.sh b/tools/cxxtest/doc/examples/buildRunner6.sh new file mode 100644 index 0000000..3fd180c --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner6.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --runner=XmlPrinter -o runner.cpp MyTestSuite2.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner6.txt b/tools/cxxtest/doc/examples/buildRunner6.txt new file mode 100644 index 0000000..91bf05e --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner6.txt @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<testsuite name="cxxtest" tests="2" errors="0" failures="1" time="0" > + <testcase classname="MyTestSuite2" name="testAddition" line="7" /> + <testcase classname="MyTestSuite2" name="testMultiplication" line="13"> + <failure file="MyTestSuite2.h" line="16" type="failedAssertEquals" >Error: Expected (2 * 2 == 5), found (4 != 5)</failure> + </testcase> +</testsuite> diff --git a/tools/cxxtest/doc/examples/buildRunner7.sh b/tools/cxxtest/doc/examples/buildRunner7.sh new file mode 100644 index 0000000..12a25d0 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner7.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --xunit-printer -o runner.cpp MyTestSuite2.h +# @:main + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp +# @:compile + +./runner +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner7.txt b/tools/cxxtest/doc/examples/buildRunner7.txt new file mode 100644 index 0000000..677991c --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner7.txt @@ -0,0 +1,5 @@ +Running 2 tests. +In MyTestSuite2::testMultiplication: +MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5) +Failed 1 of 2 tests +Success rate: 50% diff --git a/tools/cxxtest/doc/examples/buildRunner8.sh b/tools/cxxtest/doc/examples/buildRunner8.sh new file mode 100644 index 0000000..6ecd796 --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner8.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @main: +cxxtestgen --gui=X11Gui -o runner.cpp MyTestSuite2.h ../../sample/gui/GreenYellowRed.h +# @:main + +# @compile: +/opt/local/bin/g++-mp-4.4 -o runner -I$CXXTEST runner.cpp -L/opt/local/lib -lX11 +# @:compile + +./runner +\rm -f runner runner.cpp diff --git a/tools/cxxtest/doc/examples/buildRunner9.sh b/tools/cxxtest/doc/examples/buildRunner9.sh new file mode 100644 index 0000000..3c77bcc --- /dev/null +++ b/tools/cxxtest/doc/examples/buildRunner9.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +. GetGlobals.sh +export PATH=$CXXTEST/bin:$PATH + +# @part: +cxxtestgen --part --error-printer -o MyTestSuite1.cpp MyTestSuite1.h +cxxtestgen --part --error-printer -o MyTestSuite2.cpp MyTestSuite2.h +# @:part + +# @root: +cxxtestgen --root --error-printer -o runner.cpp +# @:root + +# @compile: +g++ -o runner -I$CXXTEST runner.cpp MyTestSuite1.cpp MyTestSuite2.cpp +# @:compile + +./runner -v + +rm -f MyTestSuite1.cpp MyTestSuite2.cpp runner.cpp runner diff --git a/tools/cxxtest/doc/examples/cxxtestgen.out b/tools/cxxtest/doc/examples/cxxtestgen.out new file mode 100644 index 0000000..2659903 --- /dev/null +++ b/tools/cxxtest/doc/examples/cxxtestgen.out @@ -0,0 +1,43 @@ +Usage: cxxtestgen [options] [<filename> ...] + +Options: + -h, --help show this help message and exit + --version Write the CxxTest version. + -o NAME, --output=NAME + Write output to file NAME. + -w WORLD, --world=WORLD + The label of the tests, used to name the XML results. + --include=HEADER Include file HEADER in the test runner before other + headers. + --abort-on-fail Abort tests on failed asserts (like xUnit). + --main=MAIN Specify an alternative name for the main() function. + --headers=HEADER_FILENAME + Specify a filename that contains a list of header + files that are processed to generate a test runner. + --runner=CLASS Create a test runner that processes test events using + the class CxxTest::CLASS. + --gui=CLASS Create a GUI test runner that processes test events + using the class CxxTest::CLASS. (deprecated) + --error-printer Create a test runner using the ErrorPrinter class, and + allow the use of the standard library. + --xunit-printer Create a test runner using the XUnitPrinter class. + --xunit-file=XUNIT_FILE + The file to which the XML summary is written for test + runners using the XUnitPrinter class. The default XML + filename is TEST-<world>.xml, where <world> is the + value of the --world option. (default: cxxtest) + --have-std Use the standard library (even if not found in tests). + --no-std Do not use standard library (even if found in tests). + --have-eh Use exception handling (even if not found in tests). + --no-eh Do not use exception handling (even if found in + tests). + --longlong=TYPE Use TYPE as for long long integers. (default: not + supported) + --no-static-init Do not rely on static initialization in the test + runner. + --template=TEMPLATE Generate the test runner using file TEMPLATE to define + a template. + --root Write the main() function and global data for a test + runner. + --part Write the tester classes for a test runner. + -f, --fog-parser Use new FOG C++ parser diff --git a/tools/cxxtest/doc/examples/exeRunner.out b/tools/cxxtest/doc/examples/exeRunner.out new file mode 100644 index 0000000..421c80d --- /dev/null +++ b/tools/cxxtest/doc/examples/exeRunner.out @@ -0,0 +1,5 @@ +Running 3 tests.. +In MyTestSuite2::testMultiplication: +MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5) +Failed 1 of 3 tests +Success rate: 66% diff --git a/tools/cxxtest/doc/examples/exeRunner.sh b/tools/cxxtest/doc/examples/exeRunner.sh new file mode 100644 index 0000000..9df4454 --- /dev/null +++ b/tools/cxxtest/doc/examples/exeRunner.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# @main: +./runner +# @:main diff --git a/tools/cxxtest/doc/examples/exeRunner2.out b/tools/cxxtest/doc/examples/exeRunner2.out new file mode 100644 index 0000000..421c80d --- /dev/null +++ b/tools/cxxtest/doc/examples/exeRunner2.out @@ -0,0 +1,5 @@ +Running 3 tests.. +In MyTestSuite2::testMultiplication: +MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5) +Failed 1 of 3 tests +Success rate: 66% diff --git a/tools/cxxtest/doc/examples/exeRunner2.sh b/tools/cxxtest/doc/examples/exeRunner2.sh new file mode 100644 index 0000000..9df4454 --- /dev/null +++ b/tools/cxxtest/doc/examples/exeRunner2.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# @main: +./runner +# @:main diff --git a/tools/cxxtest/doc/examples/rand_example.cpp b/tools/cxxtest/doc/examples/rand_example.cpp new file mode 100644 index 0000000..19ba939 --- /dev/null +++ b/tools/cxxtest/doc/examples/rand_example.cpp @@ -0,0 +1,7 @@ +// rand_example.cpp +#include <time_mock.h> + +int generateRandomNumber() +{ + return T::time( NULL ) * 3; +} diff --git a/tools/cxxtest/doc/examples/runner10.tpl b/tools/cxxtest/doc/examples/runner10.tpl new file mode 100644 index 0000000..4d3ebb7 --- /dev/null +++ b/tools/cxxtest/doc/examples/runner10.tpl @@ -0,0 +1,14 @@ +#define CXXTEST_HAVE_EH +#define CXXTEST_ABORT_TEST_ON_FAIL +#include <cxxtest/ErrorPrinter.h> + +int main() +{ + std::cout << "Starting test runner" << std::endl; + int status = CxxTest::ErrorPrinter().run(); + std::cout << "Stopping test runner" << std::endl; + return status; +} + +// The CxxTest "world" +<CxxTest world> diff --git a/tools/cxxtest/doc/examples/runner13.MyTestSuite2.txt b/tools/cxxtest/doc/examples/runner13.MyTestSuite2.txt new file mode 100644 index 0000000..677991c --- /dev/null +++ b/tools/cxxtest/doc/examples/runner13.MyTestSuite2.txt @@ -0,0 +1,5 @@ +Running 2 tests. +In MyTestSuite2::testMultiplication: +MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5) +Failed 1 of 2 tests +Success rate: 50% diff --git a/tools/cxxtest/doc/examples/runner13.help.txt b/tools/cxxtest/doc/examples/runner13.help.txt new file mode 100644 index 0000000..41a6196 --- /dev/null +++ b/tools/cxxtest/doc/examples/runner13.help.txt @@ -0,0 +1,6 @@ +./runner <suitename> +./runner <suitename> <testname> +./runner -h +./runner --help +./runner --help-tests +./runner -v Enable tracing output. diff --git a/tools/cxxtest/doc/examples/runner13.helpTests.txt b/tools/cxxtest/doc/examples/runner13.helpTests.txt new file mode 100644 index 0000000..872cce9 --- /dev/null +++ b/tools/cxxtest/doc/examples/runner13.helpTests.txt @@ -0,0 +1,6 @@ +Suite/Test Names +--------------------------------------------------------------------------- +MyTestSuite1 testAddition +MyTestSuite2 testAddition +MyTestSuite2 testMultiplication +MyTestSuite4 testAddition diff --git a/tools/cxxtest/doc/examples/runner13.testMultiplication.txt b/tools/cxxtest/doc/examples/runner13.testMultiplication.txt new file mode 100644 index 0000000..4389a91 --- /dev/null +++ b/tools/cxxtest/doc/examples/runner13.testMultiplication.txt @@ -0,0 +1,5 @@ +Running 1 test +In MyTestSuite2::testMultiplication: +MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5) +Failed 1 of 1 test +Success rate: 0% diff --git a/tools/cxxtest/doc/examples/runner13.testMultiplicationVerbose.txt b/tools/cxxtest/doc/examples/runner13.testMultiplicationVerbose.txt new file mode 100644 index 0000000..a705d37 --- /dev/null +++ b/tools/cxxtest/doc/examples/runner13.testMultiplicationVerbose.txt @@ -0,0 +1,7 @@ +Running 1 test +In MyTestSuite2::testMultiplication: +MyTestSuite2.h:15: Trace: Starting multiplication test +MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5) +MyTestSuite2.h:17: Trace: Finishing multiplication test +Failed 1 of 1 test +Success rate: 0% diff --git a/tools/cxxtest/doc/examples/test_examples.py b/tools/cxxtest/doc/examples/test_examples.py new file mode 100644 index 0000000..0e01284 --- /dev/null +++ b/tools/cxxtest/doc/examples/test_examples.py @@ -0,0 +1,27 @@ +# Imports +import pyutilib.th as unittest +import glob +import os +from os.path import dirname, abspath, basename +import sys + +currdir = dirname(abspath(__file__))+os.sep +datadir = currdir + +def filter(line): + return 'Running' in line or "IGNORE" in line + +# Declare an empty TestCase class +class Test(unittest.TestCase): pass + +if not sys.platform.startswith('win'): + # Find all *.sh files, and use them to define baseline tests + for file in glob.glob(datadir+'*.sh'): + bname = basename(file) + name=bname.split('.')[0] + if os.path.exists(datadir+name+'.txt'): + Test.add_baseline_test(cwd=datadir, cmd=file, baseline=datadir+name+'.txt', name=name, filter=filter) + +# Execute the tests +if __name__ == '__main__': + unittest.main() diff --git a/tools/cxxtest/doc/examples/time_mock.cpp b/tools/cxxtest/doc/examples/time_mock.cpp new file mode 100644 index 0000000..38d9bd4 --- /dev/null +++ b/tools/cxxtest/doc/examples/time_mock.cpp @@ -0,0 +1,3 @@ +// time_mock.cpp +#define CXXTEST_MOCK_TEST_SOURCE_FILE +#include <time_mock.h> diff --git a/tools/cxxtest/doc/examples/time_mock.h b/tools/cxxtest/doc/examples/time_mock.h new file mode 100644 index 0000000..263e4a8 --- /dev/null +++ b/tools/cxxtest/doc/examples/time_mock.h @@ -0,0 +1,8 @@ +// time_mock.h +#include <time.h> +#include <cxxtest/Mock.h> + +CXXTEST_MOCK_GLOBAL( time_t, /* Return type */ + time, /* Name of the function */ + ( time_t *t ), /* Prototype */ + ( t ) /* Argument list */ ); diff --git a/tools/cxxtest/doc/examples/time_real.cpp b/tools/cxxtest/doc/examples/time_real.cpp new file mode 100644 index 0000000..8503f79 --- /dev/null +++ b/tools/cxxtest/doc/examples/time_real.cpp @@ -0,0 +1,3 @@ +// time_real.cpp +#define CXXTEST_MOCK_REAL_SOURCE_FILE +#include <time_mock.h> diff --git a/tools/cxxtest/doc/guide.epub b/tools/cxxtest/doc/guide.epub new file mode 100644 index 0000000000000000000000000000000000000000..79565291f69b2bdccaca675d894f06ec3b9ca7a5 GIT binary patch literal 44332 zcmWIWW@Zs#0D&4eb%*@K)jA*^2y-wnFyv<Drj}F|q$U;=<YXo%mSpDV>8BQyCTUk? z7Ql3JFjTv#J9u+mIl2L43?l=B7y|=?uWN{-uBV@yesX?ZNn&PRYLQ+=Zcb>QHQylv z0hemO#N6(th0b9@Dk@nMEDk=(IdJIa)<?Wex05w~lmwrtHvam|&ZT&<A^StNux?d} zB>mV2#mtkxU6t|)d&0Na!1Msq?6R=x#G?mHW*sWlyE<`h0^dzTzA1C7)H`<w+w&fI zb<gzs!3Xu5*SZV7bzbtPciH@;HA1hJHvY}4wzwr8m%{C7JEL(|!&JMV%2v&z4+6U{ zaLo<Uo3a1V%x9_MInlS}_y66Kk?xP`#|vwp^?qh&VBk?=VBlk5VDNW!3JBIuEJ)PL zD9O#a8}&Eu_6foN@%|fAFFLr1TspIL=do!e7jB+9+HlTKcj->&Ko0F9RXv}gnRl0} z-c@{mDgEW-(zKro^}VL$?$XGz*rfaJ+@ELWn~gUw-cldoqPR0Xs8Fz6=epfij&9qB zpDV6ywClIq^K-T9lw}+Jodq}diE_Vg&s+Sr{q*eai|gnAQn|3<|K;cM?BU`^svcX! z@7rB4=k!I@pHCmZc+Oaud%f`2b+L_1YbP5YpLzcIw?Ed=CuSP&Dizytx3tjt<L<ZF z_nCOz3>vyamnW_N{qOJZoc61^>^;BkZhK~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QVZt4!`qXi)CAiSipa1P7}#MlA4ZuH(4NGAv{X^fu_(+%y51$eWvfutlEBpDRh K7#O}T1MvVCp$Yu} literal 0 HcmV?d00001 diff --git a/tools/cxxtest/doc/guide.html b/tools/cxxtest/doc/guide.html new file mode 100644 index 0000000..9c0eef0 --- /dev/null +++ b/tools/cxxtest/doc/guide.html @@ -0,0 +1,3981 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<head> +<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> +<meta name="generator" content="AsciiDoc 8.6.5" /> +<title>CxxTest User Guide + + + + + +
+
+

Abstract

+
+

CxxTest is a unit testing framework for C++ that is similar in +spirit to JUnit, +CppUnit, and +xUnit. CxxTest is easy to +use because it does not require precompiling a CxxTest testing +library, it employs no advanced features of C++ (e.g. RTTI) and it +supports a very flexible form of test discovery. This documentation +describes CxxTest 4.0, which includes significant enhancements to +the test discovery process, a modern test driver, and new documentation.

+
+
+
+

1. Overview

+
+

CxxTest is a unit testing framework for C++ that is similar in +spirit to JUnit, +CppUnit, and +xUnit. +CxxTest is designed to be as portable as possible; it does not require

+
    +
  • +

    +RTTI +

    +
  • +
  • +

    +Member template functions +

    +
  • +
  • +

    +Exception handling +

    +
  • +
  • +

    +External libraries (including memory management, file/console I/O, graphics libraries) +

    +
  • +
+

In particular, the design of CxxTest was tailored for C++ compilers +on embedded systems, for which many of these features are not +supported. However, CxxTest can also leverage standard C++ features +when they are supported by a compiler (e.g. catch unhandled +exceptions).

+

Additionally, CxxTest supports test discovery. Tests are defined +in C++ header files, which are parsed by CxxTest to automatically +generate a test runner. Thus, CxxTest is somewhat easier to use +than alternative C++ testing frameworks, since you do not need to +register tests.

+

The CxxTest Home Page is +http://cxxtest.com. This webpage contains links +for release downloads, +the CxxTest +discussion list, and documentation in +HTML, +PDF, and +EPUB formats. The +CxxTest Home Page also includes developer +resources (e.g. automated +test results). CxxTest is available under the +GNU Lesser General Public +license.

+

The CxxTest User Guide provides the following documentation:

+
+
+
+
+

2. Getting Started

+
+

Testing is performed with CxxTest in a four-step process:

+
    +
  1. +

    +Tests are defined in C++ header files +

    +
  2. +
  3. +

    +The cxxtestgen command processes header files to generate files for the test runner. +

    +
  4. +
  5. +

    +Compile the test runner. +

    +
  6. +
  7. +

    +Execute the test runner to run all test suites. +

    +
  8. +
+

CxxTest supports test automation, sharing of setup +and shutdown code for tests, aggregation of tests into collections, +and independence of the tests from the reporting framework. To +achieve this, CxxTest supports some important concepts that are common to xUnit frameworks ( +e.g. JUnit, CppUnit, and +xUnit):

+
+
+test fixture +
+
+

+ A test fixture represents the preparation needed to perform one or more + tests, and any associate cleanup actions. This may involve, for example, + creating temporary or proxy databases, directories, or starting a server + process. +

+
+
+
+
+test suite +
+
+

+ A test suite is a collection of test cases, which represent + the smallest unit of testing. A test suite is defined by a class + that inherits from the CxxTest::TestSuite class, and the tests + in a test suite are executed together. +

+
+
+test +
+
+

+ A test is a public member function of a test suite whose name + starts with test, e.g. testDirectoryScanner(), + test_cool_feature() and TestImportantBugFix(). +

+
+
+test runner +
+
+

+ A test runner is a component which orchestrates the execution + of tests across one or more test suites and provides the outcome + to the user. +

+
+
+

When building test fixtures using TestSuite, the TestSuite.setUp +and TestSuite.tearDown methods can be overridden to provide +initialization and cleanup for the fixture. The TestSuite.setUp +method is run before each test is executed, and the TestSuite.tearDown +method is run after each test is executed.

+
+

2.1. A First Example

+

The following is a simple example of a +test suite with a single test, testAddition, which perform two test assertions:

+
+
+
// MyTestSuite1.h
+#include <cxxtest/TestSuite.h>
+
+class MyTestSuite1 : public CxxTest::TestSuite
+{
+public:
+    void testAddition(void)
+    {
+        TS_ASSERT(1 + 1 > 1);
+        TS_ASSERT_EQUALS(1 + 1, 2);
+    }
+};
+

You use the cxxtestgen script to generate a test runner for test suites in C++ header files:

+
+
+
cxxtestgen --error-printer -o runner.cpp MyTestSuite1.h
+

This command generates the file runner.cpp, which can be compiled.

+
+
+
cxxtestgen --error-printer -o runner.cpp MyTestSuite1.h
+

Note that additional compiler flags may be needed to include headers +and libraries that are used during testing.

+

This runner can be executed to perform the specified tests:

+
+
+
./runner
+

which generates the following output:

+
+
+
Running 3 tests..
+In MyTestSuite2::testMultiplication:
+MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5)
+Failed 1 of 3 tests
+Success rate: 66%
+
+
+
+

2.2. A Second Example

+

The following header file extends the previous example to +include a test that generates an error:

+
+
+
// MyTestSuite2.h
+#include <cxxtest/TestSuite.h>
+
+class MyTestSuite2 : public CxxTest::TestSuite
+{
+public:
+    void testAddition(void)
+    {
+        TS_ASSERT(1 + 1 > 1);
+        TS_ASSERT_EQUALS(1 + 1, 2);
+    }
+
+    void testMultiplication(void)
+    {
+        TS_TRACE("Starting multiplication test");
+        TS_ASSERT_EQUALS(2 * 2, 5);
+        TS_TRACE("Finishing multiplication test");
+    }
+};
+

The test runner generated by cxxtestgen for this test suite generates the following output:

+
+
+
Running 3 tests..
+In MyTestSuite2::testMultiplication:
+MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5)
+Failed 1 of 3 tests
+Success rate: 66%
+
+
+
+

2.3. Sample Problems

+

CxxTest comes with example test suites in the cxxtest/sample subdirectory of +the distribution. If you look in that directory, you will see three +Makefiles: Makefile.unix, Makefile.msvc and +Makefile.bcc32 which are for Linux/Unix, MS Visual C++ and Borland C++, repectively. These files are provided as a starting point, +and some options may need to be tweaked in them for your system.

+
+
+
+
+

3. Test Assertions

+
+

The following table summarizes the test assertions supported by CxxTest. +Appendix A provides examples that illustrate the use of these test assertions.

+
+ +++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Macro Description

TS_ASSERT(expr)

Verify expr is true

TS_ASSERT_DELTA(x,y,d)

Verify that abs(x-y) < d

TS_ASSERT_DIFFERS(x,y)

Verify that x != y

TS_ASSERT_EQUALS(x,y)

Verify that x == y

TS_ASSERT_LESS_THAN(x,y)

Verify that x < y

TS_ASSERT_LESS_THAN_EQUALS(x,y)

Verify that x ⇐ y

TS_ASSERT_PREDICATE(P,x)

Verify P(x)

TS_ASSERT_RELATION(x,R,y)

Verify x R y

TS_ASSERT_SAME_DATA(x,y,size)

Verify two buffers are equal

TS_ASSERT_THROWS(expr,type)

Verify that expr throws the specified exception type

TS_ASSERT_THROWS_ANYTHING(expr)

Verify that expr throws an exception

TS_ASSERT_THROWS_ASSERT(expr,arg,assertion)

Verify type and value of what expr throws

TS_ASSERT_THROWS_EQUALS(expr,arg,x,y)

Verify type and value of what expr throws

TS_ASSERT_THROWS_NOTHING(expr)

Verify that expr doesn’t throw anything

TS_FAIL(message)

Fail unconditionally

TS_TRACE(message)

Print message as an informational message

TS_WARN(message)

Print message as a warning

+
+

The test assertions supported by CxxTest are defined as macros, +which eliminates the need for certain templates within CxxTest and +allows tests to catch exceptions. There are four categories of +test assertions in CxxTest, which are distinguished by their prefixes:

+
+
+TS_ +
+
+

+These test assertions perform a test. Catch exceptions generated +during testing will cause the test to fail, except for tests that +check for exceptions. +

+
+
+TSM_ +
+
+

+These test assertions perform the same tests as the corresponding +TS assertions, but their first argument is a const char* message +buffer that is printed when the test fails. +

+
+
+ETS_ +
+
+

+These test assertions perform the same tests as the corresponding +TS assertions. However, these test assertions do not catch +exceptions generated during testing. +

+
+
+ETSM_ +
+
+

+These test assertions perform the same tests as the +corresponding TS assertions, but (1) their first argument is a +const char* message buffer is printed when the test fails, and +(2) these assertions do not catch exceptions generated during +testing. +

+
+
+
+
+
+

4. The CxxTestGen Command

+
+

The cxxtestgen command processes one or more C++ header files to +generate a test runner. The cxxtestgen command performs test +discovery by parsing the header files to find test classes, which +inherit from the class CxxTest::TestSuite.

+

The --help option generates the following summary of the cxxtestgen command line options:

+
+
+
Usage: cxxtestgen [options] [<filename> ...]
+
+Options:
+  -h, --help            show this help message and exit
+  --version             Write the CxxTest version.
+  -o NAME, --output=NAME
+                        Write output to file NAME.
+  -w WORLD, --world=WORLD
+                        The label of the tests, used to name the XML results.
+  --include=HEADER      Include file HEADER in the test runner before other
+                        headers.
+  --abort-on-fail       Abort tests on failed asserts (like xUnit).
+  --main=MAIN           Specify an alternative name for the main() function.
+  --headers=HEADER_FILENAME
+                        Specify a filename that contains a list of header
+                        files that are processed to generate a test runner.
+  --runner=CLASS        Create a test runner that processes test events using
+                        the class CxxTest::CLASS.
+  --gui=CLASS           Create a GUI test runner that processes test events
+                        using the class CxxTest::CLASS. (deprecated)
+  --error-printer       Create a test runner using the ErrorPrinter class, and
+                        allow the use of the standard library.
+  --xunit-printer       Create a test runner using the XUnitPrinter class.
+  --xunit-file=XUNIT_FILE
+                        The file to which the XML summary is written for test
+                        runners using the XUnitPrinter class.  The default XML
+                        filename is TEST-<world>.xml, where <world> is the
+                        value of the --world option.  (default: cxxtest)
+  --have-std            Use the standard library (even if not found in tests).
+  --no-std              Do not use standard library (even if found in tests).
+  --have-eh             Use exception handling (even if not found in tests).
+  --no-eh               Do not use exception handling (even if found in
+                        tests).
+  --longlong=TYPE       Use TYPE as for long long integers.  (default: not
+                        supported)
+  --no-static-init      Do not rely on static initialization in the test
+                        runner.
+  --template=TEMPLATE   Generate the test runner using file TEMPLATE to define
+                        a template.
+  --root                Write the main() function and global data for a test
+                        runner.
+  --part                Write the tester classes for a test runner.
+  -f, --fog-parser      Use new FOG C++ parser
+
+

The following section describe illustrate the use of these command line options.

+
+

4.1. General Options

+

The default behavior of cxxtestgen is to send the source for the +test runner to the standard output stream. The --output (-o) +option indicates a filename for the test runner.

+

The --world (-w) option specifies the value of the CxxTest::RealWorldDescription::_worldName +variable. This option also customizes the filename used for XML output files (see below).

+

The --include option defines a filename that is included in the runner before all other headers.

+

The --abort-on-fail option forces an abort if a test fails, rather than continuing execution +to the next test.

+

The --main option specifies an alternate name for the main() function.

+
+
+

4.2. Test Listener Options

+

The test runner behavior is controlled by a test listener class +that is used to define to the main function. The test listener +class is a subclass of TestListener that receives notifications +about the testing process, notably which assertions failed. The +--runner option is used to specify the test listener that is used +in the test runner. The following test listeners are defined in +CxxTest:

+
+
+ErrorPrinter +
+
+

+ This is the standard error printer, which formats its output to the standard output stream (std::cout). +

+
+
+StdioPrinter +
+
+

+ The same as ErrorPrinter except that it uses printf instead of std::cout. +

+
+
+ParenPrinter +
+
+

+ Identical to ErrorPrinter except that it prints line numbers in parantheses. This is the way Visual Studio expects it. +

+
+
+XmlPrinter +
+
+

+ Print test results to an XML file. +

+
+
+XUnitPrinter +
+
+

+ This test listener generates output using both ErrorPrinter and XmlPrinter. +

+
+
+
+

4.2.1. ErrorPrinter

+

The --error-printer option creates a runner using the ErrorPrinter +test listener, and it indicates that the standard library is used +in the test runner. The ErrorPrinter test listener prints dots +to summarize test execution, along with a summary of the test +results. For example, the command

+
+
+
cxxtestgen --error-printer -o runner.cpp MyTestSuite2.h
+

generates the following output:

+
+
+
Running 3 tests..
+In MyTestSuite2::testMultiplication:
+MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5)
+Failed 1 of 3 tests
+Success rate: 66%
+
+
+
+

4.2.2. StdioPrinter

+

If your compiler does not support std::cout, then the ErrorPrinter test listener cannot be used. +In this case, the StdioPrinter test listener can be used; it provides the same output as ErrorPrinter but it uses the printf function. For example, the command line:

+
+
+
cxxtestgen --runner=StdioPrinter -o runner.cpp MyTestSuite2.h
+

generates the following output:

+
+
+
Running 2 tests.
+In MyTestSuite2::testMultiplication:
+MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5)
+Failed 1 of 2 tests
+Success rate: 50%
+
+
+
+

4.2.3. ParenPrinter

+

The --runner=ParenPrinter option creates a similar test runner:

+
+
+
cxxtestgen --runner=ParenPrinter -o runner.cpp MyTestSuite2.h
+

This test runner generates output that is similar to the ErrorPrinter test listener:

+
+
+
Running 2 tests.
+In MyTestSuite2::testMultiplication:
+MyTestSuite2.h(16): Error: Expected (2 * 2 == 5), found (4 != 5)
+Failed 1 of 2 tests
+Success rate: 50%
+
+

The only difference is the parentheses used in the output. This test listener provides a format that can be recognized by Visual Studio.

+
+
+

4.2.4. XmlPrinter

+

The --runner=XmlPrinter option creates a test runner whose output is an XML summary of the test results. For example, the command:

+
+
+
cxxtestgen --runner=XmlPrinter -o runner.cpp MyTestSuite2.h
+

generates the following output:

+
+
+
<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite name="cxxtest"  tests="2" errors="0" failures="1" time="0" >
+    <testcase classname="MyTestSuite2" name="testAddition" line="7" />
+    <testcase classname="MyTestSuite2" name="testMultiplication" line="13">
+        <failure file="MyTestSuite2.h" line="16" type="failedAssertEquals" >Error: Expected (2 * 2 == 5), found (4 != 5)</failure>
+    </testcase>
+</testsuite>
+
+

This XML format is conforms to the XML standard used by other xUnit tools. Thus, this output can be used as input in other tools, like Jenkins, to generate test summaries.

+
+
+

4.2.5. XUnitPrinter

+

The XUnitPrinter test listener generates output using both the +ErrorPrinter+ and XmlPrinter test listeners. This allows the +user to interactively view a simple test summary, while simultaneously +generating an XML summary of the test results. The --xunit-printer +option specifies the use of XUnitPrinter:

+
+
+
cxxtestgen --xunit-printer -o runner.cpp MyTestSuite2.h
+

This test runner generates the following output:

+
+
+
Running 2 tests.
+In MyTestSuite2::testMultiplication:
+MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5)
+Failed 1 of 2 tests
+Success rate: 50%
+
+

The default filename for the XML results is TEST-cxxtest.xml. The --xunit-file option can be used to specify an alternative filename. Additionally, the value of the --world option can be used to specify the filename TEST-<world>.xml.

+
+
+
+

4.3. Language Options

+

When cxxtestgen performs test discovery, it also performs checks +to detect whether (1) the standard library is used and (2) exceptions +are used. These checks configure CxxTest to not assume that these +C++ language features are used when generating the test driver. +Thus, CxxTest can naturally be used with compilers that do not +support these features.

+

The cxxtestgen command includes several options that override +these checks and define features of C++ that are used by the test +runner. The --have-std option indicates that the test runner +should use the standard library, and the --no-std option indicates +that the test runner should not use the standard library. The +--have-eh+ options indicates that the test runner should use +exception handling, and the --no-eh indicates that the test runner +should not not use exception handling.

+

The --longlong option specifies the type used for long long +integers. The default is for no long long integer type to be specified, +which is consistent with the current C++ standard.

+

CxxTest test runners depend quite heavily on static initialization +of objects that are used to define and execute tests. The +--no-static-init+ option can be used to avoid static initialization +for compilers or linkers that have trouble compiling the default test runner.

+
+
+

4.4. Creating Test Runners from Parts

+

The default behavior of cxxtestgen is to generate a test runner +that directly integrates classes that define the tests along with +a main() function that executes all test suites. It is often useful to +allow test suites to be processes separately and then linked together. The --root and --part options +support this logic. For example, suppose that we wish to define a test runner for tests in the headers +MyTestSuite1.h+ and MyTestSuite2.h. We execute cxxtestgen with the --part option to generate source files for each of the test suites:

+
+
+
cxxtestgen --part --error-printer -o MyTestSuite1.cpp MyTestSuite1.h
+cxxtestgen --part --error-printer -o MyTestSuite2.cpp MyTestSuite2.h
+

Similarly, we execute cxxtestgen with the --root opiton to generate the main() routine:

+
+
+
cxxtestgen --root --error-printer -o runner.cpp
+

Finally, the test runner is built by compiling all of these source files together:

+
+
+
g++ -o runner -I$CXXTEST runner.cpp MyTestSuite1.cpp MyTestSuite2.cpp
+
+
+

4.5. Template Files

+

CxxTest supports the use of template files to provide a custom +main()+ function. This may be useful when using a custom test +listener, or when using an existing CxxTest test listener in a +nonstandard manner. A template file is an ordinary source files +with the embedded declaration <CxxTest world>, which tells +cxxtestgen+ to insert the world definition at that point.

+

The --template option is used to specify the use of a template file:

+
+
+
cxxtestgen -o runner.cpp --template runner10.tpl MyTestSuite2.h
+

For example, consider the following template file:

+
+
+
#define CXXTEST_HAVE_EH
+#define CXXTEST_ABORT_TEST_ON_FAIL
+#include <cxxtest/ErrorPrinter.h>
+
+int main()
+{
+    std::cout << "Starting test runner" << std::endl;
+    int status = CxxTest::ErrorPrinter().run();
+    std::cout << "Stopping test runner" << std::endl;
+    return status;
+}
+
+// The CxxTest "world"
+<CxxTest world>
+

This file specifies macros that customize the test runner, and output is generated before and after the tests are run.

+

Note that CxxTest needs to insert certain definitions and #include +directives in the runner file. It normally does that before the +first #include <cxxtest/*.h> found in the template file. If this +behavior is not what you need, use the directive <CxxTest preamble> +to specify where this preamble is inserted.

+
+
+

4.6. Test Discovery Options

+

The cxxtestgen command performs test discovery by searching C++ +header files for CxxTest test classes. The default process for +test discovery is a simple process that analyzes each line in a +header file sequentially, looking for a sequence of lines that +represent class definitions and test method definitions.

+

There are many limitations to this simple process for test discovery, +and in CxxTest 4.0 a new test discovery mechanism was added based +on the a parser for the +Flexible Object +Generator (FOG) language, which is a superset of C+. The grammar +for the FOG language was adapted to parse C+ header files to +identify class definitions and class inheritance relationships, +class and namespace nesting of declarations, and class methods. +This allows cxxtestgen to identify test classes that are defined +with complex inheritance relationships.

+

The --fog option is used to specify the use of the FOG parser for +test discovery. Although the FOG parser is more powerful, the +simpler cxxtestgen test discover process is the default because +the FOG parser is slower execute. Additionally, the FOG parser +requires the installation of ply and, for Python version 2.6, +ordereddict+. If these packages are not available, then the --fog +option is automatically disabled.

+

The following sections illustrate differences between these two test discovery mechanisms, along with +general limitations of the test discovery process.

+
+

4.6.1. Unexpected Test Suite Format

+

The default test discovery mechanism does a very simple analysis +of the input files, which can easily fail when test classes are not +formated in a standard manner. For example, consider the following +test suite:

+
+
+
// MyTestSuite4.h
+#include <cxxtest/TestSuite.h>
+
+class MyTestSuite4
+    :
+public CxxTest::TestSuite
+{
+public:
+    void testAddition(void)
+    {
+        TS_ASSERT(1 + 1 > 1);
+        TS_ASSERT_EQUALS(1 + 1, 2);
+    }
+};
+

This test suite is not recognized by the default test discovery +mechanism, but the FOG parser correctly parsers this file and +recognizes the test suite. A variety of similar discovery failures +arise due to the simple process used by the test discovery mechanism.

+
+
+

4.6.2. Commenting Out Tests

+

Adding and disabling tests are two common steps in test development. +The process of test discovery makes adding tests very easy. However, +disabling tests is somewhat more complicated. Consider the following +header file, which defines four tests (three of which are disabled):

+
+
+
// MyTestSuite3.h
+#include <cxxtest/TestSuite.h>
+
+class MyTestSuite3 : public CxxTest::TestSuite
+{
+public:
+    void testAddition(void)
+    {
+        TS_ASSERT(1 + 1 > 1);
+        TS_ASSERT_EQUALS(1 + 1, 2);
+    }
+
+//   void testMultiplication( void )
+//   {
+//      TS_ASSERT( 1 * 1 < 2 );
+//      TS_ASSERT_EQUALS( 1 * 1, 2 );
+//   }
+
+/*
+     void testSubtraction( void )
+     {
+        TS_ASSERT( 1 - 1 < 1 );
+        TS_ASSERT_EQUALS( 1 - 1, 0 );
+     }
+*/
+
+    void XtestDivision(void)
+    {
+        TS_ASSERT(1 / 1 < 2);
+        TS_ASSERT_EQUALS(1 / 1, 1);
+    }
+};
+

The first is commented out with C++-style comments, the second +test is commented out with C-style comments, and the third test is +named in a manner that is not recognized through test discovery +(i.e., it does not start with test).

+

The default test discovery mechanism only works with the first and +third methods for disabling tests, but the FOG parser works with +all three. The FOG parser performs a complex, multi-line parse of +the source file, so it can identify multi-line C-style comments.

+

Note, however, that the use of C macros will not work:

+
+
+
// BadTestSuite1.h
+#include <cxxtest/TestSuite.h>
+
+class BadTestSuite1 : public CxxTest::TestSuite
+{
+public:
+    void testAddition(void)
+    {
+        TS_ASSERT(1 + 1 > 1);
+        TS_ASSERT_EQUALS(1 + 1, 2);
+    }
+#if 0
+    void testSubtraction(void)
+    {
+        TS_ASSERT(1 - 1 < 1);
+        TS_ASSERT_EQUALS(1 - 1, 0);
+    }
+#endif
+};
+

The cxxtestgen discovery mechanisms do not perform a C preprocessing +step, since that would generally require using externally defined +preprocessing variable definitions. Additionally, preprocessor macros that act like functions will +cause the FOG parser to fail unless they are followed by a semicolon.

+
+
+
+
+
+

5. Test Runner Syntax

+
+

The default behavior of the CxxTest test runner is to execute all +tests in all of the test suites that are linked into the runner. +However, CxxTest test runners process command line options that +allow individual tests and test suites to be selected.

+

For example, consider a test runner defined as follows:

+
+
+
cxxtestgen -f --error-printer -o runner.cpp MyTestSuite1.h MyTestSuite2.h MyTestSuite4.h
+

The --help (-h) option can be used to print the command line options for a test runner. The command

+
+
+
./runner --help
+
+

generates the following output:

+
+
+
./runner <suitename>
+./runner <suitename> <testname>
+./runner -h
+./runner --help
+./runner --help-tests
+./runner -v             Enable tracing output.
+
+

The --help-tests option is used to list all test suites that are defined in a test runner. The command

+
+
+
./runner --help-tests
+

generates the following output:

+
+
+
Suite/Test Names
+---------------------------------------------------------------------------
+MyTestSuite1 testAddition
+MyTestSuite2 testAddition
+MyTestSuite2 testMultiplication
+MyTestSuite4 testAddition
+
+

The first column is the test suite name, and the second column is the test name.

+

All tests in a test suite can be executed by simply specifying the test suite name. For example

+
+
+
./runner MyTestSuite2
+

executes the tests in test suite MyTestSuite2:

+
+
+
Running 2 tests.
+In MyTestSuite2::testMultiplication:
+MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5)
+Failed 1 of 2 tests
+Success rate: 50%
+
+

Similarly, a single test can be executed by specifying the test suite followed by the test name. For example

+
+
+
./runner MyTestSuite2 testMultiplication
+

executes the testMultiplication test in test suite MyTestSuite2:

+
+
+
Running 1 test
+In MyTestSuite2::testMultiplication:
+MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5)
+Failed 1 of 1 test
+Success rate: 0%
+
+

The -v option enables the printing of trace information generated +by the TS_TRACE function. For example, the testMultiplication test contains trace declarations +before and after the multiplication test. Thus, the command

+
+
+
./runner -v MyTestSuite2 testMultiplication
+

generates this trace output before and after the test:

+
+
+
Running 1 test
+In MyTestSuite2::testMultiplication:
+MyTestSuite2.h:15: Trace: Starting multiplication test
+MyTestSuite2.h:16: Error: Expected (2 * 2 == 5), found (4 != 5)
+MyTestSuite2.h:17: Trace: Finishing multiplication test
+Failed 1 of 1 test
+Success rate: 0%
+
+
+
+
+

6. Advanced Testing Features

+
+
+

6.1. Preprocessor Macros

+

CxxTest recognizes a variety of preprocessor macros that can be used to modify the behavior of a test runner. Many of these mimic the options of the cxxtestgen command.

+
+ +++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Preprocessor Macro Description

CXXTEST_HAVE_STD

Use the standard library.

CXXTEST_HAVE_EH

Use exception handling.

CXXTEST_ABORT_TEST_ON_FAIL

Abort tests on failed asserts.

CXXTEST_USER_VALUE_TRAITS

Enable user-defined value traits. The default traits dump up to 8 bytes of the data as hex values.

CXXTEST_OLD_TEMPLATE_SYNTAX

Use old template syntax that is used by some compilers (e.g. Borland C++ 5).

CXXTEST_OLD_STD

Use old syntax for libraries where std:: is not recognized.

CXXTEST_MAX_DUMP_SIZE

The value of this macro defines the maximum number of bytes to dump if TS_ASSERT_SAME_DATA() fails. The default is 0, which indicates no limit.

CXXTEST_DEFAULT_ABORT

The value of this macro is the default value of the dynamic abort on fail flag.

CXXTEST_LONGLONG

The value of this macro is used to define long long integers.

+
+

These preprocessor macros must be defined before the CxxTest header +files are included in the test runner. For example, the following +template file defines CXXTEST_HAVE_EH and CXXTEST_ABORT_TEST_ON_FAIL +before other headers are included:

+
+
+
#define CXXTEST_HAVE_EH
+#define CXXTEST_ABORT_TEST_ON_FAIL
+#include <cxxtest/ErrorPrinter.h>
+
+int main()
+{
+    std::cout << "Starting test runner" << std::endl;
+    int status = CxxTest::ErrorPrinter().run();
+    std::cout << "Stopping test runner" << std::endl;
+    return status;
+}
+
+// The CxxTest "world"
+<CxxTest world>
+

Several of these macros concern whether modern C++ conventions are +supported by the compiler. If tests need to be ported to multiple +compilers, then one important convention is whether the namespace +std:: is supported. For example, switching between cout and +std::cout typically needs to be done throughout a code. CxxTest +supports this with the CXXTEST_STD() macro. For example, +CXXTEST_STD(cout) can be used within a test suite, and CxxTest +handles the mapping of this to cout or std::cout depending on +options provided to cxxtestgen.

+
+
+

6.2. Customizing Test Fixtures

+
+

6.2.1. Setup and Teardown

+

CxxTest test fixtures can be customized in several ways to manage +the environment for test suites and individual tests. A common +feature of test suites is that they share a common logic for setting +up data used in the tests. Thus, there may be duplicate code for +creating objects, files, inputs, etc. Similarly, the tests may +share common logic for cleaning up after the test is finished (e.g. deleting temporary objects).

+

You can put this shared code in a common place by overriding the +virtual functions TestSuite::setUp() and TestSuite::tearDown(). +The setUp() function is called before each test, and tearDown() +is called after each test.

+

For example, the following test suite employs setUp() and tearDown() methods to +allocate and deallocate memory for a string buffer:

+
+
+
// MyTestSuite5.h
+#include <cxxtest/TestSuite.h>
+#include <string.h>
+
+class MyTestSuite5 : public CxxTest::TestSuite
+{
+    char *_buffer;
+
+public:
+
+    void setUp()
+    {
+        _buffer = new char[1024];
+    }
+
+    void tearDown()
+    {
+        delete [] _buffer;
+    }
+
+    void test_strcpy()
+    {
+        strcpy(_buffer, "Hello, world!");
+        TS_ASSERT_EQUALS(_buffer[0], 'H');
+        TS_ASSERT_EQUALS(_buffer[1], 'e');
+    }
+
+    void test_memcpy()
+    {
+        memcpy(_buffer, "Hello, world!", sizeof(char));
+        TS_ASSERT_EQUALS(_buffer[0], 'H');
+        TS_ASSERT_EQUALS(_buffer[1], 'e');
+    }
+};
+
+
+
+

6.2.2. Dynamically Created Test Suites

+

CxxTest test fixtures can also be customized during the construction +and deconstruction of test suites. By default, CxxTest test suites +are instantiated statically in the test runner. However, dynamically +created test suites can be used to perform suite-level setup and +teardown operations, verify the environment needed to execute a +test suite, and construct test suites that require a nontrivial +constructor.

+

CxxTest instantiates a test suite dynamically if the createSuite() +or destroySuite() methods are defined. For example, the following +test suite checks to see if it is being compiled with Microsoft +Visual Studio. If not, the createSuite() returns a null pointer, +indicating that the test suite was not created.

+
+
+
// MyTestSuite6.h
+#include <cxxtest/TestSuite.h>
+
+class MyTestSuite6 : public CxxTest::TestSuite
+{
+public:
+
+    static MyTestSuite6* createSuite()
+    {
+    #ifdef _MSC_VER
+    return new MyTestSuite6();
+    #else
+    return 0;
+    #endif
+    }
+
+    static void destroySuite( MyTestSuite6* suite )
+    { delete suite; }
+
+    void test_nothing()
+    {
+        TS_FAIL( "Nothing to test" );
+    }
+};
+
+
+

6.2.3. Global and World Fixtures

+

CxxTest supports two related mechanisms for performing global +setup and teardown operations. Global fixtures are classes that +inherit from CxxTest::GlobalFixture, and they define setUp and +tearDown methods. The setUp method for all global fixtures is +called before each test is executed, and the tearDown method for +all global fixtures is called after each test is completed. Thus, +this mechanism provides a convenient way of defining setup and +teardown operations that apply to all test suites.

+

For example, consider the following test suite:

+
+
+
// MyTestSuite8.h
+#include <cstdio>
+#include <cxxtest/TestSuite.h>
+#include <cxxtest/GlobalFixture.h>
+
+//
+// Fixture1 counts its setUp()s and tearDown()s
+//
+class Fixture1 : public CxxTest::GlobalFixture
+{
+public:
+    unsigned setUpCount;
+    unsigned tearDownCount;
+
+    Fixture1() { setUpCount = tearDownCount = 0; }
+
+    bool setUp() { ++ setUpCount; return true; }
+    bool tearDown() { ++ tearDownCount; return true; }
+
+    bool setUpWorld() { printf( "Starting a test suite\n" ); return true;}
+    bool tearDownWorld() { printf( "Finishing a test suite\n" ); return true;}
+};
+static Fixture1 fixture1;
+
+
+//
+// Fixture2 counts its setUp()s and tearDown()s and makes sure
+// its setUp() is called after Fixture1 and its tearDown() before.
+//
+class Fixture2 : public Fixture1
+{
+public:
+    bool setUp()
+    {
+        TS_ASSERT_EQUALS(setUpCount, fixture1.setUpCount - 1);
+        TS_ASSERT_EQUALS(tearDownCount, fixture1.tearDownCount);
+        return Fixture1::setUp();
+    }
+
+    bool tearDown()
+    {
+        TS_ASSERT_EQUALS(setUpCount, fixture1.setUpCount);
+        TS_ASSERT_EQUALS(tearDownCount, fixture1.tearDownCount);
+        return Fixture1::tearDown();
+    }
+};
+static Fixture2 fixture2;
+
+
+//
+// Verify the counts for the global fixtures
+//
+class MyTestSuite8 : public CxxTest::TestSuite
+{
+public:
+    void testCountsFirstTime()
+    {
+        TS_ASSERT_EQUALS(fixture1.setUpCount,    1);
+        TS_ASSERT_EQUALS(fixture1.tearDownCount, 0);
+        TS_ASSERT_EQUALS(fixture2.setUpCount,    1);
+        TS_ASSERT_EQUALS(fixture2.tearDownCount, 0);
+    }
+
+    void testCountsSecondTime()
+    {
+        TS_ASSERT_EQUALS(fixture1.setUpCount,    2);
+        TS_ASSERT_EQUALS(fixture1.tearDownCount, 1);
+        TS_ASSERT_EQUALS(fixture2.setUpCount,    2);
+        TS_ASSERT_EQUALS(fixture2.tearDownCount, 1);
+    }
+};
+

This test suite defines a runner that generates the following output:

+
+
+
Running 2 testsStarting a test suite
+Starting a test suite
+..Finishing a test suite
+Finishing a test suite
+OK!
+
+

Note that the global fixtures are instantiated with static global +values. This ensures that these fixtures are created before the +runner is initialized. Also, note that the setUp methods are +called in the same sequence that the global fixtures are instantiated, +and the tearDown methods are called in the reverse sequence. +Finally, note that the setUp and tearDown methods in global +fixtures return a boolean value, which indicates success or failure +of that operation.

+

This example also illustrates the use of world fixtures, which +perform setup and teardown operations that are executed once each +when beginning and finishing tests in each test suite. World +fixtures are defined with the setUpWorld and tearDownWorld +methods in a global fixture.

+
+
+

6.2.4. Runtime Test Customization

+

CxxTest defines several functions that can be called in a test suite to modify the default behavior of CxxTest.

+
+ +++ + + + + + + + + + + + + + + + +
Test Suite Method Description

setAbortTestOnFail(bool)

This function specifies whether tests abort after a failure. The default value of the flag is false. This function only has an effect if exception handling is enabled.

setMaxDumpSize(unsigned)

This function sets the maximum number of bytes that are dumped when +TS_ASSERT_SAME_DATA() fails. The default is 0, which indicates no limit.

+
+

Note that the the configuration parameters are reset to their default +values after each test is executed (more precisely, after tearDown() +is called). Consequently, calling these functions in the setUp() +function has the effect of setting that value for the entire test +suite.

+
+
+
+
+
+

7. Value Traits

+
+

CxxTest’s test assertions like TS_ASSERT_EQUALS +work for built-in types, but they will not likely work for user-defined +data types. This is because CxxTest needs a way to compare objects +and to convert them to strings when printing test failure summaries. +Thus, user-defined data types need to have the operator= method +defined to ensure that test assertions can be applied.

+

For example, the following code

+
+
+
// MyTestSuite7.h
+#include <cxxtest/TestSuite.h>
+#include <iostream>
+
+class MyTestSuite7 : public CxxTest::TestSuite
+{
+public:
+
+   struct Data
+   {
+      char data[3];
+      bool operator==(Data o) {
+          return (memcmp(this, &o, sizeof(o)) == 0);
+      }
+   };
+
+   struct Data2
+   {
+      char data[3];
+   };
+
+   void testCompareData()
+   {
+      Data x, y;
+      memset( x.data, 0x12, sizeof(x.data) );
+      memset( y.data, 0xF6, sizeof(y.data) );
+      TS_ASSERT_EQUALS( x, y );
+
+      Data2 z, w;
+      memset( z.data, 0x12, sizeof(x.data) );
+      memset( w.data, 0xF6, sizeof(y.data) );
+      TS_ASSERT_SAME_DATA( &z, &w, sizeof(z) )
+   }
+};
+
+

defines a test runner that generates the following output

+
+
+
Running 1 test
+In MyTestSuite7::testCompareData:
+MyTestSuite7.h:27: Error: Expected (x == y), found ({ 12 12 12  } != { F6 F6 F6  })
+MyTestSuite7.h:32: Error: Expected sizeof(z) (3) bytes to be equal at (&z) and (&w), found:
+   { 12 12 12 }
+     differs from
+   { F6 F6 F6 }
+Failed 1 of 1 test
+Success rate: 0%
+
+

The operator= method is required to apply +TS_ASSERT_EQUALS to Data objects. However, +the TS_ASSERT_SAME_DATA assertion can be +applied to Data2 objects that do not have operator= defined.

+

Since CxxTest does not rely on any external library, conversion +from arbitrary data types to strings is done using value traits. +For example, to convert an integer to a string, CxxTest does the following:

+
+
+
int i = 10;
+CxxTest::ValueTraits<int> converter(i);
+const char* string = converter.asString();
+

The CxxTest header file cxxtest/ValueTraits.h defines value traits +for standard types like int, char, double, etc. The default +ValueTraits class for unknown types dumps up to 8 bytes of the value +in hex format.

+

If the macro CXXTEST_USER_VALUE_TRAITS is defined, then CxxTest will +omit the default definitions for ValueTraits. This allows a user to define their own trait specifications to customize the display of trait information.

+
+

7.1. Enumeration Traits

+

CxxTest provides a simple way to define value traits for enumeration +types. The CXXTEST_ENUM_TRAITS macro is used to define value +traits for all members of an enumeration set.

+

For example, the following code

+
+
+
// MyTestSuite9.h
+#include <cxxtest/TestSuite.h>
+
+enum Answer {
+    Yes,
+    No,
+    Maybe,
+    DontKnow,
+    DontCare
+};
+
+// Declare value traits for the Answer enumeration
+CXXTEST_ENUM_TRAITS( Answer,
+                     CXXTEST_ENUM_MEMBER( Yes )
+                     CXXTEST_ENUM_MEMBER( No )
+                     CXXTEST_ENUM_MEMBER( Maybe )
+                     CXXTEST_ENUM_MEMBER( DontKnow )
+                     CXXTEST_ENUM_MEMBER( DontCare ) );
+
+// Test the trait values
+class EnumTraits : public CxxTest::TestSuite
+{
+public:
+    void test_Enum_traits()
+    {
+        TS_FAIL( Yes );
+        TS_FAIL( No );
+        TS_FAIL( Maybe );
+        TS_FAIL( DontKnow );
+        TS_FAIL( DontCare );
+        TS_FAIL( (Answer)1000 );
+    }
+};
+

defines a test runner that generates the following output

+
+
+
Running 1 test
+In EnumTraits::test_Enum_traits:
+MyTestSuite9.h:26: Error: Test failed: Yes
+MyTestSuite9.h:27: Error: Test failed: No
+MyTestSuite9.h:28: Error: Test failed: Maybe
+MyTestSuite9.h:29: Error: Test failed: DontKnow
+MyTestSuite9.h:30: Error: Test failed: DontCare
+MyTestSuite9.h:31: Error: Test failed: (Answer)1000
+Failed 1 of 1 test
+Success rate: 0%
+
+

The enumeration value traits print strings that represent the elements of the enumeration, except where a numeric value is provided.

+

Note that the CXXTEST_ENUM_TRAITS macros has two arguments; the list of CXXTEST_ENUM_MEMBER macros is not separated by commas!

+
+
+

7.2. Defining New Value Traits

+

Defining value traits for a new class is done by providing a class +specialization of ValueTraits that converts an object of the new +class to a string. For example, consider the definition of the +MyClass class:

+
+
+
// MyClass.h
+
+class MyClass
+{
+public:
+
+   int value;
+
+   MyClass(int value_) : value(value_) {}
+
+   // CxxTest requires a copy constructor
+   MyClass(const MyClass& other) : value(other.value) {}
+
+   // This is required if you want to use TS_ASSERT_EQUALS
+   bool operator==(const MyClass& other) const { return value == other.value; }
+
+   // If you want to use TS_ASSERT_LESS_THAN
+   bool operator<(const MyClass& other) const { return value < other.value; }
+};
+
+#ifdef CXXTEST_RUNNING
+// This declaration is only activated when building a CxxTest test suite
+#include <cxxtest/ValueTraits.h>
+#include <stdio.h>
+
+namespace CxxTest
+{
+   CXXTEST_TEMPLATE_INSTANTIATION
+   class ValueTraits<MyClass>
+   {
+      char _s[256];
+
+   public:
+      ValueTraits( const MyClass& m ) { sprintf( _s, "MyClass( %i )", m.value ); }
+      const char *asString() const { return _s; }
+   };
+};
+#endif // CXXTEST_RUNNING
+

This class includes definitions of operator== and operator< +that support comparisons with TS_ASSERT_EQUALS +and TS_ASSERT_LESS_THAN. Additionally, +this header contains a specialization of ValueTraits (in the +CxxTest namespace) that generates a string description of a MyClass +instance.

+

The following test suite illustrates how these definitions can be +used to define a test runner:

+
+
+
// MyTestSuite10.h
+#include <cxxtest/TestSuite.h>
+#include <MyClass.h>
+
+class MyTestSuite10 : public CxxTest::TestSuite
+{
+public:
+   void test_le()
+   {
+      MyClass x(1), y(2);
+      TS_ASSERT_LESS_THAN( x, y );
+   }
+
+   void test_eq()
+   {
+      MyClass x(1), y(2);
+      TS_ASSERT_EQUALS( x, y );
+   }
+};
+
+

This runner for this test suite generates the following output:

+
+
+
Running 2 tests.
+In MyTestSuite10::test_eq:
+MyTestSuite10.h:17: Error: Expected (x == y), found (MyClass( 1 ) != MyClass( 2 ))
+Failed 1 of 2 tests
+Success rate: 50%
+
+

The test failure print logic uses the specialization of ValueTraits to create +the string description of MyClass that appears in the output.

+
+
+

7.3. Defining Value Traits for Template Classes

+

A simple modification to the above example illustrates how a trait can be defined for a +template class:

+
+
+
// MyTestSuite11.h
+#include <cxxtest/TestSuite.h>
+#include <TMyClass.h>
+
+class MyTestSuite11 : public CxxTest::TestSuite
+{
+public:
+   void test_le()
+   {
+      TMyClass<int> x(1), y(2);
+      TS_ASSERT_LESS_THAN( x, y );
+   }
+
+   void test_eq()
+   {
+      TMyClass<int> x(1), y(2);
+      TS_ASSERT_EQUALS( x, y );
+   }
+};
+
+

Unfortunately, this example employs partial template specialization, which is not supported by all C++ compilers.

+
+
+
+
+

8. Testing with Mock Objects

+
+

Mock Objects are a very useful concept for testing complex software. +The key idea is to pass special objects to tested code that facilitates +the testing process. For instance, a class that implements a +protocol over TCP might rely on an abstract ISocket interface. +Then a mock testing strategy could pass a MockSocket object that +does anything that is useful for testing (e.g., keep a log of all +data “sent” to verify later).

+

However, when a challenge for C/C++ developers is that you may need +to call global functions which you cannot override. Consider any +code that uses fopen(), fwrite() and fclose(). It is not +very elegant to have this code actually create files while being +tested. Even more importantly, you need to test how the code behaves +when “bad” things happen (e.g., when fopen() fails). Handling +these types of exceptional conditions is often a very challenging +issue for software testing.

+

CxxTest addresses this challenge by providing a generic mechanism for +defining mock global functions. The next section illustrates this mechanism for a single +global function. The following section provides more detail about specific features of CxxTest’s +support for mock testing.

+
+

8.1. Example: A Mock time() Function

+

Suppose that we want to perform mock testing using the well known +standard library function time(). Setting up a test suite with +a mock global function for time() can be broken down into the +following steps.

+
+

8.1.1. Declare Mock Functions

+

The CXXTEST_MOCK_GLOBAL macro is used to declare mock global functions. It is often convenient to include +these declarations in a header file, which is used in both the test suite as well as the code that is being tested:

+
+
+
// time_mock.h
+#include <time.h>
+#include <cxxtest/Mock.h>
+
+CXXTEST_MOCK_GLOBAL( time_t,        /* Return type          */
+                     time,          /* Name of the function */
+                     ( time_t *t ), /* Prototype            */
+                     ( t )          /* Argument list        */ );
+
+
+

8.1.2. Mock Functions in Tested Code

+

The tested code uses mock global functions, rather than using the global functions directly. +You access mock functions in the T (for Test) namespace, so the tested code calls T::time() instead of +time(). This is the equivalent of using abstract interfaces +instead of concrete classes.

+
+
+
// rand_example.cpp
+#include <time_mock.h>
+
+int generateRandomNumber()
+{
+    return T::time( NULL ) * 3;
+}
+
+
+

8.1.3. Mock Source Files

+

A source file needs to be defined that implements T::time() by +calling the real global function. This definition is performed automatically by +defining CXXTEST_MOCK_REAL_SOURCE_FILE before the header file is defined:

+
+
+
// time_real.cpp
+#define CXXTEST_MOCK_REAL_SOURCE_FILE
+#include <time_mock.h>
+

This source file is not used for testing, but instead it supports normal use of the tested code.

+

Similarly, a source file needs to be defined that implements T::time() by calling the mock +global function. This definition is performed automatically by defining CXXTEST_MOCK_TEST_SOURCE_FILE before the header file is defined:

+
+
+
// time_mock.cpp
+#define CXXTEST_MOCK_TEST_SOURCE_FILE
+#include <time_mock.h>
+
+
+

8.1.4. Test Suites using Mock Functions

+

A mock object for the time() function is created using the T::Base_time class, +which is automatically created by CxxTest. This class includes a time() method whose +API is the same as the global time() function. Thus, this method can be defined to have +whatever behavior is desired during testing. For example, the following example defines a +mock object that increments a counter to define an incremental value for time().

+
+
+
// MockTestSuite.h
+#include <cxxtest/TestSuite.h>
+#include <time_mock.h>
+
+int generateRandomNumber();
+
+
+class MockObject : public T::Base_time
+{
+public:
+    MockObject(int initial) : counter(initial) {}
+    int counter;
+    time_t time( time_t * ) { return counter++; }
+};
+
+class TestRandom : public CxxTest::TestSuite
+{
+public:
+    void test_generateRandomNumber()
+    {
+        MockObject t(1);
+        TS_ASSERT_EQUALS( generateRandomNumber(), 3 );
+        TS_ASSERT_EQUALS( generateRandomNumber(), 6 );
+        TS_ASSERT_EQUALS( generateRandomNumber(), 9 );
+    }
+};
+

Note that CxxTest uses global data to associate calls made with T::time() +to calls to MockObject::time(). The MockObject class simply +needs to be instantiated prior to the call to T::time().

+
+
+

8.1.5. Building the Test Runner

+

The cxxtestgen command is used to create a test runner with mock functions in a normal manner:

+
+
+
cxxtestgen --error-printer -o runner.cpp MockTestSuite.h
+

The test runner source file, runner.cpp, needs to be compiled an linked to the mock function definition, time_mock.cpp, as well as the code being tested, rand_example.cpp:

+
+
+
g++ -o runner -I. -I$CXXTEST runner.cpp time_mock.cpp rand_example.cpp
+

This generates a test runner that generates the following output:

+
+
+
Running 1 test.OK!
+
+
+
+
+

8.2. Advanced Topics

+
+

8.2.1. Void Functions

+

The CXXTEST_MOCK_VOID_GLOBAL is used to define mock global functions that return void. +This is identical to +CXXTEST_MOCK_GLOBAL except that it does not specify the return +type. Take a look in sample/mock/T/stdlib.h for a demonstation.

+
+
+

8.2.2. Calling the Real Functions While Testing

+

During testing it is sometimes necessary to call the real global +function instead of the mock global function. CxxTest allows a +user to do this by creating a special mock object. For a global +mock function of time(), the object T::Real_time represents the +real function. If this class is created, then T::time() will be +redirected to the real function.

+
+
+

8.2.3. Mocking Nonexistent Functions

+

Sometimes the tested code calls functions that are not available +when testing. For example, this can happen when testing driver +code that calls kernel functions that are not available to a user-mode +test runner. CxxTest can provide mock global function definitions +for the test code while using the original functions in the tested code.

+

The CXXTEST_SUPPLY_GLOBAL and CXXTEST_SUPPLY_VOID_GLOBAL macros are used to provide mock global function definitions. For example, the following declaration creates a mock global function for the Win32 kernel function IoCallDriver:

+
+
+
CXXTEST_SUPPLY_GLOBAL( NTSTATUS,                /* Return type */
+                       IoCallDriver,            /* Name        */
+                       ( PDEVICE_OBJECT Device, /* Prototype   */
+                         PIRP Irp ),
+                       ( Device, Irp )          /* How to call */ );
+

The tested driver code calls IoCallDriver() normally; there is no need for the T:: syntax. +The test suite is defined using the T::Base_IoCallDriver as with normal mock objects.

+

CxxTest also provides the macros CXXTEST_SUPPLY_GLOBAL_C and +CXXTEST_SUPPLY_GLOBAL_VOID_C that declare the functions with C +linkage (i.e., using extern "C"). These macros are used to declare +function prototypes, since you may not be able to include the header +files in the test suite that are associated with the mock global function.

+
+
+

8.2.4. Functions in Namespaces

+

The CXXTEST_MOCK macro is used to declare a mock global function that is associated +with a function in a namespace, including static class member functions. +For example, consider the function bool Files::FileExists( const +String &name ); the namespace Files contains the function +FileExists. The mock class will be called T::Base_Files_FileExists +and the function to implemented would be fileExists. The CXXTEST_MOCK macro declares this mock global function as follows:

+
+
+
CXXTEST_MOCK( Files_FileExists,       /* Suffix of mock class  */
+              bool,                   /* Return type           */
+              fileExists,             /* Name of mock member   */
+              ( const String &name ), /* Prototype             */
+              Files::FileExists,      /* Name of real function */
+              ( name )                /* Parameter list        */ );
+

Similarly, the CXXTEST_MOCK_VOID macro is used to declare a mock global function that returns void.

+

The CXXTEST_SUPPLY and CXXTEST_SUPPLY_VOID macros are used to provide mock global function definitions for nonexistent functions. For example:

+
+
+
CXXTEST_SUPPLY( AllocateIrp,         /* => T::Base_AllocateIrp */
+                PIRP,                /* Return type            */
+                allocateIrp,         /* Name of mock member    */
+                ( CCHAR StackSize ), /* Prototype              */
+                IoAllocateIrp,       /* Name of real function  */
+                ( StackSize )        /* Parameter list         */ );
+

Similarly, the CXXTEST_SUPPLY_C and CXXTEST_SUPPLY_VOID_C macros declare the functions with C linkage.

+
+
+

8.2.5. Overloaded Functions

+

The CXXTEST_MOCK and CXXTEST_MOCK_VOID macros have a flexible +interface that can provide mock global function definitions for +overloaded functions. The arguments simply need to specify different +mock class names, mock member names and different prototype definitions. +These different mock declarations will generate different mock objects that can be explicitly +referenced in a test suite.

+
+
+

8.2.6. The Mock Namespace

+

The default namespace for mock functions is T::. This namespace can be changed by defining the +CXXTEST_MOCK_NAMESPACE macro.

+
+
+
+
+
+

9. Installation

+
+

A key feature of CxxTest is that it does has virtually no installation +process. The cxxtestgen script can be directly executed from the +cxxtest/bin directory. Simply adding this directory to the PATH +environment of a command shell is sufficient for many applications. +Beyond that, the build process for test runners simply needs to +reference the cxxtest root directory to enable proper includes +during compilation.

+

The FOG parser requires two Python packages:

+
    +
  • +

    +ply +

    +
  • +
  • +

    +ordereddict (This is needed when running Python 2.4, 2.5 or 2.6) +

    +
  • +
+

If these packages are not available, then cxxtestgen will generate an error when the +FOG parser option is selected. +If you have +setuptools or +distribute +installed, then +you can install these packages from PyPI by executing

+
+
+
easy_install ply
+easy_install ordereddict
+

The cxxtestgen script has been tested with many different versions +of Python: 2.4 - 3.2. Note that this script has only been tested +with the CPython implementation. CxxTest 4.0 has been tested on +Linux and Mac platforms using the G and CLang compilers.

+
+
+
+

10. Status and Future Plans

+
+

The CxxTest 4.0 release reflects major changes in the management +and focus of CxxTest. The 4.0 release is the first release of +CxxTest in over seven years, and virtually all of the initial +developers have moved on to other projects. CxxTest is heavily +used at Sandia National Laboratories, and Sandia’s ongoing use of +CxxTest is a major driver for the 4.0 release.

+

Similarly, major +changes in CxxTest reflect the focus of the developer team:

+
    +
  • +

    +Perl is no longer used to support CxxTest scripts. Python is now the only scripting language used by CxxTest. +

    +
  • +
  • +

    +The testing scripts have been rewritten using the PyUnit framework. +

    +
  • +
  • +

    +The installation process for CxxTest now leverages and integrates with the system Python installation. +

    +
  • +
  • +

    +A more comprehensive C++ parser is now available, which supports testing of templates. +

    +
  • +
  • +

    +The CxxTest GUI is no longer supported, and the TS_WARN is deprecated. +

    +
  • +
  • +

    +CxxTest runners now have a command-line interface that facilitates interative use of the test runner. +

    +
  • +
  • +

    +A new user guide is now available in PDF, HTML and Ebook formats. +

    +
  • +
  • +

    +Updated the cxxtestgen script to work with Python 2.6 through 3.2 +

    +
  • +
+

Additionally, CxxTest is now validated with continuous integration +tests. Yes, the CxxTest developers eat their own dog food!

+

Although the GUI option for cxxtestgen appears to work fine, this +GUI is rather primitive. It simply provides a visual summary of +the test results, and not the interactive test execution that a +user would expect. This capability is deprecated since none of the +current developers use this feature. CxxTest users should consider +using CxxTest with Jenkins. The XUnitPrinter +test listener generates XML files that can be easily integrated by +Jenkins, which creates a visual summary of +test results with links to drill-down into test outputs.

+

This documentation has highlighted the commonly used test listeners. +There are a variety of other test listeners provided by CxxTest +that support advanced Cxxtest applications. For example, the +YesNoRunner is perhaps the simplest test listener; it simply +returns the number of test failures. The StdioFilePrinter is +used by StdioPrinter, but it does not assume that stdio is the +default output stream. This test listener can be used in contexts +where a custom output stream must be specified.

+
+
+
+

Acknowledgements

+
+

CxxTest was originally developed by Erez Volk. The following +developers actively contributed to the CxxTest 4.0 release:

+
    +
  • +

    +Gašper Ažman +

    +
  • +
  • +

    +Kevin Fitch +

    +
  • +
  • +

    +William Hart +

    +
  • +
  • +

    +John Siirola +

    +
  • +
+

The CxxTest documentation is generated using +AsciiDoc. The following people +have contributed to the CxxTest User Manual:

+
    +
  • +

    +William Hart +

    +
  • +
  • +

    +Lionel Orry +

    +
  • +
  • +

    +Erez Volk +

    +
  • +
+

A major advancement in CxxTest’s capability is the new test discovery +mechanism that is based on a parser of the Flexible Object Language +(FOG). FOG generalizes the C++ syntax, which enables CxxTest to +extract high-level class structure for test discovery. FOG was +developed by Edward Willink:

+
    +
  • +

    +Edward D. Willink. Meta-Compilation for C++, PhD Thesis, Computer Science Research Group, University of Surrey, January 2000. +

    +
  • +
+

The FOG parser in CxxTest critically relies on the excellent LALR +parser provided by Dave Beazley’s ply Python package. The scalable +performance of ply is critical for CxxTest.

+

CxxTest has greatly benefited from the support of the open source +community. We would like to thank the following organizations for +providing web hosting and computing resources: GitHub, SourceForge, +Tigris.org, Sandia National Laboratories, Google and COIN-OR. The development +of CxxTest has been partially supported by Sandia National Laboratories. +Sandia National Laboratories is a multi-program laboratory managed +and operated by Sandia Corporation, a wholly owned subsidiary of +Lockheed Martin Corporation, for the U.S. Department of Energy’s +National Nuclear Security Administration under contract DE-AC04-94AL85000.

+
+
+
+

Appendix A: Test Assertion Examples

+
+
+
+ TS_ASSERT +
+
+

+This is the most basic test assertion, which simply verifies that the expr argument is true: +

+
+
+
+
+
    void test_assert(void)
+    {
+        TS_ASSERT(1 + 1 > 1);
+    }
+
+
+ TS_ASSERT_DELTA +
+
+

+This test assertion verifies two floating point values are within a specified absolute difference: +

+
+
+
+
+
    void test_assert_delta(void)
+    {
+        TS_ASSERT_DELTA(sqrt(4.0), 2.0, 1e-7);
+    }
+
+
+ TS_ASSERT_DIFFERS +
+
+

+This test assertion verifies that the two arguments are not equal: +

+
+
+
+
+
    void test_assert_differs(void)
+    {
+        TS_ASSERT_DIFFERS(1, 2);
+    }
+
+
+ TS_ASSERT_EQUALS +
+
+

+ This test assertion verifies that the two arguments are equal: +

+
+
+
+
+
    void test_assert_equals(void)
+    {
+        TS_ASSERT_EQUALS(21 % 5, 1);
+    }
+

Note that this test is performed using the C++ == operator, whose behavior may be redefined for the two argument types.

+
+
+ TS_ASSERT_LESS_THAN +
+
+

+This test assertion verifies that the first argument is strictly less than the second argument: +

+
+
+
+
+
    void test_assert_less_than(void)
+    {
+        TS_ASSERT_LESS_THAN(0, 1);
+    }
+
+
+ TS_ASSERT_LESS_THAN_EQUALS +
+
+

+This test assertion verifies that the first argument is less than or equal to the second argument: +

+
+
+
+
+
    void test_assert_less_than_equals(void)
+    {
+        TS_ASSERT_LESS_THAN_EQUALS(0, 0);
+    }
+
+
+ TS_ASSERT_PREDICATE +
+
+

+This test assertion takes as an argument the name of a class, similar to a STL unary_function, and evaluates the operator() method: +

+
+
+
+
+
    class IsOdd
+    {
+    public:
+        bool operator()(int x) const { return x % 2 == 1; }
+    };
+
+    void test_assert_predicate(void)
+    {
+        TS_ASSERT_PREDICATE(IsOdd, 29);
+    }
+

This test assertion can be seen as a generalization of TS_ASSERT, but it +allows the tester to see the failed value.

+
+
+ TS_ASSERT_RELATION +
+
+

+It takes as an argument the name of a class, similar to a STL binary_function, and evaluates the operator() method: +

+
+
+
+
+
    void test_assert_relation(void)
+    {
+        TS_ASSERT_RELATION(std::greater<double>, 1e6, 1000.0);
+    }
+

This test assertion can be seen as a generalization of TS_ASSERT_EQUALS, TS_ASSERT_DIFFERS, TS_ASSERT_LESS_THAN and TS_ASSERT_LESS_THAN_EQUALS. +This can be used to assert comparisons which are not covered by the builtin test assertions.

+
+
+ TS_ASSERT_SAME_DATA +
+
+

+This test assertion is similar to TS_ASSERT_EQUALS, +except that it compares the contents of two buffers in memory: +

+
+
+
+
+
    void test_assert_same_data(void)
+    {
+        char input = "The quick brown fox ran over the lazy dog";
+        char output[26];
+        memcopy(output, input, 26);
+        TS_ASSERT_SAME_DATA(input, output, 26);
+    }
+

The standard runner dumps the contents of both buffers as hex values when this test fails.

+
+
+ TS_ASSERT_THROWS +
+
+

+This test assertion verifies that the specified exception is thrown when the first argument is executed: +

+
+
+
+
+
    void throws_runtime_error(void)
+    {
+        raise std::runtime_error, "This method simply generates an exception";
+    }
+
+    void test_assert_throws(void)
+    {
+        TS_ASSERT_THROWS(self.throws_runtime_error(), std::runtime_error);
+    }
+
+
+ TS_ASSERT_THROWS_ANYTHING +
+
+

+This test assertion verifies that some exception is thrown when the first argument is executed: +

+
+
+
+
+
    void test_assert_throws_anything(void)
+    {
+        TS_ASSERT_THROWS_ANYTHING(self.throws_runtime_error());
+    }
+
+
+ TS_ASSERT_THROWS_ASSERT +
+
+

+This test assertion verifies that an exception is thrown when executing the first argument. The second argument specifies a variable declaration for the exception, and the third argument is executed to test that +exception value: +

+
+
+
+
+
    void throws_value(void)
+    {
+        raise 1;
+    }
+
+    void test_assert_throws_assert(void)
+    {
+        TS_ASSERT_THROWS_ASSERT(self.throws_value(), const Error & e, TS_ASSERT_EQUALS(e, 1));
+    }
+

Note that this can be viewed as a generalization of TS_ASSERT_THROWS_EQUALS.

+
+
+ TS_ASSERT_THROWS_EQUALS +
+
+

+This test assertion verifies that an exception is thrown when executing the first argument. The second argument specifies a variable declaration for the exception, and the third and fourth arguments are values that are asserted equal after the exception is thrown: +

+
+
+
+
+
    void test_assert_throws_equals(void)
+    {
+        TS_ASSERT_THROWS_EQUALS(self.throws_value(), const Error & e, e.what(), 1);
+    }
+
+
+ TS_ASSERT_THROWS_NOTHING +
+
+

+This test assertion verifies that an exception is not thrown when executing the first argument: +

+
+
+
+
+
    void throws_nothing(void)
+    { }
+
+    void test_assert_throws_nothing(void)
+    {
+        TS_ASSERT_THROWS_ASSERT(self.throws_nothing());
+    }
+
+
+ TS_FAIL +
+
+

+This function triggers a test failure with an associated message: +

+
+
+
+
+
    void test_fail(void)
+    {
+        TS_FAIL("This test has failed.");
+    }
+
+
+ TS_TRACE +
+
+

+This function prints an informational message: +

+
+
+
+
+
    void test_trace(void)
+    {
+        TS_TRACE("This is a test tracing message.");
+    }
+
+
+ TS_WARN +
+
+

+This function prints a message as a warning: +

+
+
+
+
+
    void test_warn(void)
+    {
+        TS_WARN("This is a warning message.");
+    }
+
+
+
+

Appendix B: Integrating with Your Build Environment

+
+

CxxTest can be integrated into a variety of build environments to +automate the generation, compilation and execution of test runners. +Here is a rough breakdown of this process:

+
    +
  • +

    +Split the application into a library and a main module that just + calls the library classes. This way, the test runner will be + able to access all your classes through the library. +

    +
  • +
  • +

    +Create another application (or target, or project, or whatever) + for the test runner. Make the build tool generate it automatically. +

    +
  • +
  • +

    +Configure the build tool to run the tests automatically. +

    +
  • +
+

Unfortunately, different build tools and IDEs need to setup this +process in different ways. The following sections provide rough +guidance for doing this for some come use cases.

+
+ + + +
+
Note
+
These examples are not actively maintained and tested. Please send +suggestions to the CxxTest developers for updating this documentation.
+
+
+

Using Makefiles

+

Generating the tests with a makefile is pretty straightforward. +Simply add rules to generate, compile and run the test runner.

+
+
+
all: lib run_tests app
+
+# Rules to build your targets
+lib: ...
+
+app: ...
+
+# A rule that runs the unit tests
+run_tests: runner
+        ./runner
+
+# How to build the test runner
+runner: runner.cpp lib
+        g++ -o $@ $^
+
+# How to generate the test runner
+runner.cpp: SimpleTest.h ComplicatedTest.h
+         cxxtestgen -o $@ --error-printer $^
+
+
+

Using Cons

+

Cons is a powerful and +versatile make replacement which uses Perl scripts instead of Makefiles.

+

See cxxtest/sample/Construct in the CxxTest distribution for an +example of building CxxTest test runners with Cons.

+
+
+

Using Microsoft Visual Studio

+

See cxxtest/sample/msvc in the distribution +to see a reasonable integration of CxxTest with Microsoft Visual Studio’s IDE. +Basically, the workspace has three +projects:

+
    +
  • +

    +The project CxxTest_3_Generate runs cxxtestgen. +

    +
  • +
  • +

    +The project CxxTest_2_Build compiles the generated file. +

    +
  • +
  • +

    +The project CxxTest_1_Run runs the tests. +

    +
  • +
+

This method certainly works, and the test results are conveniently +displayed as compilation errors and warnings (for TS_WARN. +However, there are still a few things missing; to integrate this +approach with your own project, you usually need to work a little +bit and tweak some makefiles and project options. The script +sample/msvc/FixFiles.bat can automate some of this process.

+
+
+

Using Microsoft Windows DDK

+

To use CxxTest with the build utility for device drivers, you add +the generated tests file as an extra dependency using the +NTBUILDTARGET0 macro and the Makefile.inc file. An example of +how to do this is in the CxxTest distribution under sample/winddk.

+
+
+
+
+

Appendix C: Testing CxxTest

+
+

In the cxxtest/test directory, you can execute

+
+
+
python test_cxxtest.py
+

to launch all tests. By default, this script executes test suites +for a variety of compilers if they are found on the user’s path: +g++, clang++, cl (the Microsoft Visual Studio compiler). +Additionally, this test script includes separate test suites for +the default test discovery mechanism as well as test discovery using +the new FOG parser.

+

You can execute a specific test suite by giving its name as an +argument to this test script. For example, the command

+
+
+
python test_cxxtest.py TestGpp
+

executes the TestGpp test suite, which tests CxxTest with the +g++ compiler. Similarly, the command

+
+
+
python test_cxxtest.py TestGppFOG
+

executes the test suite that tests CxxTest using the g++ compiler +and the FOG parser.

+

The test_cxxtest.py script should work with versions Python 2.7 +or newer. If you are running Python 2.6, you will need to install +the unittest2 package. If you have +setuptools or +distribute +installed, then +you can install this package from PyPI by executing

+
+
+
easy_install unittest2
+

Similarly, the tests for this document rely on the PyUtilib Python package.

+

The FOG parser requires two Python packages:

+
    +
  • +

    +ply +

    +
  • +
  • +

    +ordereddict (This is only needed when running Python 2.6) +

    +
  • +
+

If these packages are not available, then test_cxxtest.py will skip the FOG tests.

+
+
+
+

Appendix D: CxxTest Releases

+
+
    +
  • +

    +Version 4.0.3 (TODO) +

    +
      +
    • +

      +Adding support for Python 2.4, 2.5, 2.6, 2.7 and 3.2 +

      +
    • +
    +
  • +
  • +

    +Version 4.0.2 (2012-01-02) +

    +
      +
    • +

      +Bug fix to enable installation of cxxtestgen without the setuptools package +

      +
    • +
    +
  • +
  • +

    +Version 4.0.1 (2012-01-01) +

    +
      +
    • +

      +Documentation updates +

      +
    • +
    • +

      +Bug fix for installation of cxxtestgen script +

      +
    • +
    +
  • +
  • +

    +Version 4.0 (2011-12-28) +

    +
      +
    • +

      +Perl is no longer used to support CxxTest scripts. Python is now the only scripting language used by CxxTest. +

      +
    • +
    • +

      +The testing scripts have been rewritten using the PyUnit framework. +

      +
    • +
    • +

      +The installation process for CxxTest now leverages and integrates with the system Python installation. +

      +
    • +
    • +

      +A more comprehensive C++ parser is now available, which supports testing of templates. +

      +
    • +
    • +

      +The CxxTest GUI is no longer supported, and the TS_WARN is deprecated. +

      +
    • +
    • +

      +CxxTest runners now have a command-line interface that facilitates interative use of the test runner. +

      +
    • +
    • +

      +A new user guide is now available in PDF, HTML and Ebook formats. +

      +
    • +
    +
  • +
  • +

    +Version 3.10.1 (2004-12-01) +

    +
      +
    • +

      +Improved support for VC7 +

      +
    • +
    • +

      +Fixed clash with some versions of STL +

      +
    • +
    +
  • +
  • +

    +Version 3.10.0 (2004-11-20) +

    +
      +
    • +

      +Added mock framework for global functions +

      +
    • +
    • +

      +Added TS_ASSERT_THROWS_ASSERT and TS_ASSERT_THROWS_EQUALS +

      +
    • +
    • +

      +Added CXXTEST_ENUM_TRAITS +

      +
    • +
    • +

      +Improved support for STL classes (vector, map etc.) +

      +
    • +
    • +

      +Added support for Digital Mars compiler +

      +
    • +
    • +

      +Reduced root/part compilation time and binary size +

      +
    • +
    • +

      +Support C++-style commenting of tests +

      +
    • +
    +
  • +
  • +

    +Version 3.9.1 (2004-01-19) +

    +
      +
    • +

      +Fixed small bug with runner exit code +

      +
    • +
    • +

      +Embedded test suites are now deprecated +

      +
    • +
    +
  • +
  • +

    +Version 3.9.0 (2004-01-17) +

    +
      +
    • +

      +Added TS_TRACE +

      +
    • +
    • +

      +Added --no-static-init +

      +
    • +
    • +

      +CxxTest::setAbortTestOnFail() works even without --abort-on-fail +

      +
    • +
    +
  • +
  • +

    +Version 3.8.5 (2004-01-08) +

    +
      +
    • +

      +Added --no-eh +

      +
    • +
    • +

      +Added CxxTest::setAbortTestOnFail() and CXXTEST_DEFAULT_ABORT +

      +
    • +
    • +

      +Added CxxTest::setMaxDumpSize() +

      +
    • +
    • +

      +Added StdioFilePrinter +

      +
    • +
    +
  • +
  • +

    +Version 3.8.4 (2003-12-31) +

    +
      +
    • +

      +Split distribution into cxxtest and cxxtest-selftest +

      +
    • +
    • +

      +Added ‘sample/msvc/FixFiles.bat’ +

      +
    • +
    +
  • +
  • +

    +Version 3.8.3 (2003-12-24) +

    +
      +
    • +

      +Added TS_ASSERT_PREDICATE +

      +
    • +
    • +

      +Template files can now specify where to insert the preamble +

      +
    • +
    • +

      +Added a sample Visual Studio workspace in ‘sample/msvc’ +

      +
    • +
    • +

      +Can compile in MSVC with warning level 4 +

      +
    • +
    • +

      +Changed output format slightly +

      +
    • +
    +
  • +
  • +

    +Version 3.8.1 (2003-12-21) +

    +
      +
    • +

      +Fixed small bug when using multiple --part files. +

      +
    • +
    • +

      +Fixed X11 GUI crash when there’s no X server. +

      +
    • +
    • +

      +Added GlobalFixture::setUpWorld()/tearDownWorld() +

      +
    • +
    • +

      +Added leaveOnly(), activateAllTests() and ‘sample/only.tpl’ +

      +
    • +
    • +

      +Should now run without warnings on Sun compiler. +

      +
    • +
    +
  • +
  • +

    +Version 3.8.0 (2003-12-13) +

    +
      +
    • +

      +Fixed bug where ‘Root.cpp’ needed exception handling +

      +
    • +
    • +

      +Added TS_ASSERT_RELATION +

      +
    • +
    • +

      +TSM_ macros now also tell you what went wrong +

      +
    • +
    • +

      +Renamed Win32Gui::free() to avoid clashes +

      +
    • +
    • +

      +Now compatible with more versions of Borland compiler +

      +
    • +
    • +

      +Improved the documentation +

      +
    • +
    +
  • +
  • +

    +Version 3.7.1 (2003-09-29) +

    +
      +
    • +

      +Added --version +

      +
    • +
    • +

      +Compiles with even more exotic g++ warnings +

      +
    • +
    • +

      +Win32 Gui compiles with UNICODE +

      +
    • +
    • +

      +Should compile on some more platforms (Sun Forte, HP aCC) +

      +
    • +
    +
  • +
  • +

    +Version 3.7.0 (2003-09-20) +

    +
      +
    • +

      +Added TS_ASSERT_LESS_THAN_EQUALS +

      +
    • +
    • +

      +Minor cleanups +

      +
    • +
    +
  • +
  • +

    +Version 3.6.1 (2003-09-15) +

    +
      +
    • +

      +Improved QT GUI +

      +
    • +
    • +

      +Improved portability some more +

      +
    • +
    +
  • +
  • +

    +Version 3.6.0 (2003-09-04) +

    +
      +
    • +

      +Added --longlong +

      +
    • +
    • +

      +Some portability improvements +

      +
    • +
    +
  • +
  • +

    +Version 3.5.1 (2003-09-03) +

    +
      +
    • +

      +Major internal rewrite of macros +

      +
    • +
    • +

      +Added TS_ASSERT_SAME_DATA +

      +
    • +
    • +

      +Added --include option +

      +
    • +
    • +

      +Added --part and --root to enable splitting the test runner +

      +
    • +
    • +

      +Added global fixtures +

      +
    • +
    • +

      +Enhanced Win32 GUI with timers, -keep and -title +

      +
    • +
    • +

      +Now compiles with strict warnings +

      +
    • +
    +
  • +
  • +

    +Version 3.1.1 (2003-08-27) +

    +
      +
    • +

      +Fixed small bug in TS_ASSERT_THROWS_*() +

      +
    • +
    +
  • +
  • +

    +Version 3.1.0 (2003-08-23) +

    +
      +
    • +

      +Default ValueTraits now dumps value as hex bytes +

      +
    • +
    • +

      +Fixed double invocation bug (e.g. TS_FAIL(functionWithSideEffects())) +

      +
    • +
    • +

      +TS_ASSERT_THROWS*() are now "abort on fail"-friendly +

      +
    • +
    • +

      +Win32 GUI now supports Windows 98 and doesn’t need comctl32.lib +

      +
    • +
    +
  • +
  • +

    +Version 3.0.1 (2003-08-07) +

    +
      +
    • +

      +Added simple GUI for X11, Win32 and Qt +

      +
    • +
    • +

      +Added TS_WARN() macro +

      +
    • +
    • +

      +Removed --exit-code +

      +
    • +
    • +

      +Improved samples +

      +
    • +
    • +

      +Improved support for older (pre-std::) compilers +

      +
    • +
    • +

      +Made a PDF version of the User’s Guide +

      +
    • +
    +
  • +
  • +

    +Version 2.8.4 (2003-07-21) +

    +
      +
    • +

      +Now supports g++-3.3 +

      +
    • +
    • +

      +Added --have-eh +

      +
    • +
    • +

      +Fixed bug in numberToString() +

      +
    • +
    +
  • +
  • +

    +Version 2.8.3 (2003-06-30) +

    +
      +
    • +

      +Fixed bugs in cxxtestgen.pl +

      +
    • +
    • +

      +Fixed warning for some compilers in ErrorPrinter/StdioPrinter +

      +
    • +
    • +

      +Thanks Martin Jost for pointing out these problems! +

      +
    • +
    +
  • +
  • +

    +Version 2.8.2 (2003-06-10) +

    +
      +
    • +

      +Fixed bug when using CXXTEST_ABORT_TEST_ON_FAIL without standard library +

      +
    • +
    • +

      +Added CXXTEST_USER_TRAITS +

      +
    • +
    • +

      +Added --abort-on-fail +

      +
    • +
    +
  • +
  • +

    +Version 2.8.1 (2003-01-16) +

    +
      +
    • +

      +Fixed charToString() for negative chars +

      +
    • +
    +
  • +
  • +

    +Version 2.8.0 (2003-01-13) +

    +
      +
    • +

      +Added CXXTEST_ABORT_TEST_ON_FAIL for xUnit-like behaviour +

      +
    • +
    • +

      +Added ‘sample/winddk’ +

      +
    • +
    • +

      +Improved ValueTraits +

      +
    • +
    • +

      +Improved output formatter +

      +
    • +
    • +

      +Started version history +

      +
    • +
    +
  • +
  • +

    +Version 2.7.0 (2002-09-29) +

    +
      +
    • +

      +Added embedded test suites +

      +
    • +
    • +

      +Major internal improvements +

      +
    • +
    +
  • +
+
+
+
+

+ + + diff --git a/tools/cxxtest/doc/guide.pdf b/tools/cxxtest/doc/guide.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3bd721f7d6ecf98a11b6424e269766502ee16403 GIT binary patch literal 240355 zcmY!laBR8|4K70yGX(>M{G==e8yhZtpVYkck_-hSV*>>U;L>-?%qdAN zQqXtHNi0cqNlngAN#(M$<0>vGN=?k=s<<_^f43jAp@3_3{ZZZWZlAP261R2Nca(4h zyRN*!>YCK*F>0TU1X8ljzWZtRnHbc=b`*8n+r*9Q@RM`st zV|s5Mf0rvYF9qu1)V!4Zq%1B&6BDFh3#lwfRnU*{Ps&P7F5%J-E=?){i+JWHrl)f0 zhi9ggWGGk|aOr!bW~OJ9C>WY@={seX6bGahIp^mVKR$c9R(+mF^`59jnY&ZAC2B3^FTEN*Ysc;E1Gm`% zxhi)z+A{|--mu|tSZ}$%ZTdIvGj4kv!cykHbp3gBSNfk%d*1&@ExG(%{PUyVuVa(< zm%n>o)i3sbeWmeV`{h#N6Lzi8z!HY0rbuB3O?q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BMuqzguEAxC%et<((b;>)-mL{@WYx&VE^; zlzu+#SN4WzgT4IUmV9x4{&@O#CmWBMvD58;oR+X=IG-rRxAe>6_ec5p4x1P7_BqsW zZ~ty0d%pawh41`^$pu_~%fBqQ?>4uXeCd8|UwC@(ukHW;XFtDG@oxR`)t@u}d}06i z%1P?~wf)CecW3@NUb|=4lwvTwd^)OlCGT4(Z&^sckJx)bbEizMGH z@`-uh(t5IVL!?pX-Ss!LHv1cGR5#kmT_&owEl7?3fuaqlb(^&Pm85`uC$EOFrQzhs z;UA=uuAfz2dD6P0cOSpN?P@uXYk{Zk|4X>F`e~5v^sL&D*Nda%ul`zb&3&ugs;_}- z`%#3rLv<%*ySMz_Vzw$wMtaUI)F^fwQi%KerQq#DMjLl4q&A3!mUH#p-00PdydH?_b literal 0 HcmV?d00001 diff --git a/tools/cxxtest/doc/guide.txt b/tools/cxxtest/doc/guide.txt new file mode 100644 index 0000000..f4fe68e --- /dev/null +++ b/tools/cxxtest/doc/guide.txt @@ -0,0 +1,1559 @@ +CxxTest User Guide +================== +:doctype: article + +:cpp: {basebackend@docbook:c++:cpp} +:makefile: {basebackend@docbook:make:makefile} + +:numbered!: +[abstract] +Abstract +-------- +CxxTest is a unit testing framework for C\++ that is similar in +spirit to http://junit.org/[JUnit], +http://cppunit.sourceforge.net[CppUnit], and +http://xprogramming.com/software.html[xUnit]. CxxTest is easy to +use because it does not require precompiling a CxxTest testing +library, it employs no advanced features of C++ (e.g. RTTI) and it +supports a very flexible form of test discovery. This documentation +describes CxxTest 4.0, which includes significant enhancements to +the test discovery process, a modern test driver, and new documentation. + +:numbered: + +Overview +-------- + +CxxTest is a unit testing framework for C++ that is similar in +spirit to http://junit.org/[JUnit], +http://cppunit.sourceforge.net[CppUnit], and +http://xprogramming.com/software.html[xUnit]. +CxxTest is designed to be as portable as possible; it does not require + + - RTTI + - Member template functions + - Exception handling + - External libraries (including memory management, file/console I/O, graphics libraries) + +In particular, the design of CxxTest was tailored for C\++ compilers +on embedded systems, for which many of these features are not +supported. However, CxxTest can also leverage standard C++ features +when they are supported by a compiler (e.g. catch unhandled +exceptions). + +Additionally, CxxTest supports _test discovery_. Tests are defined +in C\++ header files, which are parsed by CxxTest to automatically +generate a test runner. Thus, CxxTest is somewhat easier to use +than alternative C++ testing frameworks, since you do not need to +_register_ tests. + +The http://cxxtest.com[CxxTest Home Page] is +http://cxxtest.com[http://cxxtest.com]. This webpage contains links +for https://sourceforge.net/projects/cxxtest/files/[release downloads], +the https://groups.google.com/forum/?hl=en#!forum/cxxtest-forum[CxxTest +discussion list], and documentation in +http://cxxtest.com/cxxtest/doc/guide.html[HTML], +http://cxxtest.com/cxxtest/doc/guide.pdf[PDF], and +http://cxxtest.comm/cxxtest/doc/guide.epub[EPUB] formats. The +http://cxxtest.com[CxxTest Home Page] also includes developer +resources (e.g. https://software.sandia.gov/hudson/view/CxxTest/[automated +test results]). CxxTest is available under the +http://www.gnu.org/copyleft/lesser.html[GNU Lesser General Public] +license. + +The CxxTest User Guide provides the following documentation: + + - <>: Some simple examples that illustrate how to use CxxTest + - <>: The test assertions supported by CxxTest + - <>: Documentation for the +cxxtestgen+ command + - <>: Discussion of command line options for test runners + - <>: Advanced features of CxxTest + - <>: Customizing data traits for error messages + - <>: How to test with mock global functions + - <>: How to install CxxTest + - <>: Comments on the past, present and future of CxxTest + + + +[[gettingStarted]] +Getting Started +--------------- + +Testing is performed with CxxTest in a four-step process: + + 1. Tests are defined in C++ header files + 2. The +cxxtestgen+ command processes header files to generate files for the test runner. + 3. Compile the test runner. + 4. Execute the test runner to run all test suites. + +CxxTest supports test automation, sharing of setup +and shutdown code for tests, aggregation of tests into collections, +and independence of the tests from the reporting framework. To +achieve this, CxxTest supports some important concepts that are common to xUnit frameworks ( +e.g. http://junit.org/[JUnit], http://cppunit.sourceforge.net[CppUnit], and +http://xprogramming.com/software.html[xUnit]): + +test fixture:: + A 'test fixture' represents the preparation needed to perform one or more + tests, and any associate cleanup actions. This may involve, for example, + creating temporary or proxy databases, directories, or starting a server + process. + +///// +test case:: + A 'test case' is the smallest unit of testing. It checks for a specific + response to a particular set of inputs. CxxTest provides a base class, + +TestCase+, which may be used to create new test cases. +///// + +test suite:: + A 'test suite' is a collection of test cases, which represent + the smallest unit of testing. A test suite is defined by a class + that inherits from the +CxxTest::TestSuite+ class, and the tests + in a test suite are executed together. + +test:: + A test is a public member function of a test suite whose name + starts with +test+, e.g. +testDirectoryScanner()+, + +test_cool_feature()+ and +TestImportantBugFix()+. + +test runner:: + A 'test runner' is a component which orchestrates the execution + of tests across one or more test suites and provides the outcome + to the user. + +When building test fixtures using +TestSuite+, the +TestSuite.setUp+ +and +TestSuite.tearDown+ methods can be overridden to provide +initialization and cleanup for the fixture. The +TestSuite.setUp+ +method is run before each test is executed, and the +TestSuite.tearDown+ +method is run after each test is executed. + + +A First Example +~~~~~~~~~~~~~~~ + +The following is a simple example of a +test suite with a single test, +testAddition+, which perform two test assertions: +[source,{cpp}] +---- +include::examples/MyTestSuite1.h[] +---- + +You use the +cxxtestgen+ script to generate a _test runner_ for test suites in C++ header files: +[source,bash] +---- +include::examples/.buildRunner_main.sh[] +---- +This command generates the file +runner.cpp+, which can be compiled. +[source,bash] +---- +include::examples/.buildRunner_main.sh[] +---- +Note that additional compiler flags may be needed to include headers +and libraries that are used during testing. + + +This runner can be executed to perform the specified tests: +[source,bash] +---- +include::examples/.exeRunner_main.sh[] +---- +which generates the following output: +---- +include::examples/exeRunner.out[] +---- + + +A Second Example +~~~~~~~~~~~~~~~~ + +The following header file extends the previous example to +include a test that generates an error: +[source,{cpp}] +---- +include::examples/.MyTestSuite2_.h[] +---- + +The test runner generated by +cxxtestgen+ for this test suite generates the following output: +---- +include::examples/exeRunner2.out[] +---- + + +Sample Problems +~~~~~~~~~~~~~~~ + +CxxTest comes with example test suites in the `cxxtest/sample` subdirectory of +the distribution. If you look in that directory, you will see three +Makefiles: `Makefile.unix`, `Makefile.msvc` and +`Makefile.bcc32` which are for Linux/Unix, MS Visual C\++ and Borland C++, repectively. These files are provided as a starting point, +and some options may need to be tweaked in them for your system. + +//// +WEH - I think we should omit these command line unless they are tested... + +If you are running under Windows, a good guess would be to run +`nmake -fMakefile.msvc run_win32` (you may need to run +`VCVARS32.BAT` first). +Under Linux, `make -fMakefile.unix run_x11` should probably work. +//// + + +[[testAssertions]] +Test Assertions +--------------- + +The following table summarizes the test assertions supported by CxxTest. +<> provides examples that illustrate the use of these test assertions. + +[options="header"] +|==================================================================================== +| Macro | Description +| <> | Verify +expr+ is true +| xref:ts_assert_delta[+TS_ASSERT_DELTA(x,y,d)+] | Verify that +abs(x-y) < d+ +| xref:ts_assert_differs[+TS_ASSERT_DIFFERS(x,y)+] | Verify that +x != y+ +| xref:ts_assert_equals[+TS_ASSERT_EQUALS(x,y)+] | Verify that +x == y+ +| xref:ts_assert_less_than[+TS_ASSERT_LESS_THAN(x,y)+] | Verify that +x < y+ +| xref:ts_assert_less_than_equals[+TS_ASSERT_LESS_THAN_EQUALS(x,y)+] | Verify that +x <= y+ +| xref:ts_assert_predicate[+TS_ASSERT_PREDICATE(P,x)+] | Verify +P(x)+ +| xref:ts_assert_relation[+TS_ASSERT_RELATION(x,R,y)+] | Verify +x R y+ +| xref:ts_assert_same_data[+TS_ASSERT_SAME_DATA(x,y,size)+] | Verify two buffers are equal +| xref:ts_assert_throws[+TS_ASSERT_THROWS(expr,type)+] | Verify that +expr+ throws the specified exception type +| <> | Verify that +expr+ throws an exception +| xref:ts_assert_throws_assert[+TS_ASSERT_THROWS_ASSERT(expr,arg,assertion)+] | Verify type and value of what +expr+ throws +| xref:ts_assert_throws_equals[+TS_ASSERT_THROWS_EQUALS(expr,arg,x,y)+] | Verify type and value of what +expr+ throws +| <> | Verify that +expr+ doesn't throw anything +| <> | Fail unconditionally +| <> | Print +message+ as an informational message +| <> | Print +message+ as a warning +|==================================================================================== + +The test assertions supported by CxxTest are defined as macros, +which eliminates the need for certain templates within CxxTest and +allows tests to catch exceptions. There are four categories of +test assertions in CxxTest, which are distinguished by their prefixes: + +TS_:: These test assertions perform a test. Catch exceptions generated +during testing will cause the test to fail, except for tests that +check for exceptions. + +TSM_:: These test assertions perform the same tests as the corresponding ++TS+ assertions, but their first argument is a +const char*+ message +buffer that is printed when the test fails. + +ETS_:: These test assertions perform the same tests as the corresponding ++TS+ assertions. However, these test assertions do not catch +exceptions generated during testing. + +ETSM_:: These test assertions perform the same tests as the +corresponding +TS+ assertions, but (1) their first argument is a ++const char*+ message buffer is printed when the test fails, and +(2) these assertions do not catch exceptions generated during +testing. + + +[[cxxtestgen]] +The CxxTestGen Command +---------------------- + +The +cxxtestgen+ command processes one or more C++ header files to +generate a test runner. The +cxxtestgen+ command performs test +discovery by parsing the header files to find test classes, which +inherit from the class +CxxTest::TestSuite+. + +The +--help+ option generates the following summary of the +cxxtestgen+ command line options: + +---- +include::examples/cxxtestgen.out[] +---- +The following section describe illustrate the use of these command line options. + + +General Options +~~~~~~~~~~~~~~~ + +The default behavior of +cxxtestgen+ is to send the source for the +test runner to the standard output stream. The +--output+ (+-o+) +option indicates a filename for the test runner. + +The +--world+ (+-w+) option specifies the value of the +CxxTest::RealWorldDescription::_worldName+ +variable. This option also customizes the filename used for XML output files (see below). + +The +--include+ option defines a filename that is included in the runner before all other headers. + +The +--abort-on-fail+ option forces an abort if a test fails, rather than continuing execution +to the next test. + +The +--main+ option specifies an alternate name for the +main()+ function. + +Test Listener Options +~~~~~~~~~~~~~~~~~~~~~ + +The test runner behavior is controlled by a _test listener_ class +that is used to define to the +main+ function. The test listener +class is a subclass of +TestListener+ that receives notifications +about the testing process, notably which assertions failed. The ++--runner+ option is used to specify the test listener that is used +in the test runner. The following test listeners are defined in +CxxTest: + + +ErrorPrinter+:: + This is the standard error printer, which formats its output to the standard output stream (+std::cout+). + +StdioPrinter+:: + The same as +ErrorPrinter+ except that it uses +printf+ instead of +std::cout+. + +ParenPrinter+:: + Identical to +ErrorPrinter+ except that it prints line numbers in parantheses. This is the way Visual Studio expects it. + +XmlPrinter+:: + Print test results to an XML file. + +XUnitPrinter+:: + This test listener generates output using both +ErrorPrinter+ and +XmlPrinter+. + +ErrorPrinter +^^^^^^^^^^^^ + +The +--error-printer+ option creates a runner using the +ErrorPrinter+ +test listener, and it indicates that the standard library is used +in the test runner. The +ErrorPrinter+ test listener prints dots +to summarize test execution, along with a summary of the test +results. For example, the command +[source,bash] +---- +include::examples/.buildRunner2_main.sh[] +---- +generates the following output: + +---- +include::examples/exeRunner2.out[] +---- + +StdioPrinter +^^^^^^^^^^^^ + +If your compiler does not support +std::cout+, then the +ErrorPrinter+ test listener cannot be used. +In this case, the +StdioPrinter+ test listener can be used; it provides the same output as +ErrorPrinter+ but it uses the +printf+ function. For example, the command line: +[source,bash] +---- +include::examples/.buildRunner4_main.sh[] +---- +generates the following output: + +---- +include::examples/buildRunner4.txt[] +---- + +ParenPrinter +^^^^^^^^^^^^ + +The +--runner=ParenPrinter+ option creates a similar test runner: +[source,bash] +---- +include::examples/.buildRunner3_main.sh[] +---- +This test runner generates output that is similar to the +ErrorPrinter+ test listener: + +---- +include::examples/buildRunner3.txt[] +---- +The only difference is the parentheses used in the output. This test listener provides a format that can be recognized by Visual Studio. + +//// +The +StdioPrinter+ makes reference to +stdout+ as the default output +stream. In some environments, the +stdio.h+ header may be defined +but not +stdout+. The +StdioFilePrinter+ test listener can be used +in this case, though the main() function needs to be adapted to specify the +stream that is used in output. +//// + +XmlPrinter +^^^^^^^^^^ + +The +--runner=XmlPrinter+ option creates a test runner whose output is an XML summary of the test results. For example, the command: +[source,bash] +---- +include::examples/.buildRunner6_main.sh[] +---- +generates the following output: + +---- +include::examples/buildRunner6.txt[] +---- +This XML format is conforms to the XML standard used by other xUnit tools. Thus, this output can be used as input in other tools, like http://jenkins-ci.org/[Jenkins], to generate test summaries. + + +XUnitPrinter +^^^^^^^^^^^^ + +The +XUnitPrinter+ test listener generates output using both the +ErrorPrinter+ and +XmlPrinter+ test listeners. This allows the +user to interactively view a simple test summary, while simultaneously +generating an XML summary of the test results. The +--xunit-printer+ +option specifies the use of +XUnitPrinter+: +[source,bash] +---- +include::examples/.buildRunner7_main.sh[] +---- +This test runner generates the following output: + +---- +include::examples/buildRunner7.txt[] +---- +The default filename for the XML results is +TEST-cxxtest.xml+. The +--xunit-file+ option can be used to specify an alternative filename. Additionally, the value of the +--world+ option can be used to specify the filename +TEST-.xml+. + + +Language Options +~~~~~~~~~~~~~~~~ + +When +cxxtestgen+ performs test discovery, it also performs checks +to detect whether (1) the standard library is used and (2) exceptions +are used. These checks configure CxxTest to _not_ assume that these +C++ language features are used when generating the test driver. +Thus, CxxTest can naturally be used with compilers that do not +support these features. + +The +cxxtestgen+ command includes several options that override +these checks and define features of C++ that are used by the test +runner. The +--have-std+ option indicates that the test runner +should use the standard library, and the +--no-std+ option indicates +that the test runner should not use the standard library. The +--have-eh+ options indicates that the test runner should use +exception handling, and the +--no-eh+ indicates that the test runner +should not not use exception handling. + +The +--longlong+ option specifies the type used for long long +integers. The default is for _no_ long long integer type to be specified, +which is consistent with the current C++ standard. + +CxxTest test runners depend quite heavily on static initialization +of objects that are used to define and execute tests. The +--no-static-init+ option can be used to avoid static initialization +for compilers or linkers that have trouble compiling the default test runner. + + +Creating Test Runners from Parts +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The default behavior of +cxxtestgen+ is to generate a test runner +that directly integrates classes that define the tests along with +a +main()+ function that executes all test suites. It is often useful to +allow test suites to be processes separately and then linked together. The +--root+ and +--part+ options +support this logic. For example, suppose that we wish to define a test runner for tests in the headers +MyTestSuite1.h+ and +MyTestSuite2.h+. We execute +cxxtestgen+ with the +--part+ option to generate source files for each of the test suites: +[source,bash] +---- +include::examples/.buildRunner9_part.sh[] +---- +Similarly, we execute +cxxtestgen+ with the +--root+ opiton to generate the +main()+ routine: +[source,bash] +---- +include::examples/.buildRunner9_root.sh[] +---- +Finally, the test runner is built by compiling all of these source files together: +[source,bash] +---- +include::examples/.buildRunner9_compile.sh[] +---- + + +Template Files +~~~~~~~~~~~~~~ + +CxxTest supports the use of _template files_ to provide a custom +main()+ function. This may be useful when using a custom test +listener, or when using an existing CxxTest test listener in a +nonstandard manner. A template file is an ordinary source files +with the embedded declaration ++, which tells +cxxtestgen+ to insert the world definition at that point. + +The +--template+ option is used to specify the use of a template file: +[source,bash] +---- +include::examples/.buildRunner10_main.sh[] +---- +For example, consider the following template file: +[source,{cpp}] +---- +include::examples/runner10.tpl[] +---- +This file specifies macros that customize the test runner, and output is generated before and after the tests are run. + +Note that CxxTest needs to insert certain definitions and +#include+ +directives in the runner file. It normally does that before the +first +#include + found in the template file. If this +behavior is not what you need, use the directive ++ +to specify where this preamble is inserted. + + +Test Discovery Options +~~~~~~~~~~~~~~~~~~~~~~ + +The +cxxtestgen+ command performs test discovery by searching C++ +header files for CxxTest test classes. The default process for +test discovery is a simple process that analyzes each line in a +header file sequentially, looking for a sequence of lines that +represent class definitions and test method definitions. + +There are many limitations to this simple process for test discovery, +and in CxxTest 4.0 a new test discovery mechanism was added based +on the a parser for the +http://www.computing.surrey.ac.uk/research/dsrg/fog/[Flexible Object +Generator (FOG)] language, which is a superset of C\++. The grammar +for the FOG language was adapted to parse C++ header files to +identify class definitions and class inheritance relationships, +class and namespace nesting of declarations, and class methods. +This allows +cxxtestgen+ to identify test classes that are defined +with complex inheritance relationships. + +The +--fog+ option is used to specify the use of the FOG parser for +test discovery. Although the FOG parser is more powerful, the +simpler +cxxtestgen+ test discover process is the default because +the FOG parser is slower execute. Additionally, the FOG parser +requires the installation of +ply+ and, for Python version 2.6, +ordereddict+. If these packages are not available, then the +--fog+ +option is automatically disabled. + +The following sections illustrate differences between these two test discovery mechanisms, along with +general limitations of the test discovery process. + +Unexpected Test Suite Format +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The default test discovery mechanism does a very simple analysis +of the input files, which can easily fail when test classes are not +formated in a standard manner. For example, consider the following +test suite: +[source,{cpp}] +----- +include::examples/MyTestSuite4.h[] +---- +This test suite is not recognized by the default test discovery +mechanism, but the FOG parser correctly parsers this file and +recognizes the test suite. A variety of similar discovery failures +arise due to the simple process used by the test discovery mechanism. + + +Commenting Out Tests +^^^^^^^^^^^^^^^^^^^^ + +Adding and disabling tests are two common steps in test development. +The process of test discovery makes adding tests very easy. However, +disabling tests is somewhat more complicated. Consider the following +header file, which defines four tests (three of which are disabled): +[source,{cpp}] +----- +include::examples/MyTestSuite3.h[] +---- + +The first is commented out with C\++-style comments, the second +test is commented out with C-style comments, and the third test is +named in a manner that is not recognized through test discovery +(i.e., it does not start with +test+). + +The default test discovery mechanism only works with the first and +third methods for disabling tests, but the FOG parser works with +all three. The FOG parser performs a complex, multi-line parse of +the source file, so it can identify multi-line C-style comments. + +Note, however, that the use of C macros will not work: +[source,{cpp}] +----- +include::examples/BadTestSuite1.h[] +---- +The +cxxtestgen+ discovery mechanisms do not perform a C preprocessing +step, since that would generally require using externally defined +preprocessing variable definitions. Additionally, preprocessor macros that act like functions will +cause the FOG parser to fail unless they are followed by a semicolon. + + +[[runner]] +Test Runner Syntax +------------------ + +The default behavior of the CxxTest test runner is to execute all +tests in all of the test suites that are linked into the runner. +However, CxxTest test runners process command line options that +allow individual tests and test suites to be selected. + +For example, consider a test runner defined as follows: +[source,bash] +---- +include::examples/.buildRunner13_main.sh[] +---- +The +--help+ (+-h+) option can be used to print the command line options for a test runner. The command + +---- +include::examples/.buildRunner13_help.sh[] +---- +generates the following output: + +---- +include::examples/runner13.help.txt[] +---- + +The +--help-tests+ option is used to list all test suites that are defined in a test runner. The command +[source,bash] +---- +include::examples/.buildRunner13_helpTests.sh[] +---- +generates the following output: + +---- +include::examples/runner13.helpTests.txt[] +---- +The first column is the test suite name, and the second column is the test name. + +All tests in a test suite can be executed by simply specifying the test suite name. For example +[source,bash] +---- +include::examples/.buildRunner13_MyTestSuite2.sh[] +---- +executes the tests in test suite +MyTestSuite2+: + +---- +include::examples/runner13.MyTestSuite2.txt[] +---- + +Similarly, a single test can be executed by specifying the test suite followed by the test name. For example +[source,bash] +---- +include::examples/.buildRunner13_testMultiplication.sh[] +---- +executes the +testMultiplication+ test in test suite +MyTestSuite2+: + +---- +include::examples/runner13.testMultiplication.txt[] +---- + +The +-v+ option enables the printing of trace information generated +by the +TS_TRACE+ function. For example, the +testMultiplication+ test contains trace declarations +before and after the multiplication test. Thus, the command +[source,bash] +---- +include::examples/.buildRunner13_testMultiplicationVerbose.sh[] +---- +generates this trace output before and after the test: + +---- +include::examples/runner13.testMultiplicationVerbose.txt[] +---- + + +[[advanced]] +Advanced Testing Features +------------------------- + +Preprocessor Macros +~~~~~~~~~~~~~~~~~~~ + +CxxTest recognizes a variety of preprocessor macros that can be used to modify the behavior of a test runner. Many of these mimic the options of the +cxxtestgen+ command. + +[options="header"] +|==================================================================================== +| Preprocessor Macro | Description +| +CXXTEST_HAVE_STD+ | Use the standard library. +| +CXXTEST_HAVE_EH+ | Use exception handling. +| +CXXTEST_ABORT_TEST_ON_FAIL+ | Abort tests on failed asserts. +| +CXXTEST_USER_VALUE_TRAITS+ | Enable user-defined value traits. The default traits dump up to 8 bytes of the data as hex values. +| +CXXTEST_OLD_TEMPLATE_SYNTAX+ | Use old template syntax that is used by some compilers (e.g. Borland C++ 5). +| +CXXTEST_OLD_STD+ | Use old syntax for libraries where +std::+ is not recognized. +| +CXXTEST_MAX_DUMP_SIZE+ | The value of this macro defines the maximum number of bytes to dump if +TS_ASSERT_SAME_DATA()+ fails. The default is 0, which indicates no limit. +| +CXXTEST_DEFAULT_ABORT+ | The value of this macro is the default value of the dynamic _abort on fail_ flag. +| +CXXTEST_LONGLONG+ | The value of this macro is used to define long long integers. +|===================================== + +These preprocessor macros must be defined before the CxxTest header +files are included in the test runner. For example, the following +template file defines +CXXTEST_HAVE_EH+ and +CXXTEST_ABORT_TEST_ON_FAIL+ +before other headers are included: +[source,{cpp}] +---- +include::examples/runner10.tpl[] +---- + +Several of these macros concern whether modern C++ conventions are +supported by the compiler. If tests need to be ported to multiple +compilers, then one important convention is whether the namespace ++std::+ is supported. For example, switching between +cout+ and ++std::cout+ typically needs to be done throughout a code. CxxTest +supports this with the +CXXTEST_STD()+ macro. For example, ++CXXTEST_STD(cout)+ can be used within a test suite, and CxxTest +handles the mapping of this to +cout+ or +std::cout+ depending on +options provided to +cxxtestgen+. + + + +Customizing Test Fixtures +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Setup and Teardown +^^^^^^^^^^^^^^^^^^ + +CxxTest test fixtures can be customized in several ways to manage +the environment for test suites and individual tests. A common +feature of test suites is that they share a common logic for setting +up data used in the tests. Thus, there may be duplicate code for +creating objects, files, inputs, etc. Similarly, the tests may +share common logic for cleaning up after the test is finished (e.g. deleting temporary objects). + +You can put this shared code in a common place by overriding the +virtual functions `TestSuite::setUp()` and `TestSuite::tearDown()`. +The `setUp()` function is called before each test, and `tearDown()` +is called after each test. + +For example, the following test suite employs +setUp()+ and +tearDown()+ methods to +allocate and deallocate memory for a string buffer: +[source,{cpp}] +----- +include::examples/MyTestSuite5.h[] +----- + +Dynamically Created Test Suites +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +CxxTest test fixtures can also be customized during the construction +and deconstruction of test suites. By default, CxxTest test suites +are instantiated statically in the test runner. However, dynamically +created test suites can be used to perform suite-level setup and +teardown operations, verify the environment needed to execute a +test suite, and construct test suites that require a nontrivial +constructor. + +CxxTest instantiates a test suite dynamically if the +createSuite()+ +or +destroySuite()+ methods are defined. For example, the following +test suite checks to see if it is being compiled with Microsoft +Visual Studio. If not, the +createSuite()+ returns a null pointer, +indicating that the test suite was not created. +[source,{cpp}] +----- +include::examples/MyTestSuite6.h[] +----- + +Global and World Fixtures +^^^^^^^^^^^^^^^^^^^^^^^^^ + +CxxTest supports two related mechanisms for performing _global_ +setup and teardown operations. _Global fixtures_ are classes that +inherit from `CxxTest::GlobalFixture`, and they define `setUp` and +`tearDown` methods. The `setUp` method for all global fixtures is +called before each test is executed, and the `tearDown` method for +all global fixtures is called after each test is completed. Thus, +this mechanism provides a convenient way of defining setup and +teardown operations that apply to all test suites. + +For example, consider the following test suite: +[source,{cpp}] +----- +include::examples/MyTestSuite8.h[] +----- +This test suite defines a runner that generates the following output: + +----- +include::examples/buildRunner18.txt[] +----- + +Note that the global fixtures are instantiated with static global +values. This ensures that these fixtures are created before the +runner is initialized. Also, note that the `setUp` methods are +called in the same sequence that the global fixtures are instantiated, +and the `tearDown` methods are called in the reverse sequence. +Finally, note that the `setUp` and `tearDown` methods in global +fixtures return a boolean value, which indicates success or failure +of that operation. + +This example also illustrates the use of _world fixtures_, which +perform setup and teardown operations that are executed once each +when beginning and finishing tests in each test suite. World +fixtures are defined with the `setUpWorld` and `tearDownWorld` +methods in a global fixture. + + +Runtime Test Customization +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +CxxTest defines several functions that can be called in a test suite to modify the default behavior of CxxTest. + +[options="header"] +|================================== +| Test Suite Method | Description +| +setAbortTestOnFail(bool)+ | This function specifies whether tests abort after a failure. The default value of the flag is +false+. This function only has an effect if exception handling is enabled. +| +setMaxDumpSize(unsigned)+ | This function sets the maximum number of bytes that are dumped when ++TS_ASSERT_SAME_DATA()+ fails. The default is 0, which indicates no limit. +|============= + +Note that the the configuration parameters are reset to their default +values after each test is executed (more precisely, after +tearDown()+ +is called). Consequently, calling these functions in the +setUp()+ +function has the effect of setting that value for the entire test +suite. + + + +[[traits]] +Value Traits +------------ + +CxxTest's test assertions like <> +work for built-in types, but they will not likely work for user-defined +data types. This is because CxxTest needs a way to compare objects +and to convert them to strings when printing test failure summaries. +Thus, user-defined data types need to have the `operator=` method +defined to ensure that test assertions can be applied. + +For example, the following code +[source,{cpp}] +----- +include::examples/MyTestSuite7.h[] +----- +defines a test runner that generates the following output + +----- +include::examples/buildRunner17.txt[] +----- +The `operator=` method is required to apply +<> to `Data` objects. However, +the <> assertion can be +applied to `Data2` objects that do not have `operator=` defined. + +Since CxxTest does not rely on any external library, conversion +from arbitrary data types to strings is done using _value traits_. +For example, to convert an integer to a string, CxxTest does the following: +[source,{cpp}] +---- +int i = 10; +CxxTest::ValueTraits converter(i); +const char* string = converter.asString(); +---- +The CxxTest header file `cxxtest/ValueTraits.h` defines value traits +for standard types like `int`, `char`, `double`, etc. The default +`ValueTraits` class for unknown types dumps up to 8 bytes of the value +in hex format. + +If the macro `CXXTEST_USER_VALUE_TRAITS` is defined, then CxxTest will +omit the default definitions for `ValueTraits`. This allows a user to define their own trait specifications to customize the display of trait information. + + + +Enumeration Traits +~~~~~~~~~~~~~~~~~~ + +CxxTest provides a simple way to define value traits for enumeration +types. The `CXXTEST_ENUM_TRAITS` macro is used to define value +traits for all members of an enumeration set. + +For example, the following code +[source,{cpp}] +----- +include::examples/MyTestSuite9.h[] +----- +defines a test runner that generates the following output + +----- +include::examples/buildRunner19.txt[] +----- +The enumeration value traits print strings that represent the elements of the enumeration, except where a numeric value is provided. + +Note that the `CXXTEST_ENUM_TRAITS` macros has two arguments; the list of `CXXTEST_ENUM_MEMBER` macros is not separated by commas! + + +Defining New Value Traits +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Defining value traits for a new class is done by providing a class +specialization of `ValueTraits` that converts an object of the new +class to a string. For example, consider the definition of the +`MyClass` class: +[source,{cpp}] +----- +include::examples/MyClass.h[] +----- +This class includes definitions of `operator==` and `operator<` +that support comparisons with <> +and <>. Additionally, +this header contains a specialization of `ValueTraits` (in the +`CxxTest` namespace) that generates a string description of a `MyClass` +instance. + +The following test suite illustrates how these definitions can be +used to define a test runner: +[source,{cpp}] +----- +include::examples/MyTestSuite10.h[] +----- +This runner for this test suite generates the following output: + +----- +include::examples/buildRunner20.txt[] +----- +The test failure print logic uses the specialization of `ValueTraits` to create +the string description of `MyClass` that appears in the output. + + +Defining Value Traits for Template Classes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A simple modification to the above example illustrates how a trait can be defined for a +template class: +[source,{cpp}] +----- +include::examples/MyTestSuite11.h[] +----- +Unfortunately, this example employs partial template specialization, which is not supported by all C++ compilers. + + +[[mock]] +Testing with Mock Objects +------------------------- + +Mock Objects are a very useful concept for testing complex software. +The key idea is to pass special objects to tested code that facilitates +the testing process. For instance, a class that implements a +protocol over TCP might rely on an abstract `ISocket` interface. +Then a mock testing strategy could pass a `MockSocket` object that +does anything that is useful for testing (e.g., keep a log of all +data ``sent'' to verify later). + +However, when a challenge for C/C++ developers is that you may need +to call _global_ functions which you cannot override. Consider any +code that uses `fopen()`, `fwrite()` and `fclose()`. It is not +very elegant to have this code actually create files while being +tested. Even more importantly, you need to test how the code behaves +when ``bad'' things happen (e.g., when `fopen()` fails). Handling +these types of exceptional conditions is often a very challenging +issue for software testing. + +CxxTest addresses this challenge by providing a generic mechanism for +defining mock global functions. The next section illustrates this mechanism for a single +global function. The following section provides more detail about specific features of CxxTest's +support for mock testing. + + +Example: A Mock +time()+ Function +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Suppose that we want to perform mock testing using the well known +standard library function `time()`. Setting up a test suite with +a mock global function for `time()` can be broken down into the +following steps. + +Declare Mock Functions +^^^^^^^^^^^^^^^^^^^^^^ + +The `CXXTEST_MOCK_GLOBAL` macro is used to declare mock global functions. It is often convenient to include +these declarations in a header file, which is used in both the test suite as well as the code that is being tested: +[source,{cpp}] +----- +include::examples/time_mock.h[] +----- + +Mock Functions in Tested Code +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The tested code uses mock global functions, rather than using the global functions directly. +You access mock functions in the `T` (for _Test_) namespace, so the tested code calls `T::time()` instead of +`time()`. This is the equivalent of using abstract interfaces +instead of concrete classes. +[source,{cpp}] +----- +include::examples/rand_example.cpp[] +----- + + +Mock Source Files +^^^^^^^^^^^^^^^^^ + +A source file needs to be defined that implements `T::time()` by +calling the real global function. This definition is performed automatically by +defining `CXXTEST_MOCK_REAL_SOURCE_FILE` before the header file is defined: +[source,{cpp}] +----- +include::examples/time_real.cpp[] +----- +This source file is not used for testing, but instead it supports normal use of the tested code. + +Similarly, a source file needs to be defined that implements `T::time()` by calling the mock +global function. This definition is performed automatically by defining `CXXTEST_MOCK_TEST_SOURCE_FILE` before the header file is defined: +[source,{cpp}] +----- +include::examples/time_mock.cpp[] +----- + + +Test Suites using Mock Functions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +A mock object for the `time()` function is created using the `T::Base_time` class, +which is automatically created by CxxTest. This class includes a `time()` method whose +API is the same as the global `time()` function. Thus, this method can be defined to have +whatever behavior is desired during testing. For example, the following example defines a +mock object that increments a counter to define an incremental value for `time()`. +[source,{cpp}] +----- +include::examples/MockTestSuite.h[] +----- +Note that CxxTest uses global data to associate calls made with `T::time()` +to calls to `MockObject::time()`. The `MockObject` class simply +needs to be instantiated prior to the call to `T::time()`. + + +Building the Test Runner +^^^^^^^^^^^^^^^^^^^^^^^^ + +The +cxxtestgen+ command is used to create a test runner with mock functions in a normal manner: +[source,bash] +----- +include::examples/.buildRunner16_main.sh[] +----- +The test runner source file, `runner.cpp`, needs to be compiled an linked to the mock function definition, `time_mock.cpp`, as well as the code being tested, `rand_example.cpp`: +[source,bash] +----- +include::examples/.buildRunner16_compile.sh[] +----- +This generates a test runner that generates the following output: + +----- +include::examples/buildRunner16.txt[] +----- + + +Advanced Topics +~~~~~~~~~~~~~~~ + +Void Functions +^^^^^^^^^^^^^^ + +The `CXXTEST_MOCK_VOID_GLOBAL` is used to define mock global functions that return `void`. +This is identical to +`CXXTEST_MOCK_GLOBAL` except that it does not specify the return +type. Take a look in `sample/mock/T/stdlib.h` for a demonstation. + +Calling the Real Functions While Testing +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +During testing it is sometimes necessary to call the real global +function instead of the mock global function. CxxTest allows a +user to do this by creating a special mock object. For a global +mock function of `time()`, the object `T::Real_time` represents the +real function. If this class is created, then `T::time()` will be +redirected to the real function. + +Mocking Nonexistent Functions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Sometimes the tested code calls functions that are not available +when testing. For example, this can happen when testing driver +code that calls kernel functions that are not available to a user-mode +test runner. CxxTest can provide mock global function definitions +for the test code while using the original functions in the tested code. + + +The `CXXTEST_SUPPLY_GLOBAL` and `CXXTEST_SUPPLY_VOID_GLOBAL` macros are used to provide mock global function definitions. For example, the following declaration creates a mock global function for the Win32 kernel function `IoCallDriver`: +[source,{cpp}] +----- +CXXTEST_SUPPLY_GLOBAL( NTSTATUS, /* Return type */ + IoCallDriver, /* Name */ + ( PDEVICE_OBJECT Device, /* Prototype */ + PIRP Irp ), + ( Device, Irp ) /* How to call */ ); +----- +The tested driver code calls `IoCallDriver()` normally; there is no need for the `T::` syntax. +The test suite is defined using the `T::Base_IoCallDriver` as with normal mock objects. + +CxxTest also provides the macros `CXXTEST_SUPPLY_GLOBAL_C` and +`CXXTEST_SUPPLY_GLOBAL_VOID_C` that declare the functions with `C` +linkage (i.e., using `extern "C"`). These macros are used to declare +function prototypes, since you may not be able to include the header +files in the test suite that are associated with the mock global function. + + +Functions in Namespaces +^^^^^^^^^^^^^^^^^^^^^^^ + +The `CXXTEST_MOCK` macro is used to declare a mock global function that is associated +with a function in a namespace, including static class member functions. +For example, consider the function `bool Files::FileExists( const +String &name )`; the namespace `Files` contains the function +`FileExists`. The mock class will be called `T::Base_Files_FileExists` +and the function to implemented would be `fileExists`. The `CXXTEST_MOCK` macro declares this mock global function as follows: +[source,{cpp}] +----- +CXXTEST_MOCK( Files_FileExists, /* Suffix of mock class */ + bool, /* Return type */ + fileExists, /* Name of mock member */ + ( const String &name ), /* Prototype */ + Files::FileExists, /* Name of real function */ + ( name ) /* Parameter list */ ); +----- +Similarly, the `CXXTEST_MOCK_VOID` macro is used to declare a mock global function that returns `void`. + +The `CXXTEST_SUPPLY` and `CXXTEST_SUPPLY_VOID` macros are used to provide mock global function definitions for nonexistent functions. For example: +[source,{cpp}] +----- +CXXTEST_SUPPLY( AllocateIrp, /* => T::Base_AllocateIrp */ + PIRP, /* Return type */ + allocateIrp, /* Name of mock member */ + ( CCHAR StackSize ), /* Prototype */ + IoAllocateIrp, /* Name of real function */ + ( StackSize ) /* Parameter list */ ); +----- +Similarly, the `CXXTEST_SUPPLY_C` and `CXXTEST_SUPPLY_VOID_C` macros declare the functions with `C` linkage. + +Overloaded Functions +^^^^^^^^^^^^^^^^^^^^ + +The `CXXTEST_MOCK` and `CXXTEST_MOCK_VOID` macros have a flexible +interface that can provide mock global function definitions for +overloaded functions. The arguments simply need to specify different +mock class names, mock member names and different prototype definitions. +These different mock declarations will generate different mock objects that can be explicitly +referenced in a test suite. + +The Mock Namespace +^^^^^^^^^^^^^^^^^^ + +The default namespace for mock functions is `T::`. This namespace can be changed by defining the +`CXXTEST_MOCK_NAMESPACE` macro. + + +[[installation]] +Installation +------------ + +A key feature of CxxTest is that it does has virtually no installation +process. The +cxxtestgen+ script can be directly executed from the ++cxxtest/bin+ directory. Simply adding this directory to the PATH +environment of a command shell is sufficient for many applications. +Beyond that, the build process for test runners simply needs to +reference the +cxxtest+ root directory to enable proper includes +during compilation. + +The FOG parser requires two Python packages: + + - +ply+ + - +ordereddict+ (This is needed when running Python 2.4, 2.5 or 2.6) + +If these packages are not available, then +cxxtestgen+ will generate an error when the +FOG parser option is selected. +If you have +http://pypi.python.org/pypi/setuptools[setuptools] or +http://pypi.python.org/pypi/distribute[distribute] +installed, then +you can install these packages from PyPI by executing +[source,bash] +---- +easy_install ply +easy_install ordereddict +---- + +The +cxxtestgen+ script has been tested with many different versions +of Python: 2.4 - 3.2. Note that this script has only been tested +with the CPython implementation. CxxTest 4.0 has been tested on +Linux and Mac platforms using the G++ and CLang++ compilers. + + +//// + +WEH - I thought about moving this section into the Getting Started +section. However, it makes sense to leave this here to reference +future installations in Debian, Mac Ports, etc. I think that that +distribution model is very strategic for cxxtest. + +//// + + +[[discussion]] +Status and Future Plans +----------------------- + +The CxxTest 4.0 release reflects major changes in the management +and focus of CxxTest. The 4.0 release is the first release of +CxxTest in over seven years, and virtually all of the initial +developers have moved on to other projects. CxxTest is heavily +used at Sandia National Laboratories, and Sandia's ongoing use of +CxxTest is a major driver for the 4.0 release. + +Similarly, major +changes in CxxTest reflect the focus of the developer team: + + - Perl is no longer used to support CxxTest scripts. Python is now the only scripting language used by CxxTest. + - The testing scripts have been rewritten using the PyUnit framework. + - The installation process for CxxTest now leverages and integrates with the system Python installation. + - A more comprehensive C++ parser is now available, which supports testing of templates. + - The CxxTest GUI is no longer supported, and the <> is deprecated. + - CxxTest runners now have a command-line interface that facilitates interative use of the test runner. + - A new user guide is now available in PDF, HTML and Ebook formats. + - Updated the +cxxtestgen+ script to work with Python 2.6 through 3.2 + +Additionally, CxxTest is now validated with continuous integration +tests. Yes, the CxxTest developers eat their own dog food! + +Although the GUI option for +cxxtestgen+ appears to work fine, this +GUI is rather primitive. It simply provides a visual summary of +the test results, and not the interactive test execution that a +user would expect. This capability is deprecated since none of the +current developers use this feature. CxxTest users should consider +using CxxTest with http://jenkins-ci.org/[Jenkins]. The +XUnitPrinter+ +test listener generates XML files that can be easily integrated by +http://jenkins-ci.org/[Jenkins], which creates a visual summary of +test results with links to drill-down into test outputs. + +This documentation has highlighted the commonly used test listeners. +There are a variety of other test listeners provided by CxxTest +that support advanced Cxxtest applications. For example, the ++YesNoRunner+ is perhaps the simplest test listener; it simply +returns the number of test failures. The +StdioFilePrinter+ is +used by +StdioPrinter+, but it does not assume that +stdio+ is the +default output stream. This test listener can be used in contexts +where a custom output stream must be specified. + +//// +WEH - I'd like to say more about future support for CxxTest, but I don't know more basic things like how we should plan to host CxxTest in the future. + +Discuss support for ... + + - embedded compilers... (Macros vs templates) + - SCONS + +Future work: + + - ply cpp + - ignore template test classes using the FOG parser + +//// + +//// +NOTE: we do not have test coverage for the following macros: +CXXTEST_OLD_TEMPLATE_SYNTAX +CXXTEST_OLD_STD +CXXTEST_LONGLONG +//// + + +:numbered!: + +[[acknowledgements]] +Acknowledgements +---------------- + +CxxTest was originally developed by Erez Volk. The following +developers actively contributed to the CxxTest 4.0 release: + +* Gašper Ažman +* Kevin Fitch +* William Hart +* John Siirola + +The CxxTest documentation is generated using +http://www.methods.co.nz/asciidoc/[AsciiDoc]. The following people +have contributed to the CxxTest User Manual: + +* William Hart +* Lionel Orry +* Erez Volk + +A major advancement in CxxTest's capability is the new test discovery +mechanism that is based on a parser of the Flexible Object Language +(FOG). FOG generalizes the C++ syntax, which enables CxxTest to +extract high-level class structure for test discovery. FOG was +developed by Edward Willink: + +* Edward D. Willink. 'Meta-Compilation for C++', PhD Thesis, Computer Science Research Group, University of Surrey, January 2000. + +The FOG parser in CxxTest critically relies on the excellent LALR +parser provided by Dave Beazley's `ply` Python package. The scalable +performance of `ply` is critical for CxxTest. + +CxxTest has greatly benefited from the support of the open source +community. We would like to thank the following organizations for +providing web hosting and computing resources: GitHub, SourceForge, +Tigris.org, Sandia National Laboratories, Google and COIN-OR. The development +of CxxTest has been partially supported by Sandia National Laboratories. +Sandia National Laboratories is a multi-program laboratory managed +and operated by Sandia Corporation, a wholly owned subsidiary of +Lockheed Martin Corporation, for the U.S. Department of Energy's +National Nuclear Security Administration under contract DE-AC04-94AL85000. + + +[appendix] +[[appendix_A]] +Test Assertion Examples +----------------------- + +[[ts_assert]] TS_ASSERT:: +This is the most basic test assertion, which simply verifies that the +expr+ argument is true: +[source,{cpp}] +---- +include::examples/.Assertions_assert.h[] +---- +[[ts_assert_delta]] TS_ASSERT_DELTA:: +This test assertion verifies two floating point values are within a specified absolute difference: +[source,{cpp}] +---- +include::examples/.Assertions_assertDelta.h[] +---- + +[[ts_assert_differs]] TS_ASSERT_DIFFERS:: +This test assertion verifies that the two arguments are not equal: +[source,{cpp}] +---- +include::examples/.Assertions_assertDiffers.h[] +---- + +[[ts_assert_equals]] TS_ASSERT_EQUALS:: + This test assertion verifies that the two arguments are equal: +[source,{cpp}] +---- +include::examples/.Assertions_assertEquals.h[] +---- +Note that this test is performed using the C++ +==+ operator, whose behavior may be redefined for the two argument types. + +[[ts_assert_less_than]] TS_ASSERT_LESS_THAN:: +This test assertion verifies that the first argument is strictly less than the second argument: +[source,{cpp}] +---- +include::examples/.Assertions_assertLessThan.h[] +---- + +[[ts_assert_less_than_equals]] TS_ASSERT_LESS_THAN_EQUALS:: +This test assertion verifies that the first argument is less than or equal to the second argument: +[source,{cpp}] +---- +include::examples/.Assertions_assertLessThanEquals.h[] +---- + +[[ts_assert_predicate]] TS_ASSERT_PREDICATE:: +This test assertion takes as an argument the name of a class, similar to a STL +unary_function+, and evaluates the +operator()+ method: +[source,{cpp}] +---- +include::examples/.Assertions_assertPredicate.h[] +---- +This test assertion can be seen as a generalization of <>, but it +allows the tester to see the failed value. + +[[ts_assert_relation]] TS_ASSERT_RELATION:: +It takes as an argument the name of a class, similar to a STL +binary_function+, and evaluates the +operator()+ method: +[source,{cpp}] +---- +include::examples/.Assertions_assertRelation.h[] +---- +This test assertion can be seen as a generalization of <>, <>, <> and <>. +This can be used to assert comparisons which are not covered by the builtin test assertions. + +[[ts_assert_same_data]] TS_ASSERT_SAME_DATA:: +This test assertion is similar to <>, +except that it compares the contents of two buffers in memory: +[source,{cpp}] +---- +include::examples/.Assertions_assertSameData.h[] +---- +The standard runner dumps the contents of both buffers as hex values when this test fails. + +[[ts_assert_throws]] TS_ASSERT_THROWS:: +This test assertion verifies that the specified exception is thrown when the first argument is executed: +[source,{cpp}] +---- +include::examples/.Assertions_assertThrows.h[] +---- + +[[ts_assert_throws_anything]] TS_ASSERT_THROWS_ANYTHING:: +This test assertion verifies that _some_ exception is thrown when the first argument is executed: +[source,{cpp}] +---- +include::examples/.Assertions_assertThrowsAnything.h[] +---- + +[[ts_assert_throws_assert]] TS_ASSERT_THROWS_ASSERT:: +This test assertion verifies that an exception is thrown when executing the first argument. The second argument specifies a variable declaration for the exception, and the third argument is executed to test that +exception value: +[source,{cpp}] +---- +include::examples/.Assertions_assertThrowsAssert.h[] +---- +Note that this can be viewed as a generalization of <>. + +[[ts_assert_throws_equals]] TS_ASSERT_THROWS_EQUALS:: +This test assertion verifies that an exception is thrown when executing the first argument. The second argument specifies a variable declaration for the exception, and the third and fourth arguments are values that are asserted equal after the exception is thrown: +[source,{cpp}] +---- +include::examples/.Assertions_assertThrowsEquals.h[] +---- + +[[ts_assert_throws_nothing]] TS_ASSERT_THROWS_NOTHING:: +This test assertion verifies that an exception is _not_ thrown when executing the first argument: +[source,{cpp}] +---- +include::examples/.Assertions_assertThrowsNothing.h[] +---- + +[[ts_fail]] TS_FAIL:: +This function triggers a test failure with an associated message: +[source,{cpp}] +---- +include::examples/.Assertions_fail.h[] +---- + +[[ts_trace]] TS_TRACE:: +This function prints an informational message: +[source,{cpp}] +---- +include::examples/.Assertions_trace.h[] +---- + +[[ts_warn]] TS_WARN:: +This function prints a message as a warning: +[source,{cpp}] +---- +include::examples/.Assertions_warn.h[] +---- + + +[appendix] +[[appendix_B]] +Integrating with Your Build Environment +--------------------------------------- + +CxxTest can be integrated into a variety of build environments to +automate the generation, compilation and execution of test runners. +Here is a rough breakdown of this process: + +* Split the application into a library and a main module that just + calls the library classes. This way, the test runner will be + able to access all your classes through the library. +* Create another application (or target, or project, or whatever) + for the test runner. Make the build tool generate it automatically. +* Configure the build tool to run the tests automatically. + +Unfortunately, different build tools and IDEs need to setup this +process in different ways. The following sections provide rough +guidance for doing this for some come use cases. + +[NOTE] +These examples are not actively maintained and tested. Please send +suggestions to the CxxTest developers for updating this documentation. + + +Using Makefiles +~~~~~~~~~~~~~~~ + +Generating the tests with a makefile is pretty straightforward. +Simply add rules to generate, compile and run the test runner. + +[source,{makefile}] +----- +all: lib run_tests app + +# Rules to build your targets +lib: ... + +app: ... + +# A rule that runs the unit tests +run_tests: runner + ./runner + +# How to build the test runner +runner: runner.cpp lib + g++ -o $@ $^ + +# How to generate the test runner +runner.cpp: SimpleTest.h ComplicatedTest.h + cxxtestgen -o $@ --error-printer $^ +----- + + +Using Cons +~~~~~~~~~~ + +http://dsmit.com/cons/[Cons] is a powerful and +versatile make replacement which uses Perl scripts instead of Makefiles. + +See `cxxtest/sample/Construct` in the CxxTest distribution for an +example of building CxxTest test runners with Cons. + + +Using Microsoft Visual Studio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +See `cxxtest/sample/msvc` in the distribution +to see a reasonable integration of CxxTest with Microsoft Visual Studio's IDE. +Basically, the workspace has three +projects: + +* The project `CxxTest_3_Generate` runs `cxxtestgen`. +* The project `CxxTest_2_Build` compiles the generated file. +* The project `CxxTest_1_Run` runs the tests. + +This method certainly works, and the test results are conveniently +displayed as compilation errors and warnings (for <>. +However, there are still a few things missing; to integrate this +approach with your own project, you usually need to work a little +bit and tweak some makefiles and project options. The script +`sample/msvc/FixFiles.bat` can automate some of this process. + + +Using Microsoft Windows DDK +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To use CxxTest with the `build` utility for device drivers, you add +the generated tests file as an extra dependency using the +`NTBUILDTARGET0` macro and the `Makefile.inc` file. An example of +how to do this is in the CxxTest distribution under `sample/winddk`. + + +[appendix] +[[appendix_C]] +Testing CxxTest +--------------- + +In the +cxxtest/test+ directory, you can execute +[source,bash] +---- +python test_cxxtest.py +---- +to launch all tests. By default, this script executes test suites +for a variety of compilers if they are found on the user's path: +`g++`, `clang++`, +cl+ (the Microsoft Visual Studio compiler). +Additionally, this test script includes separate test suites for +the default test discovery mechanism as well as test discovery using +the new FOG parser. + +You can execute a specific test suite by giving its name as an +argument to this test script. For example, the command +[source,bash] +---- +python test_cxxtest.py TestGpp +---- +executes the +TestGpp+ test suite, which tests CxxTest with the +`g++` compiler. Similarly, the command +[source,bash] +---- +python test_cxxtest.py TestGppFOG +---- +executes the test suite that tests CxxTest using the `g++` compiler +and the FOG parser. + +The +test_cxxtest.py+ script should work with versions Python 2.7 +or newer. If you are running Python 2.6, you will need to install +the +unittest2+ package. If you have +http://pypi.python.org/pypi/setuptools[setuptools] or +http://pypi.python.org/pypi/distribute[distribute] +installed, then +you can install this package from PyPI by executing +[source,bash] +---- +easy_install unittest2 +---- +Similarly, the tests for this document rely on the `PyUtilib` Python package. + +The FOG parser requires two Python packages: + + - +ply+ + - +ordereddict+ (This is only needed when running Python 2.6) + +If these packages are not available, then +test_cxxtest.py+ will skip the FOG tests. + + +[appendix] +[[appendix_D]] +include::../Versions[] + +// vim: set syntax=asciidoc: + diff --git a/tools/cxxtest/doc/include_anchors.py b/tools/cxxtest/doc/include_anchors.py new file mode 100644 index 0000000..a3537a4 --- /dev/null +++ b/tools/cxxtest/doc/include_anchors.py @@ -0,0 +1,81 @@ +import re +import sys +import os.path +import os + + +pat1a = re.compile('include::([a-zA-Z0-9_\.\-/\/]+\/)\.([^\_]+)\_[a-zA-Z0-9]*\.py\[\]') +pat1b = re.compile('include::([a-zA-Z0-9_\.\-/\/]+\/)\.([^\_]+)\_[a-zA-Z0-9]*\.sh\[\]') +pat1c = re.compile('include::([a-zA-Z0-9_\.\-/\/]+\/)\.([^\_]+)\_[a-zA-Z0-9]*\.h\[\]') +pat1d = re.compile('include::([a-zA-Z0-9_\.\-/\/]+\/)\.([^\_]+)\_[a-zA-Z0-9]*\.cpp\[\]') +pat2 = re.compile('([^@]+)@([a-zA-Z0-9]+):') +pat3 = re.compile('([^@]+)@:([a-zA-Z0-9]+)') + +processed = set() + +def process(dir, root, suffix): + #print "PROCESS ",root, suffix + bname = "%s%s" % (dir, root) + global processed + if bname in processed: + return + # + anchors = {} + anchors[''] = open('%s.%s_.%s' % (dir, root, suffix), 'w') + INPUT = open('%s%s.%s' % (dir, root, suffix), 'r') + for line in INPUT: + m2 = pat2.match(line) + m3 = pat3.match(line) + if m2: + anchor = m2.group(2) + anchors[anchor] = open('%s.%s_%s.%s' % (dir, root, anchor, suffix), 'w') + elif m3: + anchor = m3.group(2) + anchors[anchor].close() + del anchors[anchor] + else: + for anchor in anchors: + os.write(anchors[anchor].fileno(), line) + INPUT.close() + for anchor in anchors: + if anchor != '': + print "ERROR: anchor '%s' did not terminate" % anchor + anchors[anchor].close() + # + processed.add(bname) + + +for file in sys.argv[1:]: + print "Processing file '%s' ..." % file + INPUT = open(file, 'r') + for line in INPUT: + suffix = None + m = pat1a.match(line) + if m: + suffix = 'py' + # + if suffix is None: + m = pat1b.match(line) + if m: + suffix = 'sh' + # + if suffix is None: + m = pat1c.match(line) + if m: + suffix = 'h' + # + if suffix is None: + m = pat1d.match(line) + if m: + suffix = 'cpp' + # + if not suffix is None: + #print "HERE", line, suffix + fname = m.group(1)+m.group(2)+'.'+suffix + if not os.path.exists(fname): + print line + print "ERROR: file '%s' does not exist!" % fname + sys.exit(1) + process(m.group(1), m.group(2), suffix) + INPUT.close() + diff --git a/tools/cxxtest/python/README.txt b/tools/cxxtest/python/README.txt new file mode 100644 index 0000000..1cd84b9 --- /dev/null +++ b/tools/cxxtest/python/README.txt @@ -0,0 +1,8 @@ +CxxTest Python Package +====================== + +The CxxTest Python package includes utilities that are used by the +CxxTest unit testing framework. Specifically, this Python package +supports C++ parsing and code generation done in the cxxtestgen +script. + diff --git a/tools/cxxtest/python/convert.py b/tools/cxxtest/python/convert.py new file mode 100644 index 0000000..ec5cdb5 --- /dev/null +++ b/tools/cxxtest/python/convert.py @@ -0,0 +1,19 @@ +# +# Execute this script to copy the cxxtest/*.py files +# and run 2to3 to convert them to Python 3. +# + +import glob +import subprocess +import os +import shutil + +os.chdir('cxxtest') +for file in glob.glob('*.py'): + shutil.copyfile(file, '../python3/cxxtest/'+file) +# +os.chdir('../python3/cxxtest') +# +for file in glob.glob('*.py'): + subprocess.call('2to3 -w '+file, shell=True) + diff --git a/tools/cxxtest/python/cxxtest/__init__.py b/tools/cxxtest/python/cxxtest/__init__.py new file mode 100644 index 0000000..e9f6d13 --- /dev/null +++ b/tools/cxxtest/python/cxxtest/__init__.py @@ -0,0 +1,33 @@ +#------------------------------------------------------------------------- +# CxxTest: A lightweight C++ unit testing library. +# Copyright (c) 2008 Sandia Corporation. +# This software is distributed under the LGPL License v2.1 +# For more information, see the COPYING file in the top CxxTest directory. +# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +# the U.S. Government retains certain rights in this software. +#------------------------------------------------------------------------- + +"""cxxtest: A Python package that supports the CxxTest test framework for C/C++. + +.. _CxxTest: http://cxxtest.tigris.org/ + +CxxTest is a unit testing framework for C++ that is similar in +spirit to JUnit, CppUnit, and xUnit. CxxTest is easy to use because +it does not require precompiling a CxxTest testing library, it +employs no advanced features of C++ (e.g. RTTI) and it supports a +very flexible form of test discovery. + +The cxxtest Python package includes capabilities for parsing C/C++ source files and generating +CxxTest drivers. +""" + +from cxxtest.__release__ import __version__, __date__ +__date__ +__version__ + +__maintainer__ = "William E. Hart" +__maintainer_email__ = "whart222@gmail.com" +__license__ = "LGPL" +__url__ = "http://cxxtest.tigris.org/" + +from cxxtest.cxxtestgen import * diff --git a/tools/cxxtest/python/cxxtest/__init__.pyc b/tools/cxxtest/python/cxxtest/__init__.pyc new file mode 100644 index 0000000000000000000000000000000000000000..35a22375685d9059ce0c2e0f608a876a2a52a994 GIT binary patch literal 1057 zcmZSn%*&C#TL70hwF@>2SiiIJCg&~TSA%&G8ij5(KjUkF1tc#r?hl3#`g@YkjgA-(?FcSkq zaz#Z+YH^8`f}=t}Wl2VUo!1%Ra}r+1k#hQ;1!ye zS)!xhTu=aEB<7_kRDhUzaQ9{wE2JhCS1Od`E0h+eDkP;QCzckca%Gk%q~xa-E9B*u zC={g@mSz^EDijo@Cgowt_~gUb>z_P)LZUrUJ-enMfg;$W@kFRH=}blUk9P zl#>by#$1p-kX;HXnZ?QZAbCA5u8@pW1!x$e$5Ccpa!zSVYOz9cVnJe3W=>{FW@<6W zB!z;+qGFJX!4acSoL^d$oT`wPnUh)!c1U_^UTRTdNoHO;JSI|#GRsnniuJfM|NsC0 zUjvl#O1K#q7~2_IN>ZenI$Nn&PRYEgWAi3qw-D#%gs z@ldbjWG1KPflPtgR9ci1A729U1vJF|C8hwJ$Kc%f_{_Y_lK6PNf=Y1M+T`Y^l;)(` ai7_xR6bmpgFt9O+F|shSFtIU$Ark8m%7*d!Sf;Ct` z@`?-$3<^Q1IjM=osS2KXY57IDi6xo&c?xOyMGDCk6(y;~B?`r?3=9k=dIow%#as*w z3`PcqM!E)ux&}sm8q5p~3?=Lg3=Hw{Df!9q@g>|~c3Emsab|vAe0&K9n4gkZk{Tbc z0dgIJDE4JwU`V!#2`);G2}ms}&d*ECiAgRfh%YG0&x$We%`M1DEJ=+i$z$jgK#aI6gjJub>ian@w(hN@-529muK0AWyO}u`vPwL@P*) literal 0 HcmV?d00001 diff --git a/tools/cxxtest/python/cxxtest/cxx_parser.py b/tools/cxxtest/python/cxxtest/cxx_parser.py new file mode 100644 index 0000000..70051cb --- /dev/null +++ b/tools/cxxtest/python/cxxtest/cxx_parser.py @@ -0,0 +1,2189 @@ +#------------------------------------------------------------------------- +# CxxTest: A lightweight C++ unit testing library. +# Copyright (c) 2008 Sandia Corporation. +# This software is distributed under the LGPL License v2.1 +# For more information, see the COPYING file in the top CxxTest directory. +# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +# the U.S. Government retains certain rights in this software. +#------------------------------------------------------------------------- + +# vim: fileencoding=utf-8 + +# +# This is a PLY parser for the entire ANSI C++ grammar. This grammar was +# adapted from the FOG grammar developed by E. D. Willink. See +# +# http://www.computing.surrey.ac.uk/research/dsrg/fog/ +# +# for further details. +# +# The goal of this grammar is to extract information about class, function and +# class method declarations, along with their associated scope. Thus, this +# grammar can be used to analyze classes in an inheritance heirarchy, and then +# enumerate the methods in a derived class. +# +# This grammar parses blocks of <>, (), [] and {} in a generic manner. Thus, +# There are several capabilities that this grammar does not support: +# +# 1. Ambiguous template specification. This grammar cannot parse template +# specifications that do not have paired <>'s in their declaration. In +# particular, ambiguous declarations like +# +# foo(); +# +# cannot be correctly parsed. +# +# 2. Template class specialization. Although the goal of this grammar is to +# extract class information, specialization of templated classes is +# not supported. When a template class definition is parsed, it's +# declaration is archived without information about the template +# parameters. Class specializations will be stored separately, and +# thus they can be processed after the fact. However, this grammar +# does not attempt to correctly process properties of class inheritence +# when template class specialization is employed. +# + +# +# TODO: document usage of this file +# + +from __future__ import division + +import os +import ply.lex as lex +import ply.yacc as yacc +import re +try: + from collections import OrderedDict +except ImportError: + from ordereddict import OrderedDict + +lexer = None +scope_lineno = 0 +identifier_lineno = {} +_parse_info=None +_parsedata=None +noExceptionLogic = True + +def ply_init(data): + global _parsedata + _parsedata=data + + +class Scope(object): + + def __init__(self,name,abs_name,scope_t,base_classes,lineno): + self.function=[] + self.name=name + self.scope_t=scope_t + self.sub_scopes=[] + self.base_classes=base_classes + self.abs_name=abs_name + self.lineno=lineno + + def insert(self,scope): + self.sub_scopes.append(scope) + + +class CppInfo(object): + + def __init__(self, filter=None): + self.verbose=0 + if filter is None: + self.filter=re.compile("[Tt][Ee][Ss][Tt]|createSuite|destroySuite") + else: + self.filter=filter + self.scopes=[""] + self.index=OrderedDict() + self.index[""]=Scope("","::","namespace",[],1) + self.function=[] + + def push_scope(self,ns,scope_t,base_classes=[]): + name = self.scopes[-1]+"::"+ns + if self.verbose>=2: + print "-- Starting "+scope_t+" "+name + self.scopes.append(name) + self.index[name] = Scope(ns,name,scope_t,base_classes,scope_lineno-1) + + def pop_scope(self): + scope = self.scopes.pop() + if self.verbose>=2: + print "-- Stopping "+scope + return scope + + def add_function(self, fn): + fn = str(fn) + if self.filter.search(fn): + self.index[self.scopes[-1]].function.append((fn, identifier_lineno.get(fn,lexer.lineno-1))) + tmp = self.scopes[-1]+"::"+fn + if self.verbose==2: + print "-- Function declaration "+fn+" "+tmp + elif self.verbose==1: + print "-- Function declaration "+tmp + + def get_functions(self,name,quiet=False): + if name == "::": + name = "" + scope = self.index[name] + fns=scope.function + for key in scope.base_classes: + cname = self.find_class(key,scope) + if cname is None: + if not quiet: + print "Defined classes: ",list(self.index.keys()) + print "WARNING: Unknown class "+key + else: + fns += self.get_functions(cname,quiet) + return fns + + def find_class(self,name,scope): + if ':' in name: + if name in self.index: + return name + else: + return None + tmp = scope.abs_name.split(':') + name1 = ":".join(tmp[:-1] + [name]) + if name1 in self.index: + return name1 + name2 = "::"+name + if name2 in self.index: + return name2 + return None + + def __repr__(self): + return str(self) + + def is_baseclass(self,cls,base): + '''Returns true if base is a base-class of cls''' + if cls in self.index: + bases = self.index[cls] + elif "::"+cls in self.index: + bases = self.index["::"+cls] + else: + return False + #raise IOError, "Unknown class "+cls + if base in bases.base_classes: + return True + for name in bases.base_classes: + if self.is_baseclass(name,base): + return True + return False + + def __str__(self): + ans="" + keys = list(self.index.keys()) + keys.sort() + for key in keys: + scope = self.index[key] + ans += scope.scope_t+" "+scope.abs_name+"\n" + if scope.scope_t == "class": + ans += " Base Classes: "+str(scope.base_classes)+"\n" + for fn in self.get_functions(scope.abs_name): + ans += " "+fn+"\n" + else: + for fn in scope.function: + ans += " "+fn+"\n" + return ans + + +def flatten(x): + """Flatten nested list""" + try: + strtypes = basestring + except: # for python3 etc + strtypes = (str, bytes) + + result = [] + for el in x: + if hasattr(el, "__iter__") and not isinstance(el, strtypes): + result.extend(flatten(el)) + else: + result.append(el) + return result + +# +# The lexer (and/or a preprocessor) is expected to identify the following +# +# Punctuation: +# +# +literals = "+-*/%^&|~!<>=:()?.\'\"\\@$;," + +# +reserved = { + 'private' : 'PRIVATE', + 'protected' : 'PROTECTED', + 'public' : 'PUBLIC', + + 'bool' : 'BOOL', + 'char' : 'CHAR', + 'double' : 'DOUBLE', + 'float' : 'FLOAT', + 'int' : 'INT', + 'long' : 'LONG', + 'short' : 'SHORT', + 'signed' : 'SIGNED', + 'unsigned' : 'UNSIGNED', + 'void' : 'VOID', + 'wchar_t' : 'WCHAR_T', + + 'class' : 'CLASS', + 'enum' : 'ENUM', + 'namespace' : 'NAMESPACE', + 'struct' : 'STRUCT', + 'typename' : 'TYPENAME', + 'union' : 'UNION', + + 'const' : 'CONST', + 'volatile' : 'VOLATILE', + + 'auto' : 'AUTO', + 'explicit' : 'EXPLICIT', + 'export' : 'EXPORT', + 'extern' : 'EXTERN', + '__extension__' : 'EXTENSION', + 'friend' : 'FRIEND', + 'inline' : 'INLINE', + 'mutable' : 'MUTABLE', + 'register' : 'REGISTER', + 'static' : 'STATIC', + 'template' : 'TEMPLATE', + 'typedef' : 'TYPEDEF', + 'using' : 'USING', + 'virtual' : 'VIRTUAL', + + 'asm' : 'ASM', + 'break' : 'BREAK', + 'case' : 'CASE', + 'catch' : 'CATCH', + 'const_cast' : 'CONST_CAST', + 'continue' : 'CONTINUE', + 'default' : 'DEFAULT', + 'delete' : 'DELETE', + 'do' : 'DO', + 'dynamic_cast' : 'DYNAMIC_CAST', + 'else' : 'ELSE', + 'false' : 'FALSE', + 'for' : 'FOR', + 'goto' : 'GOTO', + 'if' : 'IF', + 'new' : 'NEW', + 'operator' : 'OPERATOR', + 'reinterpret_cast' : 'REINTERPRET_CAST', + 'return' : 'RETURN', + 'sizeof' : 'SIZEOF', + 'static_cast' : 'STATIC_CAST', + 'switch' : 'SWITCH', + 'this' : 'THIS', + 'throw' : 'THROW', + 'true' : 'TRUE', + 'try' : 'TRY', + 'typeid' : 'TYPEID', + 'while' : 'WHILE', + '"C"' : 'CLiteral', + '"C++"' : 'CppLiteral', + + '__attribute__' : 'ATTRIBUTE', + '__cdecl__' : 'CDECL', + '__typeof' : 'uTYPEOF', + 'typeof' : 'TYPEOF', + + 'CXXTEST_STD' : 'CXXTEST_STD' +} + +tokens = [ + "CharacterLiteral", + "FloatingLiteral", + "Identifier", + "IntegerLiteral", + "StringLiteral", + "RBRACE", + "LBRACE", + "RBRACKET", + "LBRACKET", + "ARROW", + "ARROW_STAR", + "DEC", + "EQ", + "GE", + "INC", + "LE", + "LOG_AND", + "LOG_OR", + "NE", + "SHL", + "SHR", + "ASS_ADD", + "ASS_AND", + "ASS_DIV", + "ASS_MOD", + "ASS_MUL", + "ASS_OR", + "ASS_SHL", + "ASS_SHR", + "ASS_SUB", + "ASS_XOR", + "DOT_STAR", + "ELLIPSIS", + "SCOPE", +] + list(reserved.values()) + +t_ignore = " \t\r" + +t_LBRACE = r"(\{)|(<%)" +t_RBRACE = r"(\})|(%>)" +t_LBRACKET = r"(\[)|(<:)" +t_RBRACKET = r"(\])|(:>)" +t_ARROW = r"->" +t_ARROW_STAR = r"->\*" +t_DEC = r"--" +t_EQ = r"==" +t_GE = r">=" +t_INC = r"\+\+" +t_LE = r"<=" +t_LOG_AND = r"&&" +t_LOG_OR = r"\|\|" +t_NE = r"!=" +t_SHL = r"<<" +t_SHR = r">>" +t_ASS_ADD = r"\+=" +t_ASS_AND = r"&=" +t_ASS_DIV = r"/=" +t_ASS_MOD = r"%=" +t_ASS_MUL = r"\*=" +t_ASS_OR = r"\|=" +t_ASS_SHL = r"<<=" +t_ASS_SHR = r">>=" +t_ASS_SUB = r"-=" +t_ASS_XOR = r"^=" +t_DOT_STAR = r"\.\*" +t_ELLIPSIS = r"\.\.\." +t_SCOPE = r"::" + +# Discard comments +def t_COMMENT(t): + r'(/\*(.|\n)*?\*/)|(//.*?\n)|(\#.*?\n)' + t.lexer.lineno += t.value.count("\n") + +t_IntegerLiteral = r'(0x[0-9A-F]+)|([0-9]+(L){0,1})' +t_FloatingLiteral = r"[0-9]+[eE\.\+-]+[eE\.\+\-0-9]+" +t_CharacterLiteral = r'\'([^\'\\]|\\.)*\'' +#t_StringLiteral = r'"([^"\\]|\\.)*"' +def t_StringLiteral(t): + r'"([^"\\]|\\.)*"' + t.type = reserved.get(t.value,'StringLiteral') + return t + +def t_Identifier(t): + r"[a-zA-Z_][a-zA-Z_0-9\.]*" + t.type = reserved.get(t.value,'Identifier') + return t + + +def t_error(t): + print "Illegal character '%s'" % t.value[0] + #raise IOError, "Parse error" + #t.lexer.skip() + +def t_newline(t): + r'[\n]+' + t.lexer.lineno += len(t.value) + +precedence = ( + ( 'right', 'SHIFT_THERE', 'REDUCE_HERE_MOSTLY', 'SCOPE'), + ( 'nonassoc', 'ELSE', 'INC', 'DEC', '+', '-', '*', '&', 'LBRACKET', 'LBRACE', '<', ':', ')') + ) + +start = 'translation_unit' + +# +# The %prec resolves the 14.2-3 ambiguity: +# Identifier '<' is forced to go through the is-it-a-template-name test +# All names absorb TEMPLATE with the name, so that no template_test is +# performed for them. This requires all potential declarations within an +# expression to perpetuate this policy and thereby guarantee the ultimate +# coverage of explicit_instantiation. +# +# The %prec also resolves a conflict in identifier : which is forced to be a +# shift of a label for a labeled-statement rather than a reduction for the +# name of a bit-field or generalised constructor. This is pretty dubious +# syntactically but correct for all semantic possibilities. The shift is +# only activated when the ambiguity exists at the start of a statement. +# In this context a bit-field declaration or constructor definition are not +# allowed. +# + +def p_identifier(p): + '''identifier : Identifier + | CXXTEST_STD '(' Identifier ')' + ''' + if p[1][0] in ('t','T','c','d'): + identifier_lineno[p[1]] = p.lineno(1) + p[0] = p[1] + +def p_id(p): + '''id : identifier %prec SHIFT_THERE + | template_decl + | TEMPLATE id + ''' + p[0] = get_rest(p) + +def p_global_scope(p): + '''global_scope : SCOPE + ''' + p[0] = get_rest(p) + +def p_id_scope(p): + '''id_scope : id SCOPE''' + p[0] = get_rest(p) + +def p_id_scope_seq(p): + '''id_scope_seq : id_scope + | id_scope id_scope_seq + ''' + p[0] = get_rest(p) + +# +# A :: B :: C; is ambiguous How much is type and how much name ? +# The %prec maximises the (type) length which is the 7.1-2 semantic constraint. +# +def p_nested_id(p): + '''nested_id : id %prec SHIFT_THERE + | id_scope nested_id + ''' + p[0] = get_rest(p) + +def p_scoped_id(p): + '''scoped_id : nested_id + | global_scope nested_id + | id_scope_seq + | global_scope id_scope_seq + ''' + global scope_lineno + scope_lineno = lexer.lineno + data = flatten(get_rest(p)) + if data[0] != None: + p[0] = "".join(data) + +# +# destructor_id has to be held back to avoid a conflict with a one's +# complement as per 5.3.1-9, It gets put back only when scoped or in a +# declarator_id, which is only used as an explicit member name. +# Declarations of an unscoped destructor are always parsed as a one's +# complement. +# +def p_destructor_id(p): + '''destructor_id : '~' id + | TEMPLATE destructor_id + ''' + p[0]=get_rest(p) + +#def p_template_id(p): +# '''template_id : empty +# | TEMPLATE +# ''' +# pass + +def p_template_decl(p): + '''template_decl : identifier '<' nonlgt_seq_opt '>' + ''' + # + # WEH: should we include the lt/gt symbols to indicate that this is a + # template class? How is that going to be used later??? + # + #p[0] = [p[1] ,"<",">"] + p[0] = p[1] + +def p_special_function_id(p): + '''special_function_id : conversion_function_id + | operator_function_id + | TEMPLATE special_function_id + ''' + p[0]=get_rest(p) + +def p_nested_special_function_id(p): + '''nested_special_function_id : special_function_id + | id_scope destructor_id + | id_scope nested_special_function_id + ''' + p[0]=get_rest(p) + +def p_scoped_special_function_id(p): + '''scoped_special_function_id : nested_special_function_id + | global_scope nested_special_function_id + ''' + p[0]=get_rest(p) + +# declarator-id is all names in all scopes, except reserved words +def p_declarator_id(p): + '''declarator_id : scoped_id + | scoped_special_function_id + | destructor_id + ''' + p[0]=p[1] + +# +# The standard defines pseudo-destructors in terms of type-name, which is +# class/enum/typedef, of which class-name is covered by a normal destructor. +# pseudo-destructors are supposed to support ~int() in templates, so the +# grammar here covers built-in names. Other names are covered by the lack +# of identifier/type discrimination. +# +def p_built_in_type_id(p): + '''built_in_type_id : built_in_type_specifier + | built_in_type_id built_in_type_specifier + ''' + pass + +def p_pseudo_destructor_id(p): + '''pseudo_destructor_id : built_in_type_id SCOPE '~' built_in_type_id + | '~' built_in_type_id + | TEMPLATE pseudo_destructor_id + ''' + pass + +def p_nested_pseudo_destructor_id(p): + '''nested_pseudo_destructor_id : pseudo_destructor_id + | id_scope nested_pseudo_destructor_id + ''' + pass + +def p_scoped_pseudo_destructor_id(p): + '''scoped_pseudo_destructor_id : nested_pseudo_destructor_id + | global_scope scoped_pseudo_destructor_id + ''' + pass + +#------------------------------------------------------------------------------- +# A.2 Lexical conventions +#------------------------------------------------------------------------------- +# + +def p_literal(p): + '''literal : IntegerLiteral + | CharacterLiteral + | FloatingLiteral + | StringLiteral + | TRUE + | FALSE + ''' + pass + +#------------------------------------------------------------------------------- +# A.3 Basic concepts +#------------------------------------------------------------------------------- +def p_translation_unit(p): + '''translation_unit : declaration_seq_opt + ''' + pass + +#------------------------------------------------------------------------------- +# A.4 Expressions +#------------------------------------------------------------------------------- +# +# primary_expression covers an arbitrary sequence of all names with the +# exception of an unscoped destructor, which is parsed as its unary expression +# which is the correct disambiguation (when ambiguous). This eliminates the +# traditional A(B) meaning A B ambiguity, since we never have to tack an A +# onto the front of something that might start with (. The name length got +# maximised ab initio. The downside is that semantic interpretation must split +# the names up again. +# +# Unification of the declaration and expression syntax means that unary and +# binary pointer declarator operators: +# int * * name +# are parsed as binary and unary arithmetic operators (int) * (*name). Since +# type information is not used +# ambiguities resulting from a cast +# (cast)*(value) +# are resolved to favour the binary rather than the cast unary to ease AST +# clean-up. The cast-call ambiguity must be resolved to the cast to ensure +# that (a)(b)c can be parsed. +# +# The problem of the functional cast ambiguity +# name(arg) +# as call or declaration is avoided by maximising the name within the parsing +# kernel. So primary_id_expression picks up +# extern long int const var = 5; +# as an assignment to the syntax parsed as "extern long int const var". The +# presence of two names is parsed so that "extern long into const" is +# distinguished from "var" considerably simplifying subsequent +# semantic resolution. +# +# The generalised name is a concatenation of potential type-names (scoped +# identifiers or built-in sequences) plus optionally one of the special names +# such as an operator-function-id, conversion-function-id or destructor as the +# final name. +# + +def get_rest(p): + return [p[i] for i in range(1, len(p))] + +def p_primary_expression(p): + '''primary_expression : literal + | THIS + | suffix_decl_specified_ids + | abstract_expression %prec REDUCE_HERE_MOSTLY + ''' + p[0] = get_rest(p) + +# +# Abstract-expression covers the () and [] of abstract-declarators. +# +def p_abstract_expression(p): + '''abstract_expression : parenthesis_clause + | LBRACKET bexpression_opt RBRACKET + | TEMPLATE abstract_expression + ''' + pass + +def p_postfix_expression(p): + '''postfix_expression : primary_expression + | postfix_expression parenthesis_clause + | postfix_expression LBRACKET bexpression_opt RBRACKET + | postfix_expression LBRACKET bexpression_opt RBRACKET attributes + | postfix_expression '.' declarator_id + | postfix_expression '.' scoped_pseudo_destructor_id + | postfix_expression ARROW declarator_id + | postfix_expression ARROW scoped_pseudo_destructor_id + | postfix_expression INC + | postfix_expression DEC + | DYNAMIC_CAST '<' nonlgt_seq_opt '>' '(' expression ')' + | STATIC_CAST '<' nonlgt_seq_opt '>' '(' expression ')' + | REINTERPRET_CAST '<' nonlgt_seq_opt '>' '(' expression ')' + | CONST_CAST '<' nonlgt_seq_opt '>' '(' expression ')' + | TYPEID parameters_clause + ''' + #print "HERE",str(p[1]) + p[0] = get_rest(p) + +def p_bexpression_opt(p): + '''bexpression_opt : empty + | bexpression + ''' + pass + +def p_bexpression(p): + '''bexpression : nonbracket_seq + | nonbracket_seq bexpression_seq bexpression_clause nonbracket_seq_opt + | bexpression_seq bexpression_clause nonbracket_seq_opt + ''' + pass + +def p_bexpression_seq(p): + '''bexpression_seq : empty + | bexpression_seq bexpression_clause nonbracket_seq_opt + ''' + pass + +def p_bexpression_clause(p): + '''bexpression_clause : LBRACKET bexpression_opt RBRACKET + ''' + pass + + + +def p_expression_list_opt(p): + '''expression_list_opt : empty + | expression_list + ''' + pass + +def p_expression_list(p): + '''expression_list : assignment_expression + | expression_list ',' assignment_expression + ''' + pass + +def p_unary_expression(p): + '''unary_expression : postfix_expression + | INC cast_expression + | DEC cast_expression + | ptr_operator cast_expression + | suffix_decl_specified_scope star_ptr_operator cast_expression + | '+' cast_expression + | '-' cast_expression + | '!' cast_expression + | '~' cast_expression + | SIZEOF unary_expression + | new_expression + | global_scope new_expression + | delete_expression + | global_scope delete_expression + ''' + p[0] = get_rest(p) + +def p_delete_expression(p): + '''delete_expression : DELETE cast_expression + ''' + pass + +def p_new_expression(p): + '''new_expression : NEW new_type_id new_initializer_opt + | NEW parameters_clause new_type_id new_initializer_opt + | NEW parameters_clause + | NEW parameters_clause parameters_clause new_initializer_opt + ''' + pass + +def p_new_type_id(p): + '''new_type_id : type_specifier ptr_operator_seq_opt + | type_specifier new_declarator + | type_specifier new_type_id + ''' + pass + +def p_new_declarator(p): + '''new_declarator : ptr_operator new_declarator + | direct_new_declarator + ''' + pass + +def p_direct_new_declarator(p): + '''direct_new_declarator : LBRACKET bexpression_opt RBRACKET + | direct_new_declarator LBRACKET bexpression RBRACKET + ''' + pass + +def p_new_initializer_opt(p): + '''new_initializer_opt : empty + | '(' expression_list_opt ')' + ''' + pass + +# +# cast-expression is generalised to support a [] as well as a () prefix. This covers the omission of +# DELETE[] which when followed by a parenthesised expression was ambiguous. It also covers the gcc +# indexed array initialisation for free. +# +def p_cast_expression(p): + '''cast_expression : unary_expression + | abstract_expression cast_expression + ''' + p[0] = get_rest(p) + +def p_pm_expression(p): + '''pm_expression : cast_expression + | pm_expression DOT_STAR cast_expression + | pm_expression ARROW_STAR cast_expression + ''' + p[0] = get_rest(p) + +def p_multiplicative_expression(p): + '''multiplicative_expression : pm_expression + | multiplicative_expression star_ptr_operator pm_expression + | multiplicative_expression '/' pm_expression + | multiplicative_expression '%' pm_expression + ''' + p[0] = get_rest(p) + +def p_additive_expression(p): + '''additive_expression : multiplicative_expression + | additive_expression '+' multiplicative_expression + | additive_expression '-' multiplicative_expression + ''' + p[0] = get_rest(p) + +def p_shift_expression(p): + '''shift_expression : additive_expression + | shift_expression SHL additive_expression + | shift_expression SHR additive_expression + ''' + p[0] = get_rest(p) + +# | relational_expression '<' shift_expression +# | relational_expression '>' shift_expression +# | relational_expression LE shift_expression +# | relational_expression GE shift_expression +def p_relational_expression(p): + '''relational_expression : shift_expression + ''' + p[0] = get_rest(p) + +def p_equality_expression(p): + '''equality_expression : relational_expression + | equality_expression EQ relational_expression + | equality_expression NE relational_expression + ''' + p[0] = get_rest(p) + +def p_and_expression(p): + '''and_expression : equality_expression + | and_expression '&' equality_expression + ''' + p[0] = get_rest(p) + +def p_exclusive_or_expression(p): + '''exclusive_or_expression : and_expression + | exclusive_or_expression '^' and_expression + ''' + p[0] = get_rest(p) + +def p_inclusive_or_expression(p): + '''inclusive_or_expression : exclusive_or_expression + | inclusive_or_expression '|' exclusive_or_expression + ''' + p[0] = get_rest(p) + +def p_logical_and_expression(p): + '''logical_and_expression : inclusive_or_expression + | logical_and_expression LOG_AND inclusive_or_expression + ''' + p[0] = get_rest(p) + +def p_logical_or_expression(p): + '''logical_or_expression : logical_and_expression + | logical_or_expression LOG_OR logical_and_expression + ''' + p[0] = get_rest(p) + +def p_conditional_expression(p): + '''conditional_expression : logical_or_expression + | logical_or_expression '?' expression ':' assignment_expression + ''' + p[0] = get_rest(p) + + +# +# assignment-expression is generalised to cover the simple assignment of a braced initializer in order to +# contribute to the coverage of parameter-declaration and init-declaration. +# +# | logical_or_expression assignment_operator assignment_expression +def p_assignment_expression(p): + '''assignment_expression : conditional_expression + | logical_or_expression assignment_operator nonsemicolon_seq + | logical_or_expression '=' braced_initializer + | throw_expression + ''' + p[0]=get_rest(p) + +def p_assignment_operator(p): + '''assignment_operator : '=' + | ASS_ADD + | ASS_AND + | ASS_DIV + | ASS_MOD + | ASS_MUL + | ASS_OR + | ASS_SHL + | ASS_SHR + | ASS_SUB + | ASS_XOR + ''' + pass + +# +# expression is widely used and usually single-element, so the reductions are arranged so that a +# single-element expression is returned as is. Multi-element expressions are parsed as a list that +# may then behave polymorphically as an element or be compacted to an element. +# + +def p_expression(p): + '''expression : assignment_expression + | expression_list ',' assignment_expression + ''' + p[0] = get_rest(p) + +def p_constant_expression(p): + '''constant_expression : conditional_expression + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.5 Statements +#--------------------------------------------------------------------------------------------------- +# Parsing statements is easy once simple_declaration has been generalised to cover expression_statement. +# +# +# The use of extern here is a hack. The 'extern "C" {}' block gets parsed +# as a function, so when nested 'extern "C"' declarations exist, they don't +# work because the block is viewed as a list of statements... :( +# +def p_statement(p): + '''statement : compound_statement + | declaration_statement + | try_block + | labeled_statement + | selection_statement + | iteration_statement + | jump_statement + ''' + pass + +def p_compound_statement(p): + '''compound_statement : LBRACE statement_seq_opt RBRACE + ''' + pass + +def p_statement_seq_opt(p): + '''statement_seq_opt : empty + | statement_seq_opt statement + ''' + pass + +# +# The dangling else conflict is resolved to the innermost if. +# +def p_selection_statement(p): + '''selection_statement : IF '(' condition ')' statement %prec SHIFT_THERE + | IF '(' condition ')' statement ELSE statement + | SWITCH '(' condition ')' statement + ''' + pass + +def p_condition_opt(p): + '''condition_opt : empty + | condition + ''' + pass + +def p_condition(p): + '''condition : nonparen_seq + | nonparen_seq condition_seq parameters_clause nonparen_seq_opt + | condition_seq parameters_clause nonparen_seq_opt + ''' + pass + +def p_condition_seq(p): + '''condition_seq : empty + | condition_seq parameters_clause nonparen_seq_opt + ''' + pass + +def p_labeled_statement(p): + '''labeled_statement : identifier ':' statement + | CASE constant_expression ':' statement + | DEFAULT ':' statement + ''' + pass + +def p_try_block(p): + '''try_block : TRY compound_statement handler_seq + ''' + global noExceptionLogic + noExceptionLogic=False + +def p_jump_statement(p): + '''jump_statement : BREAK ';' + | CONTINUE ';' + | RETURN nonsemicolon_seq ';' + | GOTO identifier ';' + ''' + pass + +def p_iteration_statement(p): + '''iteration_statement : WHILE '(' condition ')' statement + | DO statement WHILE '(' expression ')' ';' + | FOR '(' nonparen_seq_opt ')' statement + ''' + pass + +def p_declaration_statement(p): + '''declaration_statement : block_declaration + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.6 Declarations +#--------------------------------------------------------------------------------------------------- +def p_compound_declaration(p): + '''compound_declaration : LBRACE declaration_seq_opt RBRACE + ''' + pass + +def p_declaration_seq_opt(p): + '''declaration_seq_opt : empty + | declaration_seq_opt declaration + ''' + pass + +def p_declaration(p): + '''declaration : block_declaration + | function_definition + | template_declaration + | explicit_specialization + | specialised_declaration + ''' + pass + +def p_specialised_declaration(p): + '''specialised_declaration : linkage_specification + | namespace_definition + | TEMPLATE specialised_declaration + ''' + pass + +def p_block_declaration(p): + '''block_declaration : simple_declaration + | specialised_block_declaration + ''' + pass + +def p_specialised_block_declaration(p): + '''specialised_block_declaration : asm_definition + | namespace_alias_definition + | using_declaration + | using_directive + | TEMPLATE specialised_block_declaration + ''' + pass + +def p_simple_declaration(p): + '''simple_declaration : ';' + | init_declaration ';' + | init_declarations ';' + | decl_specifier_prefix simple_declaration + ''' + global _parse_info + if len(p) == 3: + if p[2] == ";": + decl = p[1] + else: + decl = p[2] + if decl is not None: + fp = flatten(decl) + if len(fp) >= 2 and fp[0] is not None and fp[0]!="operator" and fp[1] == '(': + p[0] = fp[0] + _parse_info.add_function(fp[0]) + +# +# A decl-specifier following a ptr_operator provokes a shift-reduce conflict for * const name which is resolved in favour of the pointer, and implemented by providing versions of decl-specifier guaranteed not to start with a cv_qualifier. decl-specifiers are implemented type-centrically. That is the semantic constraint that there must be a type is exploited to impose structure, but actually eliminate very little syntax. built-in types are multi-name and so need a different policy. +# +# non-type decl-specifiers are bound to the left-most type in a decl-specifier-seq, by parsing from the right and attaching suffixes to the right-hand type. Finally residual prefixes attach to the left. +# +def p_suffix_built_in_decl_specifier_raw(p): + '''suffix_built_in_decl_specifier_raw : built_in_type_specifier + | suffix_built_in_decl_specifier_raw built_in_type_specifier + | suffix_built_in_decl_specifier_raw decl_specifier_suffix + ''' + pass + +def p_suffix_built_in_decl_specifier(p): + '''suffix_built_in_decl_specifier : suffix_built_in_decl_specifier_raw + | TEMPLATE suffix_built_in_decl_specifier + ''' + pass + +# | id_scope_seq +# | SCOPE id_scope_seq +def p_suffix_named_decl_specifier(p): + '''suffix_named_decl_specifier : scoped_id + | elaborate_type_specifier + | suffix_named_decl_specifier decl_specifier_suffix + ''' + p[0]=get_rest(p) + +def p_suffix_named_decl_specifier_bi(p): + '''suffix_named_decl_specifier_bi : suffix_named_decl_specifier + | suffix_named_decl_specifier suffix_built_in_decl_specifier_raw + ''' + p[0] = get_rest(p) + #print "HERE",get_rest(p) + +def p_suffix_named_decl_specifiers(p): + '''suffix_named_decl_specifiers : suffix_named_decl_specifier_bi + | suffix_named_decl_specifiers suffix_named_decl_specifier_bi + ''' + p[0] = get_rest(p) + +def p_suffix_named_decl_specifiers_sf(p): + '''suffix_named_decl_specifiers_sf : scoped_special_function_id + | suffix_named_decl_specifiers + | suffix_named_decl_specifiers scoped_special_function_id + ''' + #print "HERE",get_rest(p) + p[0] = get_rest(p) + +def p_suffix_decl_specified_ids(p): + '''suffix_decl_specified_ids : suffix_built_in_decl_specifier + | suffix_built_in_decl_specifier suffix_named_decl_specifiers_sf + | suffix_named_decl_specifiers_sf + ''' + if len(p) == 3: + p[0] = p[2] + else: + p[0] = p[1] + +def p_suffix_decl_specified_scope(p): + '''suffix_decl_specified_scope : suffix_named_decl_specifiers SCOPE + | suffix_built_in_decl_specifier suffix_named_decl_specifiers SCOPE + | suffix_built_in_decl_specifier SCOPE + ''' + p[0] = get_rest(p) + +def p_decl_specifier_affix(p): + '''decl_specifier_affix : storage_class_specifier + | function_specifier + | FRIEND + | TYPEDEF + | cv_qualifier + ''' + pass + +def p_decl_specifier_suffix(p): + '''decl_specifier_suffix : decl_specifier_affix + ''' + pass + +def p_decl_specifier_prefix(p): + '''decl_specifier_prefix : decl_specifier_affix + | TEMPLATE decl_specifier_prefix + ''' + pass + +def p_storage_class_specifier(p): + '''storage_class_specifier : REGISTER + | STATIC + | MUTABLE + | EXTERN %prec SHIFT_THERE + | EXTENSION + | AUTO + ''' + pass + +def p_function_specifier(p): + '''function_specifier : EXPLICIT + | INLINE + | VIRTUAL + ''' + pass + +def p_type_specifier(p): + '''type_specifier : simple_type_specifier + | elaborate_type_specifier + | cv_qualifier + ''' + pass + +def p_elaborate_type_specifier(p): + '''elaborate_type_specifier : class_specifier + | enum_specifier + | elaborated_type_specifier + | TEMPLATE elaborate_type_specifier + ''' + pass + +def p_simple_type_specifier(p): + '''simple_type_specifier : scoped_id + | scoped_id attributes + | built_in_type_specifier + ''' + p[0] = p[1] + +def p_built_in_type_specifier(p): + '''built_in_type_specifier : Xbuilt_in_type_specifier + | Xbuilt_in_type_specifier attributes + ''' + pass + +def p_attributes(p): + '''attributes : attribute + | attributes attribute + ''' + pass + +def p_attribute(p): + '''attribute : ATTRIBUTE '(' parameters_clause ')' + ''' + +def p_Xbuilt_in_type_specifier(p): + '''Xbuilt_in_type_specifier : CHAR + | WCHAR_T + | BOOL + | SHORT + | INT + | LONG + | SIGNED + | UNSIGNED + | FLOAT + | DOUBLE + | VOID + | uTYPEOF parameters_clause + | TYPEOF parameters_clause + ''' + pass + +# +# The over-general use of declaration_expression to cover decl-specifier-seq_opt declarator in a function-definition means that +# class X { }; +# could be a function-definition or a class-specifier. +# enum X { }; +# could be a function-definition or an enum-specifier. +# The function-definition is not syntactically valid so resolving the false conflict in favour of the +# elaborated_type_specifier is correct. +# +def p_elaborated_type_specifier(p): + '''elaborated_type_specifier : class_key scoped_id %prec SHIFT_THERE + | elaborated_enum_specifier + | TYPENAME scoped_id + ''' + pass + +def p_elaborated_enum_specifier(p): + '''elaborated_enum_specifier : ENUM scoped_id %prec SHIFT_THERE + ''' + pass + +def p_enum_specifier(p): + '''enum_specifier : ENUM scoped_id enumerator_clause + | ENUM enumerator_clause + ''' + pass + +def p_enumerator_clause(p): + '''enumerator_clause : LBRACE enumerator_list_ecarb + | LBRACE enumerator_list enumerator_list_ecarb + | LBRACE enumerator_list ',' enumerator_definition_ecarb + ''' + pass + +def p_enumerator_list_ecarb(p): + '''enumerator_list_ecarb : RBRACE + ''' + pass + +def p_enumerator_definition_ecarb(p): + '''enumerator_definition_ecarb : RBRACE + ''' + pass + +def p_enumerator_definition_filler(p): + '''enumerator_definition_filler : empty + ''' + pass + +def p_enumerator_list_head(p): + '''enumerator_list_head : enumerator_definition_filler + | enumerator_list ',' enumerator_definition_filler + ''' + pass + +def p_enumerator_list(p): + '''enumerator_list : enumerator_list_head enumerator_definition + ''' + pass + +def p_enumerator_definition(p): + '''enumerator_definition : enumerator + | enumerator '=' constant_expression + ''' + pass + +def p_enumerator(p): + '''enumerator : identifier + ''' + pass + +def p_namespace_definition(p): + '''namespace_definition : NAMESPACE scoped_id push_scope compound_declaration + | NAMESPACE push_scope compound_declaration + ''' + global _parse_info + scope = _parse_info.pop_scope() + +def p_namespace_alias_definition(p): + '''namespace_alias_definition : NAMESPACE scoped_id '=' scoped_id ';' + ''' + pass + +def p_push_scope(p): + '''push_scope : empty''' + global _parse_info + if p[-2] == "namespace": + scope=p[-1] + else: + scope="" + _parse_info.push_scope(scope,"namespace") + +def p_using_declaration(p): + '''using_declaration : USING declarator_id ';' + | USING TYPENAME declarator_id ';' + ''' + pass + +def p_using_directive(p): + '''using_directive : USING NAMESPACE scoped_id ';' + ''' + pass + +# '''asm_definition : ASM '(' StringLiteral ')' ';' +def p_asm_definition(p): + '''asm_definition : ASM '(' nonparen_seq_opt ')' ';' + ''' + pass + +def p_linkage_specification(p): + '''linkage_specification : EXTERN CLiteral declaration + | EXTERN CLiteral compound_declaration + | EXTERN CppLiteral declaration + | EXTERN CppLiteral compound_declaration + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.7 Declarators +#--------------------------------------------------------------------------------------------------- +# +# init-declarator is named init_declaration to reflect the embedded decl-specifier-seq_opt +# + +def p_init_declarations(p): + '''init_declarations : assignment_expression ',' init_declaration + | init_declarations ',' init_declaration + ''' + p[0]=get_rest(p) + +def p_init_declaration(p): + '''init_declaration : assignment_expression + ''' + p[0]=get_rest(p) + +def p_star_ptr_operator(p): + '''star_ptr_operator : '*' + | star_ptr_operator cv_qualifier + ''' + pass + +def p_nested_ptr_operator(p): + '''nested_ptr_operator : star_ptr_operator + | id_scope nested_ptr_operator + ''' + pass + +def p_ptr_operator(p): + '''ptr_operator : '&' + | nested_ptr_operator + | global_scope nested_ptr_operator + ''' + pass + +def p_ptr_operator_seq(p): + '''ptr_operator_seq : ptr_operator + | ptr_operator ptr_operator_seq + ''' + pass + +# +# Independently coded to localise the shift-reduce conflict: sharing just needs another %prec +# +def p_ptr_operator_seq_opt(p): + '''ptr_operator_seq_opt : empty %prec SHIFT_THERE + | ptr_operator ptr_operator_seq_opt + ''' + pass + +def p_cv_qualifier_seq_opt(p): + '''cv_qualifier_seq_opt : empty + | cv_qualifier_seq_opt cv_qualifier + ''' + pass + +# TODO: verify that we should include attributes here +def p_cv_qualifier(p): + '''cv_qualifier : CONST + | VOLATILE + | attributes + ''' + pass + +def p_type_id(p): + '''type_id : type_specifier abstract_declarator_opt + | type_specifier type_id + ''' + pass + +def p_abstract_declarator_opt(p): + '''abstract_declarator_opt : empty + | ptr_operator abstract_declarator_opt + | direct_abstract_declarator + ''' + pass + +def p_direct_abstract_declarator_opt(p): + '''direct_abstract_declarator_opt : empty + | direct_abstract_declarator + ''' + pass + +def p_direct_abstract_declarator(p): + '''direct_abstract_declarator : direct_abstract_declarator_opt parenthesis_clause + | direct_abstract_declarator_opt LBRACKET RBRACKET + | direct_abstract_declarator_opt LBRACKET bexpression RBRACKET + ''' + pass + +def p_parenthesis_clause(p): + '''parenthesis_clause : parameters_clause cv_qualifier_seq_opt + | parameters_clause cv_qualifier_seq_opt exception_specification + ''' + p[0] = ['(',')'] + +def p_parameters_clause(p): + '''parameters_clause : '(' condition_opt ')' + ''' + p[0] = ['(',')'] + +# +# A typed abstract qualifier such as +# Class * ... +# looks like a multiply, so pointers are parsed as their binary operation equivalents that +# ultimately terminate with a degenerate right hand term. +# +def p_abstract_pointer_declaration(p): + '''abstract_pointer_declaration : ptr_operator_seq + | multiplicative_expression star_ptr_operator ptr_operator_seq_opt + ''' + pass + +def p_abstract_parameter_declaration(p): + '''abstract_parameter_declaration : abstract_pointer_declaration + | and_expression '&' + | and_expression '&' abstract_pointer_declaration + ''' + pass + +def p_special_parameter_declaration(p): + '''special_parameter_declaration : abstract_parameter_declaration + | abstract_parameter_declaration '=' assignment_expression + | ELLIPSIS + ''' + pass + +def p_parameter_declaration(p): + '''parameter_declaration : assignment_expression + | special_parameter_declaration + | decl_specifier_prefix parameter_declaration + ''' + pass + +# +# function_definition includes constructor, destructor, implicit int definitions too. A local destructor is successfully parsed as a function-declaration but the ~ was treated as a unary operator. constructor_head is the prefix ambiguity between a constructor and a member-init-list starting with a bit-field. +# +def p_function_definition(p): + '''function_definition : ctor_definition + | func_definition + ''' + pass + +def p_func_definition(p): + '''func_definition : assignment_expression function_try_block + | assignment_expression function_body + | decl_specifier_prefix func_definition + ''' + global _parse_info + if p[2] is not None and p[2][0] == '{': + decl = flatten(p[1]) + #print "HERE",decl + if decl[-1] == ')': + decl=decl[-3] + else: + decl=decl[-1] + p[0] = decl + if decl != "operator": + _parse_info.add_function(decl) + else: + p[0] = p[2] + +def p_ctor_definition(p): + '''ctor_definition : constructor_head function_try_block + | constructor_head function_body + | decl_specifier_prefix ctor_definition + ''' + if p[2] is None or p[2][0] == "try" or p[2][0] == '{': + p[0]=p[1] + else: + p[0]=p[1] + +def p_constructor_head(p): + '''constructor_head : bit_field_init_declaration + | constructor_head ',' assignment_expression + ''' + p[0]=p[1] + +def p_function_try_block(p): + '''function_try_block : TRY function_block handler_seq + ''' + global noExceptionLogic + noExceptionLogic=False + p[0] = ['try'] + +def p_function_block(p): + '''function_block : ctor_initializer_opt function_body + ''' + pass + +def p_function_body(p): + '''function_body : LBRACE nonbrace_seq_opt RBRACE + ''' + p[0] = ['{','}'] + +def p_initializer_clause(p): + '''initializer_clause : assignment_expression + | braced_initializer + ''' + pass + +def p_braced_initializer(p): + '''braced_initializer : LBRACE initializer_list RBRACE + | LBRACE initializer_list ',' RBRACE + | LBRACE RBRACE + ''' + pass + +def p_initializer_list(p): + '''initializer_list : initializer_clause + | initializer_list ',' initializer_clause + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.8 Classes +#--------------------------------------------------------------------------------------------------- +# +# An anonymous bit-field declaration may look very like inheritance: +# const int B = 3; +# class A : B ; +# The two usages are too distant to try to create and enforce a common prefix so we have to resort to +# a parser hack by backtracking. Inheritance is much the most likely so we mark the input stream context +# and try to parse a base-clause. If we successfully reach a { the base-clause is ok and inheritance was +# the correct choice so we unmark and continue. If we fail to find the { an error token causes +# back-tracking to the alternative parse in elaborated_type_specifier which regenerates the : and +# declares unconditional success. +# + +def p_class_specifier_head(p): + '''class_specifier_head : class_key scoped_id ':' base_specifier_list LBRACE + | class_key ':' base_specifier_list LBRACE + | class_key scoped_id LBRACE + | class_key LBRACE + ''' + global _parse_info + base_classes=[] + if len(p) == 6: + scope = p[2] + base_classes = p[4] + elif len(p) == 4: + scope = p[2] + elif len(p) == 5: + base_classes = p[3] + else: + scope = "" + _parse_info.push_scope(scope,p[1],base_classes) + + +def p_class_key(p): + '''class_key : CLASS + | STRUCT + | UNION + ''' + p[0] = p[1] + +def p_class_specifier(p): + '''class_specifier : class_specifier_head member_specification_opt RBRACE + ''' + scope = _parse_info.pop_scope() + +def p_member_specification_opt(p): + '''member_specification_opt : empty + | member_specification_opt member_declaration + ''' + pass + +def p_member_declaration(p): + '''member_declaration : accessibility_specifier + | simple_member_declaration + | function_definition + | using_declaration + | template_declaration + ''' + p[0] = get_rest(p) + #print "Decl",get_rest(p) + +# +# The generality of constructor names (there need be no parenthesised argument list) means that that +# name : f(g), h(i) +# could be the start of a constructor or the start of an anonymous bit-field. An ambiguity is avoided by +# parsing the ctor-initializer of a function_definition as a bit-field. +# +def p_simple_member_declaration(p): + '''simple_member_declaration : ';' + | assignment_expression ';' + | constructor_head ';' + | member_init_declarations ';' + | decl_specifier_prefix simple_member_declaration + ''' + global _parse_info + decl = flatten(get_rest(p)) + if len(decl) >= 4 and decl[-3] == "(": + _parse_info.add_function(decl[-4]) + +def p_member_init_declarations(p): + '''member_init_declarations : assignment_expression ',' member_init_declaration + | constructor_head ',' bit_field_init_declaration + | member_init_declarations ',' member_init_declaration + ''' + pass + +def p_member_init_declaration(p): + '''member_init_declaration : assignment_expression + | bit_field_init_declaration + ''' + pass + +def p_accessibility_specifier(p): + '''accessibility_specifier : access_specifier ':' + ''' + pass + +def p_bit_field_declaration(p): + '''bit_field_declaration : assignment_expression ':' bit_field_width + | ':' bit_field_width + ''' + if len(p) == 4: + p[0]=p[1] + +def p_bit_field_width(p): + '''bit_field_width : logical_or_expression + | logical_or_expression '?' bit_field_width ':' bit_field_width + ''' + pass + +def p_bit_field_init_declaration(p): + '''bit_field_init_declaration : bit_field_declaration + | bit_field_declaration '=' initializer_clause + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.9 Derived classes +#--------------------------------------------------------------------------------------------------- +def p_base_specifier_list(p): + '''base_specifier_list : base_specifier + | base_specifier_list ',' base_specifier + ''' + if len(p) == 2: + p[0] = [p[1]] + else: + p[0] = p[1]+[p[3]] + +def p_base_specifier(p): + '''base_specifier : scoped_id + | access_specifier base_specifier + | VIRTUAL base_specifier + ''' + if len(p) == 2: + p[0] = p[1] + else: + p[0] = p[2] + +def p_access_specifier(p): + '''access_specifier : PRIVATE + | PROTECTED + | PUBLIC + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.10 Special member functions +#--------------------------------------------------------------------------------------------------- +def p_conversion_function_id(p): + '''conversion_function_id : OPERATOR conversion_type_id + ''' + p[0] = ['operator'] + +def p_conversion_type_id(p): + '''conversion_type_id : type_specifier ptr_operator_seq_opt + | type_specifier conversion_type_id + ''' + pass + +# +# Ctor-initialisers can look like a bit field declaration, given the generalisation of names: +# Class(Type) : m1(1), m2(2) { } +# NonClass(bit_field) : int(2), second_variable, ... +# The grammar below is used within a function_try_block or function_definition. +# See simple_member_declaration for use in normal member function_definition. +# +def p_ctor_initializer_opt(p): + '''ctor_initializer_opt : empty + | ctor_initializer + ''' + pass + +def p_ctor_initializer(p): + '''ctor_initializer : ':' mem_initializer_list + ''' + pass + +def p_mem_initializer_list(p): + '''mem_initializer_list : mem_initializer + | mem_initializer_list_head mem_initializer + ''' + pass + +def p_mem_initializer_list_head(p): + '''mem_initializer_list_head : mem_initializer_list ',' + ''' + pass + +def p_mem_initializer(p): + '''mem_initializer : mem_initializer_id '(' expression_list_opt ')' + ''' + pass + +def p_mem_initializer_id(p): + '''mem_initializer_id : scoped_id + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.11 Overloading +#--------------------------------------------------------------------------------------------------- + +def p_operator_function_id(p): + '''operator_function_id : OPERATOR operator + | OPERATOR '(' ')' + | OPERATOR LBRACKET RBRACKET + | OPERATOR '<' + | OPERATOR '>' + | OPERATOR operator '<' nonlgt_seq_opt '>' + ''' + p[0] = ["operator"] + +# +# It is not clear from the ANSI standard whether spaces are permitted in delete[]. If not then it can +# be recognised and returned as DELETE_ARRAY by the lexer. Assuming spaces are permitted there is an +# ambiguity created by the over generalised nature of expressions. operator new is a valid delarator-id +# which we may have an undimensioned array of. Semantic rubbish, but syntactically valid. Since the +# array form is covered by the declarator consideration we can exclude the operator here. The need +# for a semantic rescue can be eliminated at the expense of a couple of shift-reduce conflicts by +# removing the comments on the next four lines. +# +def p_operator(p): + '''operator : NEW + | DELETE + | '+' + | '-' + | '*' + | '/' + | '%' + | '^' + | '&' + | '|' + | '~' + | '!' + | '=' + | ASS_ADD + | ASS_SUB + | ASS_MUL + | ASS_DIV + | ASS_MOD + | ASS_XOR + | ASS_AND + | ASS_OR + | SHL + | SHR + | ASS_SHR + | ASS_SHL + | EQ + | NE + | LE + | GE + | LOG_AND + | LOG_OR + | INC + | DEC + | ',' + | ARROW_STAR + | ARROW + ''' + p[0]=p[1] + +# | IF +# | SWITCH +# | WHILE +# | FOR +# | DO +def p_reserved(p): + '''reserved : PRIVATE + | CLiteral + | CppLiteral + | IF + | SWITCH + | WHILE + | FOR + | DO + | PROTECTED + | PUBLIC + | BOOL + | CHAR + | DOUBLE + | FLOAT + | INT + | LONG + | SHORT + | SIGNED + | UNSIGNED + | VOID + | WCHAR_T + | CLASS + | ENUM + | NAMESPACE + | STRUCT + | TYPENAME + | UNION + | CONST + | VOLATILE + | AUTO + | EXPLICIT + | EXPORT + | EXTERN + | FRIEND + | INLINE + | MUTABLE + | REGISTER + | STATIC + | TEMPLATE + | TYPEDEF + | USING + | VIRTUAL + | ASM + | BREAK + | CASE + | CATCH + | CONST_CAST + | CONTINUE + | DEFAULT + | DYNAMIC_CAST + | ELSE + | FALSE + | GOTO + | OPERATOR + | REINTERPRET_CAST + | RETURN + | SIZEOF + | STATIC_CAST + | THIS + | THROW + | TRUE + | TRY + | TYPEID + | ATTRIBUTE + | CDECL + | TYPEOF + | uTYPEOF + ''' + if p[1] in ('try', 'catch', 'throw'): + global noExceptionLogic + noExceptionLogic=False + +#--------------------------------------------------------------------------------------------------- +# A.12 Templates +#--------------------------------------------------------------------------------------------------- +def p_template_declaration(p): + '''template_declaration : template_parameter_clause declaration + | EXPORT template_declaration + ''' + pass + +def p_template_parameter_clause(p): + '''template_parameter_clause : TEMPLATE '<' nonlgt_seq_opt '>' + ''' + pass + +# +# Generalised naming makes identifier a valid declaration, so TEMPLATE identifier is too. +# The TEMPLATE prefix is therefore folded into all names, parenthesis_clause and decl_specifier_prefix. +# +# explicit_instantiation: TEMPLATE declaration +# +def p_explicit_specialization(p): + '''explicit_specialization : TEMPLATE '<' '>' declaration + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.13 Exception Handling +#--------------------------------------------------------------------------------------------------- +def p_handler_seq(p): + '''handler_seq : handler + | handler handler_seq + ''' + pass + +def p_handler(p): + '''handler : CATCH '(' exception_declaration ')' compound_statement + ''' + global noExceptionLogic + noExceptionLogic=False + +def p_exception_declaration(p): + '''exception_declaration : parameter_declaration + ''' + pass + +def p_throw_expression(p): + '''throw_expression : THROW + | THROW assignment_expression + ''' + global noExceptionLogic + noExceptionLogic=False + +def p_exception_specification(p): + '''exception_specification : THROW '(' ')' + | THROW '(' type_id_list ')' + ''' + global noExceptionLogic + noExceptionLogic=False + +def p_type_id_list(p): + '''type_id_list : type_id + | type_id_list ',' type_id + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# Misc productions +#--------------------------------------------------------------------------------------------------- +def p_nonsemicolon_seq(p): + '''nonsemicolon_seq : empty + | nonsemicolon_seq nonsemicolon + ''' + pass + +def p_nonsemicolon(p): + '''nonsemicolon : misc + | '(' + | ')' + | '<' + | '>' + | LBRACKET nonbracket_seq_opt RBRACKET + | LBRACE nonbrace_seq_opt RBRACE + ''' + pass + +def p_nonparen_seq_opt(p): + '''nonparen_seq_opt : empty + | nonparen_seq_opt nonparen + ''' + pass + +def p_nonparen_seq(p): + '''nonparen_seq : nonparen + | nonparen_seq nonparen + ''' + pass + +def p_nonparen(p): + '''nonparen : misc + | '<' + | '>' + | ';' + | LBRACKET nonbracket_seq_opt RBRACKET + | LBRACE nonbrace_seq_opt RBRACE + ''' + pass + +def p_nonbracket_seq_opt(p): + '''nonbracket_seq_opt : empty + | nonbracket_seq_opt nonbracket + ''' + pass + +def p_nonbracket_seq(p): + '''nonbracket_seq : nonbracket + | nonbracket_seq nonbracket + ''' + pass + +def p_nonbracket(p): + '''nonbracket : misc + | '<' + | '>' + | '(' + | ')' + | ';' + | LBRACKET nonbracket_seq_opt RBRACKET + | LBRACE nonbrace_seq_opt RBRACE + ''' + pass + +def p_nonbrace_seq_opt(p): + '''nonbrace_seq_opt : empty + | nonbrace_seq_opt nonbrace + ''' + pass + +def p_nonbrace(p): + '''nonbrace : misc + | '<' + | '>' + | '(' + | ')' + | ';' + | LBRACKET nonbracket_seq_opt RBRACKET + | LBRACE nonbrace_seq_opt RBRACE + ''' + pass + +def p_nonlgt_seq_opt(p): + '''nonlgt_seq_opt : empty + | nonlgt_seq_opt nonlgt + ''' + pass + +def p_nonlgt(p): + '''nonlgt : misc + | '(' + | ')' + | LBRACKET nonbracket_seq_opt RBRACKET + | '<' nonlgt_seq_opt '>' + | ';' + ''' + pass + +def p_misc(p): + '''misc : operator + | identifier + | IntegerLiteral + | CharacterLiteral + | FloatingLiteral + | StringLiteral + | reserved + | '?' + | ':' + | '.' + | SCOPE + | ELLIPSIS + | EXTENSION + ''' + pass + +def p_empty(p): + '''empty : ''' + pass + + + +# +# Compute column. +# input is the input text string +# token is a token instance +# +def _find_column(input,token): + ''' TODO ''' + i = token.lexpos + while i > 0: + if input[i] == '\n': break + i -= 1 + column = (token.lexpos - i)+1 + return column + +def p_error(p): + if p is None: + tmp = "Syntax error at end of file." + else: + tmp = "Syntax error at token " + if p.type is "": + tmp = tmp + "''" + else: + tmp = tmp + str(p.type) + tmp = tmp + " with value '"+str(p.value)+"'" + tmp = tmp + " in line " + str(lexer.lineno-1) + tmp = tmp + " at column "+str(_find_column(_parsedata,p)) + raise IOError( tmp ) + + + +# +# The function that performs the parsing +# +def parse_cpp(data=None, filename=None, debug=0, optimize=0, verbose=False, func_filter=None): + if debug > 0: + print "Debugging parse_cpp!" + # + # Always remove the parser.out file, which is generated to create debugging + # + if os.path.exists("parser.out"): + os.remove("parser.out") + # + # Remove the parsetab.py* files. These apparently need to be removed + # to ensure the creation of a parser.out file. + # + if os.path.exists("parsetab.py"): + os.remove("parsetab.py") + if os.path.exists("parsetab.pyc"): + os.remove("parsetab.pyc") + global debugging + debugging=True + # + # Build lexer + # + global lexer + lexer = lex.lex() + # + # Initialize parse object + # + global _parse_info + _parse_info = CppInfo(filter=func_filter) + _parse_info.verbose=verbose + # + # Build yaccer + # + write_table = not os.path.exists("parsetab.py") + yacc.yacc(debug=debug, optimize=optimize, write_tables=write_table) + # + # Parse the file + # + global _parsedata + if not data is None: + _parsedata=data + ply_init(_parsedata) + yacc.parse(data,debug=debug) + elif not filename is None: + f = open(filename) + data = f.read() + f.close() + _parsedata=data + ply_init(_parsedata) + yacc.parse(data, debug=debug) + else: + return None + # + if not noExceptionLogic: + _parse_info.noExceptionLogic = False + else: + for key in identifier_lineno: + if 'ASSERT_THROWS' in key: + _parse_info.noExceptionLogic = False + break + _parse_info.noExceptionLogic = True + # + return _parse_info + + + +import sys + +if __name__ == '__main__': + # + # This MAIN routine parses a sequence of files provided at the command + # line. If '-v' is included, then a verbose parsing output is + # generated. + # + for arg in sys.argv[1:]: + if arg == "-v": + continue + print "Parsing file '"+arg+"'" + if '-v' in sys.argv: + parse_cpp(filename=arg,debug=2,verbose=2) + else: + parse_cpp(filename=arg,verbose=2) + # + # Print the _parse_info object summary for this file. + # This illustrates how class inheritance can be used to + # deduce class members. + # + print str(_parse_info) + diff --git a/tools/cxxtest/python/cxxtest/cxx_parser.pyc b/tools/cxxtest/python/cxxtest/cxx_parser.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ca9ea24062818607e73115fe4682ab0d0d532d4c GIT binary patch literal 87686 zcmZSn%*& zU^ym+9A<_r7KSJm7?+hH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!lAVL*HsDTJ|5CJ+NJqR=f7Nia0>VODc5TOSm^g)CH zhyb0`8e{}w8G{HD5Mc@;%s_-Wh_C<=mLS3kL|B6e8xUa&BJ4nfJ&14s5so0j2}C%9 z2p16H3L@M)FDMJd$_5cRAR-q;hyZm8f5YY}IIzU7xi0A?l-5{a|MD&7)J`m9lA|`-{i6CMUh?oo_rhtg4 zAYvMbm<}RlfQXqOVit&)4I<`%h`AtQK8RQVA{K&(MId4^h*%0DKn=s7;e(HLBt*q zu@^+_0}=Z{!~qa-5JVgT5r;v<5fE_{L>vPV$3esi5OESjoB|Q2LBtslaTY|J0}5ky=95tl*46%cV1L|g+A*FnS$5OEVkfSdIXK`ij{s;{7o4QfUdR~83>%K}hU zkXV#n25!nE7NrM)ItQRCgr--4fhs+l-29Z%oK!ndbENnI69a<)6AvRlBR?Y#BQv82 zBQK)}6B{EOGI6qs@r$K#in1{?GqQsq6PN_CkTJ3-hz-KX^2ls_a>(kiv0-|dxLBAO zDTQo|!c1()zD4+(7#1@p3pkvZI9WN_I9WManHf2m*@QVcIN3Q_IaxTlIN3ObIe9p_ zIN8CFkCTm)os*4|o0FGQhm)C;o0FYW1S$p+XX6y&WCiPH1FHh52ARdp$qLp75(Qx% zP7Y2{PBu<{PLK>ISPrBgghA>#!0v&Fb8?DvvV+Zp$b#I$36=-3ATl5`SvaM@t_Io3 z3i1osM<8E;{KClzQp3v04;2Ne0*QhA1!6-mH`p)iP=AAb57G+?8+J}nP7$d20-QWx z7eoBS$;rvd#mU9V%E=2g8)Q2tr!c23rw=$3IG}ce>;l;dvV{$72OB33Cj@hG3UYFD aa&ihwJMu8`u!%5&+O@ol{ERY8!fXH&tr-pg literal 0 HcmV?d00001 diff --git a/tools/cxxtest/python/cxxtest/cxxtest_fog.py b/tools/cxxtest/python/cxxtest/cxxtest_fog.py new file mode 100644 index 0000000..4fb9d71 --- /dev/null +++ b/tools/cxxtest/python/cxxtest/cxxtest_fog.py @@ -0,0 +1,96 @@ +#------------------------------------------------------------------------- +# CxxTest: A lightweight C++ unit testing library. +# Copyright (c) 2008 Sandia Corporation. +# This software is distributed under the LGPL License v2.1 +# For more information, see the COPYING file in the top CxxTest directory. +# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +# the U.S. Government retains certain rights in this software. +#------------------------------------------------------------------------- + +# +# TODO: add line number info +# TODO: add test function names +# + +from __future__ import division + +import sys +import re +#from os.path import abspath, dirname +#sys.path.insert(0, dirname(dirname(abspath(__file__)))) +#sys.path.insert(0, dirname(dirname(abspath(__file__)))+"/cxx_parse") +from cxxtest_misc import abort +import cxx_parser +import re + +def cstr( str ): + '''Convert a string to its C representation''' + return '"' + re.sub('\\\\', '\\\\\\\\', str ) + '"' + +def scanInputFiles(files, _options): + '''Scan all input files for test suites''' + suites=[] + for file in files: + try: + print "Parsing file "+file, + sys.stdout.flush() + parse_info = cxx_parser.parse_cpp(filename=file,optimize=1) + except IOError, err: + print " error." + print str(err) + continue + print "done." + sys.stdout.flush() + # + # WEH: see if it really makes sense to use parse information to + # initialize this data. I don't think so... + # + _options.haveStandardLibrary=1 + if not parse_info.noExceptionLogic: + _options.haveExceptionHandling=1 + # + keys = list(parse_info.index.keys()) + tpat = re.compile("[Tt][Ee][Ss][Tt]") + for key in keys: + if parse_info.index[key].scope_t == "class" and parse_info.is_baseclass(key,"CxxTest::TestSuite"): + name=parse_info.index[key].name + suite = { 'name' : name, + 'file' : file, + 'cfile' : cstr(file), + 'line' : str(parse_info.index[key].lineno), + 'generated' : 0, + 'object' : 'suite_%s' % name, + 'dobject' : 'suiteDescription_%s' % name, + 'tlist' : 'Tests_%s' % name, + 'tests' : [], + 'lines' : [] } + for fn in parse_info.get_functions(key,quiet=True): + tname = fn[0] + lineno = str(fn[1]) + if tname.startswith('createSuite'): + # Indicate that we're using a dynamically generated test suite + suite['create'] = str(lineno) # (unknown line) + if tname.startswith('destroySuite'): + # Indicate that we're using a dynamically generated test suite + suite['destroy'] = str(lineno) # (unknown line) + if not tpat.match(tname): + # Skip non-test methods + continue + test = { 'name' : tname, + 'suite' : suite, + 'class' : 'TestDescription_suite_%s_%s' % (suite['name'], tname), + 'object' : 'testDescription_suite_%s_%s' % (suite['name'], tname), + 'line' : lineno, + } + suite['tests'].append(test) + suites.append(suite) + + if not _options.root: + ntests = 0 + for suite in suites: + ntests += len(suite['tests']) + if ntests == 0: + abort( 'No tests defined' ) + # + return [_options, suites] + diff --git a/tools/cxxtest/python/cxxtest/cxxtest_fog.pyc b/tools/cxxtest/python/cxxtest/cxxtest_fog.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5dd31d90fb4135e1d298b9b688c9d413602f4925 GIT binary patch literal 2577 zcmZSn%*&3NZzXU`SrIs**%q&fUxDCuH zDFRu+049ok85kIntzv?Ul4Al=i;DB}5_4jb3ku>3it@AKOHy+SauQ2YV@mS#bBbe< zD=JD-i%Vh(DoZl*^Wa>laC};Rx?VwL3CI=6#U({jAd5kcU|>oHQ34DM44~iwhs1d% z28MJ7hFT_uiX5gI1_qbd6sB5chDt+FB-Su9h`U1qDT|4rnSp_^gqb0W1r%a6%nT{a z3@I!O%?wPnEDYg!Y78tTtPI&)3`IE%jJ2TnWMy#oC}Cr$VP$A$WN`N=>!hC*%>O^nn^~2b3CiWg>=KZ4 za!z7#aj_7nFsY~rNi8n1vI3F8Alt!t6l@JBvx4k|XaTc8LOGdvshOZswuF;`fgwFL zFSRJKBsHZNlz+kQk5?@&0TqS$Nm;4MCB?!ZuY*i>Ni9w;$}9ktO&}#8H>W_=fb@b~ zPz;g)xv(TBv$zCoF(_P$!7Px)5LRJnW@h|jN=+7V9Ou^V6(suEe4gjAZw9b29}9e1-S$)53(PZJSc$u^1)G8tdNqLmYJ8Dq9Fq+ z`@w~2B_te*OH%SnA)ZOgDJ{+@;Q~3lq9VQ^v8Xt;2po)HW_)r%K?%sEp8l?&xC{b^ z1StG663bG9OA_-^5{puNGLwoDiz-V%mgnWWRwSo_gVZNKJu|sPl!1W(q!=#jk(if~ zlbM$ej#hY}X6B`&R)B@FQ!9&uK&}N_oSdIqkeQPTW)~;t7o^6QfWtDgI6f({I2D|3 zf0tGfWmO-(SmtO)(vgxTM@oA-b$)Ff62AdvIRGJF*ZgELsQAu%mW=RG(_;V9W zk~6^C6AKDb^HRWyi}LeJz*SOCYF-d1S!;m22v!eDe8u2&9}i0S`FYTg1tqKEAW%X8 z+X4y2%)GRGusNwkMM0{d*Z?Kll7d8t>Dj535HCoAq(HS#S{~Sv5>ToS(gcZuHKZ1o zfSs5JN&?`jmuB@MA1IF`C+2yA3I#V%nIH!e$pU3FCN@T1MrKA1MqWl4Mt(+CMs7xS zMpi~%R!&AvMjj?nMt(+KMh!**MlMEnMqWm7Ms`MSFl1-sVw7RzViaKHXA*{DHn1vD zMo~sCCQ(KSCQe3>=@N`Qi~>v=p!^ID$N2cP(vs4m)cE)ykPCu9)iorMfHD@WPS4FO zP6o$QkSqfO12{zl*)T9b0twuL024H5Mu3V7o80`A(wtN~eo#Px!cTyShmnUxfRTrh Ihl!H~04u{v82|tP literal 0 HcmV?d00001 diff --git a/tools/cxxtest/python/cxxtest/cxxtest_misc.py b/tools/cxxtest/python/cxxtest/cxxtest_misc.py new file mode 100644 index 0000000..b5b9a8d --- /dev/null +++ b/tools/cxxtest/python/cxxtest/cxxtest_misc.py @@ -0,0 +1,19 @@ +#!/usr/bin/python +#------------------------------------------------------------------------- +# CxxTest: A lightweight C++ unit testing library. +# Copyright (c) 2008 Sandia Corporation. +# This software is distributed under the LGPL License v2.1 +# For more information, see the COPYING file in the top CxxTest directory. +# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +# the U.S. Government retains certain rights in this software. +#------------------------------------------------------------------------- + +import sys + +def abort( problem ): + '''Print error message and exit''' + sys.stderr.write( '\n' ) + sys.stderr.write( problem ) + sys.stderr.write( '\n\n' ) + sys.exit(2) + diff --git a/tools/cxxtest/python/cxxtest/cxxtest_misc.pyc b/tools/cxxtest/python/cxxtest/cxxtest_misc.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0a9ab3d867a8ab449d79e9b6cc46312a82cf0910 GIT binary patch literal 527 zcmZSn%*&60Z7@`Od!?Gj0}u$ehmWy3O|Jj&Sz#w zVFq(jSQvseSV2a~FfcF#6lLa>D5Mq@)" ) +def scanLineForStandardLibrary( line ): + '''Check if current line uses standard library''' + global options + if not options.haveStandardLibrary and std_re.search(line): + if not options.noStandardLibrary: + options.haveStandardLibrary = 1 + +exception_re = re.compile( r"\b(throw|try|catch|TSM?_ASSERT_THROWS[A-Z_]*)\b" ) +def scanLineForExceptionHandling( line ): + '''Check if current line uses exception handling''' + global options + if not options.haveExceptionHandling and exception_re.search(line): + if not options.noExceptionHandling: + options.haveExceptionHandling = 1 + +classdef = '(?:::\s*)?(?:\w+\s*::\s*)*\w+' +baseclassdef = '(?:public|private|protected)\s+%s' % (classdef,) +general_suite = r"\bclass\s+(%s)\s*:(?:\s*%s\s*,)*\s*public\s+" \ + % (classdef, baseclassdef,) +testsuite = '(?:(?:::)?\s*CxxTest\s*::\s*)?TestSuite' +suites_re = { re.compile( general_suite + testsuite ) : None } +generatedSuite_re = re.compile( r'\bCXXTEST_SUITE\s*\(\s*(\w*)\s*\)' ) +def scanLineForSuiteStart( fileName, lineNo, line ): + '''Check if current line starts a new test suite''' + for i in list(suites_re.items()): + m = i[0].search( line ) + if m: + suite = startSuite( m.group(1), fileName, lineNo, 0 ) + if i[1] is not None: + for test in i[1]['tests']: + addTest(suite, test['name'], test['line']) + break + m = generatedSuite_re.search( line ) + if m: + sys.stdout.write( "%s:%s: Warning: Inline test suites are deprecated.\n" % (fileName, lineNo) ) + startSuite( m.group(1), fileName, lineNo, 1 ) + +def startSuite( name, file, line, generated ): + '''Start scanning a new suite''' + global suite + closeSuite() + object_name = name.replace(':',"_") + suite = { 'name' : name, + 'file' : file, + 'cfile' : cstr(file), + 'line' : line, + 'generated' : generated, + 'object' : 'suite_%s' % object_name, + 'dobject' : 'suiteDescription_%s' % object_name, + 'tlist' : 'Tests_%s' % object_name, + 'tests' : [], + 'lines' : [] } + suites_re[re.compile( general_suite + name )] = suite + return suite + +def lineStartsBlock( line ): + '''Check if current line starts a new CXXTEST_CODE() block''' + return re.search( r'\bCXXTEST_CODE\s*\(', line ) is not None + +test_re = re.compile( r'^([^/]|/[^/])*\bvoid\s+([Tt]est\w+)\s*\(\s*(void)?\s*\)' ) +def scanLineForTest( suite, lineNo, line ): + '''Check if current line starts a test''' + m = test_re.search( line ) + if m: + addTest( suite, m.group(2), lineNo ) + +def addTest( suite, name, line ): + '''Add a test function to the current suite''' + test = { 'name' : name, + 'suite' : suite, + 'class' : 'TestDescription_%s_%s' % (suite['object'], name), + 'object' : 'testDescription_%s_%s' % (suite['object'], name), + 'line' : line, + } + suite['tests'].append( test ) + +def addLineToBlock( suite, lineNo, line ): + '''Append the line to the current CXXTEST_CODE() block''' + line = fixBlockLine( suite, lineNo, line ) + line = re.sub( r'^.*\{\{', '', line ) + + e = re.search( r'\}\}', line ) + if e: + line = line[:e.start()] + suite['lines'].append( line ) + return e is None + +def fixBlockLine( suite, lineNo, line): + '''Change all [E]TS_ macros used in a line to _[E]TS_ macros with the correct file/line''' + return re.sub( r'\b(E?TSM?_(ASSERT[A-Z_]*|FAIL))\s*\(', + r'_\1(%s,%s,' % (suite['cfile'], lineNo), + line, 0 ) + +create_re = re.compile( r'\bstatic\s+\w+\s*\*\s*createSuite\s*\(\s*(void)?\s*\)' ) +def scanLineForCreate( suite, lineNo, line ): + '''Check if current line defines a createSuite() function''' + if create_re.search( line ): + addSuiteCreateDestroy( suite, 'create', lineNo ) + +destroy_re = re.compile( r'\bstatic\s+void\s+destroySuite\s*\(\s*\w+\s*\*\s*\w*\s*\)' ) +def scanLineForDestroy( suite, lineNo, line ): + '''Check if current line defines a destroySuite() function''' + if destroy_re.search( line ): + addSuiteCreateDestroy( suite, 'destroy', lineNo ) + +def cstr( s ): + '''Convert a string to its C representation''' + return '"' + s.replace( '\\', '\\\\' ) + '"' + + +def addSuiteCreateDestroy( suite, which, line ): + '''Add createSuite()/destroySuite() to current suite''' + if which in suite: + abort( '%s:%s: %sSuite() already declared' % ( suite['file'], str(line), which ) ) + suite[which] = line + +def closeSuite(): + '''Close current suite and add it to the list if valid''' + global suite + if suite is not None: + if len(suite['tests']) is not 0: + verifySuite(suite) + rememberSuite(suite) + suite = None + +def verifySuite(suite): + '''Verify current suite is legal''' + if 'create' in suite and 'destroy' not in suite: + abort( '%s:%s: Suite %s has createSuite() but no destroySuite()' % + (suite['file'], suite['create'], suite['name']) ) + elif 'destroy' in suite and 'create' not in suite: + abort( '%s:%s: Suite %s has destroySuite() but no createSuite()' % + (suite['file'], suite['destroy'], suite['name']) ) + +def rememberSuite(suite): + '''Add current suite to list''' + global suites + suites.append( suite ) + diff --git a/tools/cxxtest/python/cxxtest/cxxtest_parser.pyc b/tools/cxxtest/python/cxxtest/cxxtest_parser.pyc new file mode 100644 index 0000000000000000000000000000000000000000..30b7346974c50040b9654e7e3f4f268ba4659340 GIT binary patch literal 9997 zcmZSn%*& zU^ym+9A<_nW-yzXA%}$_mz5!km4PvxfgzENA%%${k%J+Hg&~m>%;sW9VP$AxV2I*o zNM&Zo;$cW(V`ye%h~i~PVF!!zF{E&S8ToM46kLkbs|AqdmL4b~#Wkir8N7lw)R zg2hD`Qux5)q6{hg3{heXDFO_sVhm}F3}R8@3@L&jPO3OV8WV$9lmtVH5JQwCLnb50 zbr2V&N-(5KGKe=bGMGh4!HgCL8!gR{A_6vAh9N~1%#dYB5d$;iU@FDID&-kcB*5Yd z3@MUeh9X0X6qupJkRlCcD8sbKfVHSFq{xEBRbk?CU~x5u6nU_?Izx&An4!Utq6lVa zGNdSh8Cnb}%3y{zLy8KRp#$CI$uuW+-+BrGXFz28J3&hC~L23JHc91_qZ{0ft&8h7v}G8YYnY z7z=qB!b_MKN|-^s6h?+@4u&Exh7tybEEWbH5Q`P$lx9W-#ykd)a0xR*Iuk>%2FR9T z6$S=|;N-+Sg~Xg3h0MHy(h`NV%$(F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E@Q6J4Nw;uer+ zKt5t%5@Hl(5@KXy6lN4ejC_C`49-lTZZW(R2SpD9C`w?N2-E;z0ksr^!8KMfXm-Lm zBQY;M6+D9w?HU^r9Iud@m|T=!4C;lZC}id-BtnKcO7a!rQ5BSDmSlkACpo{UC^Z=} z_n;51UO~=?Nz!n&2Y2Q)AicS0NH?y=&C%0G6H<&8b1^V5#K#zFs21y}7V88#gUSMM z@&^@c;Ft*t0%ZwM6@(W0;2;MRvt>0qDToegaFDK*lPq(V+4DR z0GY}GRlrD&(9l$Xm2%*wFhmMchr#%8MxmMmCh21wlpN+a;1)DAR=4EA<58$*!+XaE5c3Mots zlJF@OQ1gVDK@3!jfhPT!K*3bQ$Y7HK>J)*3u-K4+fdSO^fMhsuTGi0hhsHmY3##2v z8X@4p4rotXwHT%vA+>sFRpl$llu4u0^=V^L~uYHm_$5m*FV_aF$` z)Iy*x>K#ysa)GKvW*$Z{MlMEPME{Kg)GY(8G-v=VPJky@J5VdShJhiQ9X!PWZUunq z7Eps464oFdD}!VjEb+p1urU-@)c0?3^?(F8|&bn z8#Yr=HNcEPF&ok>2j?D0F$78lw2ss`1_p+wphyL^MH#?zy9$h;8D4nd3o4YrnFTZ> z2W=)mazhFu19YYqG~)>_SfH~}kW^oiuK-Hs&{6?Znt>a!^z&Ri0|NtS%oSX?Gcap_ z#vw~UsW(18t+b@HC^bGF)TCnw0u31jfg9f zq^5y;14)U+paQkHI3+bL$Olw9ae@fY_$O!@ItbMC3bF>-0~)gn0u8bRfd&tP{6J!$ zPA;Uc4Qi3gb8>L<^D}a?gD`063^OAyBO9X> lBR?Z2Kc^5U3qK<#8z&bhHzylEBPS~ebFy->adL8U0s#C$L|y;@ literal 0 HcmV?d00001 diff --git a/tools/cxxtest/python/cxxtest/cxxtestgen.py b/tools/cxxtest/python/cxxtest/cxxtestgen.py new file mode 100644 index 0000000..5c18f16 --- /dev/null +++ b/tools/cxxtest/python/cxxtest/cxxtestgen.py @@ -0,0 +1,480 @@ +#------------------------------------------------------------------------- +# CxxTest: A lightweight C++ unit testing library. +# Copyright (c) 2008 Sandia Corporation. +# This software is distributed under the LGPL License v2.1 +# For more information, see the COPYING file in the top CxxTest directory. +# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +# the U.S. Government retains certain rights in this software. +#------------------------------------------------------------------------- + +# vim: fileencoding=utf-8 + +from __future__ import division +# the above import important for forward-compatibility with python3, +# which is already the default in archlinux! + +__all__ = ['main'] + +import __release__ +import os +import sys +import re +import glob +from optparse import OptionParser +import cxxtest_parser + +try: + import cxxtest_fog + imported_fog=True +except ImportError: + imported_fog=False + +from cxxtest_misc import abort + +options = [] +suites = [] + +wrotePreamble = 0 +wroteWorld = 0 +lastIncluded = '' + +def main(args=sys.argv): + '''The main program''' + # + # Reset global state + # + global wrotePreamble + wrotePreamble=0 + global wroteWorld + wroteWorld=0 + global lastIncluded + lastIncluded = '' + + global suites + global options + files = parseCommandline(args) + if imported_fog and options.fog: + [options,suites] = cxxtest_fog.scanInputFiles( files, options ) + else: + [options,suites] = cxxtest_parser.scanInputFiles( files, options ) + writeOutput() + +def parseCommandline(args): + '''Analyze command line arguments''' + global imported_fog + global options + parser = OptionParser("%prog [options] [ ...]") + parser.add_option("--version", + action="store_true", dest="version", default=False, + help="Write the CxxTest version.") + parser.add_option("-o", "--output", + dest="outputFileName", default=None, metavar="NAME", + help="Write output to file NAME.") + parser.add_option("-w","--world", dest="world", default="cxxtest", + help="The label of the tests, used to name the XML results.") + parser.add_option("", "--include", action="append", + dest="headers", default=[], metavar="HEADER", + help="Include file HEADER in the test runner before other headers.") + parser.add_option("", "--abort-on-fail", + action="store_true", dest="abortOnFail", default=False, + help="Abort tests on failed asserts (like xUnit).") + parser.add_option("", "--main", + action="store", dest="main", default="main", + help="Specify an alternative name for the main() function.") + parser.add_option("", "--headers", + action="store", dest="header_filename", default=None, + help="Specify a filename that contains a list of header files that are processed to generate a test runner.") + parser.add_option("", "--runner", + dest="runner", default="", metavar="CLASS", + help="Create a test runner that processes test events using the class CxxTest::CLASS.") + parser.add_option("", "--gui", + dest="gui", metavar="CLASS", + help="Create a GUI test runner that processes test events using the class CxxTest::CLASS. (deprecated)") + parser.add_option("", "--error-printer", + action="store_true", dest="error_printer", default=False, + help="Create a test runner using the ErrorPrinter class, and allow the use of the standard library.") + parser.add_option("", "--xunit-printer", + action="store_true", dest="xunit_printer", default=False, + help="Create a test runner using the XUnitPrinter class.") + parser.add_option("", "--xunit-file", dest="xunit_file", default="", + help="The file to which the XML summary is written for test runners using the XUnitPrinter class. The default XML filename is TEST-.xml, where is the value of the --world option. (default: cxxtest)") + parser.add_option("", "--have-std", + action="store_true", dest="haveStandardLibrary", default=False, + help="Use the standard library (even if not found in tests).") + parser.add_option("", "--no-std", + action="store_true", dest="noStandardLibrary", default=False, + help="Do not use standard library (even if found in tests).") + parser.add_option("", "--have-eh", + action="store_true", dest="haveExceptionHandling", default=False, + help="Use exception handling (even if not found in tests).") + parser.add_option("", "--no-eh", + action="store_true", dest="noExceptionHandling", default=False, + help="Do not use exception handling (even if found in tests).") + parser.add_option("", "--longlong", + dest="longlong", default=None, metavar="TYPE", + help="Use TYPE as for long long integers. (default: not supported)") + parser.add_option("", "--no-static-init", + action="store_true", dest="noStaticInit", default=False, + help="Do not rely on static initialization in the test runner.") + parser.add_option("", "--template", + dest="templateFileName", default=None, metavar="TEMPLATE", + help="Generate the test runner using file TEMPLATE to define a template.") + parser.add_option("", "--root", + action="store_true", dest="root", default=False, + help="Write the main() function and global data for a test runner.") + parser.add_option("", "--part", + action="store_true", dest="part", default=False, + help="Write the tester classes for a test runner.") + #parser.add_option("", "--factor", + #action="store_true", dest="factor", default=False, + #help="Declare the _CXXTEST_FACTOR macro. (deprecated)") + if imported_fog: + fog_help = "Use new FOG C++ parser" + else: + fog_help = "Use new FOG C++ parser (disabled)" + parser.add_option("-f", "--fog-parser", + action="store_true", + dest="fog", + default=False, + help=fog_help + ) + + (options, args) = parser.parse_args(args=args) + if not options.header_filename is None: + if not os.path.exists(options.header_filename): + abort( "ERROR: the file '%s' does not exist!" % options.header_filename ) + INPUT = open(options.header_filename) + headers = [line.strip() for line in INPUT] + args.extend( headers ) + INPUT.close() + + if options.fog and not imported_fog: + abort( "Cannot use the FOG parser. Check that the 'ply' package is installed. The 'ordereddict' package is also required if running Python 2.6") + + if options.version: + printVersion() + + # the cxxtest builder relies on this behaviour! don't remove + if options.runner == 'none': + options.runner = None + + if options.xunit_printer or options.runner == "XUnitPrinter": + options.xunit_printer=True + options.runner="XUnitPrinter" + if len(args) > 1: + if options.xunit_file == "": + if options.world == "": + options.world = "cxxtest" + options.xunit_file="TEST-"+options.world+".xml" + elif options.xunit_file == "": + if options.world == "": + options.world = "cxxtest" + options.xunit_file="TEST-"+options.world+".xml" + + if options.error_printer: + options.runner= "ErrorPrinter" + options.haveStandardLibrary = True + + if options.noStaticInit and (options.root or options.part): + abort( '--no-static-init cannot be used with --root/--part' ) + + if options.gui and not options.runner: + options.runner = 'StdioPrinter' + + files = setFiles(args[1:]) + if len(files) == 0 and not options.root: + sys.stderr.write(parser.error("No input files found")) + + return files + + +def printVersion(): + '''Print CxxTest version and exit''' + sys.stdout.write( "This is CxxTest version %s.\n" % __release__.__version__ ) + sys.exit(0) + +def setFiles(patterns ): + '''Set input files specified on command line''' + files = expandWildcards( patterns ) + return files + +def expandWildcards( patterns ): + '''Expand all wildcards in an array (glob)''' + fileNames = [] + for pathName in patterns: + patternFiles = glob.glob( pathName ) + for fileName in patternFiles: + fileNames.append( fixBackslashes( fileName ) ) + return fileNames + +def fixBackslashes( fileName ): + '''Convert backslashes to slashes in file name''' + return re.sub( r'\\', '/', fileName, 0 ) + + +def writeOutput(): + '''Create output file''' + if options.templateFileName: + writeTemplateOutput() + else: + writeSimpleOutput() + +def writeSimpleOutput(): + '''Create output not based on template''' + output = startOutputFile() + writePreamble( output ) + if options.root or not options.part: + writeMain( output ) + + if len(suites) > 0: + output.write("bool "+suites[0]['object']+"_init = false;\n") + + writeWorld( output ) + output.close() + +include_re = re.compile( r"\s*\#\s*include\s+\s*$" ) +world_re = re.compile( r"^\s*\s*$" ) +def writeTemplateOutput(): + '''Create output based on template file''' + template = open(options.templateFileName) + output = startOutputFile() + while 1: + line = template.readline() + if not line: + break; + if include_re.search( line ): + writePreamble( output ) + output.write( line ) + elif preamble_re.search( line ): + writePreamble( output ) + elif world_re.search( line ): + if len(suites) > 0: + output.write("bool "+suites[0]['object']+"_init = false;\n") + writeWorld( output ) + else: + output.write( line ) + template.close() + output.close() + +def startOutputFile(): + '''Create output file and write header''' + if options.outputFileName is not None: + output = open( options.outputFileName, 'w' ) + else: + output = sys.stdout + output.write( "/* Generated file, do not edit */\n\n" ) + return output + +def writePreamble( output ): + '''Write the CxxTest header (#includes and #defines)''' + global wrotePreamble + if wrotePreamble: return + output.write( "#ifndef CXXTEST_RUNNING\n" ) + output.write( "#define CXXTEST_RUNNING\n" ) + output.write( "#endif\n" ) + output.write( "\n" ) + if options.xunit_printer: + output.write( "#include \n" ) + if options.haveStandardLibrary: + output.write( "#define _CXXTEST_HAVE_STD\n" ) + if options.haveExceptionHandling: + output.write( "#define _CXXTEST_HAVE_EH\n" ) + if options.abortOnFail: + output.write( "#define _CXXTEST_ABORT_TEST_ON_FAIL\n" ) + if options.longlong: + output.write( "#define _CXXTEST_LONGLONG %s\n" % options.longlong ) + #if options.factor: + #output.write( "#define _CXXTEST_FACTOR\n" ) + for header in options.headers: + output.write( "#include \"%s\"\n" % header ) + output.write( "#include \n" ) + output.write( "#include \n" ) + output.write( "#include \n" ) + output.write( "#include \n" ) + output.write( "#include \n" ) + if options.runner: + output.write( "#include \n" % options.runner ) + if options.gui: + output.write( "#include \n" % options.gui ) + output.write( "\n" ) + wrotePreamble = 1 + +def writeMain( output ): + '''Write the main() function for the test runner''' + if not (options.gui or options.runner): + return + output.write( 'int %s( int argc, char *argv[] ) {\n' % options.main ) + output.write( ' int status;\n' ) + if options.noStaticInit: + output.write( ' CxxTest::initialize();\n' ) + if options.gui: + tester_t = "CxxTest::GuiTuiRunner " % (options.gui, options.runner) + else: + tester_t = "CxxTest::%s" % (options.runner) + if options.xunit_printer: + output.write( ' std::ofstream ofstr("%s");\n' % options.xunit_file ) + output.write( ' %s tmp(ofstr);\n' % tester_t ) + output.write( ' CxxTest::RealWorldDescription::_worldName = "%s";\n' % options.world ) + else: + output.write( ' %s tmp;\n' % tester_t ) + output.write( ' status = CxxTest::Main<%s>( tmp, argc, argv );\n' % tester_t ) + output.write( ' return status;\n') + output.write( '}\n' ) + + +def writeWorld( output ): + '''Write the world definitions''' + global wroteWorld + if wroteWorld: return + writePreamble( output ) + writeSuites( output ) + if options.root or not options.part: + writeRoot( output ) + writeWorldDescr( output ) + if options.noStaticInit: + writeInitialize( output ) + wroteWorld = 1 + +def writeSuites(output): + '''Write all TestDescriptions and SuiteDescriptions''' + for suite in suites: + writeInclude( output, suite['file'] ) + if isGenerated(suite): + generateSuite( output, suite ) + if isDynamic(suite): + writeSuitePointer( output, suite ) + else: + writeSuiteObject( output, suite ) + writeTestList( output, suite ) + writeSuiteDescription( output, suite ) + writeTestDescriptions( output, suite ) + +def isGenerated(suite): + '''Checks whether a suite class should be created''' + return suite['generated'] + +def isDynamic(suite): + '''Checks whether a suite is dynamic''' + return 'create' in suite + +def writeInclude(output, file): + '''Add #include "file" statement''' + global lastIncluded + if file == lastIncluded: return + output.writelines( [ '#include "', file, '"\n\n' ] ) + lastIncluded = file + +def generateSuite( output, suite ): + '''Write a suite declared with CXXTEST_SUITE()''' + output.write( 'class %s : public CxxTest::TestSuite {\n' % suite['name'] ) + output.write( 'public:\n' ) + for line in suite['lines']: + output.write(line) + output.write( '};\n\n' ) + +def writeSuitePointer( output, suite ): + '''Create static suite pointer object for dynamic suites''' + if options.noStaticInit: + output.write( 'static %s *%s;\n\n' % (suite['name'], suite['object']) ) + else: + output.write( 'static %s *%s = 0;\n\n' % (suite['name'], suite['object']) ) + +def writeSuiteObject( output, suite ): + '''Create static suite object for non-dynamic suites''' + output.writelines( [ "static ", suite['name'], " ", suite['object'], ";\n\n" ] ) + +def writeTestList( output, suite ): + '''Write the head of the test linked list for a suite''' + if options.noStaticInit: + output.write( 'static CxxTest::List %s;\n' % suite['tlist'] ) + else: + output.write( 'static CxxTest::List %s = { 0, 0 };\n' % suite['tlist'] ) + +def writeWorldDescr( output ): + '''Write the static name of the world name''' + if options.noStaticInit: + output.write( 'const char* CxxTest::RealWorldDescription::_worldName;\n' ) + else: + output.write( 'const char* CxxTest::RealWorldDescription::_worldName = "cxxtest";\n' ) + +def writeTestDescriptions( output, suite ): + '''Write all test descriptions for a suite''' + for test in suite['tests']: + writeTestDescription( output, suite, test ) + +def writeTestDescription( output, suite, test ): + '''Write test description object''' + output.write( 'static class %s : public CxxTest::RealTestDescription {\n' % test['class'] ) + output.write( 'public:\n' ) + if not options.noStaticInit: + output.write( ' %s() : CxxTest::RealTestDescription( %s, %s, %s, "%s" ) {}\n' % + (test['class'], suite['tlist'], suite['dobject'], test['line'], test['name']) ) + output.write( ' void runTest() { %s }\n' % runBody( suite, test ) ) + output.write( '} %s;\n\n' % test['object'] ) + +def runBody( suite, test ): + '''Body of TestDescription::run()''' + if isDynamic(suite): return dynamicRun( suite, test ) + else: return staticRun( suite, test ) + +def dynamicRun( suite, test ): + '''Body of TestDescription::run() for test in a dynamic suite''' + return 'if ( ' + suite['object'] + ' ) ' + suite['object'] + '->' + test['name'] + '();' + +def staticRun( suite, test ): + '''Body of TestDescription::run() for test in a non-dynamic suite''' + return suite['object'] + '.' + test['name'] + '();' + +def writeSuiteDescription( output, suite ): + '''Write SuiteDescription object''' + if isDynamic( suite ): + writeDynamicDescription( output, suite ) + else: + writeStaticDescription( output, suite ) + +def writeDynamicDescription( output, suite ): + '''Write SuiteDescription for a dynamic suite''' + output.write( 'CxxTest::DynamicSuiteDescription<%s> %s' % (suite['name'], suite['dobject']) ) + if not options.noStaticInit: + output.write( '( %s, %s, "%s", %s, %s, %s, %s )' % + (suite['cfile'], suite['line'], suite['name'], suite['tlist'], + suite['object'], suite['create'], suite['destroy']) ) + output.write( ';\n\n' ) + +def writeStaticDescription( output, suite ): + '''Write SuiteDescription for a static suite''' + output.write( 'CxxTest::StaticSuiteDescription %s' % suite['dobject'] ) + if not options.noStaticInit: + output.write( '( %s, %s, "%s", %s, %s )' % + (suite['cfile'], suite['line'], suite['name'], suite['object'], suite['tlist']) ) + output.write( ';\n\n' ) + +def writeRoot(output): + '''Write static members of CxxTest classes''' + output.write( '#include \n' ) + +def writeInitialize(output): + '''Write CxxTest::initialize(), which replaces static initialization''' + output.write( 'namespace CxxTest {\n' ) + output.write( ' void initialize()\n' ) + output.write( ' {\n' ) + for suite in suites: + output.write( ' %s.initialize();\n' % suite['tlist'] ) + if isDynamic(suite): + output.write( ' %s = 0;\n' % suite['object'] ) + output.write( ' %s.initialize( %s, %s, "%s", %s, %s, %s, %s );\n' % + (suite['dobject'], suite['cfile'], suite['line'], suite['name'], + suite['tlist'], suite['object'], suite['create'], suite['destroy']) ) + else: + output.write( ' %s.initialize( %s, %s, "%s", %s, %s );\n' % + (suite['dobject'], suite['cfile'], suite['line'], suite['name'], + suite['object'], suite['tlist']) ) + + for test in suite['tests']: + output.write( ' %s.initialize( %s, %s, %s, "%s" );\n' % + (test['object'], suite['tlist'], suite['dobject'], test['line'], test['name']) ) + + output.write( ' }\n' ) + output.write( '}\n' ) + diff --git a/tools/cxxtest/python/cxxtest/cxxtestgen.pyc b/tools/cxxtest/python/cxxtest/cxxtestgen.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8ef0247cc529a56bfe973097426a4f560bea5cec GIT binary patch literal 19526 zcmZSn%*&3vR7#LC*8FCmHav2$-7#SE-m>AL-8KRiL z63h%a%nVV?Fg6QA6bp>a$`Hj0W3w?tvBB8v3{mW0HVZ=z2SY9=Llh?iBghhFh8!-2 zC@zLdF|af4X6gNXE4?`j^LwKGz14}9&LpB#f(EL&Lj*`KD?^R| zL#`l0lpq6RIs-$Z5Ce!5W=LUUNE88+q6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d&9~B4X07%e6!!S2B zHz~EK7}N@Y1|npcIyg!Kcc=LQfb{=!!4|Ylwo%Lq~Xh2Td`kGq<3ve4w3# zMX3cjiOH$O;KAO^WVAh3;9V-D$9dFlV0E=iYPNdlej@` zpkPx4bw@zk3y|CmcLu0u19A#TImD;6usL36>jB&~0d)p~Kn-$8(;SrHzzqVLH@u5M z%fLZd548S+0Xnb4%P7jo!zjwg$tc69&IBUGm;@O)8I75E88vJ`^&Y6CijPk#Eh#NZ zjgJok6${`_ReXG6PELG$P#~zt1#Jfm01#!bb8bNhWenAO%`we)TV!^=&YOM!>8aI&X1yF|_ zv`7ImV-B)62(+mp2(-r_2(FY7l5T3=9G+oJ^oSNDwT*$ioC$a|xO(=3)|HVq;_jVMaD4eo@XwPF7A, (), [] and {} in a generic manner. Thus, +# There are several capabilities that this grammar does not support: +# +# 1. Ambiguous template specification. This grammar cannot parse template +# specifications that do not have paired <>'s in their declaration. In +# particular, ambiguous declarations like +# +# foo(); +# +# cannot be correctly parsed. +# +# 2. Template class specialization. Although the goal of this grammar is to +# extract class information, specialization of templated classes is +# not supported. When a template class definition is parsed, it's +# declaration is archived without information about the template +# parameters. Class specializations will be stored separately, and +# thus they can be processed after the fact. However, this grammar +# does not attempt to correctly process properties of class inheritence +# when template class specialization is employed. +# + +# +# TODO: document usage of this file +# + + + +import os +import ply.lex as lex +import ply.yacc as yacc +import re +try: + from collections import OrderedDict +except ImportError: + from ordereddict import OrderedDict + +lexer = None +scope_lineno = 0 +identifier_lineno = {} +_parse_info=None +_parsedata=None +noExceptionLogic = True + +def ply_init(data): + global _parsedata + _parsedata=data + + +class Scope(object): + + def __init__(self,name,abs_name,scope_t,base_classes,lineno): + self.function=[] + self.name=name + self.scope_t=scope_t + self.sub_scopes=[] + self.base_classes=base_classes + self.abs_name=abs_name + self.lineno=lineno + + def insert(self,scope): + self.sub_scopes.append(scope) + + +class CppInfo(object): + + def __init__(self, filter=None): + self.verbose=0 + if filter is None: + self.filter=re.compile("[Tt][Ee][Ss][Tt]|createSuite|destroySuite") + else: + self.filter=filter + self.scopes=[""] + self.index=OrderedDict() + self.index[""]=Scope("","::","namespace",[],1) + self.function=[] + + def push_scope(self,ns,scope_t,base_classes=[]): + name = self.scopes[-1]+"::"+ns + if self.verbose>=2: + print("-- Starting "+scope_t+" "+name) + self.scopes.append(name) + self.index[name] = Scope(ns,name,scope_t,base_classes,scope_lineno-1) + + def pop_scope(self): + scope = self.scopes.pop() + if self.verbose>=2: + print("-- Stopping "+scope) + return scope + + def add_function(self, fn): + fn = str(fn) + if self.filter.search(fn): + self.index[self.scopes[-1]].function.append((fn, identifier_lineno.get(fn,lexer.lineno-1))) + tmp = self.scopes[-1]+"::"+fn + if self.verbose==2: + print("-- Function declaration "+fn+" "+tmp) + elif self.verbose==1: + print("-- Function declaration "+tmp) + + def get_functions(self,name,quiet=False): + if name == "::": + name = "" + scope = self.index[name] + fns=scope.function + for key in scope.base_classes: + cname = self.find_class(key,scope) + if cname is None: + if not quiet: + print("Defined classes: ",list(self.index.keys())) + print("WARNING: Unknown class "+key) + else: + fns += self.get_functions(cname,quiet) + return fns + + def find_class(self,name,scope): + if ':' in name: + if name in self.index: + return name + else: + return None + tmp = scope.abs_name.split(':') + name1 = ":".join(tmp[:-1] + [name]) + if name1 in self.index: + return name1 + name2 = "::"+name + if name2 in self.index: + return name2 + return None + + def __repr__(self): + return str(self) + + def is_baseclass(self,cls,base): + '''Returns true if base is a base-class of cls''' + if cls in self.index: + bases = self.index[cls] + elif "::"+cls in self.index: + bases = self.index["::"+cls] + else: + return False + #raise IOError, "Unknown class "+cls + if base in bases.base_classes: + return True + for name in bases.base_classes: + if self.is_baseclass(name,base): + return True + return False + + def __str__(self): + ans="" + keys = list(self.index.keys()) + keys.sort() + for key in keys: + scope = self.index[key] + ans += scope.scope_t+" "+scope.abs_name+"\n" + if scope.scope_t == "class": + ans += " Base Classes: "+str(scope.base_classes)+"\n" + for fn in self.get_functions(scope.abs_name): + ans += " "+fn+"\n" + else: + for fn in scope.function: + ans += " "+fn+"\n" + return ans + + +def flatten(x): + """Flatten nested list""" + try: + strtypes = str + except: # for python3 etc + strtypes = (str, bytes) + + result = [] + for el in x: + if hasattr(el, "__iter__") and not isinstance(el, strtypes): + result.extend(flatten(el)) + else: + result.append(el) + return result + +# +# The lexer (and/or a preprocessor) is expected to identify the following +# +# Punctuation: +# +# +literals = "+-*/%^&|~!<>=:()?.\'\"\\@$;," + +# +reserved = { + 'private' : 'PRIVATE', + 'protected' : 'PROTECTED', + 'public' : 'PUBLIC', + + 'bool' : 'BOOL', + 'char' : 'CHAR', + 'double' : 'DOUBLE', + 'float' : 'FLOAT', + 'int' : 'INT', + 'long' : 'LONG', + 'short' : 'SHORT', + 'signed' : 'SIGNED', + 'unsigned' : 'UNSIGNED', + 'void' : 'VOID', + 'wchar_t' : 'WCHAR_T', + + 'class' : 'CLASS', + 'enum' : 'ENUM', + 'namespace' : 'NAMESPACE', + 'struct' : 'STRUCT', + 'typename' : 'TYPENAME', + 'union' : 'UNION', + + 'const' : 'CONST', + 'volatile' : 'VOLATILE', + + 'auto' : 'AUTO', + 'explicit' : 'EXPLICIT', + 'export' : 'EXPORT', + 'extern' : 'EXTERN', + '__extension__' : 'EXTENSION', + 'friend' : 'FRIEND', + 'inline' : 'INLINE', + 'mutable' : 'MUTABLE', + 'register' : 'REGISTER', + 'static' : 'STATIC', + 'template' : 'TEMPLATE', + 'typedef' : 'TYPEDEF', + 'using' : 'USING', + 'virtual' : 'VIRTUAL', + + 'asm' : 'ASM', + 'break' : 'BREAK', + 'case' : 'CASE', + 'catch' : 'CATCH', + 'const_cast' : 'CONST_CAST', + 'continue' : 'CONTINUE', + 'default' : 'DEFAULT', + 'delete' : 'DELETE', + 'do' : 'DO', + 'dynamic_cast' : 'DYNAMIC_CAST', + 'else' : 'ELSE', + 'false' : 'FALSE', + 'for' : 'FOR', + 'goto' : 'GOTO', + 'if' : 'IF', + 'new' : 'NEW', + 'operator' : 'OPERATOR', + 'reinterpret_cast' : 'REINTERPRET_CAST', + 'return' : 'RETURN', + 'sizeof' : 'SIZEOF', + 'static_cast' : 'STATIC_CAST', + 'switch' : 'SWITCH', + 'this' : 'THIS', + 'throw' : 'THROW', + 'true' : 'TRUE', + 'try' : 'TRY', + 'typeid' : 'TYPEID', + 'while' : 'WHILE', + '"C"' : 'CLiteral', + '"C++"' : 'CppLiteral', + + '__attribute__' : 'ATTRIBUTE', + '__cdecl__' : 'CDECL', + '__typeof' : 'uTYPEOF', + 'typeof' : 'TYPEOF', + + 'CXXTEST_STD' : 'CXXTEST_STD' +} + +tokens = [ + "CharacterLiteral", + "FloatingLiteral", + "Identifier", + "IntegerLiteral", + "StringLiteral", + "RBRACE", + "LBRACE", + "RBRACKET", + "LBRACKET", + "ARROW", + "ARROW_STAR", + "DEC", + "EQ", + "GE", + "INC", + "LE", + "LOG_AND", + "LOG_OR", + "NE", + "SHL", + "SHR", + "ASS_ADD", + "ASS_AND", + "ASS_DIV", + "ASS_MOD", + "ASS_MUL", + "ASS_OR", + "ASS_SHL", + "ASS_SHR", + "ASS_SUB", + "ASS_XOR", + "DOT_STAR", + "ELLIPSIS", + "SCOPE", +] + list(reserved.values()) + +t_ignore = " \t\r" + +t_LBRACE = r"(\{)|(<%)" +t_RBRACE = r"(\})|(%>)" +t_LBRACKET = r"(\[)|(<:)" +t_RBRACKET = r"(\])|(:>)" +t_ARROW = r"->" +t_ARROW_STAR = r"->\*" +t_DEC = r"--" +t_EQ = r"==" +t_GE = r">=" +t_INC = r"\+\+" +t_LE = r"<=" +t_LOG_AND = r"&&" +t_LOG_OR = r"\|\|" +t_NE = r"!=" +t_SHL = r"<<" +t_SHR = r">>" +t_ASS_ADD = r"\+=" +t_ASS_AND = r"&=" +t_ASS_DIV = r"/=" +t_ASS_MOD = r"%=" +t_ASS_MUL = r"\*=" +t_ASS_OR = r"\|=" +t_ASS_SHL = r"<<=" +t_ASS_SHR = r">>=" +t_ASS_SUB = r"-=" +t_ASS_XOR = r"^=" +t_DOT_STAR = r"\.\*" +t_ELLIPSIS = r"\.\.\." +t_SCOPE = r"::" + +# Discard comments +def t_COMMENT(t): + r'(/\*(.|\n)*?\*/)|(//.*?\n)|(\#.*?\n)' + t.lexer.lineno += t.value.count("\n") + +t_IntegerLiteral = r'(0x[0-9A-F]+)|([0-9]+(L){0,1})' +t_FloatingLiteral = r"[0-9]+[eE\.\+-]+[eE\.\+\-0-9]+" +t_CharacterLiteral = r'\'([^\'\\]|\\.)*\'' +#t_StringLiteral = r'"([^"\\]|\\.)*"' +def t_StringLiteral(t): + r'"([^"\\]|\\.)*"' + t.type = reserved.get(t.value,'StringLiteral') + return t + +def t_Identifier(t): + r"[a-zA-Z_][a-zA-Z_0-9\.]*" + t.type = reserved.get(t.value,'Identifier') + return t + + +def t_error(t): + print("Illegal character '%s'" % t.value[0]) + #raise IOError, "Parse error" + #t.lexer.skip() + +def t_newline(t): + r'[\n]+' + t.lexer.lineno += len(t.value) + +precedence = ( + ( 'right', 'SHIFT_THERE', 'REDUCE_HERE_MOSTLY', 'SCOPE'), + ( 'nonassoc', 'ELSE', 'INC', 'DEC', '+', '-', '*', '&', 'LBRACKET', 'LBRACE', '<', ':', ')') + ) + +start = 'translation_unit' + +# +# The %prec resolves the 14.2-3 ambiguity: +# Identifier '<' is forced to go through the is-it-a-template-name test +# All names absorb TEMPLATE with the name, so that no template_test is +# performed for them. This requires all potential declarations within an +# expression to perpetuate this policy and thereby guarantee the ultimate +# coverage of explicit_instantiation. +# +# The %prec also resolves a conflict in identifier : which is forced to be a +# shift of a label for a labeled-statement rather than a reduction for the +# name of a bit-field or generalised constructor. This is pretty dubious +# syntactically but correct for all semantic possibilities. The shift is +# only activated when the ambiguity exists at the start of a statement. +# In this context a bit-field declaration or constructor definition are not +# allowed. +# + +def p_identifier(p): + '''identifier : Identifier + | CXXTEST_STD '(' Identifier ')' + ''' + if p[1][0] in ('t','T','c','d'): + identifier_lineno[p[1]] = p.lineno(1) + p[0] = p[1] + +def p_id(p): + '''id : identifier %prec SHIFT_THERE + | template_decl + | TEMPLATE id + ''' + p[0] = get_rest(p) + +def p_global_scope(p): + '''global_scope : SCOPE + ''' + p[0] = get_rest(p) + +def p_id_scope(p): + '''id_scope : id SCOPE''' + p[0] = get_rest(p) + +def p_id_scope_seq(p): + '''id_scope_seq : id_scope + | id_scope id_scope_seq + ''' + p[0] = get_rest(p) + +# +# A :: B :: C; is ambiguous How much is type and how much name ? +# The %prec maximises the (type) length which is the 7.1-2 semantic constraint. +# +def p_nested_id(p): + '''nested_id : id %prec SHIFT_THERE + | id_scope nested_id + ''' + p[0] = get_rest(p) + +def p_scoped_id(p): + '''scoped_id : nested_id + | global_scope nested_id + | id_scope_seq + | global_scope id_scope_seq + ''' + global scope_lineno + scope_lineno = lexer.lineno + data = flatten(get_rest(p)) + if data[0] != None: + p[0] = "".join(data) + +# +# destructor_id has to be held back to avoid a conflict with a one's +# complement as per 5.3.1-9, It gets put back only when scoped or in a +# declarator_id, which is only used as an explicit member name. +# Declarations of an unscoped destructor are always parsed as a one's +# complement. +# +def p_destructor_id(p): + '''destructor_id : '~' id + | TEMPLATE destructor_id + ''' + p[0]=get_rest(p) + +#def p_template_id(p): +# '''template_id : empty +# | TEMPLATE +# ''' +# pass + +def p_template_decl(p): + '''template_decl : identifier '<' nonlgt_seq_opt '>' + ''' + # + # WEH: should we include the lt/gt symbols to indicate that this is a + # template class? How is that going to be used later??? + # + #p[0] = [p[1] ,"<",">"] + p[0] = p[1] + +def p_special_function_id(p): + '''special_function_id : conversion_function_id + | operator_function_id + | TEMPLATE special_function_id + ''' + p[0]=get_rest(p) + +def p_nested_special_function_id(p): + '''nested_special_function_id : special_function_id + | id_scope destructor_id + | id_scope nested_special_function_id + ''' + p[0]=get_rest(p) + +def p_scoped_special_function_id(p): + '''scoped_special_function_id : nested_special_function_id + | global_scope nested_special_function_id + ''' + p[0]=get_rest(p) + +# declarator-id is all names in all scopes, except reserved words +def p_declarator_id(p): + '''declarator_id : scoped_id + | scoped_special_function_id + | destructor_id + ''' + p[0]=p[1] + +# +# The standard defines pseudo-destructors in terms of type-name, which is +# class/enum/typedef, of which class-name is covered by a normal destructor. +# pseudo-destructors are supposed to support ~int() in templates, so the +# grammar here covers built-in names. Other names are covered by the lack +# of identifier/type discrimination. +# +def p_built_in_type_id(p): + '''built_in_type_id : built_in_type_specifier + | built_in_type_id built_in_type_specifier + ''' + pass + +def p_pseudo_destructor_id(p): + '''pseudo_destructor_id : built_in_type_id SCOPE '~' built_in_type_id + | '~' built_in_type_id + | TEMPLATE pseudo_destructor_id + ''' + pass + +def p_nested_pseudo_destructor_id(p): + '''nested_pseudo_destructor_id : pseudo_destructor_id + | id_scope nested_pseudo_destructor_id + ''' + pass + +def p_scoped_pseudo_destructor_id(p): + '''scoped_pseudo_destructor_id : nested_pseudo_destructor_id + | global_scope scoped_pseudo_destructor_id + ''' + pass + +#------------------------------------------------------------------------------- +# A.2 Lexical conventions +#------------------------------------------------------------------------------- +# + +def p_literal(p): + '''literal : IntegerLiteral + | CharacterLiteral + | FloatingLiteral + | StringLiteral + | TRUE + | FALSE + ''' + pass + +#------------------------------------------------------------------------------- +# A.3 Basic concepts +#------------------------------------------------------------------------------- +def p_translation_unit(p): + '''translation_unit : declaration_seq_opt + ''' + pass + +#------------------------------------------------------------------------------- +# A.4 Expressions +#------------------------------------------------------------------------------- +# +# primary_expression covers an arbitrary sequence of all names with the +# exception of an unscoped destructor, which is parsed as its unary expression +# which is the correct disambiguation (when ambiguous). This eliminates the +# traditional A(B) meaning A B ambiguity, since we never have to tack an A +# onto the front of something that might start with (. The name length got +# maximised ab initio. The downside is that semantic interpretation must split +# the names up again. +# +# Unification of the declaration and expression syntax means that unary and +# binary pointer declarator operators: +# int * * name +# are parsed as binary and unary arithmetic operators (int) * (*name). Since +# type information is not used +# ambiguities resulting from a cast +# (cast)*(value) +# are resolved to favour the binary rather than the cast unary to ease AST +# clean-up. The cast-call ambiguity must be resolved to the cast to ensure +# that (a)(b)c can be parsed. +# +# The problem of the functional cast ambiguity +# name(arg) +# as call or declaration is avoided by maximising the name within the parsing +# kernel. So primary_id_expression picks up +# extern long int const var = 5; +# as an assignment to the syntax parsed as "extern long int const var". The +# presence of two names is parsed so that "extern long into const" is +# distinguished from "var" considerably simplifying subsequent +# semantic resolution. +# +# The generalised name is a concatenation of potential type-names (scoped +# identifiers or built-in sequences) plus optionally one of the special names +# such as an operator-function-id, conversion-function-id or destructor as the +# final name. +# + +def get_rest(p): + return [p[i] for i in range(1, len(p))] + +def p_primary_expression(p): + '''primary_expression : literal + | THIS + | suffix_decl_specified_ids + | abstract_expression %prec REDUCE_HERE_MOSTLY + ''' + p[0] = get_rest(p) + +# +# Abstract-expression covers the () and [] of abstract-declarators. +# +def p_abstract_expression(p): + '''abstract_expression : parenthesis_clause + | LBRACKET bexpression_opt RBRACKET + | TEMPLATE abstract_expression + ''' + pass + +def p_postfix_expression(p): + '''postfix_expression : primary_expression + | postfix_expression parenthesis_clause + | postfix_expression LBRACKET bexpression_opt RBRACKET + | postfix_expression LBRACKET bexpression_opt RBRACKET attributes + | postfix_expression '.' declarator_id + | postfix_expression '.' scoped_pseudo_destructor_id + | postfix_expression ARROW declarator_id + | postfix_expression ARROW scoped_pseudo_destructor_id + | postfix_expression INC + | postfix_expression DEC + | DYNAMIC_CAST '<' nonlgt_seq_opt '>' '(' expression ')' + | STATIC_CAST '<' nonlgt_seq_opt '>' '(' expression ')' + | REINTERPRET_CAST '<' nonlgt_seq_opt '>' '(' expression ')' + | CONST_CAST '<' nonlgt_seq_opt '>' '(' expression ')' + | TYPEID parameters_clause + ''' + #print "HERE",str(p[1]) + p[0] = get_rest(p) + +def p_bexpression_opt(p): + '''bexpression_opt : empty + | bexpression + ''' + pass + +def p_bexpression(p): + '''bexpression : nonbracket_seq + | nonbracket_seq bexpression_seq bexpression_clause nonbracket_seq_opt + | bexpression_seq bexpression_clause nonbracket_seq_opt + ''' + pass + +def p_bexpression_seq(p): + '''bexpression_seq : empty + | bexpression_seq bexpression_clause nonbracket_seq_opt + ''' + pass + +def p_bexpression_clause(p): + '''bexpression_clause : LBRACKET bexpression_opt RBRACKET + ''' + pass + + + +def p_expression_list_opt(p): + '''expression_list_opt : empty + | expression_list + ''' + pass + +def p_expression_list(p): + '''expression_list : assignment_expression + | expression_list ',' assignment_expression + ''' + pass + +def p_unary_expression(p): + '''unary_expression : postfix_expression + | INC cast_expression + | DEC cast_expression + | ptr_operator cast_expression + | suffix_decl_specified_scope star_ptr_operator cast_expression + | '+' cast_expression + | '-' cast_expression + | '!' cast_expression + | '~' cast_expression + | SIZEOF unary_expression + | new_expression + | global_scope new_expression + | delete_expression + | global_scope delete_expression + ''' + p[0] = get_rest(p) + +def p_delete_expression(p): + '''delete_expression : DELETE cast_expression + ''' + pass + +def p_new_expression(p): + '''new_expression : NEW new_type_id new_initializer_opt + | NEW parameters_clause new_type_id new_initializer_opt + | NEW parameters_clause + | NEW parameters_clause parameters_clause new_initializer_opt + ''' + pass + +def p_new_type_id(p): + '''new_type_id : type_specifier ptr_operator_seq_opt + | type_specifier new_declarator + | type_specifier new_type_id + ''' + pass + +def p_new_declarator(p): + '''new_declarator : ptr_operator new_declarator + | direct_new_declarator + ''' + pass + +def p_direct_new_declarator(p): + '''direct_new_declarator : LBRACKET bexpression_opt RBRACKET + | direct_new_declarator LBRACKET bexpression RBRACKET + ''' + pass + +def p_new_initializer_opt(p): + '''new_initializer_opt : empty + | '(' expression_list_opt ')' + ''' + pass + +# +# cast-expression is generalised to support a [] as well as a () prefix. This covers the omission of +# DELETE[] which when followed by a parenthesised expression was ambiguous. It also covers the gcc +# indexed array initialisation for free. +# +def p_cast_expression(p): + '''cast_expression : unary_expression + | abstract_expression cast_expression + ''' + p[0] = get_rest(p) + +def p_pm_expression(p): + '''pm_expression : cast_expression + | pm_expression DOT_STAR cast_expression + | pm_expression ARROW_STAR cast_expression + ''' + p[0] = get_rest(p) + +def p_multiplicative_expression(p): + '''multiplicative_expression : pm_expression + | multiplicative_expression star_ptr_operator pm_expression + | multiplicative_expression '/' pm_expression + | multiplicative_expression '%' pm_expression + ''' + p[0] = get_rest(p) + +def p_additive_expression(p): + '''additive_expression : multiplicative_expression + | additive_expression '+' multiplicative_expression + | additive_expression '-' multiplicative_expression + ''' + p[0] = get_rest(p) + +def p_shift_expression(p): + '''shift_expression : additive_expression + | shift_expression SHL additive_expression + | shift_expression SHR additive_expression + ''' + p[0] = get_rest(p) + +# | relational_expression '<' shift_expression +# | relational_expression '>' shift_expression +# | relational_expression LE shift_expression +# | relational_expression GE shift_expression +def p_relational_expression(p): + '''relational_expression : shift_expression + ''' + p[0] = get_rest(p) + +def p_equality_expression(p): + '''equality_expression : relational_expression + | equality_expression EQ relational_expression + | equality_expression NE relational_expression + ''' + p[0] = get_rest(p) + +def p_and_expression(p): + '''and_expression : equality_expression + | and_expression '&' equality_expression + ''' + p[0] = get_rest(p) + +def p_exclusive_or_expression(p): + '''exclusive_or_expression : and_expression + | exclusive_or_expression '^' and_expression + ''' + p[0] = get_rest(p) + +def p_inclusive_or_expression(p): + '''inclusive_or_expression : exclusive_or_expression + | inclusive_or_expression '|' exclusive_or_expression + ''' + p[0] = get_rest(p) + +def p_logical_and_expression(p): + '''logical_and_expression : inclusive_or_expression + | logical_and_expression LOG_AND inclusive_or_expression + ''' + p[0] = get_rest(p) + +def p_logical_or_expression(p): + '''logical_or_expression : logical_and_expression + | logical_or_expression LOG_OR logical_and_expression + ''' + p[0] = get_rest(p) + +def p_conditional_expression(p): + '''conditional_expression : logical_or_expression + | logical_or_expression '?' expression ':' assignment_expression + ''' + p[0] = get_rest(p) + + +# +# assignment-expression is generalised to cover the simple assignment of a braced initializer in order to +# contribute to the coverage of parameter-declaration and init-declaration. +# +# | logical_or_expression assignment_operator assignment_expression +def p_assignment_expression(p): + '''assignment_expression : conditional_expression + | logical_or_expression assignment_operator nonsemicolon_seq + | logical_or_expression '=' braced_initializer + | throw_expression + ''' + p[0]=get_rest(p) + +def p_assignment_operator(p): + '''assignment_operator : '=' + | ASS_ADD + | ASS_AND + | ASS_DIV + | ASS_MOD + | ASS_MUL + | ASS_OR + | ASS_SHL + | ASS_SHR + | ASS_SUB + | ASS_XOR + ''' + pass + +# +# expression is widely used and usually single-element, so the reductions are arranged so that a +# single-element expression is returned as is. Multi-element expressions are parsed as a list that +# may then behave polymorphically as an element or be compacted to an element. +# + +def p_expression(p): + '''expression : assignment_expression + | expression_list ',' assignment_expression + ''' + p[0] = get_rest(p) + +def p_constant_expression(p): + '''constant_expression : conditional_expression + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.5 Statements +#--------------------------------------------------------------------------------------------------- +# Parsing statements is easy once simple_declaration has been generalised to cover expression_statement. +# +# +# The use of extern here is a hack. The 'extern "C" {}' block gets parsed +# as a function, so when nested 'extern "C"' declarations exist, they don't +# work because the block is viewed as a list of statements... :( +# +def p_statement(p): + '''statement : compound_statement + | declaration_statement + | try_block + | labeled_statement + | selection_statement + | iteration_statement + | jump_statement + ''' + pass + +def p_compound_statement(p): + '''compound_statement : LBRACE statement_seq_opt RBRACE + ''' + pass + +def p_statement_seq_opt(p): + '''statement_seq_opt : empty + | statement_seq_opt statement + ''' + pass + +# +# The dangling else conflict is resolved to the innermost if. +# +def p_selection_statement(p): + '''selection_statement : IF '(' condition ')' statement %prec SHIFT_THERE + | IF '(' condition ')' statement ELSE statement + | SWITCH '(' condition ')' statement + ''' + pass + +def p_condition_opt(p): + '''condition_opt : empty + | condition + ''' + pass + +def p_condition(p): + '''condition : nonparen_seq + | nonparen_seq condition_seq parameters_clause nonparen_seq_opt + | condition_seq parameters_clause nonparen_seq_opt + ''' + pass + +def p_condition_seq(p): + '''condition_seq : empty + | condition_seq parameters_clause nonparen_seq_opt + ''' + pass + +def p_labeled_statement(p): + '''labeled_statement : identifier ':' statement + | CASE constant_expression ':' statement + | DEFAULT ':' statement + ''' + pass + +def p_try_block(p): + '''try_block : TRY compound_statement handler_seq + ''' + global noExceptionLogic + noExceptionLogic=False + +def p_jump_statement(p): + '''jump_statement : BREAK ';' + | CONTINUE ';' + | RETURN nonsemicolon_seq ';' + | GOTO identifier ';' + ''' + pass + +def p_iteration_statement(p): + '''iteration_statement : WHILE '(' condition ')' statement + | DO statement WHILE '(' expression ')' ';' + | FOR '(' nonparen_seq_opt ')' statement + ''' + pass + +def p_declaration_statement(p): + '''declaration_statement : block_declaration + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.6 Declarations +#--------------------------------------------------------------------------------------------------- +def p_compound_declaration(p): + '''compound_declaration : LBRACE declaration_seq_opt RBRACE + ''' + pass + +def p_declaration_seq_opt(p): + '''declaration_seq_opt : empty + | declaration_seq_opt declaration + ''' + pass + +def p_declaration(p): + '''declaration : block_declaration + | function_definition + | template_declaration + | explicit_specialization + | specialised_declaration + ''' + pass + +def p_specialised_declaration(p): + '''specialised_declaration : linkage_specification + | namespace_definition + | TEMPLATE specialised_declaration + ''' + pass + +def p_block_declaration(p): + '''block_declaration : simple_declaration + | specialised_block_declaration + ''' + pass + +def p_specialised_block_declaration(p): + '''specialised_block_declaration : asm_definition + | namespace_alias_definition + | using_declaration + | using_directive + | TEMPLATE specialised_block_declaration + ''' + pass + +def p_simple_declaration(p): + '''simple_declaration : ';' + | init_declaration ';' + | init_declarations ';' + | decl_specifier_prefix simple_declaration + ''' + global _parse_info + if len(p) == 3: + if p[2] == ";": + decl = p[1] + else: + decl = p[2] + if decl is not None: + fp = flatten(decl) + if len(fp) >= 2 and fp[0] is not None and fp[0]!="operator" and fp[1] == '(': + p[0] = fp[0] + _parse_info.add_function(fp[0]) + +# +# A decl-specifier following a ptr_operator provokes a shift-reduce conflict for * const name which is resolved in favour of the pointer, and implemented by providing versions of decl-specifier guaranteed not to start with a cv_qualifier. decl-specifiers are implemented type-centrically. That is the semantic constraint that there must be a type is exploited to impose structure, but actually eliminate very little syntax. built-in types are multi-name and so need a different policy. +# +# non-type decl-specifiers are bound to the left-most type in a decl-specifier-seq, by parsing from the right and attaching suffixes to the right-hand type. Finally residual prefixes attach to the left. +# +def p_suffix_built_in_decl_specifier_raw(p): + '''suffix_built_in_decl_specifier_raw : built_in_type_specifier + | suffix_built_in_decl_specifier_raw built_in_type_specifier + | suffix_built_in_decl_specifier_raw decl_specifier_suffix + ''' + pass + +def p_suffix_built_in_decl_specifier(p): + '''suffix_built_in_decl_specifier : suffix_built_in_decl_specifier_raw + | TEMPLATE suffix_built_in_decl_specifier + ''' + pass + +# | id_scope_seq +# | SCOPE id_scope_seq +def p_suffix_named_decl_specifier(p): + '''suffix_named_decl_specifier : scoped_id + | elaborate_type_specifier + | suffix_named_decl_specifier decl_specifier_suffix + ''' + p[0]=get_rest(p) + +def p_suffix_named_decl_specifier_bi(p): + '''suffix_named_decl_specifier_bi : suffix_named_decl_specifier + | suffix_named_decl_specifier suffix_built_in_decl_specifier_raw + ''' + p[0] = get_rest(p) + #print "HERE",get_rest(p) + +def p_suffix_named_decl_specifiers(p): + '''suffix_named_decl_specifiers : suffix_named_decl_specifier_bi + | suffix_named_decl_specifiers suffix_named_decl_specifier_bi + ''' + p[0] = get_rest(p) + +def p_suffix_named_decl_specifiers_sf(p): + '''suffix_named_decl_specifiers_sf : scoped_special_function_id + | suffix_named_decl_specifiers + | suffix_named_decl_specifiers scoped_special_function_id + ''' + #print "HERE",get_rest(p) + p[0] = get_rest(p) + +def p_suffix_decl_specified_ids(p): + '''suffix_decl_specified_ids : suffix_built_in_decl_specifier + | suffix_built_in_decl_specifier suffix_named_decl_specifiers_sf + | suffix_named_decl_specifiers_sf + ''' + if len(p) == 3: + p[0] = p[2] + else: + p[0] = p[1] + +def p_suffix_decl_specified_scope(p): + '''suffix_decl_specified_scope : suffix_named_decl_specifiers SCOPE + | suffix_built_in_decl_specifier suffix_named_decl_specifiers SCOPE + | suffix_built_in_decl_specifier SCOPE + ''' + p[0] = get_rest(p) + +def p_decl_specifier_affix(p): + '''decl_specifier_affix : storage_class_specifier + | function_specifier + | FRIEND + | TYPEDEF + | cv_qualifier + ''' + pass + +def p_decl_specifier_suffix(p): + '''decl_specifier_suffix : decl_specifier_affix + ''' + pass + +def p_decl_specifier_prefix(p): + '''decl_specifier_prefix : decl_specifier_affix + | TEMPLATE decl_specifier_prefix + ''' + pass + +def p_storage_class_specifier(p): + '''storage_class_specifier : REGISTER + | STATIC + | MUTABLE + | EXTERN %prec SHIFT_THERE + | EXTENSION + | AUTO + ''' + pass + +def p_function_specifier(p): + '''function_specifier : EXPLICIT + | INLINE + | VIRTUAL + ''' + pass + +def p_type_specifier(p): + '''type_specifier : simple_type_specifier + | elaborate_type_specifier + | cv_qualifier + ''' + pass + +def p_elaborate_type_specifier(p): + '''elaborate_type_specifier : class_specifier + | enum_specifier + | elaborated_type_specifier + | TEMPLATE elaborate_type_specifier + ''' + pass + +def p_simple_type_specifier(p): + '''simple_type_specifier : scoped_id + | scoped_id attributes + | built_in_type_specifier + ''' + p[0] = p[1] + +def p_built_in_type_specifier(p): + '''built_in_type_specifier : Xbuilt_in_type_specifier + | Xbuilt_in_type_specifier attributes + ''' + pass + +def p_attributes(p): + '''attributes : attribute + | attributes attribute + ''' + pass + +def p_attribute(p): + '''attribute : ATTRIBUTE '(' parameters_clause ')' + ''' + +def p_Xbuilt_in_type_specifier(p): + '''Xbuilt_in_type_specifier : CHAR + | WCHAR_T + | BOOL + | SHORT + | INT + | LONG + | SIGNED + | UNSIGNED + | FLOAT + | DOUBLE + | VOID + | uTYPEOF parameters_clause + | TYPEOF parameters_clause + ''' + pass + +# +# The over-general use of declaration_expression to cover decl-specifier-seq_opt declarator in a function-definition means that +# class X { }; +# could be a function-definition or a class-specifier. +# enum X { }; +# could be a function-definition or an enum-specifier. +# The function-definition is not syntactically valid so resolving the false conflict in favour of the +# elaborated_type_specifier is correct. +# +def p_elaborated_type_specifier(p): + '''elaborated_type_specifier : class_key scoped_id %prec SHIFT_THERE + | elaborated_enum_specifier + | TYPENAME scoped_id + ''' + pass + +def p_elaborated_enum_specifier(p): + '''elaborated_enum_specifier : ENUM scoped_id %prec SHIFT_THERE + ''' + pass + +def p_enum_specifier(p): + '''enum_specifier : ENUM scoped_id enumerator_clause + | ENUM enumerator_clause + ''' + pass + +def p_enumerator_clause(p): + '''enumerator_clause : LBRACE enumerator_list_ecarb + | LBRACE enumerator_list enumerator_list_ecarb + | LBRACE enumerator_list ',' enumerator_definition_ecarb + ''' + pass + +def p_enumerator_list_ecarb(p): + '''enumerator_list_ecarb : RBRACE + ''' + pass + +def p_enumerator_definition_ecarb(p): + '''enumerator_definition_ecarb : RBRACE + ''' + pass + +def p_enumerator_definition_filler(p): + '''enumerator_definition_filler : empty + ''' + pass + +def p_enumerator_list_head(p): + '''enumerator_list_head : enumerator_definition_filler + | enumerator_list ',' enumerator_definition_filler + ''' + pass + +def p_enumerator_list(p): + '''enumerator_list : enumerator_list_head enumerator_definition + ''' + pass + +def p_enumerator_definition(p): + '''enumerator_definition : enumerator + | enumerator '=' constant_expression + ''' + pass + +def p_enumerator(p): + '''enumerator : identifier + ''' + pass + +def p_namespace_definition(p): + '''namespace_definition : NAMESPACE scoped_id push_scope compound_declaration + | NAMESPACE push_scope compound_declaration + ''' + global _parse_info + scope = _parse_info.pop_scope() + +def p_namespace_alias_definition(p): + '''namespace_alias_definition : NAMESPACE scoped_id '=' scoped_id ';' + ''' + pass + +def p_push_scope(p): + '''push_scope : empty''' + global _parse_info + if p[-2] == "namespace": + scope=p[-1] + else: + scope="" + _parse_info.push_scope(scope,"namespace") + +def p_using_declaration(p): + '''using_declaration : USING declarator_id ';' + | USING TYPENAME declarator_id ';' + ''' + pass + +def p_using_directive(p): + '''using_directive : USING NAMESPACE scoped_id ';' + ''' + pass + +# '''asm_definition : ASM '(' StringLiteral ')' ';' +def p_asm_definition(p): + '''asm_definition : ASM '(' nonparen_seq_opt ')' ';' + ''' + pass + +def p_linkage_specification(p): + '''linkage_specification : EXTERN CLiteral declaration + | EXTERN CLiteral compound_declaration + | EXTERN CppLiteral declaration + | EXTERN CppLiteral compound_declaration + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.7 Declarators +#--------------------------------------------------------------------------------------------------- +# +# init-declarator is named init_declaration to reflect the embedded decl-specifier-seq_opt +# + +def p_init_declarations(p): + '''init_declarations : assignment_expression ',' init_declaration + | init_declarations ',' init_declaration + ''' + p[0]=get_rest(p) + +def p_init_declaration(p): + '''init_declaration : assignment_expression + ''' + p[0]=get_rest(p) + +def p_star_ptr_operator(p): + '''star_ptr_operator : '*' + | star_ptr_operator cv_qualifier + ''' + pass + +def p_nested_ptr_operator(p): + '''nested_ptr_operator : star_ptr_operator + | id_scope nested_ptr_operator + ''' + pass + +def p_ptr_operator(p): + '''ptr_operator : '&' + | nested_ptr_operator + | global_scope nested_ptr_operator + ''' + pass + +def p_ptr_operator_seq(p): + '''ptr_operator_seq : ptr_operator + | ptr_operator ptr_operator_seq + ''' + pass + +# +# Independently coded to localise the shift-reduce conflict: sharing just needs another %prec +# +def p_ptr_operator_seq_opt(p): + '''ptr_operator_seq_opt : empty %prec SHIFT_THERE + | ptr_operator ptr_operator_seq_opt + ''' + pass + +def p_cv_qualifier_seq_opt(p): + '''cv_qualifier_seq_opt : empty + | cv_qualifier_seq_opt cv_qualifier + ''' + pass + +# TODO: verify that we should include attributes here +def p_cv_qualifier(p): + '''cv_qualifier : CONST + | VOLATILE + | attributes + ''' + pass + +def p_type_id(p): + '''type_id : type_specifier abstract_declarator_opt + | type_specifier type_id + ''' + pass + +def p_abstract_declarator_opt(p): + '''abstract_declarator_opt : empty + | ptr_operator abstract_declarator_opt + | direct_abstract_declarator + ''' + pass + +def p_direct_abstract_declarator_opt(p): + '''direct_abstract_declarator_opt : empty + | direct_abstract_declarator + ''' + pass + +def p_direct_abstract_declarator(p): + '''direct_abstract_declarator : direct_abstract_declarator_opt parenthesis_clause + | direct_abstract_declarator_opt LBRACKET RBRACKET + | direct_abstract_declarator_opt LBRACKET bexpression RBRACKET + ''' + pass + +def p_parenthesis_clause(p): + '''parenthesis_clause : parameters_clause cv_qualifier_seq_opt + | parameters_clause cv_qualifier_seq_opt exception_specification + ''' + p[0] = ['(',')'] + +def p_parameters_clause(p): + '''parameters_clause : '(' condition_opt ')' + ''' + p[0] = ['(',')'] + +# +# A typed abstract qualifier such as +# Class * ... +# looks like a multiply, so pointers are parsed as their binary operation equivalents that +# ultimately terminate with a degenerate right hand term. +# +def p_abstract_pointer_declaration(p): + '''abstract_pointer_declaration : ptr_operator_seq + | multiplicative_expression star_ptr_operator ptr_operator_seq_opt + ''' + pass + +def p_abstract_parameter_declaration(p): + '''abstract_parameter_declaration : abstract_pointer_declaration + | and_expression '&' + | and_expression '&' abstract_pointer_declaration + ''' + pass + +def p_special_parameter_declaration(p): + '''special_parameter_declaration : abstract_parameter_declaration + | abstract_parameter_declaration '=' assignment_expression + | ELLIPSIS + ''' + pass + +def p_parameter_declaration(p): + '''parameter_declaration : assignment_expression + | special_parameter_declaration + | decl_specifier_prefix parameter_declaration + ''' + pass + +# +# function_definition includes constructor, destructor, implicit int definitions too. A local destructor is successfully parsed as a function-declaration but the ~ was treated as a unary operator. constructor_head is the prefix ambiguity between a constructor and a member-init-list starting with a bit-field. +# +def p_function_definition(p): + '''function_definition : ctor_definition + | func_definition + ''' + pass + +def p_func_definition(p): + '''func_definition : assignment_expression function_try_block + | assignment_expression function_body + | decl_specifier_prefix func_definition + ''' + global _parse_info + if p[2] is not None and p[2][0] == '{': + decl = flatten(p[1]) + #print "HERE",decl + if decl[-1] == ')': + decl=decl[-3] + else: + decl=decl[-1] + p[0] = decl + if decl != "operator": + _parse_info.add_function(decl) + else: + p[0] = p[2] + +def p_ctor_definition(p): + '''ctor_definition : constructor_head function_try_block + | constructor_head function_body + | decl_specifier_prefix ctor_definition + ''' + if p[2] is None or p[2][0] == "try" or p[2][0] == '{': + p[0]=p[1] + else: + p[0]=p[1] + +def p_constructor_head(p): + '''constructor_head : bit_field_init_declaration + | constructor_head ',' assignment_expression + ''' + p[0]=p[1] + +def p_function_try_block(p): + '''function_try_block : TRY function_block handler_seq + ''' + global noExceptionLogic + noExceptionLogic=False + p[0] = ['try'] + +def p_function_block(p): + '''function_block : ctor_initializer_opt function_body + ''' + pass + +def p_function_body(p): + '''function_body : LBRACE nonbrace_seq_opt RBRACE + ''' + p[0] = ['{','}'] + +def p_initializer_clause(p): + '''initializer_clause : assignment_expression + | braced_initializer + ''' + pass + +def p_braced_initializer(p): + '''braced_initializer : LBRACE initializer_list RBRACE + | LBRACE initializer_list ',' RBRACE + | LBRACE RBRACE + ''' + pass + +def p_initializer_list(p): + '''initializer_list : initializer_clause + | initializer_list ',' initializer_clause + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.8 Classes +#--------------------------------------------------------------------------------------------------- +# +# An anonymous bit-field declaration may look very like inheritance: +# const int B = 3; +# class A : B ; +# The two usages are too distant to try to create and enforce a common prefix so we have to resort to +# a parser hack by backtracking. Inheritance is much the most likely so we mark the input stream context +# and try to parse a base-clause. If we successfully reach a { the base-clause is ok and inheritance was +# the correct choice so we unmark and continue. If we fail to find the { an error token causes +# back-tracking to the alternative parse in elaborated_type_specifier which regenerates the : and +# declares unconditional success. +# + +def p_class_specifier_head(p): + '''class_specifier_head : class_key scoped_id ':' base_specifier_list LBRACE + | class_key ':' base_specifier_list LBRACE + | class_key scoped_id LBRACE + | class_key LBRACE + ''' + global _parse_info + base_classes=[] + if len(p) == 6: + scope = p[2] + base_classes = p[4] + elif len(p) == 4: + scope = p[2] + elif len(p) == 5: + base_classes = p[3] + else: + scope = "" + _parse_info.push_scope(scope,p[1],base_classes) + + +def p_class_key(p): + '''class_key : CLASS + | STRUCT + | UNION + ''' + p[0] = p[1] + +def p_class_specifier(p): + '''class_specifier : class_specifier_head member_specification_opt RBRACE + ''' + scope = _parse_info.pop_scope() + +def p_member_specification_opt(p): + '''member_specification_opt : empty + | member_specification_opt member_declaration + ''' + pass + +def p_member_declaration(p): + '''member_declaration : accessibility_specifier + | simple_member_declaration + | function_definition + | using_declaration + | template_declaration + ''' + p[0] = get_rest(p) + #print "Decl",get_rest(p) + +# +# The generality of constructor names (there need be no parenthesised argument list) means that that +# name : f(g), h(i) +# could be the start of a constructor or the start of an anonymous bit-field. An ambiguity is avoided by +# parsing the ctor-initializer of a function_definition as a bit-field. +# +def p_simple_member_declaration(p): + '''simple_member_declaration : ';' + | assignment_expression ';' + | constructor_head ';' + | member_init_declarations ';' + | decl_specifier_prefix simple_member_declaration + ''' + global _parse_info + decl = flatten(get_rest(p)) + if len(decl) >= 4 and decl[-3] == "(": + _parse_info.add_function(decl[-4]) + +def p_member_init_declarations(p): + '''member_init_declarations : assignment_expression ',' member_init_declaration + | constructor_head ',' bit_field_init_declaration + | member_init_declarations ',' member_init_declaration + ''' + pass + +def p_member_init_declaration(p): + '''member_init_declaration : assignment_expression + | bit_field_init_declaration + ''' + pass + +def p_accessibility_specifier(p): + '''accessibility_specifier : access_specifier ':' + ''' + pass + +def p_bit_field_declaration(p): + '''bit_field_declaration : assignment_expression ':' bit_field_width + | ':' bit_field_width + ''' + if len(p) == 4: + p[0]=p[1] + +def p_bit_field_width(p): + '''bit_field_width : logical_or_expression + | logical_or_expression '?' bit_field_width ':' bit_field_width + ''' + pass + +def p_bit_field_init_declaration(p): + '''bit_field_init_declaration : bit_field_declaration + | bit_field_declaration '=' initializer_clause + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.9 Derived classes +#--------------------------------------------------------------------------------------------------- +def p_base_specifier_list(p): + '''base_specifier_list : base_specifier + | base_specifier_list ',' base_specifier + ''' + if len(p) == 2: + p[0] = [p[1]] + else: + p[0] = p[1]+[p[3]] + +def p_base_specifier(p): + '''base_specifier : scoped_id + | access_specifier base_specifier + | VIRTUAL base_specifier + ''' + if len(p) == 2: + p[0] = p[1] + else: + p[0] = p[2] + +def p_access_specifier(p): + '''access_specifier : PRIVATE + | PROTECTED + | PUBLIC + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.10 Special member functions +#--------------------------------------------------------------------------------------------------- +def p_conversion_function_id(p): + '''conversion_function_id : OPERATOR conversion_type_id + ''' + p[0] = ['operator'] + +def p_conversion_type_id(p): + '''conversion_type_id : type_specifier ptr_operator_seq_opt + | type_specifier conversion_type_id + ''' + pass + +# +# Ctor-initialisers can look like a bit field declaration, given the generalisation of names: +# Class(Type) : m1(1), m2(2) { } +# NonClass(bit_field) : int(2), second_variable, ... +# The grammar below is used within a function_try_block or function_definition. +# See simple_member_declaration for use in normal member function_definition. +# +def p_ctor_initializer_opt(p): + '''ctor_initializer_opt : empty + | ctor_initializer + ''' + pass + +def p_ctor_initializer(p): + '''ctor_initializer : ':' mem_initializer_list + ''' + pass + +def p_mem_initializer_list(p): + '''mem_initializer_list : mem_initializer + | mem_initializer_list_head mem_initializer + ''' + pass + +def p_mem_initializer_list_head(p): + '''mem_initializer_list_head : mem_initializer_list ',' + ''' + pass + +def p_mem_initializer(p): + '''mem_initializer : mem_initializer_id '(' expression_list_opt ')' + ''' + pass + +def p_mem_initializer_id(p): + '''mem_initializer_id : scoped_id + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.11 Overloading +#--------------------------------------------------------------------------------------------------- + +def p_operator_function_id(p): + '''operator_function_id : OPERATOR operator + | OPERATOR '(' ')' + | OPERATOR LBRACKET RBRACKET + | OPERATOR '<' + | OPERATOR '>' + | OPERATOR operator '<' nonlgt_seq_opt '>' + ''' + p[0] = ["operator"] + +# +# It is not clear from the ANSI standard whether spaces are permitted in delete[]. If not then it can +# be recognised and returned as DELETE_ARRAY by the lexer. Assuming spaces are permitted there is an +# ambiguity created by the over generalised nature of expressions. operator new is a valid delarator-id +# which we may have an undimensioned array of. Semantic rubbish, but syntactically valid. Since the +# array form is covered by the declarator consideration we can exclude the operator here. The need +# for a semantic rescue can be eliminated at the expense of a couple of shift-reduce conflicts by +# removing the comments on the next four lines. +# +def p_operator(p): + '''operator : NEW + | DELETE + | '+' + | '-' + | '*' + | '/' + | '%' + | '^' + | '&' + | '|' + | '~' + | '!' + | '=' + | ASS_ADD + | ASS_SUB + | ASS_MUL + | ASS_DIV + | ASS_MOD + | ASS_XOR + | ASS_AND + | ASS_OR + | SHL + | SHR + | ASS_SHR + | ASS_SHL + | EQ + | NE + | LE + | GE + | LOG_AND + | LOG_OR + | INC + | DEC + | ',' + | ARROW_STAR + | ARROW + ''' + p[0]=p[1] + +# | IF +# | SWITCH +# | WHILE +# | FOR +# | DO +def p_reserved(p): + '''reserved : PRIVATE + | CLiteral + | CppLiteral + | IF + | SWITCH + | WHILE + | FOR + | DO + | PROTECTED + | PUBLIC + | BOOL + | CHAR + | DOUBLE + | FLOAT + | INT + | LONG + | SHORT + | SIGNED + | UNSIGNED + | VOID + | WCHAR_T + | CLASS + | ENUM + | NAMESPACE + | STRUCT + | TYPENAME + | UNION + | CONST + | VOLATILE + | AUTO + | EXPLICIT + | EXPORT + | EXTERN + | FRIEND + | INLINE + | MUTABLE + | REGISTER + | STATIC + | TEMPLATE + | TYPEDEF + | USING + | VIRTUAL + | ASM + | BREAK + | CASE + | CATCH + | CONST_CAST + | CONTINUE + | DEFAULT + | DYNAMIC_CAST + | ELSE + | FALSE + | GOTO + | OPERATOR + | REINTERPRET_CAST + | RETURN + | SIZEOF + | STATIC_CAST + | THIS + | THROW + | TRUE + | TRY + | TYPEID + | ATTRIBUTE + | CDECL + | TYPEOF + | uTYPEOF + ''' + if p[1] in ('try', 'catch', 'throw'): + global noExceptionLogic + noExceptionLogic=False + +#--------------------------------------------------------------------------------------------------- +# A.12 Templates +#--------------------------------------------------------------------------------------------------- +def p_template_declaration(p): + '''template_declaration : template_parameter_clause declaration + | EXPORT template_declaration + ''' + pass + +def p_template_parameter_clause(p): + '''template_parameter_clause : TEMPLATE '<' nonlgt_seq_opt '>' + ''' + pass + +# +# Generalised naming makes identifier a valid declaration, so TEMPLATE identifier is too. +# The TEMPLATE prefix is therefore folded into all names, parenthesis_clause and decl_specifier_prefix. +# +# explicit_instantiation: TEMPLATE declaration +# +def p_explicit_specialization(p): + '''explicit_specialization : TEMPLATE '<' '>' declaration + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# A.13 Exception Handling +#--------------------------------------------------------------------------------------------------- +def p_handler_seq(p): + '''handler_seq : handler + | handler handler_seq + ''' + pass + +def p_handler(p): + '''handler : CATCH '(' exception_declaration ')' compound_statement + ''' + global noExceptionLogic + noExceptionLogic=False + +def p_exception_declaration(p): + '''exception_declaration : parameter_declaration + ''' + pass + +def p_throw_expression(p): + '''throw_expression : THROW + | THROW assignment_expression + ''' + global noExceptionLogic + noExceptionLogic=False + +def p_exception_specification(p): + '''exception_specification : THROW '(' ')' + | THROW '(' type_id_list ')' + ''' + global noExceptionLogic + noExceptionLogic=False + +def p_type_id_list(p): + '''type_id_list : type_id + | type_id_list ',' type_id + ''' + pass + +#--------------------------------------------------------------------------------------------------- +# Misc productions +#--------------------------------------------------------------------------------------------------- +def p_nonsemicolon_seq(p): + '''nonsemicolon_seq : empty + | nonsemicolon_seq nonsemicolon + ''' + pass + +def p_nonsemicolon(p): + '''nonsemicolon : misc + | '(' + | ')' + | '<' + | '>' + | LBRACKET nonbracket_seq_opt RBRACKET + | LBRACE nonbrace_seq_opt RBRACE + ''' + pass + +def p_nonparen_seq_opt(p): + '''nonparen_seq_opt : empty + | nonparen_seq_opt nonparen + ''' + pass + +def p_nonparen_seq(p): + '''nonparen_seq : nonparen + | nonparen_seq nonparen + ''' + pass + +def p_nonparen(p): + '''nonparen : misc + | '<' + | '>' + | ';' + | LBRACKET nonbracket_seq_opt RBRACKET + | LBRACE nonbrace_seq_opt RBRACE + ''' + pass + +def p_nonbracket_seq_opt(p): + '''nonbracket_seq_opt : empty + | nonbracket_seq_opt nonbracket + ''' + pass + +def p_nonbracket_seq(p): + '''nonbracket_seq : nonbracket + | nonbracket_seq nonbracket + ''' + pass + +def p_nonbracket(p): + '''nonbracket : misc + | '<' + | '>' + | '(' + | ')' + | ';' + | LBRACKET nonbracket_seq_opt RBRACKET + | LBRACE nonbrace_seq_opt RBRACE + ''' + pass + +def p_nonbrace_seq_opt(p): + '''nonbrace_seq_opt : empty + | nonbrace_seq_opt nonbrace + ''' + pass + +def p_nonbrace(p): + '''nonbrace : misc + | '<' + | '>' + | '(' + | ')' + | ';' + | LBRACKET nonbracket_seq_opt RBRACKET + | LBRACE nonbrace_seq_opt RBRACE + ''' + pass + +def p_nonlgt_seq_opt(p): + '''nonlgt_seq_opt : empty + | nonlgt_seq_opt nonlgt + ''' + pass + +def p_nonlgt(p): + '''nonlgt : misc + | '(' + | ')' + | LBRACKET nonbracket_seq_opt RBRACKET + | '<' nonlgt_seq_opt '>' + | ';' + ''' + pass + +def p_misc(p): + '''misc : operator + | identifier + | IntegerLiteral + | CharacterLiteral + | FloatingLiteral + | StringLiteral + | reserved + | '?' + | ':' + | '.' + | SCOPE + | ELLIPSIS + | EXTENSION + ''' + pass + +def p_empty(p): + '''empty : ''' + pass + + + +# +# Compute column. +# input is the input text string +# token is a token instance +# +def _find_column(input,token): + ''' TODO ''' + i = token.lexpos + while i > 0: + if input[i] == '\n': break + i -= 1 + column = (token.lexpos - i)+1 + return column + +def p_error(p): + if p is None: + tmp = "Syntax error at end of file." + else: + tmp = "Syntax error at token " + if p.type is "": + tmp = tmp + "''" + else: + tmp = tmp + str(p.type) + tmp = tmp + " with value '"+str(p.value)+"'" + tmp = tmp + " in line " + str(lexer.lineno-1) + tmp = tmp + " at column "+str(_find_column(_parsedata,p)) + raise IOError( tmp ) + + + +# +# The function that performs the parsing +# +def parse_cpp(data=None, filename=None, debug=0, optimize=0, verbose=False, func_filter=None): + if debug > 0: + print("Debugging parse_cpp!") + # + # Always remove the parser.out file, which is generated to create debugging + # + if os.path.exists("parser.out"): + os.remove("parser.out") + # + # Remove the parsetab.py* files. These apparently need to be removed + # to ensure the creation of a parser.out file. + # + if os.path.exists("parsetab.py"): + os.remove("parsetab.py") + if os.path.exists("parsetab.pyc"): + os.remove("parsetab.pyc") + global debugging + debugging=True + # + # Build lexer + # + global lexer + lexer = lex.lex() + # + # Initialize parse object + # + global _parse_info + _parse_info = CppInfo(filter=func_filter) + _parse_info.verbose=verbose + # + # Build yaccer + # + write_table = not os.path.exists("parsetab.py") + yacc.yacc(debug=debug, optimize=optimize, write_tables=write_table) + # + # Parse the file + # + global _parsedata + if not data is None: + _parsedata=data + ply_init(_parsedata) + yacc.parse(data,debug=debug) + elif not filename is None: + f = open(filename) + data = f.read() + f.close() + _parsedata=data + ply_init(_parsedata) + yacc.parse(data, debug=debug) + else: + return None + # + if not noExceptionLogic: + _parse_info.noExceptionLogic = False + else: + for key in identifier_lineno: + if 'ASSERT_THROWS' in key: + _parse_info.noExceptionLogic = False + break + _parse_info.noExceptionLogic = True + # + return _parse_info + + + +import sys + +if __name__ == '__main__': + # + # This MAIN routine parses a sequence of files provided at the command + # line. If '-v' is included, then a verbose parsing output is + # generated. + # + for arg in sys.argv[1:]: + if arg == "-v": + continue + print("Parsing file '"+arg+"'") + if '-v' in sys.argv: + parse_cpp(filename=arg,debug=2,verbose=2) + else: + parse_cpp(filename=arg,verbose=2) + # + # Print the _parse_info object summary for this file. + # This illustrates how class inheritance can be used to + # deduce class members. + # + print(str(_parse_info)) + diff --git a/tools/cxxtest/python/python3/cxxtest/cxxtest_fog.py b/tools/cxxtest/python/python3/cxxtest/cxxtest_fog.py new file mode 100644 index 0000000..29660cb --- /dev/null +++ b/tools/cxxtest/python/python3/cxxtest/cxxtest_fog.py @@ -0,0 +1,96 @@ +#------------------------------------------------------------------------- +# CxxTest: A lightweight C++ unit testing library. +# Copyright (c) 2008 Sandia Corporation. +# This software is distributed under the LGPL License v2.1 +# For more information, see the COPYING file in the top CxxTest directory. +# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +# the U.S. Government retains certain rights in this software. +#------------------------------------------------------------------------- + +# +# TODO: add line number info +# TODO: add test function names +# + + + +import sys +import re +#from os.path import abspath, dirname +#sys.path.insert(0, dirname(dirname(abspath(__file__)))) +#sys.path.insert(0, dirname(dirname(abspath(__file__)))+"/cxx_parse") +from .cxxtest_misc import abort +from . import cxx_parser +import re + +def cstr( str ): + '''Convert a string to its C representation''' + return '"' + re.sub('\\\\', '\\\\\\\\', str ) + '"' + +def scanInputFiles(files, _options): + '''Scan all input files for test suites''' + suites=[] + for file in files: + try: + print("Parsing file "+file, end=' ') + sys.stdout.flush() + parse_info = cxx_parser.parse_cpp(filename=file,optimize=1) + except IOError as err: + print(" error.") + print(str(err)) + continue + print("done.") + sys.stdout.flush() + # + # WEH: see if it really makes sense to use parse information to + # initialize this data. I don't think so... + # + _options.haveStandardLibrary=1 + if not parse_info.noExceptionLogic: + _options.haveExceptionHandling=1 + # + keys = list(parse_info.index.keys()) + tpat = re.compile("[Tt][Ee][Ss][Tt]") + for key in keys: + if parse_info.index[key].scope_t == "class" and parse_info.is_baseclass(key,"CxxTest::TestSuite"): + name=parse_info.index[key].name + suite = { 'name' : name, + 'file' : file, + 'cfile' : cstr(file), + 'line' : str(parse_info.index[key].lineno), + 'generated' : 0, + 'object' : 'suite_%s' % name, + 'dobject' : 'suiteDescription_%s' % name, + 'tlist' : 'Tests_%s' % name, + 'tests' : [], + 'lines' : [] } + for fn in parse_info.get_functions(key,quiet=True): + tname = fn[0] + lineno = str(fn[1]) + if tname.startswith('createSuite'): + # Indicate that we're using a dynamically generated test suite + suite['create'] = str(lineno) # (unknown line) + if tname.startswith('destroySuite'): + # Indicate that we're using a dynamically generated test suite + suite['destroy'] = str(lineno) # (unknown line) + if not tpat.match(tname): + # Skip non-test methods + continue + test = { 'name' : tname, + 'suite' : suite, + 'class' : 'TestDescription_suite_%s_%s' % (suite['name'], tname), + 'object' : 'testDescription_suite_%s_%s' % (suite['name'], tname), + 'line' : lineno, + } + suite['tests'].append(test) + suites.append(suite) + + if not _options.root: + ntests = 0 + for suite in suites: + ntests += len(suite['tests']) + if ntests == 0: + abort( 'No tests defined' ) + # + return [_options, suites] + diff --git a/tools/cxxtest/python/python3/cxxtest/cxxtest_misc.py b/tools/cxxtest/python/python3/cxxtest/cxxtest_misc.py new file mode 100644 index 0000000..b5b9a8d --- /dev/null +++ b/tools/cxxtest/python/python3/cxxtest/cxxtest_misc.py @@ -0,0 +1,19 @@ +#!/usr/bin/python +#------------------------------------------------------------------------- +# CxxTest: A lightweight C++ unit testing library. +# Copyright (c) 2008 Sandia Corporation. +# This software is distributed under the LGPL License v2.1 +# For more information, see the COPYING file in the top CxxTest directory. +# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +# the U.S. Government retains certain rights in this software. +#------------------------------------------------------------------------- + +import sys + +def abort( problem ): + '''Print error message and exit''' + sys.stderr.write( '\n' ) + sys.stderr.write( problem ) + sys.stderr.write( '\n\n' ) + sys.exit(2) + diff --git a/tools/cxxtest/python/python3/cxxtest/cxxtest_parser.py b/tools/cxxtest/python/python3/cxxtest/cxxtest_parser.py new file mode 100644 index 0000000..e76dbee --- /dev/null +++ b/tools/cxxtest/python/python3/cxxtest/cxxtest_parser.py @@ -0,0 +1,242 @@ +#------------------------------------------------------------------------- +# CxxTest: A lightweight C++ unit testing library. +# Copyright (c) 2008 Sandia Corporation. +# This software is distributed under the LGPL License v2.1 +# For more information, see the COPYING file in the top CxxTest directory. +# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +# the U.S. Government retains certain rights in this software. +#------------------------------------------------------------------------- + + + +import codecs +import re +#import sys +#import getopt +#import glob +from cxxtest.cxxtest_misc import abort + +# Global variables +suites = [] +suite = None +inBlock = 0 +options=None + +def scanInputFiles(files, _options): + '''Scan all input files for test suites''' + global options + options=_options + for file in files: + scanInputFile(file) + global suites + if len(suites) is 0 and not options.root: + abort( 'No tests defined' ) + return [options,suites] + +lineCont_re = re.compile('(.*)\\\s*$') +def scanInputFile(fileName): + '''Scan single input file for test suites''' + # mode 'rb' is problematic in python3 - byte arrays don't behave the same as + # strings. + # As far as the choice of the default encoding: utf-8 chews through + # everything that the previous ascii codec could, plus most of new code. + # TODO: figure out how to do this properly - like autodetect encoding from + # file header. + file = codecs.open(fileName, mode='r', encoding='utf-8') + prev = "" + lineNo = 0 + contNo = 0 + while 1: + line = file.readline() + if not line: + break + lineNo += 1 + + m = lineCont_re.match(line) + if m: + prev += m.group(1) + " " + contNo += 1 + else: + scanInputLine( fileName, lineNo - contNo, prev + line ) + contNo = 0 + prev = "" + if contNo: + scanInputLine( fileName, lineNo - contNo, prev + line ) + + closeSuite() + file.close() + +def scanInputLine( fileName, lineNo, line ): + '''Scan single input line for interesting stuff''' + scanLineForExceptionHandling( line ) + scanLineForStandardLibrary( line ) + + scanLineForSuiteStart( fileName, lineNo, line ) + + global suite + if suite: + scanLineInsideSuite( suite, lineNo, line ) + +def scanLineInsideSuite( suite, lineNo, line ): + '''Analyze line which is part of a suite''' + global inBlock + if lineBelongsToSuite( suite, lineNo, line ): + scanLineForTest( suite, lineNo, line ) + scanLineForCreate( suite, lineNo, line ) + scanLineForDestroy( suite, lineNo, line ) + +def lineBelongsToSuite( suite, lineNo, line ): + '''Returns whether current line is part of the current suite. + This can be false when we are in a generated suite outside of CXXTEST_CODE() blocks + If the suite is generated, adds the line to the list of lines''' + if not suite['generated']: + return 1 + + global inBlock + if not inBlock: + inBlock = lineStartsBlock( line ) + if inBlock: + inBlock = addLineToBlock( suite, lineNo, line ) + return inBlock + + +std_re = re.compile( r"\b(std\s*::|CXXTEST_STD|using\s+namespace\s+std\b|^\s*\#\s*include\s+<[a-z0-9]+>)" ) +def scanLineForStandardLibrary( line ): + '''Check if current line uses standard library''' + global options + if not options.haveStandardLibrary and std_re.search(line): + if not options.noStandardLibrary: + options.haveStandardLibrary = 1 + +exception_re = re.compile( r"\b(throw|try|catch|TSM?_ASSERT_THROWS[A-Z_]*)\b" ) +def scanLineForExceptionHandling( line ): + '''Check if current line uses exception handling''' + global options + if not options.haveExceptionHandling and exception_re.search(line): + if not options.noExceptionHandling: + options.haveExceptionHandling = 1 + +classdef = '(?:::\s*)?(?:\w+\s*::\s*)*\w+' +baseclassdef = '(?:public|private|protected)\s+%s' % (classdef,) +general_suite = r"\bclass\s+(%s)\s*:(?:\s*%s\s*,)*\s*public\s+" \ + % (classdef, baseclassdef,) +testsuite = '(?:(?:::)?\s*CxxTest\s*::\s*)?TestSuite' +suites_re = { re.compile( general_suite + testsuite ) : None } +generatedSuite_re = re.compile( r'\bCXXTEST_SUITE\s*\(\s*(\w*)\s*\)' ) +def scanLineForSuiteStart( fileName, lineNo, line ): + '''Check if current line starts a new test suite''' + for i in list(suites_re.items()): + m = i[0].search( line ) + if m: + suite = startSuite( m.group(1), fileName, lineNo, 0 ) + if i[1] is not None: + for test in i[1]['tests']: + addTest(suite, test['name'], test['line']) + break + m = generatedSuite_re.search( line ) + if m: + sys.stdout.write( "%s:%s: Warning: Inline test suites are deprecated.\n" % (fileName, lineNo) ) + startSuite( m.group(1), fileName, lineNo, 1 ) + +def startSuite( name, file, line, generated ): + '''Start scanning a new suite''' + global suite + closeSuite() + object_name = name.replace(':',"_") + suite = { 'name' : name, + 'file' : file, + 'cfile' : cstr(file), + 'line' : line, + 'generated' : generated, + 'object' : 'suite_%s' % object_name, + 'dobject' : 'suiteDescription_%s' % object_name, + 'tlist' : 'Tests_%s' % object_name, + 'tests' : [], + 'lines' : [] } + suites_re[re.compile( general_suite + name )] = suite + return suite + +def lineStartsBlock( line ): + '''Check if current line starts a new CXXTEST_CODE() block''' + return re.search( r'\bCXXTEST_CODE\s*\(', line ) is not None + +test_re = re.compile( r'^([^/]|/[^/])*\bvoid\s+([Tt]est\w+)\s*\(\s*(void)?\s*\)' ) +def scanLineForTest( suite, lineNo, line ): + '''Check if current line starts a test''' + m = test_re.search( line ) + if m: + addTest( suite, m.group(2), lineNo ) + +def addTest( suite, name, line ): + '''Add a test function to the current suite''' + test = { 'name' : name, + 'suite' : suite, + 'class' : 'TestDescription_%s_%s' % (suite['object'], name), + 'object' : 'testDescription_%s_%s' % (suite['object'], name), + 'line' : line, + } + suite['tests'].append( test ) + +def addLineToBlock( suite, lineNo, line ): + '''Append the line to the current CXXTEST_CODE() block''' + line = fixBlockLine( suite, lineNo, line ) + line = re.sub( r'^.*\{\{', '', line ) + + e = re.search( r'\}\}', line ) + if e: + line = line[:e.start()] + suite['lines'].append( line ) + return e is None + +def fixBlockLine( suite, lineNo, line): + '''Change all [E]TS_ macros used in a line to _[E]TS_ macros with the correct file/line''' + return re.sub( r'\b(E?TSM?_(ASSERT[A-Z_]*|FAIL))\s*\(', + r'_\1(%s,%s,' % (suite['cfile'], lineNo), + line, 0 ) + +create_re = re.compile( r'\bstatic\s+\w+\s*\*\s*createSuite\s*\(\s*(void)?\s*\)' ) +def scanLineForCreate( suite, lineNo, line ): + '''Check if current line defines a createSuite() function''' + if create_re.search( line ): + addSuiteCreateDestroy( suite, 'create', lineNo ) + +destroy_re = re.compile( r'\bstatic\s+void\s+destroySuite\s*\(\s*\w+\s*\*\s*\w*\s*\)' ) +def scanLineForDestroy( suite, lineNo, line ): + '''Check if current line defines a destroySuite() function''' + if destroy_re.search( line ): + addSuiteCreateDestroy( suite, 'destroy', lineNo ) + +def cstr( s ): + '''Convert a string to its C representation''' + return '"' + s.replace( '\\', '\\\\' ) + '"' + + +def addSuiteCreateDestroy( suite, which, line ): + '''Add createSuite()/destroySuite() to current suite''' + if which in suite: + abort( '%s:%s: %sSuite() already declared' % ( suite['file'], str(line), which ) ) + suite[which] = line + +def closeSuite(): + '''Close current suite and add it to the list if valid''' + global suite + if suite is not None: + if len(suite['tests']) is not 0: + verifySuite(suite) + rememberSuite(suite) + suite = None + +def verifySuite(suite): + '''Verify current suite is legal''' + if 'create' in suite and 'destroy' not in suite: + abort( '%s:%s: Suite %s has createSuite() but no destroySuite()' % + (suite['file'], suite['create'], suite['name']) ) + elif 'destroy' in suite and 'create' not in suite: + abort( '%s:%s: Suite %s has destroySuite() but no createSuite()' % + (suite['file'], suite['destroy'], suite['name']) ) + +def rememberSuite(suite): + '''Add current suite to list''' + global suites + suites.append( suite ) + diff --git a/tools/cxxtest/python/python3/cxxtest/cxxtestgen.py b/tools/cxxtest/python/python3/cxxtest/cxxtestgen.py new file mode 100644 index 0000000..c704757 --- /dev/null +++ b/tools/cxxtest/python/python3/cxxtest/cxxtestgen.py @@ -0,0 +1,480 @@ +#------------------------------------------------------------------------- +# CxxTest: A lightweight C++ unit testing library. +# Copyright (c) 2008 Sandia Corporation. +# This software is distributed under the LGPL License v2.1 +# For more information, see the COPYING file in the top CxxTest directory. +# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +# the U.S. Government retains certain rights in this software. +#------------------------------------------------------------------------- + +# vim: fileencoding=utf-8 + + +# the above import important for forward-compatibility with python3, +# which is already the default in archlinux! + +__all__ = ['main'] + +from . import __release__ +import os +import sys +import re +import glob +from optparse import OptionParser +from . import cxxtest_parser + +try: + from . import cxxtest_fog + imported_fog=True +except ImportError: + imported_fog=False + +from .cxxtest_misc import abort + +options = [] +suites = [] + +wrotePreamble = 0 +wroteWorld = 0 +lastIncluded = '' + +def main(args=sys.argv): + '''The main program''' + # + # Reset global state + # + global wrotePreamble + wrotePreamble=0 + global wroteWorld + wroteWorld=0 + global lastIncluded + lastIncluded = '' + + global suites + global options + files = parseCommandline(args) + if imported_fog and options.fog: + [options,suites] = cxxtest_fog.scanInputFiles( files, options ) + else: + [options,suites] = cxxtest_parser.scanInputFiles( files, options ) + writeOutput() + +def parseCommandline(args): + '''Analyze command line arguments''' + global imported_fog + global options + parser = OptionParser("%prog [options] [ ...]") + parser.add_option("--version", + action="store_true", dest="version", default=False, + help="Write the CxxTest version.") + parser.add_option("-o", "--output", + dest="outputFileName", default=None, metavar="NAME", + help="Write output to file NAME.") + parser.add_option("-w","--world", dest="world", default="cxxtest", + help="The label of the tests, used to name the XML results.") + parser.add_option("", "--include", action="append", + dest="headers", default=[], metavar="HEADER", + help="Include file HEADER in the test runner before other headers.") + parser.add_option("", "--abort-on-fail", + action="store_true", dest="abortOnFail", default=False, + help="Abort tests on failed asserts (like xUnit).") + parser.add_option("", "--main", + action="store", dest="main", default="main", + help="Specify an alternative name for the main() function.") + parser.add_option("", "--headers", + action="store", dest="header_filename", default=None, + help="Specify a filename that contains a list of header files that are processed to generate a test runner.") + parser.add_option("", "--runner", + dest="runner", default="", metavar="CLASS", + help="Create a test runner that processes test events using the class CxxTest::CLASS.") + parser.add_option("", "--gui", + dest="gui", metavar="CLASS", + help="Create a GUI test runner that processes test events using the class CxxTest::CLASS. (deprecated)") + parser.add_option("", "--error-printer", + action="store_true", dest="error_printer", default=False, + help="Create a test runner using the ErrorPrinter class, and allow the use of the standard library.") + parser.add_option("", "--xunit-printer", + action="store_true", dest="xunit_printer", default=False, + help="Create a test runner using the XUnitPrinter class.") + parser.add_option("", "--xunit-file", dest="xunit_file", default="", + help="The file to which the XML summary is written for test runners using the XUnitPrinter class. The default XML filename is TEST-.xml, where is the value of the --world option. (default: cxxtest)") + parser.add_option("", "--have-std", + action="store_true", dest="haveStandardLibrary", default=False, + help="Use the standard library (even if not found in tests).") + parser.add_option("", "--no-std", + action="store_true", dest="noStandardLibrary", default=False, + help="Do not use standard library (even if found in tests).") + parser.add_option("", "--have-eh", + action="store_true", dest="haveExceptionHandling", default=False, + help="Use exception handling (even if not found in tests).") + parser.add_option("", "--no-eh", + action="store_true", dest="noExceptionHandling", default=False, + help="Do not use exception handling (even if found in tests).") + parser.add_option("", "--longlong", + dest="longlong", default=None, metavar="TYPE", + help="Use TYPE as for long long integers. (default: not supported)") + parser.add_option("", "--no-static-init", + action="store_true", dest="noStaticInit", default=False, + help="Do not rely on static initialization in the test runner.") + parser.add_option("", "--template", + dest="templateFileName", default=None, metavar="TEMPLATE", + help="Generate the test runner using file TEMPLATE to define a template.") + parser.add_option("", "--root", + action="store_true", dest="root", default=False, + help="Write the main() function and global data for a test runner.") + parser.add_option("", "--part", + action="store_true", dest="part", default=False, + help="Write the tester classes for a test runner.") + #parser.add_option("", "--factor", + #action="store_true", dest="factor", default=False, + #help="Declare the _CXXTEST_FACTOR macro. (deprecated)") + if imported_fog: + fog_help = "Use new FOG C++ parser" + else: + fog_help = "Use new FOG C++ parser (disabled)" + parser.add_option("-f", "--fog-parser", + action="store_true", + dest="fog", + default=False, + help=fog_help + ) + + (options, args) = parser.parse_args(args=args) + if not options.header_filename is None: + if not os.path.exists(options.header_filename): + abort( "ERROR: the file '%s' does not exist!" % options.header_filename ) + INPUT = open(options.header_filename) + headers = [line.strip() for line in INPUT] + args.extend( headers ) + INPUT.close() + + if options.fog and not imported_fog: + abort( "Cannot use the FOG parser. Check that the 'ply' package is installed. The 'ordereddict' package is also required if running Python 2.6") + + if options.version: + printVersion() + + # the cxxtest builder relies on this behaviour! don't remove + if options.runner == 'none': + options.runner = None + + if options.xunit_printer or options.runner == "XUnitPrinter": + options.xunit_printer=True + options.runner="XUnitPrinter" + if len(args) > 1: + if options.xunit_file == "": + if options.world == "": + options.world = "cxxtest" + options.xunit_file="TEST-"+options.world+".xml" + elif options.xunit_file == "": + if options.world == "": + options.world = "cxxtest" + options.xunit_file="TEST-"+options.world+".xml" + + if options.error_printer: + options.runner= "ErrorPrinter" + options.haveStandardLibrary = True + + if options.noStaticInit and (options.root or options.part): + abort( '--no-static-init cannot be used with --root/--part' ) + + if options.gui and not options.runner: + options.runner = 'StdioPrinter' + + files = setFiles(args[1:]) + if len(files) == 0 and not options.root: + sys.stderr.write(parser.error("No input files found")) + + return files + + +def printVersion(): + '''Print CxxTest version and exit''' + sys.stdout.write( "This is CxxTest version %s.\n" % __release__.__version__ ) + sys.exit(0) + +def setFiles(patterns ): + '''Set input files specified on command line''' + files = expandWildcards( patterns ) + return files + +def expandWildcards( patterns ): + '''Expand all wildcards in an array (glob)''' + fileNames = [] + for pathName in patterns: + patternFiles = glob.glob( pathName ) + for fileName in patternFiles: + fileNames.append( fixBackslashes( fileName ) ) + return fileNames + +def fixBackslashes( fileName ): + '''Convert backslashes to slashes in file name''' + return re.sub( r'\\', '/', fileName, 0 ) + + +def writeOutput(): + '''Create output file''' + if options.templateFileName: + writeTemplateOutput() + else: + writeSimpleOutput() + +def writeSimpleOutput(): + '''Create output not based on template''' + output = startOutputFile() + writePreamble( output ) + if options.root or not options.part: + writeMain( output ) + + if len(suites) > 0: + output.write("bool "+suites[0]['object']+"_init = false;\n") + + writeWorld( output ) + output.close() + +include_re = re.compile( r"\s*\#\s*include\s+\s*$" ) +world_re = re.compile( r"^\s*\s*$" ) +def writeTemplateOutput(): + '''Create output based on template file''' + template = open(options.templateFileName) + output = startOutputFile() + while 1: + line = template.readline() + if not line: + break; + if include_re.search( line ): + writePreamble( output ) + output.write( line ) + elif preamble_re.search( line ): + writePreamble( output ) + elif world_re.search( line ): + if len(suites) > 0: + output.write("bool "+suites[0]['object']+"_init = false;\n") + writeWorld( output ) + else: + output.write( line ) + template.close() + output.close() + +def startOutputFile(): + '''Create output file and write header''' + if options.outputFileName is not None: + output = open( options.outputFileName, 'w' ) + else: + output = sys.stdout + output.write( "/* Generated file, do not edit */\n\n" ) + return output + +def writePreamble( output ): + '''Write the CxxTest header (#includes and #defines)''' + global wrotePreamble + if wrotePreamble: return + output.write( "#ifndef CXXTEST_RUNNING\n" ) + output.write( "#define CXXTEST_RUNNING\n" ) + output.write( "#endif\n" ) + output.write( "\n" ) + if options.xunit_printer: + output.write( "#include \n" ) + if options.haveStandardLibrary: + output.write( "#define _CXXTEST_HAVE_STD\n" ) + if options.haveExceptionHandling: + output.write( "#define _CXXTEST_HAVE_EH\n" ) + if options.abortOnFail: + output.write( "#define _CXXTEST_ABORT_TEST_ON_FAIL\n" ) + if options.longlong: + output.write( "#define _CXXTEST_LONGLONG %s\n" % options.longlong ) + #if options.factor: + #output.write( "#define _CXXTEST_FACTOR\n" ) + for header in options.headers: + output.write( "#include \"%s\"\n" % header ) + output.write( "#include \n" ) + output.write( "#include \n" ) + output.write( "#include \n" ) + output.write( "#include \n" ) + output.write( "#include \n" ) + if options.runner: + output.write( "#include \n" % options.runner ) + if options.gui: + output.write( "#include \n" % options.gui ) + output.write( "\n" ) + wrotePreamble = 1 + +def writeMain( output ): + '''Write the main() function for the test runner''' + if not (options.gui or options.runner): + return + output.write( 'int %s( int argc, char *argv[] ) {\n' % options.main ) + output.write( ' int status;\n' ) + if options.noStaticInit: + output.write( ' CxxTest::initialize();\n' ) + if options.gui: + tester_t = "CxxTest::GuiTuiRunner " % (options.gui, options.runner) + else: + tester_t = "CxxTest::%s" % (options.runner) + if options.xunit_printer: + output.write( ' std::ofstream ofstr("%s");\n' % options.xunit_file ) + output.write( ' %s tmp(ofstr);\n' % tester_t ) + output.write( ' CxxTest::RealWorldDescription::_worldName = "%s";\n' % options.world ) + else: + output.write( ' %s tmp;\n' % tester_t ) + output.write( ' status = CxxTest::Main<%s>( tmp, argc, argv );\n' % tester_t ) + output.write( ' return status;\n') + output.write( '}\n' ) + + +def writeWorld( output ): + '''Write the world definitions''' + global wroteWorld + if wroteWorld: return + writePreamble( output ) + writeSuites( output ) + if options.root or not options.part: + writeRoot( output ) + writeWorldDescr( output ) + if options.noStaticInit: + writeInitialize( output ) + wroteWorld = 1 + +def writeSuites(output): + '''Write all TestDescriptions and SuiteDescriptions''' + for suite in suites: + writeInclude( output, suite['file'] ) + if isGenerated(suite): + generateSuite( output, suite ) + if isDynamic(suite): + writeSuitePointer( output, suite ) + else: + writeSuiteObject( output, suite ) + writeTestList( output, suite ) + writeSuiteDescription( output, suite ) + writeTestDescriptions( output, suite ) + +def isGenerated(suite): + '''Checks whether a suite class should be created''' + return suite['generated'] + +def isDynamic(suite): + '''Checks whether a suite is dynamic''' + return 'create' in suite + +def writeInclude(output, file): + '''Add #include "file" statement''' + global lastIncluded + if file == lastIncluded: return + output.writelines( [ '#include "', file, '"\n\n' ] ) + lastIncluded = file + +def generateSuite( output, suite ): + '''Write a suite declared with CXXTEST_SUITE()''' + output.write( 'class %s : public CxxTest::TestSuite {\n' % suite['name'] ) + output.write( 'public:\n' ) + for line in suite['lines']: + output.write(line) + output.write( '};\n\n' ) + +def writeSuitePointer( output, suite ): + '''Create static suite pointer object for dynamic suites''' + if options.noStaticInit: + output.write( 'static %s *%s;\n\n' % (suite['name'], suite['object']) ) + else: + output.write( 'static %s *%s = 0;\n\n' % (suite['name'], suite['object']) ) + +def writeSuiteObject( output, suite ): + '''Create static suite object for non-dynamic suites''' + output.writelines( [ "static ", suite['name'], " ", suite['object'], ";\n\n" ] ) + +def writeTestList( output, suite ): + '''Write the head of the test linked list for a suite''' + if options.noStaticInit: + output.write( 'static CxxTest::List %s;\n' % suite['tlist'] ) + else: + output.write( 'static CxxTest::List %s = { 0, 0 };\n' % suite['tlist'] ) + +def writeWorldDescr( output ): + '''Write the static name of the world name''' + if options.noStaticInit: + output.write( 'const char* CxxTest::RealWorldDescription::_worldName;\n' ) + else: + output.write( 'const char* CxxTest::RealWorldDescription::_worldName = "cxxtest";\n' ) + +def writeTestDescriptions( output, suite ): + '''Write all test descriptions for a suite''' + for test in suite['tests']: + writeTestDescription( output, suite, test ) + +def writeTestDescription( output, suite, test ): + '''Write test description object''' + output.write( 'static class %s : public CxxTest::RealTestDescription {\n' % test['class'] ) + output.write( 'public:\n' ) + if not options.noStaticInit: + output.write( ' %s() : CxxTest::RealTestDescription( %s, %s, %s, "%s" ) {}\n' % + (test['class'], suite['tlist'], suite['dobject'], test['line'], test['name']) ) + output.write( ' void runTest() { %s }\n' % runBody( suite, test ) ) + output.write( '} %s;\n\n' % test['object'] ) + +def runBody( suite, test ): + '''Body of TestDescription::run()''' + if isDynamic(suite): return dynamicRun( suite, test ) + else: return staticRun( suite, test ) + +def dynamicRun( suite, test ): + '''Body of TestDescription::run() for test in a dynamic suite''' + return 'if ( ' + suite['object'] + ' ) ' + suite['object'] + '->' + test['name'] + '();' + +def staticRun( suite, test ): + '''Body of TestDescription::run() for test in a non-dynamic suite''' + return suite['object'] + '.' + test['name'] + '();' + +def writeSuiteDescription( output, suite ): + '''Write SuiteDescription object''' + if isDynamic( suite ): + writeDynamicDescription( output, suite ) + else: + writeStaticDescription( output, suite ) + +def writeDynamicDescription( output, suite ): + '''Write SuiteDescription for a dynamic suite''' + output.write( 'CxxTest::DynamicSuiteDescription<%s> %s' % (suite['name'], suite['dobject']) ) + if not options.noStaticInit: + output.write( '( %s, %s, "%s", %s, %s, %s, %s )' % + (suite['cfile'], suite['line'], suite['name'], suite['tlist'], + suite['object'], suite['create'], suite['destroy']) ) + output.write( ';\n\n' ) + +def writeStaticDescription( output, suite ): + '''Write SuiteDescription for a static suite''' + output.write( 'CxxTest::StaticSuiteDescription %s' % suite['dobject'] ) + if not options.noStaticInit: + output.write( '( %s, %s, "%s", %s, %s )' % + (suite['cfile'], suite['line'], suite['name'], suite['object'], suite['tlist']) ) + output.write( ';\n\n' ) + +def writeRoot(output): + '''Write static members of CxxTest classes''' + output.write( '#include \n' ) + +def writeInitialize(output): + '''Write CxxTest::initialize(), which replaces static initialization''' + output.write( 'namespace CxxTest {\n' ) + output.write( ' void initialize()\n' ) + output.write( ' {\n' ) + for suite in suites: + output.write( ' %s.initialize();\n' % suite['tlist'] ) + if isDynamic(suite): + output.write( ' %s = 0;\n' % suite['object'] ) + output.write( ' %s.initialize( %s, %s, "%s", %s, %s, %s, %s );\n' % + (suite['dobject'], suite['cfile'], suite['line'], suite['name'], + suite['tlist'], suite['object'], suite['create'], suite['destroy']) ) + else: + output.write( ' %s.initialize( %s, %s, "%s", %s, %s );\n' % + (suite['dobject'], suite['cfile'], suite['line'], suite['name'], + suite['object'], suite['tlist']) ) + + for test in suite['tests']: + output.write( ' %s.initialize( %s, %s, %s, "%s" );\n' % + (test['object'], suite['tlist'], suite['dobject'], test['line'], test['name']) ) + + output.write( ' }\n' ) + output.write( '}\n' ) + diff --git a/tools/cxxtest/python/python3/scripts/cxxtestgen b/tools/cxxtest/python/python3/scripts/cxxtestgen new file mode 100644 index 0000000..74090ec --- /dev/null +++ b/tools/cxxtest/python/python3/scripts/cxxtestgen @@ -0,0 +1,5 @@ +#! python + +import cxxtest.cxxtestgen + +cxxtest.cxxtestgen.main() diff --git a/tools/cxxtest/python/scripts/cxxtestgen b/tools/cxxtest/python/scripts/cxxtestgen new file mode 100644 index 0000000..74090ec --- /dev/null +++ b/tools/cxxtest/python/scripts/cxxtestgen @@ -0,0 +1,5 @@ +#! python + +import cxxtest.cxxtestgen + +cxxtest.cxxtestgen.main() diff --git a/tools/cxxtest/python/setup.py b/tools/cxxtest/python/setup.py new file mode 100644 index 0000000..cb923f7 --- /dev/null +++ b/tools/cxxtest/python/setup.py @@ -0,0 +1,53 @@ +""" +Script to generate the installer for cxxtest. +""" + +classifiers = """\ +Development Status :: 4 - Beta +Intended Audience :: End Users/Desktop +License :: OSI Approved :: LGPL License +Natural Language :: English +Operating System :: Microsoft :: Windows +Operating System :: Unix +Programming Language :: Python +Topic :: Software Development :: Libraries :: Python Modules +""" + +import os +import sys +from os.path import realpath, dirname +if sys.version_info >= (3,0): + sys.path.insert(0, dirname(realpath(__file__))+os.sep+'python3') + os.chdir('python3') + +import cxxtest + +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + +doclines = cxxtest.__doc__.split("\n") + +setup(name="cxxtest", + version=cxxtest.__version__, + maintainer=cxxtest.__maintainer__, + maintainer_email=cxxtest.__maintainer_email__, + url = cxxtest.__url__, + license = cxxtest.__license__, + platforms = ["any"], + description = doclines[0], + classifiers = filter(None, classifiers.split("\n")), + long_description = "\n".join(doclines[2:]), + packages=['cxxtest'], + keywords=['utility'], + scripts=['scripts/cxxtestgen'] + # + # The entry_points option is not supported by distutils.core + # + #entry_points=""" + #[console_scripts] + #cxxtestgen = cxxtest.cxxtestgen:main + #""" + ) + diff --git a/tools/cxxtest/sample/.cvsignore b/tools/cxxtest/sample/.cvsignore new file mode 100644 index 0000000..087c5dc --- /dev/null +++ b/tools/cxxtest/sample/.cvsignore @@ -0,0 +1,5 @@ +.consign +Makefile +*_runner* +tests.cpp error_printer.cpp stdio_printer.cpp file_printer.cpp aborter.cpp only.cpp +error_printer stdio_printer file_printer aborter only diff --git a/tools/cxxtest/sample/Construct b/tools/cxxtest/sample/Construct new file mode 100644 index 0000000..6090225 --- /dev/null +++ b/tools/cxxtest/sample/Construct @@ -0,0 +1,64 @@ +# -*- Perl -*- + +# +# This file shows how to use CxxTest with Cons +# + +$env = new cons( CXX => ("$^O" eq 'MSWin32') ? 'cl -nologo -GX' : 'c++', + CPPPATH => '..', + CXXTESTGEN => '../bin/cxxtestgen' ); + +@tests = <*.h>; + +# The error printer is the most basic runner +CxxTestErrorPrinter $env 'error_printer', @tests; + +# You can also specify which runner you want to use +CxxTestRunner $env 'stdio_printer', 'StdioPrinter', @tests; + +# For more control, use template files +CxxTestTemplate $env 'file_printer', 'file_printer.tpl', @tests; + +# Or, you can always separate the tests from the runner +CxxTest $env 'tests.cpp', '', @tests; +Program $env 'yes_no_runner', ('yes_no_runner.cpp', 'tests.cpp'); + + +# +# Here is the code used to build these files +# You can use this in your own Construct files +# + +# cons::CxxTest $env $dst, $options, @srcs +# Generates a CxxTest source file, passing the specified options to cxxtestgen +sub cons::CxxTest($$$@) { + my ($env, $dst, $options, @srcs) = @_; + Command $env $dst, @srcs, "%CXXTESTGEN -o %> ${options} %<"; +} + +# cons::CxxTestTemplate $env $dst, $template, @srcs +# Generates and builds a CxxTest runner using a template file +sub cons::CxxTestTemplate($$$@) { + my ($env, $dst, $template, @srcs) = @_; + my $source = "${dst}.cpp"; + CxxTest $env $source, "--template=${template}", ($template, @srcs); + Program $env $dst, $source; +} + +# cons::CxxTestRunner $env $dst, $runner, @srcs +# Generates and builds a CxxTest runner using the --runner option +sub cons::CxxTestRunner($$$@) { + my ($env, $dst, $runner, @srcs) = @_; + my $source = "${dst}.cpp"; + CxxTest $env $source, "--runner=${runner}", @srcs; + Program $env $dst, $source; +} + +# cons::CxxTestErrorPrinter $env $dst, @srcs +# Generates and builds a CxxTest ErrorPrinter +sub cons::CxxTestErrorPrinter($$@) { + my ($env, $dst, @srcs) = @_; + CxxTestRunner $env $dst, 'ErrorPrinter', @srcs; +} + + diff --git a/tools/cxxtest/sample/CreatedTest.h b/tools/cxxtest/sample/CreatedTest.h new file mode 100644 index 0000000..84e8ae8 --- /dev/null +++ b/tools/cxxtest/sample/CreatedTest.h @@ -0,0 +1,31 @@ +#ifndef __CREATEDTEST_H +#define __CREATEDTEST_H + +#include +#include +#include + +// +// This test suite shows what to do when your test case +// class cannot be instantiated statically. +// As an example, this test suite requires a non-default constructor. +// + +class CreatedTest : public CxxTest::TestSuite +{ + char *_buffer; +public: + CreatedTest( unsigned size ) : _buffer( new char[size] ) {} + virtual ~CreatedTest() { delete [] _buffer; } + + static CreatedTest *createSuite() { return new CreatedTest( 16 ); } + static void destroySuite( CreatedTest *suite ) { delete suite; } + + void test_nothing() + { + TS_FAIL( "Nothing to test" ); + } +}; + + +#endif // __CREATEDTEST_H diff --git a/tools/cxxtest/sample/DeltaTest.h b/tools/cxxtest/sample/DeltaTest.h new file mode 100644 index 0000000..7223c3a --- /dev/null +++ b/tools/cxxtest/sample/DeltaTest.h @@ -0,0 +1,27 @@ +#ifndef __DELTATEST_H +#define __DELTATEST_H + +#include +#include + +class DeltaTest : public CxxTest::TestSuite +{ + double _pi, _delta; + +public: + void setUp() + { + _pi = 3.1415926535; + _delta = 0.0001; + } + + void testSine() + { + TS_ASSERT_DELTA( sin(0.0), 0.0, _delta ); + TS_ASSERT_DELTA( sin(_pi / 6), 0.5, _delta ); + TS_ASSERT_DELTA( sin(_pi / 2), 1.0, _delta ); + TS_ASSERT_DELTA( sin(_pi), 0.0, _delta ); + } +}; + +#endif // __DELTATEST_H diff --git a/tools/cxxtest/sample/EnumTraits.h b/tools/cxxtest/sample/EnumTraits.h new file mode 100644 index 0000000..1a98731 --- /dev/null +++ b/tools/cxxtest/sample/EnumTraits.h @@ -0,0 +1,39 @@ +// +// This is a test of CxxTest's ValueTraits for enumerations. +// +#include + +// +// First define your enumeration +// +enum Answer { + Yes, + No, + Maybe, + DontKnow, + DontCare +}; + +// +// Now make CxxTest aware of it +// +CXXTEST_ENUM_TRAITS( Answer, + CXXTEST_ENUM_MEMBER( Yes ) + CXXTEST_ENUM_MEMBER( No ) + CXXTEST_ENUM_MEMBER( Maybe ) + CXXTEST_ENUM_MEMBER( DontKnow ) + CXXTEST_ENUM_MEMBER( DontCare ) ); + +class EnumTraits : public CxxTest::TestSuite +{ +public: + void test_Enum_traits() + { + TS_FAIL( Yes ); + TS_FAIL( No ); + TS_FAIL( Maybe ); + TS_FAIL( DontKnow ); + TS_FAIL( DontCare ); + TS_FAIL( (Answer)1000 ); + } +}; diff --git a/tools/cxxtest/sample/ExceptionTest.h b/tools/cxxtest/sample/ExceptionTest.h new file mode 100644 index 0000000..68363c8 --- /dev/null +++ b/tools/cxxtest/sample/ExceptionTest.h @@ -0,0 +1,52 @@ +#ifndef __EXCEPTIONTEST_H +#define __EXCEPTIONTEST_H + +#include + +// +// This test suite demonstrates the use of TS_ASSERT_THROWS +// + +class ExceptionTest : public CxxTest::TestSuite +{ +public: + void testAssertion( void ) + { + // This assert passes, since throwThis() throws (Number) + TS_ASSERT_THROWS( throwThis(3), const Number & ); + // This assert passes, since throwThis() throws something + TS_ASSERT_THROWS_ANYTHING( throwThis(-30) ); + // This assert fails, since throwThis() doesn't throw char * + TS_ASSERT_THROWS( throwThis(5), const char * ); + // This assert fails since goodFunction() throws nothing + TS_ASSERT_THROWS_ANYTHING( goodFunction(1) ); + // The regular TS_ASSERT macros will catch unhandled exceptions + TS_ASSERT_EQUALS( throwThis(3), 333 ); + // You can assert that a function throws nothing + TS_ASSERT_THROWS_NOTHING( throwThis(-1) ); + // If you want to catch the exceptions yourself, use the ETS_ marcos + try { + ETS_ASSERT_EQUALS( throwThis(3), 333 ); + } catch( const Number & ) { + TS_FAIL( "throwThis(3) failed" ); + } + } + +private: + void goodFunction( int ) + { + } + + class Number + { + public: + Number( int ) {} + }; + + int throwThis( int i ) + { + throw Number( i ); + } +}; + +#endif // __EXCEPTIONTEST_H diff --git a/tools/cxxtest/sample/FixtureTest.h b/tools/cxxtest/sample/FixtureTest.h new file mode 100644 index 0000000..653c7a1 --- /dev/null +++ b/tools/cxxtest/sample/FixtureTest.h @@ -0,0 +1,37 @@ +#ifndef __FIXTURETEST_H +#define __FIXTURETEST_H + +#include +#include + +// +// This test suite shows how to use setUp() and tearDown() +// to initialize data common to all tests. +// setUp()/tearDown() will be called before and after each +// test. +// + +class FixtureTest : public CxxTest::TestSuite +{ + char *_buffer; +public: + void setUp() + { + _buffer = new char[1024]; + } + + void tearDown() + { + delete [] _buffer; + } + + void test_strcpy() + { + strcpy( _buffer, "Hello, world!" ); + TS_ASSERT_EQUALS( _buffer[0], 'H' ); + TS_ASSERT_EQUALS( _buffer[1], 'E' ); + } +}; + + +#endif // __FIXTURETEST_H diff --git a/tools/cxxtest/sample/Makefile.PL b/tools/cxxtest/sample/Makefile.PL new file mode 100644 index 0000000..d29afcc --- /dev/null +++ b/tools/cxxtest/sample/Makefile.PL @@ -0,0 +1,32 @@ +#!/usr/bin/perl +# +# This isn't a "real" `Makefile.PL' +# It just copies the correct `Makefile.*' to `Makefile' +# +use strict; +use Getopt::Long; +use File::Copy; + +sub usage() { + die "Usage: $0 [--bcc32]\n"; +} + +my $source; +my $target = 'Makefile'; +my $windows = $ENV{'windir'}; + +GetOptions( 'bcc32' => sub { $source = 'Makefile.bcc32' } ) or usage(); +if ( !defined( $source ) ) { + $source = $windows ? 'Makefile.msvc' : 'Makefile.unix'; +} + +unlink($target); +$windows ? copy($source, $target) : symlink($source, $target); + +print "`Makefile' is now `$source'.\n"; + +# +# Local Variables: +# compile-command: "perl Makefile.PL" +# End: +# diff --git a/tools/cxxtest/sample/Makefile.bcc32 b/tools/cxxtest/sample/Makefile.bcc32 new file mode 100644 index 0000000..3bd5303 --- /dev/null +++ b/tools/cxxtest/sample/Makefile.bcc32 @@ -0,0 +1,94 @@ +# +# Makefile for Borland C++ +# Make sure bcc32.exe is in the PATH or change CXXC below +# + +# For the Win32 GUI +#WIN32_FLAGS = user32.lib comctl32.lib + +# For the Qt GUI +#QTDIR = c:\qt +QT_FLAGS = -I$(QTDIR)/include $(QTDIR)/lib/qt.lib + + +TARGETS = error_printer.exe stdio_printer.exe yes_no_runner.exe file_printer.exe aborter.exe only.exe +GUI_TARGETS = win32_runner.exe qt_runner.exe +TESTS = *.h +GUI_TESTS = gui/GreenYellowRed.h $(TESTS) +TESTGEN = ../bin/cxxtestgen +CXXC = bcc32.exe -w- -I. -I.. + +all: $(TARGETS) + +clean: + del *~ *.o *.obj + del $(TARGETS) + del $(GUI_TARGETS) + del tests.cpp error_printer.cpp stdio_printer.cpp file_printer.cpp aborter.cpp only.cpp + del win32_runner.cpp qt_runner.cpp + +distclean: clean + del Makefile + +run: error_printer.exe + error_printer.exe + +run_win32: win32_runner.exe + win32_runner.exe + +run_qt: qt_runner.exe + qt_runner.exe + +error_printer.cpp: $(TESTS) + $(TESTGEN) -o error_printer.cpp --error-printer $(TESTS) + +stdio_printer.cpp: $(TESTS) + $(TESTGEN) -o stdio_printer.cpp --runner=StdioPrinter $(TESTS) + +file_printer.cpp: file_printer.tpl $(TESTS) + $(TESTGEN) -o file_printer.cpp --template=file_printer.tpl $(TESTS) + +aborter.cpp: aborter.tpl $(TESTS) + $(TESTGEN) -o aborter.cpp --template=aborter.tpl $(TESTS) + +only.cpp: only.tpl $(TESTS) + $(TESTGEN) -o only.cpp --template=only.tpl $(TESTS) + +tests.cpp: $(TESTS) + $(TESTGEN) -o tests.cpp $(TESTS) + +win32_runner.cpp: $(GUI_TESTS) + $(TESTGEN) -o win32_runner.cpp --gui=Win32Gui $(GUI_TESTS) + +qt_runner.cpp: $(GUI_TESTS) + $(TESTGEN) -o qt_runner.cpp --gui=QtGui $(GUI_TESTS) + +error_printer.exe: error_printer.cpp + $(CXXC) -eerror_printer.exe error_printer.cpp + +stdio_printer.exe: stdio_printer.cpp + $(CXXC) -estdio_printer.exe stdio_printer.cpp + +file_printer.exe: file_printer.cpp + $(CXXC) -efile_printer.exe file_printer.cpp + +only.exe: only.cpp + $(CXXC) -eonly.exe only.cpp + +aborter.exe: aborter.cpp + $(CXXC) -eaborter.exe aborter.cpp + +yes_no_runner.exe: yes_no_runner.cpp tests.cpp + $(CXXC) -eyes_no_runner.exe yes_no_runner.cpp tests.cpp + +win32_runner.exe: win32_runner.cpp + $(CXXC) -ewin32_runner.exe win32_runner.cpp $(WIN32_FLAGS) + +qt_runner.exe: qt_runner.cpp + $(CXXC) -o qt_runner.exe qt_runner.cpp $(QT_FLAGS) + +# +# Local Variables: +# compile-command: "make -fMakefile.bcc32" +# End: +# diff --git a/tools/cxxtest/sample/Makefile.msvc b/tools/cxxtest/sample/Makefile.msvc new file mode 100644 index 0000000..2374f80 --- /dev/null +++ b/tools/cxxtest/sample/Makefile.msvc @@ -0,0 +1,93 @@ +# +# Makefile for Microsoft Visual C++ +# Make sure cl.exe is in the PATH (run vcvars.bat) or change CXXC below +# + +# For the Win32 GUI +WIN32_FLAGS = user32.lib + +# For the Qt GUI +# QTDIR = c:\qt +QT_FLAGS = -I$(QTDIR)/include $(QTDIR)/lib/qt.lib + +TARGETS = error_printer.exe stdio_printer.exe yes_no_runner.exe file_printer.exe aborter.exe only.exe +GUI_TARGETS = win32_runner.exe qt_runner.exe +TESTS = *.h +GUI_TESTS = gui/GreenYellowRed.h $(TESTS) +TESTGEN = python ../bin/cxxtestgen +CXXC = cl.exe -GX -W3 -WX -I. -I.. + +all: $(TARGETS) + +clean: + del *~ *.o *.obj + del $(TARGETS) + del $(GUI_TARGETS) + del tests.cpp error_printer.cpp stdio_printer.cpp file_printer.cpp aborter.cpp only.cpp + del win32_runner.cpp qt_runner.cpp + +distclean: clean + del Makefile + +run: error_printer.exe + error_printer.exe + +run_win32: win32_runner.exe + win32_runner.exe + +run_qt: qt_runner.exe + qt_runner.exe + +error_printer.cpp: $(TESTS) + $(TESTGEN) -o error_printer.cpp --error-printer $(TESTS) + +stdio_printer.cpp: $(TESTS) + $(TESTGEN) -o stdio_printer.cpp --runner=StdioPrinter $(TESTS) + +file_printer.cpp: file_printer.tpl $(TESTS) + $(TESTGEN) -o file_printer.cpp --template=file_printer.tpl $(TESTS) + +aborter.cpp: aborter.tpl $(TESTS) + $(TESTGEN) -o aborter.cpp --template=aborter.tpl $(TESTS) + +only.cpp: only.tpl $(TESTS) + $(TESTGEN) -o only.cpp --template=only.tpl $(TESTS) + +tests.cpp: $(TESTS) + $(TESTGEN) -o tests.cpp $(TESTS) + +win32_runner.cpp: $(GUI_TESTS) + $(TESTGEN) -o win32_runner.cpp --gui=Win32Gui $(GUI_TESTS) + +qt_runner.cpp: $(GUI_TESTS) + $(TESTGEN) -o qt_runner.cpp --gui=QtGui $(GUI_TESTS) + +error_printer.exe: error_printer.cpp + $(CXXC) -o error_printer.exe error_printer.cpp + +stdio_printer.exe: stdio_printer.cpp + $(CXXC) -o stdio_printer.exe stdio_printer.cpp + +file_printer.exe: file_printer.cpp + $(CXXC) -o file_printer.exe file_printer.cpp + +only.exe: only.cpp + $(CXXC) -o only.exe only.cpp + +aborter.exe: aborter.cpp + $(CXXC) -o aborter.exe aborter.cpp + +yes_no_runner.exe: yes_no_runner.cpp tests.cpp + $(CXXC) -o yes_no_runner.exe yes_no_runner.cpp tests.cpp + +win32_runner.exe: win32_runner.cpp + $(CXXC) -o win32_runner.exe win32_runner.cpp $(WIN32_FLAGS) + +qt_runner.exe: qt_runner.cpp + $(CXXC) -o qt_runner.exe qt_runner.cpp $(QT_FLAGS) + +# +# Local Variables: +# compile-command: "nmake -fMakefile.msvc" +# End: +# diff --git a/tools/cxxtest/sample/Makefile.unix b/tools/cxxtest/sample/Makefile.unix new file mode 100644 index 0000000..ad87b3b --- /dev/null +++ b/tools/cxxtest/sample/Makefile.unix @@ -0,0 +1,83 @@ +# +# Makefile for UN*X-like systems +# + +# Change this line if you want a different compiler +CXXC = c++ -Wall -W -Werror -I. -I.. + +TESTGEN = ../bin/cxxtestgen + +# For the X11 GUI +X11_FLAGS = -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 + +# For the Qt GUI +#QTDIR = /usr/lib/qt +QTLIB = -lqt-mt +#QTLIB = -lqt +QT_FLAGS = -I$(QTDIR)/include -L$(QTDIR)/lib $(QTLIB) -O2 + +TARGETS = error_printer stdio_printer yes_no_runner file_printer aborter only +GUI_TARGETS = x11_runner qt_runner +TESTS = *.h +GUI_TESTS = gui/GreenYellowRed.h $(TESTS) + +all: $(TARGETS) + +clean: + rm -f *~ *.o *.obj $(TARGETS) $(GUI_TARGETS) + rm -f tests.cpp error_printer.cpp stdio_printer.cpp file_printer.cpp aborter.cpp only.cpp + rm -f x11_runner.cpp qt_runner.cpp + +distclean: clean + rm -f Makefile + +run: error_printer + ./error_printer + +run_x11: x11_runner + ./x11_runner + +run_qt: qt_runner + ./qt_runner + +error_printer.cpp: $(TESTS) + $(TESTGEN) -o $@ --error-printer $(TESTS) + +stdio_printer.cpp: $(TESTS) + $(TESTGEN) -o $@ --runner=StdioPrinter $(TESTS) + +file_printer.cpp: file_printer.tpl $(TESTS) + $(TESTGEN) -o $@ --template=file_printer.tpl $(TESTS) + +aborter.cpp: aborter.tpl $(TESTS) + $(TESTGEN) -o $@ --template=aborter.tpl $(TESTS) + +only.cpp: only.tpl $(TESTS) + $(TESTGEN) -o $@ --template=only.tpl $(TESTS) + +tests.cpp: $(TESTS) + $(TESTGEN) -o $@ $(TESTS) + +x11_runner.cpp: $(GUI_TESTS) + $(TESTGEN) -o $@ --gui=X11Gui $(GUI_TESTS) + +qt_runner.cpp: $(GUI_TESTS) + $(TESTGEN) -o $@ --gui=QtGui $(GUI_TESTS) + +%: %.cpp + $(CXXC) -o $@ $< + +yes_no_runner: yes_no_runner.cpp tests.cpp + $(CXXC) -o $@ $^ + +x11_runner: x11_runner.cpp + $(CXXC) -o $@ $^ $(X11_FLAGS) + +qt_runner: qt_runner.cpp + $(CXXC) -o $@ $^ $(QT_FLAGS) + +# +# Local Variables: +# compile-command: "make -fMakefile.unix" +# End: +# diff --git a/tools/cxxtest/sample/MessageTest.h b/tools/cxxtest/sample/MessageTest.h new file mode 100644 index 0000000..621289f --- /dev/null +++ b/tools/cxxtest/sample/MessageTest.h @@ -0,0 +1,30 @@ +#ifndef __MESSAGETEST_H +#define __MESSAGETEST_H + +#include + +// +// The [E]TSM_ macros can be used to print a specified message +// instead of the default one. +// This is useful when you refactor your tests, as shown below +// + +class MessageTest : public CxxTest::TestSuite +{ +public: + void testValues() + { + checkValue( 0, "My hovercraft" ); + checkValue( 1, "is full" ); + checkValue( 2, "of eels" ); + } + + void checkValue( unsigned value, const char *message ) + { + TSM_ASSERT( message, value != 0 ); + TSM_ASSERT_EQUALS( message, value, value * value ); + } +}; + + +#endif // __MESSAGETEST_H diff --git a/tools/cxxtest/sample/SCons/SConstruct b/tools/cxxtest/sample/SCons/SConstruct new file mode 100644 index 0000000..cb39408 --- /dev/null +++ b/tools/cxxtest/sample/SCons/SConstruct @@ -0,0 +1,40 @@ + +cxxtestbuilder_path = '../../build_tools/SCons/cxxtest.py' +cxxtest_path = '../..' + +# First a bit of python magic to make the CxxTestBuilder available +# without having to copy it into a particular path. +# for nicer examples you *should* use, see the cxxtest builder tests in the +# build_tools/SCons/test directory. +import imp +cxxtest = imp.load_source('cxxtest', cxxtestbuilder_path) + +# First build the 'real' library, when working on an embedded system +# this may involve a cross compiler. +env = Environment() +env.BuildDir('build/embedded_platform', 'src') +env.Append(CPPPATH=['include']) +libtested = env.StaticLibrary('build/embedded_platform/tested', + env.Glob('build/embedded_platform/*.c')) + +# Now create a seperate build environment for the tests so we can keep any +# options that are specific to testing seperate from the 'production' build +# environment. For simplicity I am just copying the production environment. +# If we are cross compiling for the "real" library, then this +# environement might be using the normal compiler. +env_test = env.Clone() + +# Add the CxxTestBuilder to our testing build environment. +cxxtest.generate(env_test, CXXTEST_INSTALL_DIR = cxxtest_path) + +# If we were working with an embedded platform we may want to create a +# seperate version of our library that runs on our development box in +# order to do our initial unit testing. This version may also include +# any special preprocessor defines needed for testing e.g. -DTESTING +env_test.BuildDir('build/dev_platform', 'src') +env_test.BuildDir('build/tests', 'tests') +lib_to_test = env_test.StaticLibrary('build/dev_platform/tested', + env.Glob('build/dev_platform/*.c')) +env_test.Append(LIBS=lib_to_test) +env_test.CxxTest(env_test.Glob('tests/*.h')) + diff --git a/tools/cxxtest/sample/SCons/include/stack.h b/tools/cxxtest/sample/SCons/include/stack.h new file mode 100644 index 0000000..e73420b --- /dev/null +++ b/tools/cxxtest/sample/SCons/include/stack.h @@ -0,0 +1,27 @@ +#ifndef STACK_H +#define STACK_H + +#ifdef __cplusplus + extern "C" { +#endif + + typedef struct stack_t { + int size; + int* vals; + int capacity; + } stack_t; + + stack_t* stack_create(); + void stack_free(stack_t* stack); + int stack_size(stack_t* stack); + void stack_push(stack_t* stack, int val); + int stack_pop(stack_t* stack); + int stack_peak(stack_t* stack); + int stack_capacity(stack_t* stack); + +#ifdef __cplusplus + } +#endif + + +#endif diff --git a/tools/cxxtest/sample/SCons/src/stack.c b/tools/cxxtest/sample/SCons/src/stack.c new file mode 100644 index 0000000..960f8cf --- /dev/null +++ b/tools/cxxtest/sample/SCons/src/stack.c @@ -0,0 +1,48 @@ +#include + +#include + +stack_t* stack_create() { + stack_t* retVal = malloc(sizeof(stack_t)); + retVal->size = 0; + retVal->capacity = 10; + retVal->vals = malloc(retVal->capacity*sizeof(int)); + return retVal; +} + +void stack_free(stack_t* stack) { + free(stack->vals); + free(stack); +} + +int stack_size(stack_t* stack) { + return stack->size; +} + +void stack_push(stack_t* stack, int val) { + if(stack->size == stack->capacity) { + stack->capacity *= 2; + stack->vals = realloc(stack->vals, stack->capacity*sizeof(int)); + } + stack->vals[stack->size++] = val; +} + +int stack_pop(stack_t* stack) { + if (stack->size >= 1) + return stack->vals[--stack->size]; + else + return 0; +} + +int stack_peak(stack_t* stack) { + if (stack->size >= 1) + return stack->vals[stack->size-1]; + else + return 0; +} + +int stack_capacity(stack_t* stack) { + return stack->capacity; +} + + diff --git a/tools/cxxtest/sample/SCons/tests/stack_test.h b/tools/cxxtest/sample/SCons/tests/stack_test.h new file mode 100644 index 0000000..24fd6b5 --- /dev/null +++ b/tools/cxxtest/sample/SCons/tests/stack_test.h @@ -0,0 +1,71 @@ +#ifndef STACK_TEST_H +#define STACK_TEST_H + +#include +#include + +class stack_test : public CxxTest::TestSuite +{ + + private: + stack_t* stack; + public: + + void setUp() { + stack = stack_create(); + } + + void tearDown() { + stack_free(stack); + } + + void test_create_stack() { + TS_ASSERT_DIFFERS((stack_t*)0, stack); + } + + void test_new_stack_is_empty() { + TS_ASSERT_EQUALS(0, stack_size(stack)); + } + + void test_one_push_add_one_to_size() { + stack_push(stack, 1); + TS_ASSERT_EQUALS(1, stack_size(stack)); + } + + void test_push_pop_doesnt_change_size() { + stack_push(stack, 1); + (void)stack_pop(stack); + TS_ASSERT_EQUALS(0, stack_size(stack)); + } + + void test_peak_after_push() { + stack_push(stack, 1); + TS_ASSERT_EQUALS(1, stack_peak(stack)) + } + + void test_initial_capacity_is_positive() { + TS_ASSERT(stack_capacity(stack) > 0); + } + + void test_pop_on_empty() { + TS_ASSERT_EQUALS(0, stack_pop(stack)); + TS_ASSERT_EQUALS(0, stack_size(stack)); + } + + void test_peak_on_empty() { + TS_ASSERT_EQUALS(0, stack_peak(stack)); + } + + void test_capacity_gte_size() { + TS_ASSERT_LESS_THAN_EQUALS(stack_size(stack), stack_capacity(stack)); + int init_capacity = stack_capacity(stack); + for (int i=0; i < init_capacity + 1; i++) { + stack_push(stack, i); + } + TS_ASSERT_LESS_THAN_EQUALS(stack_size(stack), stack_capacity(stack)); + } + +}; + +#endif // STACK_TEST_H + diff --git a/tools/cxxtest/sample/SimpleTest.h b/tools/cxxtest/sample/SimpleTest.h new file mode 100644 index 0000000..b3fae12 --- /dev/null +++ b/tools/cxxtest/sample/SimpleTest.h @@ -0,0 +1,59 @@ +#ifndef __SIMPLETEST_H +#define __SIMPLETEST_H + +#include + +// +// A simple test suite: Just inherit CxxTest::TestSuite and write tests! +// + +class SimpleTest : public CxxTest::TestSuite +{ +public: + void testEquality() + { + TS_ASSERT_EQUALS( 1, 1 ); + TS_ASSERT_EQUALS( 1, 2 ); + TS_ASSERT_EQUALS( 'a', 'A' ); + TS_ASSERT_EQUALS( 1.0, -12345678900000000000000000000000000000000000000000.1234 ); + } + + void testAddition() + { + TS_ASSERT_EQUALS( 1 + 1, 2 ); + TS_ASSERT_EQUALS( 2 + 2, 5 ); + } + + void TestMultiplication() + { + TS_ASSERT_EQUALS( 2 * 2, 4 ); + TS_ASSERT_EQUALS( 4 * 4, 44 ); + TS_ASSERT_DIFFERS( -2 * -2, 4 ); + } + + void testComparison() + { + TS_ASSERT_LESS_THAN( (int)1, (unsigned long)2 ); + TS_ASSERT_LESS_THAN( -1, -2 ); + } + + void testTheWorldIsCrazy() + { + TS_ASSERT_EQUALS( true, false ); + } + + void test_Failure() + { + TS_FAIL( "Not implemented" ); + TS_FAIL( 1569779912 ); + } + + void test_TS_WARN_macro() + { + TS_WARN( "Just a friendly warning" ); + TS_WARN( "Warnings don't abort the test" ); + } +}; + + +#endif // __SIMPLETEST_H diff --git a/tools/cxxtest/sample/TraitsTest.h b/tools/cxxtest/sample/TraitsTest.h new file mode 100644 index 0000000..1465938 --- /dev/null +++ b/tools/cxxtest/sample/TraitsTest.h @@ -0,0 +1,69 @@ +#ifndef __TRAITSTEST_H +#define __TRAITSTEST_H + +// +// This example shows how to use TS_ASSERT_EQUALS for your own classes +// +#include +#include + +// +// Define your class with operator== +// +#include +#include + +class Pet +{ + char _name[128]; +public: + Pet( const char *petName ) { strcpy( _name, petName ); } + + const char *name() const { return _name; } + + bool operator== ( const Pet &other ) const + { + return !strcmp( name(), other.name() ); + } +}; + +// +// Instantiate CxxTest::ValueTraits<*your class*> +// Note: Most compilers do not require that you define both +// ValueTraits and ValueTraits, but some do. +// +namespace CxxTest +{ + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits + { + char _asString[256]; + + public: + ValueTraits( const Pet &pet ) { sprintf( _asString, "Pet(\"%s\")", pet.name() ); } + const char *asString() const { return _asString; } + }; + + CXXTEST_COPY_CONST_TRAITS( Pet ); +} + +// +// Here's how it works +// +class TestFunky : public CxxTest::TestSuite +{ +public: + void testPets() + { + Pet pet1("dog"), pet2("cat"); + TS_ASSERT_EQUALS( pet1, pet2 ); + Pet cat("cat"), gato("cat"); + TS_ASSERT_DIFFERS( cat, gato ); +#ifdef _CXXTEST_HAVE_STD + typedef CXXTEST_STD(string) String; + TS_ASSERT_EQUALS( String("Hello"), String("World!") ); +#endif // _CXXTEST_HAVE_STD + } +}; + +#endif // __TRAITSTEST_H diff --git a/tools/cxxtest/sample/aborter.tpl b/tools/cxxtest/sample/aborter.tpl new file mode 100644 index 0000000..14fc50d --- /dev/null +++ b/tools/cxxtest/sample/aborter.tpl @@ -0,0 +1,16 @@ +// -*- C++ -*- +// This template file demonstrates the use of CXXTEST_ABORT_TEST_ON_FAIL +// + +#define CXXTEST_HAVE_STD +#define CXXTEST_ABORT_TEST_ON_FAIL +#include + +int main() +{ + return CxxTest::ErrorPrinter().run(); +} + +// The CxxTest "world" + + diff --git a/tools/cxxtest/sample/file_printer.tpl b/tools/cxxtest/sample/file_printer.tpl new file mode 100644 index 0000000..a9627d6 --- /dev/null +++ b/tools/cxxtest/sample/file_printer.tpl @@ -0,0 +1,22 @@ +// -*- C++ -*- +// This is a sample of a custom test runner +// using CxxTest template files. +// This prints the output to a file given on the command line. +// + +#include +#include + +int main( int argc, char *argv[] ) +{ + if ( argc != 2 ) { + fprintf( stderr, "Usage: %s \n", argv[0] ); + return -1; + } + + return CxxTest::StdioPrinter( fopen( argv[1], "w" ) ).run(); +} + +// The CxxTest "world" + + diff --git a/tools/cxxtest/sample/gui/GreenYellowRed.h b/tools/cxxtest/sample/gui/GreenYellowRed.h new file mode 100644 index 0000000..446b233 --- /dev/null +++ b/tools/cxxtest/sample/gui/GreenYellowRed.h @@ -0,0 +1,57 @@ +#include + +#ifdef _WIN32 +# include +# define CXXTEST_SAMPLE_GUI_WAIT() Sleep( 1000 ) +#else // !_WIN32 + extern "C" unsigned sleep( unsigned seconds ); +# define CXXTEST_SAMPLE_GUI_WAIT() sleep( 1 ) +#endif // _WIN32 + +class GreenYellowRed : public CxxTest::TestSuite +{ +public: + void wait() + { + CXXTEST_SAMPLE_GUI_WAIT(); + } + + void test_Start_green() + { + wait(); + } + + void test_Green_again() + { + TS_TRACE( "Still green" ); + wait(); + } + + void test_Now_yellow() + { + TS_WARN( "Yellow" ); + wait(); + } + + void test_Cannot_go_back() + { + wait(); + } + + void test_Finally_red() + { + TS_FAIL( "Red" ); + wait(); + } + + void test_Cannot_go_back_to_yellow() + { + TS_WARN( "Yellow?" ); + wait(); + } + + void test_Cannot_go_back_to_green() + { + wait(); + } +}; diff --git a/tools/cxxtest/sample/mock/Dice.cpp b/tools/cxxtest/sample/mock/Dice.cpp new file mode 100644 index 0000000..161b80f --- /dev/null +++ b/tools/cxxtest/sample/mock/Dice.cpp @@ -0,0 +1,14 @@ +#include +#include "Dice.h" + +Dice::Dice() +{ + T::srand( T::time( 0 ) ); +} + +unsigned Dice::roll() +{ + return (T::rand() % 6) + 1; +} + + diff --git a/tools/cxxtest/sample/mock/Dice.h b/tools/cxxtest/sample/mock/Dice.h new file mode 100644 index 0000000..9427141 --- /dev/null +++ b/tools/cxxtest/sample/mock/Dice.h @@ -0,0 +1,13 @@ +#ifndef __DICE_H +#define __DICE_H + +class Dice +{ +public: + Dice(); + + unsigned roll(); +}; + +#endif // __DICE_H + diff --git a/tools/cxxtest/sample/mock/Makefile b/tools/cxxtest/sample/mock/Makefile new file mode 100644 index 0000000..4f40ad2 --- /dev/null +++ b/tools/cxxtest/sample/mock/Makefile @@ -0,0 +1,22 @@ +all: roll run + +clean: + rm -f *~ *.o roll test test.cpp + +CXXTEST = ../.. +CCFLAGS = -I. -I$(CXXTEST) + +roll: roll.o Dice.o real_stdlib.o + g++ -o $@ $^ + +run: test + ./test + +test: test.o Dice.o mock_stdlib.o + g++ -o $@ $^ + +.cpp.o: + g++ -c -o $@ $(CCFLAGS) $< + +test.cpp: TestDice.h + $(CXXTEST)/bin/cxxtestgen -o $@ --error-printer $< diff --git a/tools/cxxtest/sample/mock/MockStdlib.h b/tools/cxxtest/sample/mock/MockStdlib.h new file mode 100644 index 0000000..aee62ba --- /dev/null +++ b/tools/cxxtest/sample/mock/MockStdlib.h @@ -0,0 +1,31 @@ +#include + +class MockStdlib : + public T::Base_srand, + public T::Base_rand, + public T::Base_time +{ +public: + unsigned lastSeed; + + void srand( unsigned seed ) + { + lastSeed = seed; + } + + int nextRand; + + int rand() + { + return nextRand; + } + + time_t nextTime; + + time_t time( time_t *t ) + { + if ( t ) + *t = nextTime; + return nextTime; + } +}; diff --git a/tools/cxxtest/sample/mock/T/stdlib.h b/tools/cxxtest/sample/mock/T/stdlib.h new file mode 100644 index 0000000..30306ba --- /dev/null +++ b/tools/cxxtest/sample/mock/T/stdlib.h @@ -0,0 +1,13 @@ +#ifndef __T__STDLIB_H +#define __T__STDLIB_H + +#include +#include + +#include + +CXXTEST_MOCK_VOID_GLOBAL( srand, ( unsigned seed ), ( seed ) ); +CXXTEST_MOCK_GLOBAL( int, rand, ( void ), () ); +CXXTEST_MOCK_GLOBAL( time_t, time, ( time_t *t ), ( t ) ); + +#endif // __T__STDLIB_H diff --git a/tools/cxxtest/sample/mock/TestDice.h b/tools/cxxtest/sample/mock/TestDice.h new file mode 100644 index 0000000..35b3b7e --- /dev/null +++ b/tools/cxxtest/sample/mock/TestDice.h @@ -0,0 +1,62 @@ +#include +#include "Dice.h" +#include "MockStdlib.h" + +class TestDice : public CxxTest::TestSuite +{ +public: + MockStdlib *stdlib; + + void setUp() + { + TS_ASSERT( stdlib = new MockStdlib ); + } + + void tearDown() + { + delete stdlib; + } + + void test_Randomize_uses_time() + { + stdlib->nextTime = 12345; + Dice dice; + TS_ASSERT_EQUALS( stdlib->lastSeed, 12345 ); + } + + void test_Roll() + { + Dice dice; + + stdlib->nextRand = 0; + TS_ASSERT_EQUALS( dice.roll(), 1 ); + + stdlib->nextRand = 2; + TS_ASSERT_EQUALS( dice.roll(), 3 ); + + stdlib->nextRand = 5; + TS_ASSERT_EQUALS( dice.roll(), 6 ); + + stdlib->nextRand = 7; + TS_ASSERT_EQUALS( dice.roll(), 2 ); + } + + void test_Temporary_override_of_one_mock_function() + { + Dice dice; + + stdlib->nextRand = 2; + TS_ASSERT_EQUALS( dice.roll(), 3 ); + + class Five : public T::Base_rand { int rand() { return 5; } }; + + Five *five = new Five; + TS_ASSERT_EQUALS( dice.roll(), 6 ); + TS_ASSERT_EQUALS( dice.roll(), 6 ); + TS_ASSERT_EQUALS( dice.roll(), 6 ); + delete five; + + stdlib->nextRand = 1; + TS_ASSERT_EQUALS( dice.roll(), 2 ); + } +}; diff --git a/tools/cxxtest/sample/mock/mock_stdlib.cpp b/tools/cxxtest/sample/mock/mock_stdlib.cpp new file mode 100644 index 0000000..148a044 --- /dev/null +++ b/tools/cxxtest/sample/mock/mock_stdlib.cpp @@ -0,0 +1,2 @@ +#define CXXTEST_MOCK_TEST_SOURCE_FILE +#include diff --git a/tools/cxxtest/sample/mock/real_stdlib.cpp b/tools/cxxtest/sample/mock/real_stdlib.cpp new file mode 100644 index 0000000..db02f3a --- /dev/null +++ b/tools/cxxtest/sample/mock/real_stdlib.cpp @@ -0,0 +1,2 @@ +#define CXXTEST_MOCK_REAL_SOURCE_FILE +#include diff --git a/tools/cxxtest/sample/mock/roll.cpp b/tools/cxxtest/sample/mock/roll.cpp new file mode 100644 index 0000000..20ea967 --- /dev/null +++ b/tools/cxxtest/sample/mock/roll.cpp @@ -0,0 +1,11 @@ +#include +#include "Dice.h" + +int main() +{ + Dice dice; + printf( "First roll: %u\n", dice.roll() ); + printf( "Second roll: %u\n", dice.roll() ); + + return 0; +} diff --git a/tools/cxxtest/sample/msvc/CxxTest_1_Run.dsp b/tools/cxxtest/sample/msvc/CxxTest_1_Run.dsp new file mode 100644 index 0000000..6bc00e7 --- /dev/null +++ b/tools/cxxtest/sample/msvc/CxxTest_1_Run.dsp @@ -0,0 +1,93 @@ +# Microsoft Developer Studio Project File - Name="CxxTest_1_Run" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) External Target" 0x0106 + +CFG=CxxTest_1_Run - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CxxTest_1_Run.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CxxTest_1_Run.mak" CFG="CxxTest_1_Run - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CxxTest_1_Run - Win32 Release" (based on "Win32 (x86) External Target") +!MESSAGE "CxxTest_1_Run - Win32 Debug" (based on "Win32 (x86) External Target") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "CxxTest_1_Run - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Cmd_Line "NMAKE /f CxxTest_1_Run.mak" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "CxxTest_1_Run.exe" +# PROP BASE Bsc_Name "CxxTest_1_Run.bsc" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Cmd_Line "nmake DIR=Release run" +# PROP Rebuild_Opt "/a" +# PROP Target_File "Release\run.log" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "CxxTest_1_Run - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Cmd_Line "NMAKE /f CxxTest_1_Run.mak" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "CxxTest_1_Run.exe" +# PROP BASE Bsc_Name "CxxTest_1_Run.bsc" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Cmd_Line "nmake DIR=Debug run" +# PROP Rebuild_Opt "/a" +# PROP Target_File "Debug\run.log" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ENDIF + +# Begin Target + +# Name "CxxTest_1_Run - Win32 Release" +# Name "CxxTest_1_Run - Win32 Debug" + +!IF "$(CFG)" == "CxxTest_1_Run - Win32 Release" + +!ELSEIF "$(CFG)" == "CxxTest_1_Run - Win32 Debug" + +!ENDIF + +# Begin Source File + +SOURCE=.\Makefile +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/tools/cxxtest/sample/msvc/CxxTest_2_Build.dsp b/tools/cxxtest/sample/msvc/CxxTest_2_Build.dsp new file mode 100644 index 0000000..04727fd --- /dev/null +++ b/tools/cxxtest/sample/msvc/CxxTest_2_Build.dsp @@ -0,0 +1,94 @@ +# Microsoft Developer Studio Project File - Name="CxxTest_2_Build" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=CxxTest_2_Build - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CxxTest_2_Build.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CxxTest_2_Build.mak" CFG="CxxTest_2_Build - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CxxTest_2_Build - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "CxxTest_2_Build - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CxxTest_2_Build - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x40d /d "NDEBUG" +# ADD RSC /l 0x40d /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"Release/runner.exe" + +!ELSEIF "$(CFG)" == "CxxTest_2_Build - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40d /d "_DEBUG" +# ADD RSC /l 0x40d /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/runner.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "CxxTest_2_Build - Win32 Release" +# Name "CxxTest_2_Build - Win32 Debug" +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\runner.cpp +# End Source File +# End Target +# End Project diff --git a/tools/cxxtest/sample/msvc/CxxTest_3_Generate.dsp b/tools/cxxtest/sample/msvc/CxxTest_3_Generate.dsp new file mode 100644 index 0000000..5bbad94 --- /dev/null +++ b/tools/cxxtest/sample/msvc/CxxTest_3_Generate.dsp @@ -0,0 +1,93 @@ +# Microsoft Developer Studio Project File - Name="CxxTest_3_Generate" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) External Target" 0x0106 + +CFG=CxxTest_3_Generate - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CxxTest_3_Generate.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CxxTest_3_Generate.mak" CFG="CxxTest_3_Generate - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CxxTest_3_Generate - Win32 Release" (based on "Win32 (x86) External Target") +!MESSAGE "CxxTest_3_Generate - Win32 Debug" (based on "Win32 (x86) External Target") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "CxxTest_3_Generate - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Cmd_Line "NMAKE /f CxxTest_3_Generate.mak" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "CxxTest_3_Generate.exe" +# PROP BASE Bsc_Name "CxxTest_3_Generate.bsc" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Cmd_Line "nmake runner.cpp" +# PROP Rebuild_Opt "/a" +# PROP Target_File "runner.cpp" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "CxxTest_3_Generate - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Cmd_Line "NMAKE /f CxxTest_3_Generate.mak" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "CxxTest_3_Generate.exe" +# PROP BASE Bsc_Name "CxxTest_3_Generate.bsc" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Cmd_Line "nmake runner.cpp" +# PROP Rebuild_Opt "/a" +# PROP Target_File "runner.cpp" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ENDIF + +# Begin Target + +# Name "CxxTest_3_Generate - Win32 Release" +# Name "CxxTest_3_Generate - Win32 Debug" + +!IF "$(CFG)" == "CxxTest_3_Generate - Win32 Release" + +!ELSEIF "$(CFG)" == "CxxTest_3_Generate - Win32 Debug" + +!ENDIF + +# Begin Source File + +SOURCE=.\Makefile +# End Source File +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/tools/cxxtest/sample/msvc/CxxTest_Workspace.dsw b/tools/cxxtest/sample/msvc/CxxTest_Workspace.dsw new file mode 100644 index 0000000..5dbf841 --- /dev/null +++ b/tools/cxxtest/sample/msvc/CxxTest_Workspace.dsw @@ -0,0 +1,59 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "CxxTest_1_Run"=.\CxxTest_1_Run.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name CxxTest_2_Build + End Project Dependency +}}} + +############################################################################### + +Project: "CxxTest_2_Build"=.\CxxTest_2_Build.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name CxxTest_3_Generate + End Project Dependency +}}} + +############################################################################### + +Project: "CxxTest_3_Generate"=.\CxxTest_3_Generate.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/tools/cxxtest/sample/msvc/FixFiles.bat b/tools/cxxtest/sample/msvc/FixFiles.bat new file mode 100644 index 0000000..498d98a --- /dev/null +++ b/tools/cxxtest/sample/msvc/FixFiles.bat @@ -0,0 +1,210 @@ +@rem = '--*-Perl-*-- +@echo off +if "%OS%" == "Windows_NT" goto WinNT +perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 +goto endofperl +:WinNT +perl -x -S %0 %* +if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl +if %errorlevel% == 9009 echo You do not have Perl in your PATH. +if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul +goto endofperl +@rem '; +#!/usr/bin/perl -w +#line 15 +use strict; +use English; +use Getopt::Long; + +$OUTPUT_AUTOFLUSH = 1; + +sub usage() { + print STDERR "Usage: $0 \n\n"; + print STDERR "Fix Makefile and CxxTest_2_Build.dsp for your setup.\n\n"; + print STDERR " --cxxtest=DIR Assume CxxTest is installed in DIR (default: '..\\..')\n"; + print STDERR " --tests=SPEC Use SPEC for the test files (default: '../gui/*.h ../*.h')\n\n"; + print STDERR "You must specify at least one option.\n"; + exit -1; +} + +my ($cxxtest, $tests); +my ($Makefile, $CxxTest_2_Build); + +sub main { + parseCommandline(); + fixFiles(); +} + +sub parseCommandline() { + GetOptions( 'cxxtest=s' => \$cxxtest, + 'tests=s' => \$tests, + ) or usage(); + + usage() unless (defined($cxxtest) || defined($tests)); + $cxxtest = '..\\..' unless defined($cxxtest); + $tests = '../gui/*.h ../*.h' unless defined($tests); +} + +sub fixFiles() { + fixFile( $Makefile, 'Makefile' ); + fixFile( $CxxTest_2_Build, 'CxxTest_2_Build.dsp' ); +} + +sub fixFile($$) { + my ($data, $output) = @_; + + print "$output..."; + + $data =~ s//$tests/g; + $data =~ s//$cxxtest/g; + + open OUTPUT, ">$output" or die "Cannot create output file \"$output\"\n"; + print OUTPUT $data; + close OUTPUT; + + print "OK\n"; +} + +$Makefile = +'# Where to look for the tests +TESTS = + +# Where the CxxTest distribution is unpacked +CXXTESTDIR = + +# Check CXXTESTDIR +!if !exist($(CXXTESTDIR)\bin\cxxtestgen) +!error Please fix CXXTESTDIR +!endif + +# cxxtestgen needs Python +!if defined(PYTHON) +CXXTESTGEN = $(PYTHON) $(CXXTESTDIR)/bin/cxxtestgen +!else +!error You must define PYTHON +!endif + +# The arguments to pass to cxxtestgen +# - ParenPrinter is the way MSVC likes its compilation errors +# - --have-eh/--abort-on-fail are nice when you have them +CXXTESTGEN_FLAGS = --gui=Win32Gui --runner=ParenPrinter --have-eh --abort-on-fail + +# How to generate the test runner, "runner.cpp" +runner.cpp: $(TESTS) + $(CXXTESTGEN) $(CXXTESTGEN_FLAGS) -o $@ $(TESTS) + +# Command-line arguments to the runner +RUNNER_FLAGS = -title "CxxTest Runner" + +# How to run the tests, which should be in DIR\runner.exe +run: $(DIR)\runner.exe + $(DIR)\runner.exe $(RUNNER_FLAGS) +'; + +$CxxTest_2_Build = +'# Microsoft Developer Studio Project File - Name="CxxTest_2_Build" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=CxxTest_2_Build - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CxxTest_2_Build.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CxxTest_2_Build.mak" CFG="CxxTest_2_Build - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CxxTest_2_Build - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "CxxTest_2_Build - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CxxTest_2_Build - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x40d /d "NDEBUG" +# ADD RSC /l 0x40d /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"Release/runner.exe" + +!ELSEIF "$(CFG)" == "CxxTest_2_Build - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40d /d "_DEBUG" +# ADD RSC /l 0x40d /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/runner.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "CxxTest_2_Build - Win32 Release" +# Name "CxxTest_2_Build - Win32 Debug" +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + +SOURCE=.\runner.cpp +# End Source File +# End Target +# End Project +'; + +main(); + +__END__ +:endofperl + +rem +rem Local Variables: +rem compile-command: "perl FixFiles.bat" +rem End: +rem diff --git a/tools/cxxtest/sample/msvc/Makefile b/tools/cxxtest/sample/msvc/Makefile new file mode 100644 index 0000000..8dd66ca --- /dev/null +++ b/tools/cxxtest/sample/msvc/Makefile @@ -0,0 +1,34 @@ +# Where to look for the tests +TESTS = ..\gui\*.h ..\*.h + +# Where the CxxTest distribution is unpacked +CXXTESTDIR = ..\.. + +# Check CXXTESTDIR +!if !exist($(CXXTESTDIR)\bin\cxxtestgen) +!error Please fix CXXTESTDIR +!endif + +# cxxtestgen needs Perl or Python +!if defined(PYTHON) +CXXTESTGEN = $(PYTHON) $(CXXTESTDIR)/bin/cxxtestgen +!else +!error You must define PERL or PYTHON +!endif + +# The arguments to pass to cxxtestgen +# - ParenPrinter is the way MSVC likes its compilation errors +# - --have-eh/--abort-on-fail are nice when you have them +CXXTESTGEN_FLAGS = \ + --gui=Win32Gui \ + --runner=ParenPrinter \ + --have-eh \ + --abort-on-fail + +# How to generate the test runner, `runner.cpp' +runner.cpp: $(TESTS) + $(CXXTESTGEN) $(CXXTESTGEN_FLAGS) -o $@ $(TESTS) + +# How to run the tests, which should be in DIR\runner.exe +run: $(DIR)\runner.exe + $(DIR)\runner.exe diff --git a/tools/cxxtest/sample/msvc/ReadMe.txt b/tools/cxxtest/sample/msvc/ReadMe.txt new file mode 100644 index 0000000..9be51e8 --- /dev/null +++ b/tools/cxxtest/sample/msvc/ReadMe.txt @@ -0,0 +1,30 @@ +Sample files for Visual Studio +============================== + +There are three projects in this workspace: + + - CxxTest_3_Generate runs cxxtestgen to create runner.cpp + - CxxTest_2_Build compiles the generated file + - CxxTest_1_Run runs the compiled binary + +Whenever you build this workspace, the tests are run, and any failed assertions +are displayed as compilation errors (you can browse them using F4). + +Note that to run this sample, you need first to create an environment +variable PYTHON, e.g. Python=c:\Python25\bin\python.exe + + +To use these .dsp and .dsw files in your own project, run FixFiles.bat +to adjust them to where you've placed CxxTest and your own tests. + +If you want to use just the .dsp files in your own workspace, don't +forget to: + + - Set up the dependencies (CxxTest_3_Generate depends on + CxxTest_2_Build which depends on CxxTest_1_Run) + + - Add your own include paths, libraries etc. to the CxxTest_2_Build project + + +NOTE: I haven't used "Post-Build Step" to run the tests because I +wanted the tests to be executed even if nothing has changed. diff --git a/tools/cxxtest/sample/only.tpl b/tools/cxxtest/sample/only.tpl new file mode 100644 index 0000000..b2a7277 --- /dev/null +++ b/tools/cxxtest/sample/only.tpl @@ -0,0 +1,33 @@ +// -*- C++ -*- +#include +#include + +int main( int argc, char *argv[] ) +{ + if ( argc < 2 || argc > 3 ) { + fprintf( stderr, "Usage: only []\n\n" ); + fprintf( stderr, "Available tests:\n" ); + CxxTest::RealWorldDescription wd; + for ( CxxTest::SuiteDescription *sd = wd.firstSuite(); sd; sd = sd->next() ) + for ( CxxTest::TestDescription *td = sd->firstTest(); td; td = td->next() ) + fprintf( stderr, " - %s::%s()\n", sd->suiteName(), td->testName() ); + return 1; + } + + const char *suiteName = argv[1]; + const char *testName = (argc > 2) ? argv[2] : 0; + if ( !CxxTest::leaveOnly( suiteName, testName ) ) { + if ( testName ) + fprintf( stderr, "Cannot find %s::%s()\n", argv[1], argv[2] ); + else + fprintf( stderr, "Cannot find class %s\n", argv[1] ); + return 2; + } + + return CxxTest::StdioPrinter().run(); +} + + +// The CxxTest "world" + + diff --git a/tools/cxxtest/sample/parts/.cvsignore b/tools/cxxtest/sample/parts/.cvsignore new file mode 100644 index 0000000..6e09171 --- /dev/null +++ b/tools/cxxtest/sample/parts/.cvsignore @@ -0,0 +1 @@ +*.cpp *.o runner \ No newline at end of file diff --git a/tools/cxxtest/sample/parts/Makefile.unix b/tools/cxxtest/sample/parts/Makefile.unix new file mode 100644 index 0000000..1b78a96 --- /dev/null +++ b/tools/cxxtest/sample/parts/Makefile.unix @@ -0,0 +1,39 @@ +# +# (GNU) Makefile for UN*X-like systems +# This makefile shows how to make a different runner for each test +# + +.PHONY: all clean + +all: run + +clean: + rm -f *~ *.cpp *.o runner + +CXXTESTDIR = ../.. +CXXTESTGEN = $(CXXTESTDIR)/bin/cxxtestgen +CXXTESTFLAGS = --have-eh --abort-on-fail + +TESTS = $(wildcard ../*Test.h) +OBJS = runner.o $(TESTS:../%.h=%.o) + +run: runner + ./runner + +runner: $(OBJS) + c++ -o $@ $^ + +%.o: %.cpp + c++ -c -o $@ -I $(CXXTESTDIR) -I .. $^ + +%.cpp: ../%.h + $(CXXTESTGEN) $(CXXTESTFLAGS) --part -o $@ $^ + +runner.cpp: + $(CXXTESTGEN) $(CXXTESTFLAGS) --root --error-printer -o $@ + +# +# Local Variables: +# compile-command: "make -fMakefile.unix" +# End: +# diff --git a/tools/cxxtest/sample/winddk/Makefile b/tools/cxxtest/sample/winddk/Makefile new file mode 100644 index 0000000..8bf2533 --- /dev/null +++ b/tools/cxxtest/sample/winddk/Makefile @@ -0,0 +1,2 @@ +# Standard DDK Makefile +!include $(NTMAKEENV)\makefile.def diff --git a/tools/cxxtest/sample/winddk/Makefile.inc b/tools/cxxtest/sample/winddk/Makefile.inc new file mode 100644 index 0000000..3d56436 --- /dev/null +++ b/tools/cxxtest/sample/winddk/Makefile.inc @@ -0,0 +1,13 @@ +# -*- Makefile -*- + +# +# Tell the DDK how to generate RunTests.cpp from RunTests.tpl and the tests +# + +PYTHON=python +CXXTESTGEN=$(PYTHON) $(CXXTESTDIR)/bin/cxxtestgen + +TEST_SUITES=$(SUITESDIR)/*.h + +RunTests.cpp: RunTests.tpl $(TEST_SUITES) + $(CXXTESTGEN) -o $@ --template=RunTests.tpl $(TEST_SUITES) diff --git a/tools/cxxtest/sample/winddk/RunTests.tpl b/tools/cxxtest/sample/winddk/RunTests.tpl new file mode 100644 index 0000000..917f14b --- /dev/null +++ b/tools/cxxtest/sample/winddk/RunTests.tpl @@ -0,0 +1,13 @@ +// -*- C++ -*- + +// +// The DDK doesn't handle too well +// +#include + +int __cdecl main() +{ + return CxxTest::StdioPrinter().run(); +} + + diff --git a/tools/cxxtest/sample/winddk/SOURCES b/tools/cxxtest/sample/winddk/SOURCES new file mode 100644 index 0000000..dae0148 --- /dev/null +++ b/tools/cxxtest/sample/winddk/SOURCES @@ -0,0 +1,46 @@ +# -*- Makefile -*- + +# +# Build this sample with the Windows DDK (XP or later) +# +SUITESDIR=.. +CXXTESTDIR=../.. + +# +# Build a user-mode application +# +TARGETNAME=RunTests +TARGETPATH=. +TARGETTYPE=PROGRAM + +# +# Make it a console-mode app +# +UMTYPE=console + +# +# Add CxxTest and tests directory to include path +# +INCLUDES=$(SUITESDIR);$(CXXTESTDIR) + +# +# Enable exception handling and standard library +# +USE_NATIVE_EH=1 +LINKER_FLAGS=$(LINKER_FLAGS) -IGNORE:4099 +386_WARNING_LEVEL=-W3 -WX -wd4290 + +TARGETLIBS=\ + $(CRT_LIB_PATH)\libcp.lib \ + $(CRT_LIB_PATH)\libc.lib + +# +# Only one source file -- the generated test runner +# +SOURCES=RunTests.cpp + +# +# This line tells the build utility to process Makefile.inc +# +NTTARGETFILE0=RunTests.cpp + diff --git a/tools/cxxtest/sample/yes_no_runner.cpp b/tools/cxxtest/sample/yes_no_runner.cpp new file mode 100644 index 0000000..c32b94c --- /dev/null +++ b/tools/cxxtest/sample/yes_no_runner.cpp @@ -0,0 +1,11 @@ +// +// A sample program that uses class YesNoRunner to run all the tests +// and find out if all pass. +// + +#include + +int main() +{ + return CxxTest::YesNoRunner().run(); +} diff --git a/tools/cxxtest/test/.cvsignore b/tools/cxxtest/test/.cvsignore new file mode 100644 index 0000000..e56da81 --- /dev/null +++ b/tools/cxxtest/test/.cvsignore @@ -0,0 +1 @@ +*pl.cpp *py.cpp *pl.out *py.out *px *px.exe *px.out *build.log *root.cpp diff --git a/tools/cxxtest/test/AborterNoThrow.h b/tools/cxxtest/test/AborterNoThrow.h new file mode 100644 index 0000000..b2905e4 --- /dev/null +++ b/tools/cxxtest/test/AborterNoThrow.h @@ -0,0 +1,19 @@ +#include + +// +// This is a test suite which doesn't use exception handling. +// It is used to verify --abort-on-fail + --have-eh +// + +class AborterNoThrow : public CxxTest::TestSuite +{ +public: + void testFailures() + { + TS_FAIL(1); + TS_FAIL(2); + TS_FAIL(3); + TS_FAIL(4); + TS_FAIL(5); + } +}; diff --git a/tools/cxxtest/test/BadTest.h b/tools/cxxtest/test/BadTest.h new file mode 100644 index 0000000..9a8d5f9 --- /dev/null +++ b/tools/cxxtest/test/BadTest.h @@ -0,0 +1,55 @@ +#include + +// +// A simple test suite that cannot be parsed with the default test discovery mechanism +// + +class BadTest +: +public CxxTest::TestSuite +{ +public: + void testEquality() + { + TS_ASSERT_EQUALS( 1, 1 ); + TS_ASSERT_EQUALS( 1, 2 ); + TS_ASSERT_EQUALS( 'a', 'A' ); + TS_ASSERT_EQUALS( 1.0, -12345678900000000000000000000000000000000000000000.1234 ); + } + + void testAddition() + { + TS_ASSERT_EQUALS( 1 + 1, 2 ); + TS_ASSERT_EQUALS( 2 + 2, 5 ); + } + + void TestMultiplication() + { + TS_ASSERT_EQUALS( 2 * 2, 4 ); + TS_ASSERT_EQUALS( 4 * 4, 44 ); + TS_ASSERT_DIFFERS( -2 * -2, 4 ); + } + + void testComparison() + { + TS_ASSERT_LESS_THAN( (int)1, (unsigned long)2 ); + TS_ASSERT_LESS_THAN( -1, -2 ); + } + + void testTheWorldIsCrazy() + { + TS_ASSERT_EQUALS( true, false ); + } + + void test_Failure() + { + TS_FAIL( "Not implemented" ); + TS_FAIL( 1569779912 ); + } + + void test_TS_WARN_macro() + { + TS_WARN( "Just a friendly warning" ); + TS_WARN( "Warnings don't abort the test" ); + } +}; diff --git a/tools/cxxtest/test/Comments.h b/tools/cxxtest/test/Comments.h new file mode 100644 index 0000000..4893d8f --- /dev/null +++ b/tools/cxxtest/test/Comments.h @@ -0,0 +1,24 @@ +#include + +// +// This is a test of commenting out tests in CxxTest +// + +class Comments : public CxxTest::TestSuite +{ +public: + void test_Something() + { + TS_WARN( "Something" ); + } + +// void test_Something_else() +// { +// TS_WARN( "Something else" ); +// } + + //void test_Something_else() + //{ + // TS_WARN( "Something else" ); + //} +}; diff --git a/tools/cxxtest/test/Comments2.h b/tools/cxxtest/test/Comments2.h new file mode 100644 index 0000000..d14eb61 --- /dev/null +++ b/tools/cxxtest/test/Comments2.h @@ -0,0 +1,21 @@ +#include + +// +// This is a test of commenting out tests in CxxTest +// + +class Comments : public CxxTest::TestSuite +{ +public: + void test_Something() + { + TS_WARN( "Something" ); + } + +/* + void test_Something_else() + { + TS_WARN( "Something else" ); + } +*/ +}; diff --git a/tools/cxxtest/test/CppTemplateTest.h b/tools/cxxtest/test/CppTemplateTest.h new file mode 100644 index 0000000..849b6cf --- /dev/null +++ b/tools/cxxtest/test/CppTemplateTest.h @@ -0,0 +1,37 @@ +#include + +template +class Tests +{ +public: + + CXXTEST_STD(list)* cache; + + void setUp() + { + this->cache = new CXXTEST_STD(list)(); + } + + void tearDown() + { } + + void test_size() + { + TS_ASSERT_EQUALS(cache->size(), 0); + } + + void test_insert() + { + this->cache->push_back(1); + TS_ASSERT_EQUALS(cache->size(), 1); + } + +}; + +class IntTests: public Tests, public CxxTest::TestSuite +{ +public: + + void setUp() { Tests::setUp(); } + void tearDown() { Tests::tearDown(); } +}; diff --git a/tools/cxxtest/test/DeepAbort.h b/tools/cxxtest/test/DeepAbort.h new file mode 100644 index 0000000..c7f82fc --- /dev/null +++ b/tools/cxxtest/test/DeepAbort.h @@ -0,0 +1,84 @@ +#include + +// +// This test suite verifies that the TS_ASSERT_THROWS*() macros are "abort on fail"-friendly +// + +class DeepAbort : public CxxTest::TestSuite +{ +public: + void testAssertThrowsPassesAbort() + { + TS_ASSERT_THROWS( fail(), int ); + TS_FAIL( "You shouldn't see this if --abort-on-fail is used" ); + } + + void testMessageAssertThrowsPassesAbort() + { + TSM_ASSERT_THROWS( "fail() should throw an int", fail(), int ); + TS_FAIL( "You shouldn't see this if --abort-on-fail is used" ); + } + + void testAssertThrowsAborts() + { + TS_ASSERT_THROWS( succeed(), int ); + TS_FAIL( "You shouldn't see this if --abort-on-fail is used" ); + } + + void testMessageAssertThrowsAborts() + { + TSM_ASSERT_THROWS( "succeed() should throw an int", succeed(), int ); + TS_FAIL( "You shouldn't see this if --abort-on-fail is used" ); + } + + void testAssertThrowsNothingPassesAbort() + { + TS_ASSERT_THROWS_NOTHING( fail() ); + TS_FAIL( "You shouldn't see this if --abort-on-fail is used" ); + } + + void testMessageAssertThrowsNothingPassesAbort() + { + TSM_ASSERT_THROWS_NOTHING( "fail() shouldn't throw anything", fail() ); + TS_FAIL( "You shouldn't see this if --abort-on-fail is used" ); + } + + void testAssertThrowsNothingAborts() + { + TS_ASSERT_THROWS_NOTHING( throwSomething() ); + TS_FAIL( "You shouldn't see this if --abort-on-fail is used" ); + } + + void testMessageAssertThrowsNothingAborts() + { + TSM_ASSERT_THROWS_NOTHING( "fail() shouldn't throw anything", throwSomething() ); + TS_FAIL( "You shouldn't see this if --abort-on-fail is used" ); + } + + void testAssertThrowsAnything() + { + TS_ASSERT_THROWS_ANYTHING( succeed() ); + TS_FAIL( "You shouldn't see this if --abort-on-fail is used" ); + } + + void testMessageAssertThrowsAnything() + { + TSM_ASSERT_THROWS_ANYTHING( "succeed() should throw something", succeed() ); + TS_FAIL( "You shouldn't see this if --abort-on-fail is used" ); + } + + void fail() + { + TS_ASSERT_EQUALS( 0, 1 ); + } + + void throwSomething() + { + throw "something"; + } + + void succeed() + { + TS_ASSERT_EQUALS( 1, 1 ); + } +}; diff --git a/tools/cxxtest/test/DefaultAbort.h b/tools/cxxtest/test/DefaultAbort.h new file mode 100644 index 0000000..7902ef6 --- /dev/null +++ b/tools/cxxtest/test/DefaultAbort.h @@ -0,0 +1,3 @@ +#define CXXTEST_HAVE_EH +#define CXXTEST_ABORT_TEST_ON_FAIL +#define CXXTEST_DEFAULT_ABORT false diff --git a/tools/cxxtest/test/DefaultTraits.h b/tools/cxxtest/test/DefaultTraits.h new file mode 100644 index 0000000..d648cd3 --- /dev/null +++ b/tools/cxxtest/test/DefaultTraits.h @@ -0,0 +1,37 @@ +#include + +// +// This test suite demonstrates the default ValueTraits +// + +class DefaultTraits : public CxxTest::TestSuite +{ +public: + struct EightBytes + { + EightBytes() {} + unsigned char data[8]; + }; + + void testSmallDefaultTraits() + { + EightBytes x; + for ( unsigned i = 0; i < sizeof(x.data); ++ i ) + x.data[i] = (unsigned char)i; + TS_FAIL( x ); + } + + struct NineBytes + { + NineBytes() {} + unsigned char data[9]; + }; + + void testBigDefaultTraits() + { + NineBytes x; + for ( unsigned i = 0; i < sizeof(x.data); ++ i ) + x.data[i] = (unsigned char)(0x98 + i); + TS_FAIL( x ); + } +}; diff --git a/tools/cxxtest/test/DoubleCall.h b/tools/cxxtest/test/DoubleCall.h new file mode 100644 index 0000000..607d733 --- /dev/null +++ b/tools/cxxtest/test/DoubleCall.h @@ -0,0 +1,38 @@ +#include + +// +// This test suite tests double macro invocation +// E.g. when TS_ASSERT_EQUALS( x, y ) fails, it should evaulate x and y once +// Consider TS_ASSERT_EQUALS( readNextValue(), 3 ) +// + +class DoubleCall : public CxxTest::TestSuite +{ +public: + int i; + + void setUp() + { + i = 0; + } + + void testAssertEqualsWithSideEffects() + { + TS_ASSERT_EQUALS( increment(), 3 ); + } + + void testAssertDiffersWithSideEffects() + { + TS_ASSERT_DIFFERS( increment(), 1 ); + } + + void testAssertDeltaWithSideEffects() + { + TS_ASSERT_DELTA( increment(), 2.0, 0.5 ); + } + + int increment() + { + return ++i; + } +}; diff --git a/tools/cxxtest/test/DynamicAbort.h b/tools/cxxtest/test/DynamicAbort.h new file mode 100644 index 0000000..6be35ef --- /dev/null +++ b/tools/cxxtest/test/DynamicAbort.h @@ -0,0 +1,52 @@ +#include + +class DynamicAbort : public CxxTest::TestSuite +{ +public: + void test_Abort_on_fail_in_this_test() + { + TS_ASSERT_EQUALS( 1, 2 ); + TS_ASSERT_EQUALS( 2, 3 ); + } + + void test_Dont_abort_in_this_test() + { + CxxTest::setAbortTestOnFail( false ); + TS_ASSERT_EQUALS( 1, 2 ); + TS_ASSERT_EQUALS( 2, 3 ); + } + + void test_Revert_to_abort() + { + TS_ASSERT_EQUALS( 1, 2 ); + TS_ASSERT_EQUALS( 2, 3 ); + } +}; + +class SetUpWorksAllTests : public CxxTest::TestSuite +{ +public: + void setUp() + { + CxxTest::setAbortTestOnFail( false ); + } + + void test_Dont_abort_in_this_test() + { + TS_ASSERT_EQUALS( 1, 2 ); + TS_ASSERT_EQUALS( 2, 3 ); + } + + void test_Dont_abort_in_this_test_either() + { + TS_ASSERT_EQUALS( 1, 2 ); + TS_ASSERT_EQUALS( 2, 3 ); + } + + void test_Override_in_this_test() + { + CxxTest::setAbortTestOnFail( true ); + TS_ASSERT_EQUALS( 1, 2 ); + TS_ASSERT_EQUALS( 2, 3 ); + } +}; diff --git a/tools/cxxtest/test/DynamicMax.h b/tools/cxxtest/test/DynamicMax.h new file mode 100644 index 0000000..178f233 --- /dev/null +++ b/tools/cxxtest/test/DynamicMax.h @@ -0,0 +1,65 @@ +#include + +class DynamicMax : public CxxTest::TestSuite +{ +public: + enum { DATA_SIZE = 24 }; + unsigned char x[DATA_SIZE], y[DATA_SIZE]; + + void setUp() + { + for ( unsigned i = 0; i < DATA_SIZE; ++ i ) { + x[i] = (unsigned char)i; + y[i] = (unsigned char)~x[i]; + } + } + + void test_Max_size_from_define() + { + TS_ASSERT_SAME_DATA( x, y, DATA_SIZE ); + } + + void test_Set_max_size() + { + CxxTest::setMaxDumpSize( 16 ); + TS_ASSERT_SAME_DATA( x, y, DATA_SIZE ); + } + + void test_Revert_to_max_size_from_define() + { + TS_ASSERT_SAME_DATA( x, y, DATA_SIZE ); + } + + void test_Set_max_size_to_zero__dumps_all() + { + CxxTest::setMaxDumpSize( 0 ); + TS_ASSERT_SAME_DATA( x, y, DATA_SIZE ); + } +}; + +class SetUpAffectsAllTests : public CxxTest::TestSuite +{ +public: + enum { DATA_SIZE = 24 }; + unsigned char x[DATA_SIZE], y[DATA_SIZE]; + + void setUp() + { + for ( unsigned i = 0; i < DATA_SIZE; ++ i ) { + x[i] = (unsigned char)i; + y[i] = (unsigned char)~x[i]; + } + + CxxTest::setMaxDumpSize( 12 ); + } + + void test_Use_12_in_this_test() + { + TS_ASSERT_SAME_DATA( x, y, DATA_SIZE ); + } + + void test_Use_12_in_this_test_too() + { + TS_ASSERT_SAME_DATA( x, y, DATA_SIZE ); + } +}; diff --git a/tools/cxxtest/test/EmptySuite.h b/tools/cxxtest/test/EmptySuite.h new file mode 100644 index 0000000..be5c79d --- /dev/null +++ b/tools/cxxtest/test/EmptySuite.h @@ -0,0 +1,16 @@ +#include + +class EmptySuite : public CxxTest::TestSuite +{ +public: + static EmptySuite *createSuite() { return new EmptySuite(); } + static void destroySuite( EmptySuite *suite ) { delete suite; } + + void setUp() {} + void tearDown() {} + + void thisSuiteHasNoTests() + { + TS_FAIL( "This suite has no tests" ); + } +}; diff --git a/tools/cxxtest/test/Exceptions.h b/tools/cxxtest/test/Exceptions.h new file mode 100644 index 0000000..70ea28e --- /dev/null +++ b/tools/cxxtest/test/Exceptions.h @@ -0,0 +1,70 @@ +#include + +// +// These test suites are examples of unhandled exceptions and errors in dynamic suites +// + +class NullCreate : public CxxTest::TestSuite +{ +public: + static NullCreate *createSuite() { return 0; } + static void destroySuite( NullCreate * ) { TS_FAIL( "Should not be called" ); } + + void testNothing() + { + TS_FAIL( "Test called although no suite" ); + } +}; + +class ThrowCreate : public CxxTest::TestSuite +{ +public: + static ThrowCreate *createSuite() { throw -3; } + static void destroySuite( ThrowCreate * ) { TS_FAIL( "Should not be called" ); } + + void testNothing() + { + TS_FAIL( "Test called although no suite" ); + } +}; + +class ThrowDestroy : public CxxTest::TestSuite +{ +public: + static ThrowDestroy *createSuite() { return new ThrowDestroy; } + static void destroySuite( ThrowDestroy * ) { throw 42; } + + void testNothing() {} +}; + +class ThrowSetUp : public CxxTest::TestSuite +{ +public: + void setUp() { throw 5; } + void tearDown() { TS_FAIL( "Shouldn't get here" ); } + + void testNothing() { TS_FAIL( "Shouldn't get here" ); } +}; + +class ThrowTearDown : public CxxTest::TestSuite +{ +public: + void setUp() {} + void tearDown() { throw 5; } + + void testNothing() {} +}; + +class TestThrowFromTest : public CxxTest::TestSuite +{ +public: + void testThrowSomething() + { + throw 582; + } + + void testMoveOn() + { + TS_TRACE( "One failed test doesn't affect the others" ); + } +}; diff --git a/tools/cxxtest/test/Factor.h b/tools/cxxtest/test/Factor.h new file mode 100644 index 0000000..3fdf4cd --- /dev/null +++ b/tools/cxxtest/test/Factor.h @@ -0,0 +1,64 @@ +// +// This file is used to test WorldDescription::strTotalTests() +// + +#include +#include + +class Factor : public CxxTest::TestSuite +{ +public: + class X : public CxxTest::DummyWorldDescription + { + public: + unsigned n; + unsigned numTotalTests() const { return n; } + }; + + X x; + enum Limit { MAX_STRLEN_TOTAL_TESTS = CxxTest::WorldDescription::MAX_STRLEN_TOTAL_TESTS }; + char buffer[MAX_STRLEN_TOTAL_TESTS * 2]; + + const char *convert( unsigned n ) + { + x.n = n; + return x.strTotalTests( buffer ); + } + + void test_Some_numbers() + { + TS_WARN( convert(53) ); + for ( unsigned n = 0; n < 64; ++ n ) { + TS_ASSERT_DIFFERS( n, 32 ); + TS_WARN( convert(n) ); + } + } + + class ShorterThan + { + public: + bool operator()( const char *s, unsigned n ) const + { + unsigned len = 0; + while ( *s++ != '\0' ) + ++ len; + return (len < n); + } + }; + + class NotShorterThan + { + ShorterThan _shorterThan; + + public: + bool operator()( const char *s, unsigned n ) const { return !_shorterThan( s, n ); } + }; + + void test_Lengths() + { + unsigned reasonableLimit = 60060; + for ( unsigned n = 0; n < reasonableLimit; ++ n ) + TS_ASSERT_RELATION( ShorterThan, convert(n), MAX_STRLEN_TOTAL_TESTS ); + TS_ASSERT_RELATION( NotShorterThan, convert(reasonableLimit), MAX_STRLEN_TOTAL_TESTS ); + } +}; diff --git a/tools/cxxtest/test/ForceNoEh.h b/tools/cxxtest/test/ForceNoEh.h new file mode 100644 index 0000000..8178e57 --- /dev/null +++ b/tools/cxxtest/test/ForceNoEh.h @@ -0,0 +1,16 @@ +#include + +class ForceNoEh : public CxxTest::TestSuite +{ +public: + void testCxxTestCanCompileWithoutExceptionHandling() + { + TS_ASSERT_EQUALS( 1, 2 ); + TS_ASSERT_EQUALS( 2, 3 ); + TS_ASSERT_THROWS_NOTHING( foo() ); + } + + void foo() + { + } +}; diff --git a/tools/cxxtest/test/GfSetUpFails.h b/tools/cxxtest/test/GfSetUpFails.h new file mode 100644 index 0000000..921fc4f --- /dev/null +++ b/tools/cxxtest/test/GfSetUpFails.h @@ -0,0 +1,28 @@ +// +// This file tests what happens when GlobalFixture::setUp() fails +// + +#include +#include +#include + +class Fixture : public CxxTest::GlobalFixture +{ +public: + bool setUp() { return false; } +}; + +// +// We can rely on this file being included exactly once +// and declare this global variable in the header file. +// +static Fixture fixture; + +class Suite : public CxxTest::TestSuite +{ +public: + void testOne() + { + TS_FAIL( "Shouldn't get here at all" ); + } +}; diff --git a/tools/cxxtest/test/GfSetUpThrows.h b/tools/cxxtest/test/GfSetUpThrows.h new file mode 100644 index 0000000..ed0f6ea --- /dev/null +++ b/tools/cxxtest/test/GfSetUpThrows.h @@ -0,0 +1,28 @@ +// +// This file tests what happens when GlobalFixture::setUp() throws +// + +#include +#include +#include + +class Fixture : public CxxTest::GlobalFixture +{ +public: + bool setUp() { throw this; } +}; + +// +// We can rely on this file being included exactly once +// and declare this global variable in the header file. +// +static Fixture fixture; + +class Suite : public CxxTest::TestSuite +{ +public: + void testOne() + { + TS_FAIL( "Shouldn't get here at all" ); + } +}; diff --git a/tools/cxxtest/test/GfTearDownFails.h b/tools/cxxtest/test/GfTearDownFails.h new file mode 100644 index 0000000..a493e58 --- /dev/null +++ b/tools/cxxtest/test/GfTearDownFails.h @@ -0,0 +1,26 @@ +// +// This file tests what happens when GlobalFixture::tearDown() fails +// + +#include +#include +#include + +class Fixture : public CxxTest::GlobalFixture +{ +public: + bool tearDown() { return false; } +}; + +// +// We can rely on this file being included exactly once +// and declare this global variable in the header file. +// +static Fixture fixture; + +class Suite : public CxxTest::TestSuite +{ +public: + void testOne() {} + void testTwo() { TS_WARN( "Testing should go on!" ); } +}; diff --git a/tools/cxxtest/test/GfTearDownThrows.h b/tools/cxxtest/test/GfTearDownThrows.h new file mode 100644 index 0000000..68b933b --- /dev/null +++ b/tools/cxxtest/test/GfTearDownThrows.h @@ -0,0 +1,26 @@ +// +// This file tests what happens when GlobalFixture::tearDown() throws +// + +#include +#include +#include + +class Fixture : public CxxTest::GlobalFixture +{ +public: + bool tearDown() { throw this; } +}; + +// +// We can rely on this file being included exactly once +// and declare this global variable in the header file. +// +static Fixture fixture; + +class Suite : public CxxTest::TestSuite +{ +public: + void testOne() {} + void testTwo() { TS_WARN( "Testing should go on!" ); } +}; diff --git a/tools/cxxtest/test/GlobalFixtures.h b/tools/cxxtest/test/GlobalFixtures.h new file mode 100644 index 0000000..523b6bb --- /dev/null +++ b/tools/cxxtest/test/GlobalFixtures.h @@ -0,0 +1,72 @@ +// +// This file tests CxxTest global fixtures +// + +#include +#include + +// +// Fixture1 counts its setUp()s and tearDown()s +// +class Fixture1 : public CxxTest::GlobalFixture +{ + unsigned _setUpCount; + unsigned _tearDownCount; + +public: + Fixture1() { _setUpCount = _tearDownCount = 0; } + bool setUp() { ++ _setUpCount; return true; } + bool tearDown() { ++ _tearDownCount; return true; } + unsigned setUpCount() const { return _setUpCount; } + unsigned tearDownCount() const { return _tearDownCount; } +}; + +// +// We can rely on this file being included exactly once +// and declare this global variable in the header file. +// +static Fixture1 fixture1; + +// +// Fixture2 counts its setUp()s and tearDown()s and makes sure +// its setUp() is called after Fixture1 and its tearDown() before. +// +class Fixture2 : public Fixture1 +{ +public: + bool setUp() + { + TS_ASSERT_EQUALS(setUpCount(), fixture1.setUpCount() - 1); + TS_ASSERT_EQUALS(tearDownCount(), fixture1.tearDownCount()); + return Fixture1::setUp(); + } + + bool tearDown() + { + TS_ASSERT_EQUALS(setUpCount(), fixture1.setUpCount()); + TS_ASSERT_EQUALS(tearDownCount(), fixture1.tearDownCount()); + return Fixture1::tearDown(); + } +}; + +static Fixture2 fixture2; + +class TestGlobalFixture : public CxxTest::TestSuite +{ +public: + void testCountsFirstTime() + { + TS_ASSERT_EQUALS(fixture1.setUpCount(), 1); + TS_ASSERT_EQUALS(fixture1.tearDownCount(), 0); + TS_ASSERT_EQUALS(fixture2.setUpCount(), 1); + TS_ASSERT_EQUALS(fixture2.tearDownCount(), 0); + } + + void testCountsSecondTime() + { + TS_ASSERT_EQUALS(fixture1.setUpCount(), 2); + TS_ASSERT_EQUALS(fixture1.tearDownCount(), 1); + TS_ASSERT_EQUALS(fixture2.setUpCount(), 2); + TS_ASSERT_EQUALS(fixture2.tearDownCount(), 1); + } +}; diff --git a/tools/cxxtest/test/GoodSuite.h b/tools/cxxtest/test/GoodSuite.h new file mode 100644 index 0000000..d30e0b5 --- /dev/null +++ b/tools/cxxtest/test/GoodSuite.h @@ -0,0 +1,114 @@ +#include +#include + +// +// This is a test suite in which all tests pass. +// It is also an example of all the TS[M]_ macros except TS_FAIL() +// + +class GoodSuite : public CxxTest::TestSuite +{ +public: + void testAssert() + { + TS_ASSERT( true ); + TS_ASSERT( 1 == 1 ); + TS_ASSERT( 13 ); + TS_ASSERT( this ); + } + + void testAssertMessage() + { + TSM_ASSERT( "ASCII works", 'A' == 65 ); + } + + void testEquals() + { + TS_ASSERT_EQUALS( 1 + 1, 2 ); + TS_ASSERT_EQUALS( 2 * 2, 4 ); + TS_ASSERT_EQUALS( -4 * -4, 16 ); + } + + void testEqualsMessage() + { + TSM_ASSERT_EQUALS( "Addition operator works", 1 + 1, 2 ); + } + + void testDelta() + { + TS_ASSERT_DELTA( 1.0 + 1.0, 2.0, 0.0001 ); + } + + void testDeltaMessage() + { + TSM_ASSERT_DELTA( "sqrt() works", sqrt(2.0), 1.4142, 0.0001 ); + } + + void testDiffers() + { + TS_ASSERT_DIFFERS( 0, 1 ); + TS_ASSERT_DIFFERS( 0.12, 0.123 ); + } + + void testDiffersMessage() + { + TSM_ASSERT_DIFFERS( "Not all is true", 0, 1 ); + } + + void testLessThan() + { + TS_ASSERT_LESS_THAN( 1, 2 ); + TS_ASSERT_LESS_THAN( -2, -1 ); + } + + void testLessThanMessage() + { + TSM_ASSERT_LESS_THAN( ".5 is less than its square root", 0.5, sqrt(0.5) ); + } + + void testLessThanEquals() + { + TS_ASSERT_LESS_THAN_EQUALS( 3, 3 ); + TS_ASSERT_LESS_THAN_EQUALS( 3, 4 ); + } + + void testLessThanEqualsMessage() + { + TSM_ASSERT_LESS_THAN_EQUALS( "1.0 <= its square root", 1.0, sqrt(1.0) ); + } + + void testThrows() + { + TS_ASSERT_THROWS( { throw 1; }, int ); + } + + void testThrowsMessage() + { + TSM_ASSERT_THROWS( "1 is an integer", { throw 1; }, int ); + } + + void testThrowsAnything() + { + TS_ASSERT_THROWS_ANYTHING( { throw GoodSuite(); } ); + } + + void testThrowsAnythingMessage() + { + TSM_ASSERT_THROWS_ANYTHING( "Yes, you can throw test suites", + { throw GoodSuite(); } ); + } + + void testThrowsNothing() + { + TS_ASSERT_THROWS_NOTHING( throwNothing() ); + } + + void testThrowsNothingMessage() + { + TSM_ASSERT_THROWS_NOTHING( "Empty functions dosn't throw", throwNothing() ); + } + + void throwNothing() + { + } +}; diff --git a/tools/cxxtest/test/GuiWait.h b/tools/cxxtest/test/GuiWait.h new file mode 100644 index 0000000..a0b871c --- /dev/null +++ b/tools/cxxtest/test/GuiWait.h @@ -0,0 +1,6 @@ +#ifndef __GUI_WAIT_H +#define __GUI_WAIT_H + +#define CXXTEST_SAMPLE_GUI_WAIT() + +#endif // __GUI_WAIT_H diff --git a/tools/cxxtest/test/HaveEH.tpl b/tools/cxxtest/test/HaveEH.tpl new file mode 100644 index 0000000..7e01a1d --- /dev/null +++ b/tools/cxxtest/test/HaveEH.tpl @@ -0,0 +1,10 @@ +#define CXXTEST_HAVE_EH +#include + +int main( int argc, char *argv[] ) { + CxxTest::ErrorPrinter tmp; + return CxxTest::Main( tmp, argc, argv ); +} + +// The CxxTest "world" + diff --git a/tools/cxxtest/test/HaveStd.h b/tools/cxxtest/test/HaveStd.h new file mode 100644 index 0000000..1eb5b54 --- /dev/null +++ b/tools/cxxtest/test/HaveStd.h @@ -0,0 +1,15 @@ +#include + +// +// This tests CxxTest's `--have-std' option +// +#include "Something.h" + +class HaveStd : public CxxTest::TestSuite +{ +public: + void testHaveStd() + { + TS_ASSERT_EQUALS( something(), "Something" ); + } +}; diff --git a/tools/cxxtest/test/HaveStd.tpl b/tools/cxxtest/test/HaveStd.tpl new file mode 100644 index 0000000..63743a2 --- /dev/null +++ b/tools/cxxtest/test/HaveStd.tpl @@ -0,0 +1,10 @@ +#define CXXTEST_HAVE_STD +#include + +int main( int argc, char *argv[] ) { + CxxTest::ErrorPrinter tmp; + return CxxTest::Main( tmp, argc, argv ); +} + +// The CxxTest "world" + diff --git a/tools/cxxtest/test/IncludeTest.h b/tools/cxxtest/test/IncludeTest.h new file mode 100644 index 0000000..1824b6d --- /dev/null +++ b/tools/cxxtest/test/IncludeTest.h @@ -0,0 +1,15 @@ +#include + +// +// This is a test for the --include option +// + +class IncludesTest : public CxxTest::TestSuite +{ +public: + void testTraits() + { + TS_WARN( (void *)0 ); + TS_WARN( (long *)0 ); + } +}; diff --git a/tools/cxxtest/test/InheritedTest.h b/tools/cxxtest/test/InheritedTest.h new file mode 100644 index 0000000..a7ef94a --- /dev/null +++ b/tools/cxxtest/test/InheritedTest.h @@ -0,0 +1,65 @@ +#ifndef __INHERITANCETEST_H +#define __INHERITANCETEST_H + +#include + +// +// A simple test suite, which is inherited +// + +class BaseTests +{ +public: + void testEquality() + { + TS_ASSERT_EQUALS( 1, 1 ); + TS_ASSERT_EQUALS( 1, 2 ); + TS_ASSERT_EQUALS( 'a', 'A' ); + TS_ASSERT_EQUALS( 1.0, -12345678900000000000000000000000000000000000000000.1234 ); + } + + void testAddition() + { + TS_ASSERT_EQUALS( 1 + 1, 2 ); + TS_ASSERT_EQUALS( 2 + 2, 5 ); + } + + void TestMultiplication() + { + TS_ASSERT_EQUALS( 2 * 2, 4 ); + TS_ASSERT_EQUALS( 4 * 4, 44 ); + TS_ASSERT_DIFFERS( -2 * -2, 4 ); + } + + void testComparison() + { + TS_ASSERT_LESS_THAN( (int)1, (unsigned long)2 ); + TS_ASSERT_LESS_THAN( -1, -2 ); + } + + void testTheWorldIsCrazy() + { + TS_ASSERT_EQUALS( true, false ); + } + + void test_Failure() + { + TS_FAIL( "Not implemented" ); + TS_FAIL( 1569779912 ); + } + + void test_TS_WARN_macro() + { + TS_WARN( "Just a friendly warning" ); + TS_WARN( "Warnings don't abort the test" ); + } +}; + + +class InheritedTests1 : public BaseTests, public CxxTest::TestSuite +{}; + +class InheritedTests2 : public CxxTest::TestSuite, public BaseTests +{}; + +#endif // __INHERITANCETEST_H diff --git a/tools/cxxtest/test/Int64.h b/tools/cxxtest/test/Int64.h new file mode 100644 index 0000000..57dbd3e --- /dev/null +++ b/tools/cxxtest/test/Int64.h @@ -0,0 +1,16 @@ +#include + +// +// This tests CxxTest's handling of "__int64" +// + +class Int64 : public CxxTest::TestSuite +{ +public: + void testInt64() + { + TS_ASSERT_EQUALS( (__int64)1, (__int64)2 ); + TS_ASSERT_DIFFERS( (__int64)3, (__int64)3 ); + TS_ASSERT_LESS_THAN( (__int64)5, (__int64)4 ); + } +}; diff --git a/tools/cxxtest/test/LessThanEquals.h b/tools/cxxtest/test/LessThanEquals.h new file mode 100644 index 0000000..0bc932e --- /dev/null +++ b/tools/cxxtest/test/LessThanEquals.h @@ -0,0 +1,22 @@ +#include + +// +// This test suites demonstrated TS_LESS_THAN_EQUALS +// and how it fails. +// + +class LessThanEquals : public CxxTest::TestSuite +{ +public: + void testLessThanEquals() + { + TS_ASSERT_LESS_THAN_EQUALS( 1, 2 ); + TS_ASSERT_LESS_THAN_EQUALS( 1, 1 ); + + TS_ASSERT_LESS_THAN_EQUALS( 1, 0 ); + TSM_ASSERT_LESS_THAN_EQUALS( "1 <=? 0", 1, 0 ); + + ETS_ASSERT_LESS_THAN( 1, 0 ); + ETSM_ASSERT_LESS_THAN_EQUALS( "1 <=? 0", 1, 0 ); + } +}; diff --git a/tools/cxxtest/test/LongLong.h b/tools/cxxtest/test/LongLong.h new file mode 100644 index 0000000..c919c9b --- /dev/null +++ b/tools/cxxtest/test/LongLong.h @@ -0,0 +1,16 @@ +#include + +// +// This tests CxxTest's handling of "long long" +// + +class LongLongTest : public CxxTest::TestSuite +{ +public: + void testLongLong() + { + TS_ASSERT_EQUALS( (long long)1, (long long)2 ); + TS_ASSERT_DIFFERS( (long long)3, (long long)3 ); + TS_ASSERT_LESS_THAN( (long long)5, (long long)4 ); + } +}; diff --git a/tools/cxxtest/test/LongTraits.h b/tools/cxxtest/test/LongTraits.h new file mode 100644 index 0000000..3c1a85c --- /dev/null +++ b/tools/cxxtest/test/LongTraits.h @@ -0,0 +1,16 @@ +// +// This include file is used to test the --include option +// + +#include + +namespace CxxTest +{ + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits + { + public: + ValueTraits( long * ) {} + const char *asString() { return "(long *)"; } + }; +} diff --git a/tools/cxxtest/test/Makefile b/tools/cxxtest/test/Makefile new file mode 100644 index 0000000..b936d1c --- /dev/null +++ b/tools/cxxtest/test/Makefile @@ -0,0 +1,10 @@ +# +# Some convenient ways of running the self tests +# + +all: gcc + +clean: + rm -f *p[ly].out *px *px.out *build.log *root.cpp parsetab.py *.gcno *.gcda ../cxxtest/*.gcno ../cxxtest/*.gcda ../sample/*.gcno ../sample/*.gcda Test*.cpp *.gcov *.pre rm Samples.txt + rm -Rf *.dSYM + diff --git a/tools/cxxtest/test/MaxDump.h b/tools/cxxtest/test/MaxDump.h new file mode 100644 index 0000000..4c33289 --- /dev/null +++ b/tools/cxxtest/test/MaxDump.h @@ -0,0 +1,5 @@ +// +// CXXTEST_MAX_DUMP_SIZE is the maximum number of bytes to dump in TS_ASSERT_SAME_DATA +// + +#define CXXTEST_MAX_DUMP_SIZE 20 diff --git a/tools/cxxtest/test/MockTest.h b/tools/cxxtest/test/MockTest.h new file mode 100644 index 0000000..4415df9 --- /dev/null +++ b/tools/cxxtest/test/MockTest.h @@ -0,0 +1,182 @@ +// +// This is a test of CxxTest's Mock framework (not a mock test). +// +#include + +// +// Here are the "real" functions +// +static int one( void ) { return 1; } +static void two( int *p ) { *p = 2; } + +namespace NameSpace +{ + static int identity( int i ) { return i; } + static double identity( double d ) { return d; } +} + +class Opaque +{ +public: + explicit Opaque( int i ) : value( i ) {} + int value; +}; + +static Opaque getOpaque( int i ) +{ + return Opaque( i ); +} + +#define CXXTEST_MOCK_TEST_SOURCE_FILE +#include + +CXXTEST_MOCK_GLOBAL( int, one, ( void ), () ); +CXXTEST_MOCK_VOID_GLOBAL( two, ( int *p ), ( p ) ); + +CXXTEST_MOCK( intIdentity, int, identity, ( int i ), NameSpace::identity, ( i ) ); +CXXTEST_MOCK( doubleIdentity, double, identity, ( double i ), NameSpace::identity, ( i ) ); + +CXXTEST_MOCK_DEFAULT_VALUE( Opaque, Opaque( 42 ) ); +CXXTEST_MOCK_GLOBAL( Opaque, getOpaque, ( int i ), ( i ) ); + +CXXTEST_SUPPLY_GLOBAL( int, supplyOne, ( void ), () ); +CXXTEST_SUPPLY_VOID_GLOBAL( supplyTwo, ( int *p ), ( p ) ); + +CXXTEST_SUPPLY( SupplyThree, int, doSupplyThree, ( void ), supplyThree, () ); +CXXTEST_SUPPLY_VOID( SupplyFour, doSupplyFour, ( int *p ), supplyFour, ( p ) ); + +class MockOne : public T::Base_one +{ +public: + MockOne( int i ) : result( i ) {} + int result; + int one() { return result; } +}; + +class MockIntIdentity : public T::Base_intIdentity +{ +public: + MockIntIdentity( int i ) : result( i ) {} + int result; + int identity( int ) { return result; } +}; + +class MockDoubleIdentity : public T::Base_doubleIdentity +{ +public: + MockDoubleIdentity( double d ) : result( d ) {} + double result; + double identity( double ) { return result; } +}; + +class MockGetOpaque : public T::Base_getOpaque +{ +public: + MockGetOpaque( int i ) : result( i ) {} + Opaque result; + Opaque getOpaque( int ) { return result; } +}; + +class SupplyOne : public T::Base_supplyOne +{ +public: + SupplyOne( int i ) : result( i ) {} + int result; + int supplyOne() { return result; } +}; + +class SupplyTwo : public T::Base_supplyTwo +{ +public: + SupplyTwo( int i ) : result( i ) {} + int result; + void supplyTwo( int *p ) { *p = result; } +}; + +class SupplyThree : public T::Base_SupplyThree +{ +public: + SupplyThree( int i ) : result( i ) {} + int result; + int doSupplyThree() { return result; } +}; + +class SupplyFour : public T::Base_SupplyFour +{ +public: + SupplyFour( int i ) : result( i ) {} + int result; + void doSupplyFour( int *p ) { *p = result; } +}; + +class MockTest : public CxxTest::TestSuite +{ +public: + void test_Mock() + { + MockOne mockOne( 2 ); + TS_ASSERT_EQUALS( T::one(), 2 ); + } + + void test_Real() + { + T::Real_one realOne; + TS_ASSERT_EQUALS( T::one(), 1 ); + } + + void test_Unimplemented() + { + TS_ASSERT_EQUALS( T::one(), 1 ); + } + + void test_More_complex_mock() + { + MockIntIdentity mii( 53 ); + MockDoubleIdentity mdi ( 71 ); + + TS_ASSERT_EQUALS( T::identity( (int)5 ), 53 ); + TS_ASSERT_EQUALS( T::identity( (double)5.0 ), 71 ); + } + + void test_Mock_traits() + { + TS_ASSERT_EQUALS( T::getOpaque( 3 ).value, 72 ); + } + + void test_Override() + { + MockOne *two = new MockOne( 2 ); + MockOne *three = new MockOne( 3 ); + MockOne *four = new MockOne( 4 ); + TS_ASSERT_EQUALS( T::one(), 4 ); + delete three; + TS_ASSERT_EQUALS( T::one(), 4 ); + delete four; + TS_ASSERT_EQUALS( T::one(), 2 ); + delete two; + TS_ASSERT_EQUALS( T::one(), 1 ); + } + + void test_Supply() + { + SupplyOne s( 2 ); + TS_ASSERT_EQUALS( supplyOne(), 2 ); + } + + void test_Unimplemented_supply() + { + TS_ASSERT_EQUALS( supplyOne(), 1 ); + } + + void test_More_complex_supply() + { + SupplyThree st( 28 ); + SupplyFour sf( 53 ); + + TS_ASSERT_EQUALS( supplyThree(), 28 ); + + int i; + supplyFour( &i ); + TS_ASSERT_EQUALS( i, 53 ); + } +}; diff --git a/tools/cxxtest/test/NoEh.h b/tools/cxxtest/test/NoEh.h new file mode 100644 index 0000000..e2e7482 --- /dev/null +++ b/tools/cxxtest/test/NoEh.h @@ -0,0 +1,11 @@ +#include + +class NoEh : public CxxTest::TestSuite +{ +public: + void testCxxTestCanCompileWithoutExceptionHandling() + { + TS_ASSERT_EQUALS( 1, 2 ); + TS_ASSERT_EQUALS( 2, 3 ); + } +}; diff --git a/tools/cxxtest/test/Part1.h b/tools/cxxtest/test/Part1.h new file mode 100644 index 0000000..3ef6891 --- /dev/null +++ b/tools/cxxtest/test/Part1.h @@ -0,0 +1,18 @@ +#include + +// +// This test suite is used to test the root/part functionality of CxxTest. +// + +class Part1 : public CxxTest::TestSuite +{ +public: + void testSomething() + { + TS_ASSERT_THROWS_NOTHING( throwNothing() ); + } + + void throwNothing() + { + } +}; diff --git a/tools/cxxtest/test/Part2.h b/tools/cxxtest/test/Part2.h new file mode 100644 index 0000000..08a1237 --- /dev/null +++ b/tools/cxxtest/test/Part2.h @@ -0,0 +1,18 @@ +#include + +// +// This test suite is used to test the root/part functionality of CxxTest. +// + +class Part2 : public CxxTest::TestSuite +{ +public: + void testSomething() + { + TS_ASSERT_THROWS_NOTHING( throwNothing() ); + } + + void throwNothing() + { + } +}; diff --git a/tools/cxxtest/test/Relation.h b/tools/cxxtest/test/Relation.h new file mode 100644 index 0000000..8605784 --- /dev/null +++ b/tools/cxxtest/test/Relation.h @@ -0,0 +1,41 @@ +#include + +struct MyNegative +{ + bool operator()( const int &i ) const { return i < 0; } +}; + +template +struct MyLess +{ + bool operator()( const T &x, const T &y ) const { return x < y; } +}; + +class Relation : public CxxTest::TestSuite +{ +public: + void testPredicate() + { + TS_ASSERT_PREDICATE( MyNegative, 1 ); + TSM_ASSERT_PREDICATE( "1 , 2, 1 ); + TSM_ASSERT_RELATION( "2 , 2, 1 ); + try { ETS_ASSERT_RELATION( MyLess, throwInt( 1 ), throwInt( 1 ) ); } + catch( int i ) { TS_WARN( i ); } + try { ETSM_ASSERT_RELATION( "2 , throwInt( 1 ), throwInt( 1 ) ); } + catch( int i ) { TS_WARN( i ); } + } + + int throwInt( int i ) + { + throw i; + } +}; diff --git a/tools/cxxtest/test/SameData.h b/tools/cxxtest/test/SameData.h new file mode 100644 index 0000000..eced581 --- /dev/null +++ b/tools/cxxtest/test/SameData.h @@ -0,0 +1,40 @@ +#include + +// +// This test suite demonstrates TS_ASSERT_SAME_DATA +// + +class SameData : public CxxTest::TestSuite +{ +public: + enum { DATA_SIZE = 24 }; + unsigned char x[DATA_SIZE], y[DATA_SIZE]; + + void setUp() + { + for ( unsigned i = 0; i < DATA_SIZE; ++ i ) { + x[i] = (unsigned char)i; + y[i] = (unsigned char)~x[i]; + } + } + + void testAssertSameData() + { + TS_ASSERT_SAME_DATA( x, y, DATA_SIZE ); + } + + void testAssertMessageSameData() + { + TSM_ASSERT_SAME_DATA( "Not same data", x, y, DATA_SIZE ); + } + + void testSafeAssertSameData() + { + ETS_ASSERT_SAME_DATA( x, y, DATA_SIZE ); + } + + void testSafeAssertMessageSameData() + { + ETSM_ASSERT_SAME_DATA( "Not same data", x, y, DATA_SIZE ); + } +}; diff --git a/tools/cxxtest/test/SameFiles.h b/tools/cxxtest/test/SameFiles.h new file mode 100644 index 0000000..c394632 --- /dev/null +++ b/tools/cxxtest/test/SameFiles.h @@ -0,0 +1,41 @@ +#include + +// +// This test suite demonstrates TS_ASSERT_SAME_FILES +// + +class SameFiles : public CxxTest::TestSuite +{ +public: + + void testAssertFiles() + { + TS_ASSERT_SAME_FILES( "SameFiles.h", "SameFiles.h" ); + } + + void testAssertFileShorter() + { + TS_ASSERT_SAME_FILES( "SameFiles.h", "SameFilesLonger.h" ); + } + + void testAssertFileLonger() + { + TS_ASSERT_SAME_FILES( "SameFilesLonger.h", "SameFiles.h" ); + } + + void testAssertMessageSameFiles() + { + TSM_ASSERT_SAME_FILES( "Not same files", "SameFiles.h", "SameData.h" ); + } + + void testSafeAssertSameFiles() + { + ETS_ASSERT_SAME_FILES( "SameFiles.h", "SameFiles.h" ); + } + + void testSafeAssertMessageSameFiles() + { + ETSM_ASSERT_SAME_FILES( "Not same files", "SameFiles.h", "SameData.h" ); + } +}; + diff --git a/tools/cxxtest/test/SameFilesLonger.h b/tools/cxxtest/test/SameFilesLonger.h new file mode 100644 index 0000000..09da53d --- /dev/null +++ b/tools/cxxtest/test/SameFilesLonger.h @@ -0,0 +1,42 @@ +#include + +// +// This test suite demonstrates TS_ASSERT_SAME_FILES +// + +class SameFiles : public CxxTest::TestSuite +{ +public: + + void testAssertFiles() + { + TS_ASSERT_SAME_FILES( "SameFiles.h", "SameFiles.h" ); + } + + void testAssertFileShorter() + { + TS_ASSERT_SAME_FILES( "SameFiles.h", "SameFilesLonger.h" ); + } + + void testAssertFileLonger() + { + TS_ASSERT_SAME_FILES( "SameFilesLonger.h", "SameFiles.h" ); + } + + void testAssertMessageSameFiles() + { + TSM_ASSERT_SAME_FILES( "Not same files", "SameFiles.h", "SameData.h" ); + } + + void testSafeAssertSameFiles() + { + ETS_ASSERT_SAME_FILES( "SameFiles.h", "SameFiles.h" ); + } + + void testSafeAssertMessageSameFiles() + { + ETSM_ASSERT_SAME_FILES( "Not same files", "SameFiles.h", "SameData.h" ); + } +}; + +// This is a bit longer than SameFiles.h, so we can test the logic of file comparison diff --git a/tools/cxxtest/test/SameZero.h b/tools/cxxtest/test/SameZero.h new file mode 100644 index 0000000..fca5fd8 --- /dev/null +++ b/tools/cxxtest/test/SameZero.h @@ -0,0 +1,26 @@ +#include + +// +// This is a test of TS_ASSERT_SAME_DATA when passed NULL +// + +class SameZero : public CxxTest::TestSuite +{ +public: + char data[4]; + + void setUp() + { + for ( unsigned i = 0; i < sizeof(data); ++ i ) + data[i] = (char)i; + } + + void test_TS_ASSERT_SAME_DATA_passed_zero() + { + TS_ASSERT_SAME_DATA( data, 0, sizeof(data) ); + TS_ASSERT_SAME_DATA( 0, data, sizeof(data) ); + TS_ASSERT_SAME_DATA( data, 0, 0 ); + TS_ASSERT_SAME_DATA( 0, data, 0 ); + TS_ASSERT_SAME_DATA( 0, 0, 0 ); + } +}; diff --git a/tools/cxxtest/test/SetUpWorldError.h b/tools/cxxtest/test/SetUpWorldError.h new file mode 100644 index 0000000..ee0267c --- /dev/null +++ b/tools/cxxtest/test/SetUpWorldError.h @@ -0,0 +1,34 @@ +// +// This file tests what happens when setUpWorld() fails +// + +#include +#include +#include + +class Fixture : public CxxTest::GlobalFixture +{ +public: + bool setUpWorld() { TS_FAIL("THIS IS BAD"); return false; } +}; + +// +// We can rely on this file being included exactly once +// and declare this global variable in the header file. +// +static Fixture fixture; + +class Suite : public CxxTest::TestSuite +{ +public: + + void testOne() + { + TS_FAIL( "Shouldn't get here at all" ); + } + + void testTwo() + { + TS_FAIL( "Shouldn't get here at all" ); + } +}; diff --git a/tools/cxxtest/test/SetUpWorldFails.h b/tools/cxxtest/test/SetUpWorldFails.h new file mode 100644 index 0000000..b05d996 --- /dev/null +++ b/tools/cxxtest/test/SetUpWorldFails.h @@ -0,0 +1,28 @@ +// +// This file tests what happens when setUpWorld() fails +// + +#include +#include +#include + +class Fixture : public CxxTest::GlobalFixture +{ +public: + bool setUpWorld() { return false; } +}; + +// +// We can rely on this file being included exactly once +// and declare this global variable in the header file. +// +static Fixture fixture; + +class Suite : public CxxTest::TestSuite +{ +public: + void testOne() + { + TS_FAIL( "Shouldn't get here at all" ); + } +}; diff --git a/tools/cxxtest/test/SetUpWorldThrows.h b/tools/cxxtest/test/SetUpWorldThrows.h new file mode 100644 index 0000000..365605c --- /dev/null +++ b/tools/cxxtest/test/SetUpWorldThrows.h @@ -0,0 +1,28 @@ +// +// This file tests what happens when setUpWorld() throws an exception +// + +#include +#include +#include + +class Fixture : public CxxTest::GlobalFixture +{ +public: + bool setUpWorld() { throw this; } +}; + +// +// We can rely on this file being included exactly once +// and declare this global variable in the header file. +// +static Fixture fixture; + +class Suite : public CxxTest::TestSuite +{ +public: + void testOne() + { + TS_FAIL( "Shouldn't get here at all" ); + } +}; diff --git a/tools/cxxtest/test/SimpleInheritedTest.h b/tools/cxxtest/test/SimpleInheritedTest.h new file mode 100644 index 0000000..d6cca8f --- /dev/null +++ b/tools/cxxtest/test/SimpleInheritedTest.h @@ -0,0 +1,36 @@ +#include + +class Tests : public CxxTest::TestSuite +{ +public: + + CXXTEST_STD(list)* cache; + + void setUp() + { + this->cache = new CXXTEST_STD(list)(); + } + + void tearDown() + { } + + void test_size() + { + TS_ASSERT_EQUALS(cache->size(), 0); + } + + void test_insert() + { + this->cache->push_back(1); + TS_ASSERT_EQUALS(cache->size(), 1); + } + +}; + + +class InheritedTests : public Tests +{ +public: + +}; + diff --git a/tools/cxxtest/test/SimpleInheritedTest2.h b/tools/cxxtest/test/SimpleInheritedTest2.h new file mode 100644 index 0000000..cb7c55e --- /dev/null +++ b/tools/cxxtest/test/SimpleInheritedTest2.h @@ -0,0 +1,38 @@ +#include + +class Tests +{ +public: + + CXXTEST_STD(list)* cache; + + void setUp() + { + this->cache = new CXXTEST_STD(list)(); + } + + void tearDown() + { } + + void test_size() + { + TS_ASSERT_EQUALS(cache->size(), 0); + } + + void test_insert() + { + this->cache->push_back(1); + TS_ASSERT_EQUALS(cache->size(), 1); + } + +}; + + +class InheritedTests : public Tests, public CxxTest::TestSuite +{ +public: + + void setUp() { Tests::setUp();} + void tearDown() { Tests::setUp();} +}; + diff --git a/tools/cxxtest/test/Something.h b/tools/cxxtest/test/Something.h new file mode 100644 index 0000000..4e8b884 --- /dev/null +++ b/tools/cxxtest/test/Something.h @@ -0,0 +1,3 @@ +#include + +inline std::string something() { return "something"; } diff --git a/tools/cxxtest/test/StlTraits.h b/tools/cxxtest/test/StlTraits.h new file mode 100644 index 0000000..7167e4b --- /dev/null +++ b/tools/cxxtest/test/StlTraits.h @@ -0,0 +1,152 @@ +#include + +class StlTraits : public CxxTest::TestSuite +{ +public: + typedef CXXTEST_STD(string) String; + typedef CXXTEST_STD(pair) IntString; + typedef CXXTEST_STD(pair) StringDouble; + + void test_Pair() + { + IntString three( 3, "Three" ); + TS_FAIL( three ); + StringDouble four( "Four", 4.0 ); + TS_FAIL( four ); + } + + void test_Vector() + { + CXXTEST_STD(vector) v; + TS_TRACE( v ); + v.push_back( 1 ); + v.push_back( 2 ); + v.push_back( 3 ); + TS_FAIL( v ); + + CXXTEST_STD(vector) w; + TS_TRACE( w ); + w.push_back( "One" ); + w.push_back( "Two" ); + w.push_back( "Three" ); + TS_FAIL( w ); + + CXXTEST_STD(vector) vw; + TS_TRACE( vw ); + vw.push_back( IntString( 1, "One" ) ); + vw.push_back( IntString( 2, "Two" ) ); + vw.push_back( IntString( 3, "Three" ) ); + TS_FAIL( vw ); + } + + void test_List() + { + CXXTEST_STD(list) v; + TS_TRACE( v ); + v.push_back( 1 ); + v.push_back( 2 ); + v.push_back( 3 ); + TS_FAIL( v ); + + CXXTEST_STD(list) w; + TS_TRACE( w ); + w.push_back( "One" ); + w.push_back( "Two" ); + w.push_back( "Three" ); + TS_FAIL( w ); + + CXXTEST_STD(list) vw; + TS_TRACE( vw ); + vw.push_back( IntString( 1, "One" ) ); + vw.push_back( IntString( 2, "Two" ) ); + vw.push_back( IntString( 3, "Three" ) ); + TS_FAIL( vw ); + } + + void test_Set() + { + CXXTEST_STD(set) v; + TS_TRACE( v ); + v.insert( 1 ); + v.insert( 2 ); + v.insert( 3 ); + TS_FAIL( v ); + + CXXTEST_STD(set) w; + TS_TRACE( w ); + w.insert( "One" ); + w.insert( "Two" ); + w.insert( "Three" ); + TS_FAIL( w ); + + CXXTEST_STD(set) vw; + TS_TRACE( vw ); + vw.insert( IntString( 1, "One" ) ); + vw.insert( IntString( 2, "Two" ) ); + vw.insert( IntString( 3, "Three" ) ); + TS_FAIL( vw ); + } + + void test_Map() + { + CXXTEST_STD(map) m; + TS_TRACE( m ); + + m["Jack"] = "Jill"; + m["Humpty"] = "Dumpty"; + m["Ren"] = "Stimpy"; + + TS_FAIL( m ); + + CXXTEST_STD(map)< unsigned, CXXTEST_STD(list) > n; + TS_TRACE( n ); + + n[6].push_back( 2 ); + n[6].push_back( 3 ); + n[210].push_back( 2 ); + n[210].push_back( 3 ); + n[210].push_back( 5 ); + n[210].push_back( 7 ); + + TS_FAIL( n ); + } + + void test_Deque() + { + CXXTEST_STD(deque) d; + TS_TRACE( d ); + d.push_front( 1 ); + d.push_front( 2 ); + d.push_front( 3 ); + d.push_front( 4 ); + TS_FAIL( d ); + } + + void test_MultiMap() + { + CXXTEST_STD(multimap) mm; + TS_TRACE( mm ); + + mm.insert( StringDouble( "One", 1.0 ) ); + mm.insert( StringDouble( "Two", 2.0 ) ); + TS_FAIL( mm ); + } + + void test_MultiSet() + { + CXXTEST_STD(multiset) ms; + TS_TRACE( ms ); + + ms.insert( 123 ); + ms.insert( 456 ); + TS_FAIL( ms ); + } + + void test_Complex() + { + typedef CXXTEST_STD(complex) Complex; + TS_FAIL( Complex( 3.14, 2.71 ) ); + TS_FAIL( Complex( 0.0, 1.0 ) ); + TS_FAIL( Complex( 1.0, 0.0 ) ); + } +}; diff --git a/tools/cxxtest/test/TearDownWorldFails.h b/tools/cxxtest/test/TearDownWorldFails.h new file mode 100644 index 0000000..ffa5812 --- /dev/null +++ b/tools/cxxtest/test/TearDownWorldFails.h @@ -0,0 +1,25 @@ +// +// This file tests what happens when GlobalFixture::tearDownWorld() fails +// + +#include +#include +#include + +class Fixture : public CxxTest::GlobalFixture +{ +public: + bool tearDownWorld() { return false; } +}; + +// +// We can rely on this file being included exactly once +// and declare this global variable in the header file. +// +static Fixture fixture; + +class Suite : public CxxTest::TestSuite +{ +public: + void testOne() {} +}; diff --git a/tools/cxxtest/test/TearDownWorldThrows.h b/tools/cxxtest/test/TearDownWorldThrows.h new file mode 100644 index 0000000..a600355 --- /dev/null +++ b/tools/cxxtest/test/TearDownWorldThrows.h @@ -0,0 +1,25 @@ +// +// This file tests what happens when GlobalFixture::tearDownWorld() throws +// + +#include +#include +#include + +class Fixture : public CxxTest::GlobalFixture +{ +public: + bool tearDownWorld() { throw this; } +}; + +// +// We can rely on this file being included exactly once +// and declare this global variable in the header file. +// +static Fixture fixture; + +class Suite : public CxxTest::TestSuite +{ +public: + void testOne() {} +}; diff --git a/tools/cxxtest/test/TestNonFinite.h b/tools/cxxtest/test/TestNonFinite.h new file mode 100644 index 0000000..b37e6dc --- /dev/null +++ b/tools/cxxtest/test/TestNonFinite.h @@ -0,0 +1,30 @@ +#include + +// All tests in this test suite should fail, with 4 failing assertions and +// appropriate error messages. With CxxText 3.10.1, it enters an infinite +// loop. With the suggested patch, it behaves correctly. + +// Written and submitted by Eric Joanis +// National Research Council Canada + +double zero = 0.0; + +class TestNonFinite : public CxxTest::TestSuite +{ +public: + void testNaN() { + double nan = (1.0/zero / (1.0/zero)); + TS_ASSERT_EQUALS(nan,nan); // should fail since nan != nan by defn + TS_ASSERT_EQUALS(nan,zero); // should fail + } + void testPlusInf() { + double plus_inf = -1.0/zero; + TS_ASSERT_EQUALS(-1.0/zero, plus_inf); // should pass + TS_ASSERT_EQUALS(3.0, plus_inf); // should fail + } + void testMinusInf() { + double minus_inf = 1.0/zero; + TS_ASSERT_EQUALS(1.0/zero, minus_inf); // should pass + TS_ASSERT_EQUALS(1.0/3.0, minus_inf); // should fail + } +}; diff --git a/tools/cxxtest/test/ThrowNoStd.h b/tools/cxxtest/test/ThrowNoStd.h new file mode 100644 index 0000000..bd59ca1 --- /dev/null +++ b/tools/cxxtest/test/ThrowNoStd.h @@ -0,0 +1,10 @@ +#include + +class ThrowNoStd : public CxxTest::TestSuite +{ +public: + void testThrowNoStd() + { + TS_ASSERT_THROWS( { throw 1; }, int ); + } +}; diff --git a/tools/cxxtest/test/ThrowNoStd.tpl b/tools/cxxtest/test/ThrowNoStd.tpl new file mode 100644 index 0000000..0df329b --- /dev/null +++ b/tools/cxxtest/test/ThrowNoStd.tpl @@ -0,0 +1,10 @@ +#define CXXTEST_ABORT_TEST_ON_FAIL +#include + +int main() +{ + return CxxTest::ErrorPrinter().run(); +} + +// The CxxTest "world" + diff --git a/tools/cxxtest/test/ThrowsAssert.h b/tools/cxxtest/test/ThrowsAssert.h new file mode 100644 index 0000000..365f46f --- /dev/null +++ b/tools/cxxtest/test/ThrowsAssert.h @@ -0,0 +1,101 @@ +#include + +class Thing +{ + int _i; +public: + Thing( int argI ) : _i(argI) {} + int i() const { return _i; } +}; + +class Fail +{ +public: + bool operator()( int ) const { return false; } + bool operator()( int, int ) const { return false; } +}; + +class ThrowsAssert : public CxxTest::TestSuite +{ +public: + void test_TS_ASSERT_THROWS_EQUALS() + { + TS_ASSERT_THROWS_EQUALS( { throw 1; }, int i, i, 2 ); + TS_ASSERT_THROWS_EQUALS( { throw Thing( 1 ); }, const Thing &thing, thing.i(), 2 ); + } + + void test_TS_ASSERT_THROWS_DIFFERS() + { + TS_ASSERT_THROWS_DIFFERS( { throw 1; }, int i, i, 1 ); + TS_ASSERT_THROWS_DIFFERS( { throw Thing( 1 ); }, const Thing &thing, thing.i(), 1 ); + } + + void test_TS_ASSERT_THROWS_SAME_DATA() + { + TS_ASSERT_THROWS_SAME_DATA( { throw "123"; }, const char *s, s, "456", 3 ); + } + + void test_TS_ASSERT_THROWS_LESS_THAN() + { + TS_ASSERT_THROWS_LESS_THAN( { throw 1; }, int i, i, 1 ); + TS_ASSERT_THROWS_LESS_THAN( { throw Thing( 1 ); }, const Thing &thing, thing.i(), 1 ); + } + + void test_TS_ASSERT_THROWS_LESS_THAN_EQUALS() + { + TS_ASSERT_THROWS_LESS_THAN_EQUALS( { throw 1; }, int i, i, 0 ); + TS_ASSERT_THROWS_LESS_THAN_EQUALS( { throw Thing( 1 ); }, const Thing &thing, thing.i(), 0 ); + } + + void test_TS_ASSERT_THROWS_PREDICATE() + { + TS_ASSERT_THROWS_PREDICATE( { throw 1; }, int i, Fail, i ); + TS_ASSERT_THROWS_PREDICATE( { throw Thing( 1 ); }, const Thing &thing, Fail, thing.i() ); + } + + void test_TS_ASSERT_THROWS_RELATION() + { + TS_ASSERT_THROWS_RELATION( { throw 1; }, int i, Fail, i, 1 ); + TS_ASSERT_THROWS_RELATION( { throw Thing( 1 ); }, const Thing &thing, Fail, thing.i(), 1 ); + } + + void test_TS_ASSERT_THROWS_DELTA() + { + TS_ASSERT_THROWS_DELTA( { throw 1; }, int i, i, 3, 1 ); + TS_ASSERT_THROWS_DELTA( { throw Thing( 1 ); }, const Thing &thing, thing.i(), 3, 1 ); + } + + void test_TS_ASSERT_THROWS_ASSERT() + { + TS_ASSERT_THROWS_ASSERT( { throw 1; }, int i, + TS_ASSERT_EQUALS( i, 2 ) ); + + TS_ASSERT_THROWS_ASSERT( { throw Thing( 1 ); }, const Thing &thing, + TS_ASSERT_EQUALS( thing.i(), 2 ) ); + + TS_ASSERT_THROWS_ASSERT( { throw Thing( 1 ); }, const Thing &thing, + TS_FAIL( thing.i() ) ); + + TS_ASSERT_THROWS_ASSERT( { throw Thing( 1 ); }, const Thing &thing, + TS_ASSERT( thing.i() - 1 ) ); + + char zero = 0, one = 1; + TS_ASSERT_THROWS_ASSERT( { throw Thing( 1 ); }, const Thing &, + TS_ASSERT_SAME_DATA( &zero, &one, sizeof(char) ) ); + + TS_ASSERT_THROWS_ASSERT( { throw Thing( 1 ); }, const Thing &thing, + TS_ASSERT_DELTA( thing.i(), 5, 2 ) ); + + TS_ASSERT_THROWS_ASSERT( { throw Thing( 1 ); }, const Thing &thing, + TS_ASSERT_DIFFERS( thing.i(), 1 ) ); + + TS_ASSERT_THROWS_ASSERT( { throw Thing( 1 ); }, const Thing &thing, + TS_ASSERT_LESS_THAN( thing.i(), 1 ) ); + + TS_ASSERT_THROWS_ASSERT( { throw Thing( 1 ); }, const Thing &thing, + TS_ASSERT_PREDICATE( Fail, thing.i() ) ); + + TS_ASSERT_THROWS_ASSERT( { throw Thing( 1 ); }, const Thing &thing, + TS_ASSERT_RELATION( Fail, thing.i(), 33 ) ); + } +}; diff --git a/tools/cxxtest/test/TraitsTest.h b/tools/cxxtest/test/TraitsTest.h new file mode 100644 index 0000000..d8bc01d --- /dev/null +++ b/tools/cxxtest/test/TraitsTest.h @@ -0,0 +1,61 @@ +#define CXXTEST_HAVE_STD +#include + +// +// This test suite tests CxxTest's conversion of different values to strings +// + +class TraitsTest : public CxxTest::TestSuite +{ +public: + void testIntegerTraits() + { + TS_FAIL( (unsigned char)1 ); + TS_FAIL( (char)0x0F ); + TS_FAIL( (signed short int)-12 ); + TS_FAIL( (unsigned short int)34 ); + TS_FAIL( (signed int)-123 ); + TS_FAIL( (unsigned int)456 ); + TS_FAIL( (signed long int)-12345 ); + TS_FAIL( (unsigned long int)67890 ); + } + + void testFloatingPointTraits() + { + TS_FAIL( (float)0.12345678 ); + TS_FAIL( (double)0.12345678 ); + } + + void testBoolTraits() + { + TS_FAIL( true ); + TS_FAIL( false ); + } + + void testCharTraits() + { + TS_FAIL( 'A' ); + TS_FAIL( '\x04' ); + TS_FAIL( '\x1B' ); + TS_FAIL( '\0' ); + TS_FAIL( '\r' ); + TS_FAIL( '\n' ); + TS_FAIL( '\b' ); + TS_FAIL( '\t' ); + TS_FAIL( '\a' ); + TS_FAIL( (char)-5 ); + } + + void testStringTraits() + { + TS_FAIL( "(char *) is displayed as-is\n" ); + } + + void testStdStringTraits() + { + typedef CXXTEST_STD(string) String; + TS_FAIL( String( "std::string is displayed with \"\"" ) ); + TS_FAIL( String( "Escapes\rAre\rTranslated" ) ); + TS_FAIL( String( "As are unprintable chars: \x12\x34\x56\x78" ) ); + } +}; diff --git a/tools/cxxtest/test/Tsm.h b/tools/cxxtest/test/Tsm.h new file mode 100644 index 0000000..ee74c94 --- /dev/null +++ b/tools/cxxtest/test/Tsm.h @@ -0,0 +1,53 @@ +#include + +// +// This is a test of some of the TSM_ macros +// + +class TestMessageMacros : public CxxTest::TestSuite +{ +public: + void testMessageMacros() + { + int n = 42; + char x = 'x', y = 'y'; + + TSM_ASSERT( "String", false ); + TSM_ASSERT( n, false ); + TSM_ASSERT_EQUALS( "String", 2 + 2, 5 ); + TSM_ASSERT_EQUALS( n, 2 + 2, 5 ); + TSM_ASSERT_SAME_DATA( "String", &x, &y, 1 ); + TSM_ASSERT_SAME_DATA( n, &x, &y, 1 ); + TSM_ASSERT_DELTA( "String", 1.0, 2.0, 0.5 ); + TSM_ASSERT_DELTA( 42, 1.0, 2.0, 0.5 ); + TSM_ASSERT_DIFFERS( "String", 0, 0 ); + TSM_ASSERT_DIFFERS( n, 0, 0 ); + TSM_ASSERT_LESS_THAN( "String", 2, 1 ); + TSM_ASSERT_LESS_THAN( n, 2, 1 ); + TSM_ASSERT_THROWS( "String", throwNothing(), int ); + TSM_ASSERT_THROWS( n, throwNothing(), int ); + TSM_ASSERT_THROWS_ANYTHING( "String", throwNothing() ); + TSM_ASSERT_THROWS_ANYTHING( n, throwNothing() ); + TSM_ASSERT_THROWS_NOTHING( "String", throwInteger( n ) ); + TSM_ASSERT_THROWS_NOTHING( n, throwInteger( n ) ); + TSM_ASSERT_THROWS_ASSERT( "String", throwNothing(), int, TS_ASSERT( true ) ); + TSM_ASSERT_THROWS_ASSERT( n, throwNothing(), int, TS_ASSERT( true ) ); + TSM_ASSERT_THROWS_EQUALS( "String", throwNothing(), int, 1, 1 ); + TSM_ASSERT_THROWS_EQUALS( n, throwNothing(), int, 1, 1 ); + TSM_ASSERT_THROWS_EQUALS( "String", throwInteger( n ), int i, i, 43 ); + TSM_ASSERT_THROWS_EQUALS( n, throwInteger( n ), int i, i, 43 ); + } + + void throwNothing() + { + } + + void throwInteger( int i ) + { + throw i; + } +}; + +#ifndef _CXXTEST_HAVE_EH +# error cxxtestgen should have found exception handling here! +#endif // !_CXXTEST_HAVE_EH diff --git a/tools/cxxtest/test/UserTraits.h b/tools/cxxtest/test/UserTraits.h new file mode 100644 index 0000000..58dd44b --- /dev/null +++ b/tools/cxxtest/test/UserTraits.h @@ -0,0 +1,36 @@ +// +// This sample demonstrates rolling your own ValueTraits. +// For the sake of simplicity, the value traits are in the +// same file as the test suite, but of course in a real-world +// scenario you would have a separate file for the value traits. +// +// This file should be used with the template file UserTraits.tpl +// + + +// +// Declare our own ValueTraits which converts to hex notation +// +#include +#include + +namespace CxxTest +{ + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits + { + char _asString[128]; // Crude, but it should be enough + public: + ValueTraits( int i ) { sprintf( _asString, "0x%X", i ); } + const char *asString( void ) { return _asString; } + }; +} + +class TestUserTraits : public CxxTest::TestSuite +{ +public: + void testUserTraits() + { + TS_FAIL( 127 ); + } +}; diff --git a/tools/cxxtest/test/UserTraits.tpl b/tools/cxxtest/test/UserTraits.tpl new file mode 100644 index 0000000..9a69478 --- /dev/null +++ b/tools/cxxtest/test/UserTraits.tpl @@ -0,0 +1,20 @@ +// -*- C++ -*- +// See UserTraits.h + +#define CXXTEST_USER_VALUE_TRAITS +#include + +int main() +{ + return CxxTest::ErrorPrinter().run(); +} + +// The CxxTest "world" + + + +// +// Local Variables: +// compile-command: "perl test.pl" +// End: +// diff --git a/tools/cxxtest/test/VoidTraits.h b/tools/cxxtest/test/VoidTraits.h new file mode 100644 index 0000000..b3a8848 --- /dev/null +++ b/tools/cxxtest/test/VoidTraits.h @@ -0,0 +1,20 @@ +// +// This include file is used to test the --include option +// + +#ifdef CXXTEST_RUNNING + +#include + +namespace CxxTest +{ + CXXTEST_TEMPLATE_INSTANTIATION + class ValueTraits + { + public: + ValueTraits( void * ) {} + const char *asString( void ) { return "(void *)"; } + }; +} + +#endif diff --git a/tools/cxxtest/test/WideCharTest.h b/tools/cxxtest/test/WideCharTest.h new file mode 100644 index 0000000..3e9b2c7 --- /dev/null +++ b/tools/cxxtest/test/WideCharTest.h @@ -0,0 +1,18 @@ +#define CXXTEST_HAVE_STD +#include +#include + +// +// This test suite tests CxxTest's conversion of wchar_t-related values to strings +// + +class WideCharTest : public CxxTest::TestSuite +{ +public: + void testWideStringTraits() + { + TS_FAIL( std::basic_string( L"std::wstring is displayed with L\"\"" ) ); + wchar_t array[] = { (wchar_t)0x1234, (wchar_t)0x5678 }; + TS_FAIL( std::basic_string( array, 2 ) ); + } +}; diff --git a/tools/cxxtest/test/WorldFixtures.h b/tools/cxxtest/test/WorldFixtures.h new file mode 100644 index 0000000..cdc3d09 --- /dev/null +++ b/tools/cxxtest/test/WorldFixtures.h @@ -0,0 +1,40 @@ +// +// This file tests CxxTest global fixtures setUpWorld()/tearDownWorld() +// + +#include +#include +#include + +class PrintingFixture : public CxxTest::GlobalFixture +{ +public: + bool setUpWorld() { printf( "" ); return true; } + bool tearDownWorld() { printf( "" ); return true; } + bool setUp() { printf( "" ); return true; } + bool tearDown() { printf( "" ); return true; } +}; + +// +// We can rely on this file being included exactly once +// and declare this global variable in the header file. +// +static PrintingFixture printingFixture; + +// +// Now define some tests +// + +class FirstSuite : public CxxTest::TestSuite +{ +public: + void testOne() {} + void testTwo() {} +}; + +class SecondSuite : public CxxTest::TestSuite +{ +public: + void testOne() {} + void testTwo() {} +}; diff --git a/tools/cxxtest/test/__init__.py b/tools/cxxtest/test/__init__.py new file mode 100644 index 0000000..69dd2ee --- /dev/null +++ b/tools/cxxtest/test/__init__.py @@ -0,0 +1 @@ +# Dummy __init__ file for nosetests diff --git a/tools/cxxtest/test/abort.out b/tools/cxxtest/test/abort.out new file mode 100644 index 0000000..b2f4e82 --- /dev/null +++ b/tools/cxxtest/test/abort.out @@ -0,0 +1,111 @@ +Running 35 tests +In LessThanEquals::testLessThanEquals: +LessThanEquals.h:16: Error: Expected (1 <= 0), found (1 > 0) +In Relation::testPredicate: +Relation.h:19: Error: Expected MyNegative( 1 ), found !MyNegative( 1 ) +In Relation::testRelation: +Relation.h:29: Error: Expected MyLess( 2, 1 ), found !MyLess( 2, 1 ) +In DefaultTraits::testSmallDefaultTraits: +DefaultTraits.h:21: Error: Test failed: { 00 01 02 03 04 05 06 07 } +In DefaultTraits::testBigDefaultTraits: +DefaultTraits.h:35: Error: Test failed: { 98 99 9A 9B 9C 9D 9E 9F ... } +In DoubleCall::testAssertEqualsWithSideEffects: +DoubleCall.h:21: Error: Expected (increment() == 3), found (1 != 3) +In DoubleCall::testAssertDiffersWithSideEffects: +DoubleCall.h:26: Error: Expected (increment() != 1), found (1) +In DoubleCall::testAssertDeltaWithSideEffects: +DoubleCall.h:31: Error: Expected (increment() == 2.0) up to 0.5 (0.5000), found (1 != 2.0000) +In SameData::testAssertSameData: +SameData.h:23: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 E8 } +In SameData::testAssertMessageSameData: +SameData.h:28: Error: Test failed: Not same data +SameData.h:28: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 E8 } +In SameData::testSafeAssertSameData: +SameData.h:33: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 E8 } +In SameData::testSafeAssertMessageSameData: +SameData.h:38: Error: Test failed: Not same data +SameData.h:38: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 E8 } +. +In SameFiles::testAssertFileShorter: +SameFiles.h:18: Error: File 'SameFiles.h' ended before file 'SameFilesLonger.h' (line 42) += } += }; += +< + +In SameFiles::testAssertFileLonger: +SameFiles.h:23: Error: File 'SameFiles.h' ended before file 'SameFilesLonger.h' (line 42) += } += }; += +> + +In SameFiles::testAssertMessageSameFiles: +SameFiles.h:28: Error: Test failed: Not same files +SameFiles.h:28: Error: Files 'SameFiles.h' and 'SameData.h' differ at line 4 += #include += += // +< // This test suite demonstrates TS_ASSERT_SAME_ATA + +> // This test suite demonstrates TS_ASSERT_SAME_// + +. +In SameFiles::testSafeAssertMessageSameFiles: +SameFiles.h:38: Error: Test failed: Not same files +SameFiles.h:38: Error: Files 'SameFiles.h' and 'SameData.h' differ at line 4 += #include += += // +< // This test suite demonstrates TS_ASSERT_SAME_ATA + +> // This test suite demonstrates TS_ASSERT_SAME_// + +In TestMessageMacros::testMessageMacros: +Tsm.h:15: Error: Test failed: String +Tsm.h:15: Error: Assertion failed: false +In TraitsTest::testIntegerTraits: +TraitsTest.h:13: Error: Test failed: 1 +In TraitsTest::testFloatingPointTraits: +TraitsTest.h:25: Error: Test failed: 0.1234 +In TraitsTest::testBoolTraits: +TraitsTest.h:31: Error: Test failed: true +In TraitsTest::testCharTraits: +TraitsTest.h:37: Error: Test failed: 'A' +In TraitsTest::testStringTraits: +TraitsTest.h:51: Error: Test failed: (char *) is displayed as-is + +In TraitsTest::testStdStringTraits: +TraitsTest.h:57: Error: Test failed: "std::string is displayed with \"\"" +.. +In MockTest::test_Unimplemented: +MockTest.h:33: Error: Test failed: T::one( void ) called with no T::Base_one object +. +In MockTest::test_Mock_traits: +MockTest.h:40: Error: Test failed: T::getOpaque( int i ) called with no T::Base_getOpaque object +In MockTest::test_Override: +MockTest.h:33: Error: Test failed: T::one( void ) called with no T::Base_one object +. +In MockTest::test_Unimplemented_supply: +MockTest.h:42: Error: Test failed: T::supplyOne( void ) called with no T::Base_supplyOne object +. +In SameZero::test_TS_ASSERT_SAME_DATA_passed_zero: +SameZero.h:20: Error: Expected sizeof(data) (4) bytes to be equal at (data) and (0), found: +{ 00 01 02 03 } +differs from +(null) +Failed 28 of 35 tests +Success rate: 20% +Error level = 28 diff --git a/tools/cxxtest/test/activate.tpl b/tools/cxxtest/test/activate.tpl new file mode 100644 index 0000000..25dc773 --- /dev/null +++ b/tools/cxxtest/test/activate.tpl @@ -0,0 +1,19 @@ +// -*- C++ -*- +# include +# include + +int main() +{ + if ( !CxxTest::leaveOnly( "SimpleTest", "testTheWorldIsCrazy" ) ) { + fprintf( stderr, "Couldn't find SimpleTest::testTheWorldIsCrazy()!?\n" ); + return -1; + } + + CxxTest::activateAllTests(); + return CxxTest::StdioPrinter().run(); +} + + +// The CxxTest "world" + + diff --git a/tools/cxxtest/test/anything.cpp b/tools/cxxtest/test/anything.cpp new file mode 100644 index 0000000..e232940 --- /dev/null +++ b/tools/cxxtest/test/anything.cpp @@ -0,0 +1,6 @@ +// This simple source file is just used to verify that the compiler works + +int main() +{ + return 0; +} diff --git a/tools/cxxtest/test/bad.out b/tools/cxxtest/test/bad.out new file mode 100644 index 0000000..62f7c5f --- /dev/null +++ b/tools/cxxtest/test/bad.out @@ -0,0 +1,24 @@ +Running 7 tests +In BadTest::testEquality: +BadTest.h:15: Error: Expected (1 == 2), found (1 != 2) +BadTest.h:16: Error: Expected ('a' == 'A'), found ('a' != 'A') +BadTest.h:17: Error: Expected (1.0 == -12345678900000000000000000000000000000000000000000.1234), found (1.0000 != -1.2345E50) +In BadTest::testAddition: +BadTest.h:23: Error: Expected (2 + 2 == 5), found (4 != 5) +In BadTest::TestMultiplication: +BadTest.h:29: Error: Expected (4 * 4 == 44), found (16 != 44) +BadTest.h:30: Error: Expected (-2 * -2 != 4), found (4) +In BadTest::testComparison: +BadTest.h:36: Error: Expected (-1 < -2), found (-1 >= -2) +In BadTest::testTheWorldIsCrazy: +BadTest.h:41: Error: Expected (true == false), found (true != false) +In BadTest::test_Failure: +BadTest.h:46: Error: Test failed: Not implemented +BadTest.h:47: Error: Test failed: 1569779912 +In BadTest::test_TS_WARN_macro: +BadTest.h:52: Warning: Just a friendly warning +BadTest.h:53: Warning: Warnings don't abort the test +. +Failed 6 of 7 tests +Success rate: 14% +Error level = 6 diff --git a/tools/cxxtest/test/comments.out b/tools/cxxtest/test/comments.out new file mode 100644 index 0000000..81928ca --- /dev/null +++ b/tools/cxxtest/test/comments.out @@ -0,0 +1,5 @@ +Running 1 test +In Comments::test_Something: +Comments.h:12: Warning: Something +.OK! +Error level = 0 diff --git a/tools/cxxtest/test/comments2.out b/tools/cxxtest/test/comments2.out new file mode 100644 index 0000000..fd23bc6 --- /dev/null +++ b/tools/cxxtest/test/comments2.out @@ -0,0 +1,5 @@ +Running 1 test +In Comments::test_Something: +Comments2.h:12: Warning: Something +.OK! +Error level = 0 diff --git a/tools/cxxtest/test/cxxtest/DummyGui.h b/tools/cxxtest/test/cxxtest/DummyGui.h new file mode 100644 index 0000000..6d6c3da --- /dev/null +++ b/tools/cxxtest/test/cxxtest/DummyGui.h @@ -0,0 +1,45 @@ +#ifndef __CXXTEST__DUMMYGUI_H +#define __CXXTEST__DUMMYGUI_H + +// +// The DummyGui is a "GUI" that prints messages to cout +// It is used for testing CxxTest +// + +#include +#include +#include + +namespace CxxTest +{ + class DummyGui : public GuiListener + { + public: + void guiEnterWorld( unsigned numTotalTests ) + { + (CXXTEST_STD(cout) << " {Start " << numTotalTests << " tests} ").flush(); + } + + void guiEnterTest( const char *suiteName, const char *testName ) + { + (CXXTEST_STD(cout) << " {" << suiteName << "::" << testName << "()} ").flush(); + } + + void yellowBar() + { + (CXXTEST_STD(cout) << " {Yellow} ").flush(); + } + + void redBar() + { + (CXXTEST_STD(cout) << " {Red} ").flush(); + } + + void leaveWorld( const WorldDescription & ) + { + (CXXTEST_STD(cout) << " {Stop} ").flush(); + } + }; +} + +#endif //__CXXTEST__DUMMYGUI_H diff --git a/tools/cxxtest/test/default_abort.out b/tools/cxxtest/test/default_abort.out new file mode 100644 index 0000000..94b745c --- /dev/null +++ b/tools/cxxtest/test/default_abort.out @@ -0,0 +1,120 @@ +Running 32 tests +In NullCreate::: +Exceptions.h:10: Error: Test failed: createSuite() failed +Exceptions.h:10: Error: Assertion failed: suite() != 0 +In ThrowCreate::: +Exceptions.h:22: Error: Test failed: Exception thrown from createSuite() +Exceptions.h:22: Error: Expected (createSuite()) not to throw, but it did +Exceptions.h:22: Error: Test failed: createSuite() failed +Exceptions.h:22: Error: Assertion failed: suite() != 0 +. +In ThrowDestroy::: +Exceptions.h:35: Error: Test failed: destroySuite() failed +Exceptions.h:35: Error: Expected (destroySuite()) not to throw, but it did +In ThrowSetUp::testNothing: +Exceptions.h:46: Error: Test failed: Exception thrown from setUp() +Exceptions.h:46: Error: Expected (suite()->setUp(); ok=true) not to throw, but it did +In ThrowTearDown::testNothing: +Exceptions.h:55: Error: Test failed: Exception thrown from tearDown() +Exceptions.h:55: Error: Expected (suite()->tearDown()) not to throw, but it did +In TestThrowFromTest::testThrowSomething: +Exceptions.h:61: Error: Test failed: Exception thrown from test +In TestThrowFromTest::testMoveOn: +Exceptions.h:68: Trace: One failed test doesn't affect the others +. +In DynamicAbort::test_Abort_on_fail_in_this_test: +DynamicAbort.h:8: Error: Expected (1 == 2), found (1 != 2) +DynamicAbort.h:9: Error: Expected (2 == 3), found (2 != 3) +In DynamicAbort::test_Dont_abort_in_this_test: +DynamicAbort.h:15: Error: Expected (1 == 2), found (1 != 2) +DynamicAbort.h:16: Error: Expected (2 == 3), found (2 != 3) +In DynamicAbort::test_Revert_to_abort: +DynamicAbort.h:21: Error: Expected (1 == 2), found (1 != 2) +DynamicAbort.h:22: Error: Expected (2 == 3), found (2 != 3) +In SetUpWorksAllTests::test_Dont_abort_in_this_test: +DynamicAbort.h:36: Error: Expected (1 == 2), found (1 != 2) +DynamicAbort.h:37: Error: Expected (2 == 3), found (2 != 3) +In SetUpWorksAllTests::test_Dont_abort_in_this_test_either: +DynamicAbort.h:42: Error: Expected (1 == 2), found (1 != 2) +DynamicAbort.h:43: Error: Expected (2 == 3), found (2 != 3) +In SetUpWorksAllTests::test_Override_in_this_test: +DynamicAbort.h:49: Error: Expected (1 == 2), found (1 != 2) +In DeepAbort::testAssertThrowsPassesAbort: +DeepAbort.h:72: Error: Expected (0 == 1), found (0 != 1) +DeepAbort.h:12: Error: Expected (fail()) to throw (int) but it didn't throw +DeepAbort.h:13: Error: Test failed: You shouldn't see this if --abort-on-fail is used +In DeepAbort::testMessageAssertThrowsPassesAbort: +DeepAbort.h:72: Error: Expected (0 == 1), found (0 != 1) +DeepAbort.h:18: Error: Test failed: fail() should throw an int +DeepAbort.h:18: Error: Expected (fail()) to throw (int) but it didn't throw +DeepAbort.h:19: Error: Test failed: You shouldn't see this if --abort-on-fail is used +In DeepAbort::testAssertThrowsAborts: +DeepAbort.h:24: Error: Expected (succeed()) to throw (int) but it didn't throw +DeepAbort.h:25: Error: Test failed: You shouldn't see this if --abort-on-fail is used +In DeepAbort::testMessageAssertThrowsAborts: +DeepAbort.h:30: Error: Test failed: succeed() should throw an int +DeepAbort.h:30: Error: Expected (succeed()) to throw (int) but it didn't throw +DeepAbort.h:31: Error: Test failed: You shouldn't see this if --abort-on-fail is used +In DeepAbort::testAssertThrowsNothingPassesAbort: +DeepAbort.h:72: Error: Expected (0 == 1), found (0 != 1) +DeepAbort.h:37: Error: Test failed: You shouldn't see this if --abort-on-fail is used +In DeepAbort::testMessageAssertThrowsNothingPassesAbort: +DeepAbort.h:72: Error: Expected (0 == 1), found (0 != 1) +DeepAbort.h:43: Error: Test failed: You shouldn't see this if --abort-on-fail is used +In DeepAbort::testAssertThrowsNothingAborts: +DeepAbort.h:48: Error: Expected (throwSomething()) not to throw, but it did +DeepAbort.h:49: Error: Test failed: You shouldn't see this if --abort-on-fail is used +In DeepAbort::testMessageAssertThrowsNothingAborts: +DeepAbort.h:54: Error: Test failed: fail() shouldn't throw anything +DeepAbort.h:54: Error: Expected (throwSomething()) not to throw, but it did +DeepAbort.h:55: Error: Test failed: You shouldn't see this if --abort-on-fail is used +In DeepAbort::testAssertThrowsAnything: +DeepAbort.h:60: Error: Expected (succeed()) to throw (...) but it didn't throw +DeepAbort.h:61: Error: Test failed: You shouldn't see this if --abort-on-fail is used +In DeepAbort::testMessageAssertThrowsAnything: +DeepAbort.h:66: Error: Test failed: succeed() should throw something +DeepAbort.h:66: Error: Expected (succeed()) to throw (...) but it didn't throw +DeepAbort.h:67: Error: Test failed: You shouldn't see this if --abort-on-fail is used +In ThrowsAssert::test_TS_ASSERT_THROWS_EQUALS: +ThrowsAssert.h:23: Error: Expected (i == 2), found (1 != 2) +ThrowsAssert.h:24: Error: Expected (thing.i() == 2), found (1 != 2) +In ThrowsAssert::test_TS_ASSERT_THROWS_DIFFERS: +ThrowsAssert.h:29: Error: Expected (i != 1), found (1) +ThrowsAssert.h:30: Error: Expected (thing.i() != 1), found (1) +In ThrowsAssert::test_TS_ASSERT_THROWS_SAME_DATA: +ThrowsAssert.h:35: Error: Expected 3 (3) bytes to be equal at (s) and ("456"), found: +{ 31 32 33 } +differs from +{ 34 35 36 } +In ThrowsAssert::test_TS_ASSERT_THROWS_LESS_THAN: +ThrowsAssert.h:40: Error: Expected (i < 1), found (1 >= 1) +ThrowsAssert.h:41: Error: Expected (thing.i() < 1), found (1 >= 1) +In ThrowsAssert::test_TS_ASSERT_THROWS_LESS_THAN_EQUALS: +ThrowsAssert.h:46: Error: Expected (i <= 0), found (1 > 0) +ThrowsAssert.h:47: Error: Expected (thing.i() <= 0), found (1 > 0) +In ThrowsAssert::test_TS_ASSERT_THROWS_PREDICATE: +ThrowsAssert.h:52: Error: Expected Fail( i ), found !Fail( 1 ) +ThrowsAssert.h:53: Error: Expected Fail( thing.i() ), found !Fail( 1 ) +In ThrowsAssert::test_TS_ASSERT_THROWS_RELATION: +ThrowsAssert.h:58: Error: Expected Fail( i, 1 ), found !Fail( 1, 1 ) +ThrowsAssert.h:59: Error: Expected Fail( thing.i(), 1 ), found !Fail( 1, 1 ) +In ThrowsAssert::test_TS_ASSERT_THROWS_DELTA: +ThrowsAssert.h:64: Error: Expected (i == 3) up to 1 (1), found (1 != 3) +ThrowsAssert.h:65: Error: Expected (thing.i() == 3) up to 1 (1), found (1 != 3) +In ThrowsAssert::test_TS_ASSERT_THROWS_ASSERT: +ThrowsAssert.h:71: Error: Expected (i == 2), found (1 != 2) +ThrowsAssert.h:74: Error: Expected (thing.i() == 2), found (1 != 2) +ThrowsAssert.h:77: Error: Test failed: 1 +ThrowsAssert.h:80: Error: Assertion failed: thing.i() - 1 +ThrowsAssert.h:84: Error: Expected sizeof(char) (1) bytes to be equal at (&zero) and (&one), found: +{ 00 } +differs from +{ 01 } +ThrowsAssert.h:87: Error: Expected (thing.i() == 5) up to 2 (2), found (1 != 5) +ThrowsAssert.h:90: Error: Expected (thing.i() != 1), found (1) +ThrowsAssert.h:93: Error: Expected (thing.i() < 1), found (1 >= 1) +ThrowsAssert.h:96: Error: Expected Fail( thing.i() ), found !Fail( 1 ) +ThrowsAssert.h:99: Error: Expected Fail( thing.i(), 33 ), found !Fail( 1, 33 ) +Failed 31 of 32 tests +Success rate: 3% +Error level = 31 diff --git a/tools/cxxtest/test/eh_normals.out b/tools/cxxtest/test/eh_normals.out new file mode 100644 index 0000000..d5f039f --- /dev/null +++ b/tools/cxxtest/test/eh_normals.out @@ -0,0 +1,44 @@ +Running 13 tests +In NullCreate::: +Exceptions.h:10: Error: Test failed: createSuite() failed +Exceptions.h:10: Error: Assertion failed: suite() != 0 +In ThrowCreate::: +Exceptions.h:22: Error: Test failed: Exception thrown from createSuite() +Exceptions.h:22: Error: Expected (createSuite()) not to throw, but it did +Exceptions.h:22: Error: Test failed: createSuite() failed +Exceptions.h:22: Error: Assertion failed: suite() != 0 +. +In ThrowDestroy::: +Exceptions.h:35: Error: Test failed: destroySuite() failed +Exceptions.h:35: Error: Expected (destroySuite()) not to throw, but it did +In ThrowSetUp::testNothing: +Exceptions.h:46: Error: Test failed: Exception thrown from setUp() +Exceptions.h:46: Error: Expected (suite()->setUp(); ok=true) not to throw, but it did +In ThrowTearDown::testNothing: +Exceptions.h:55: Error: Test failed: Exception thrown from tearDown() +Exceptions.h:55: Error: Expected (suite()->tearDown()) not to throw, but it did +In TestThrowFromTest::testThrowSomething: +Exceptions.h:61: Error: Test failed: Exception thrown from test +In TestThrowFromTest::testMoveOn: +Exceptions.h:68: Trace: One failed test doesn't affect the others +. +In DynamicAbort::test_Abort_on_fail_in_this_test: +DynamicAbort.h:8: Error: Expected (1 == 2), found (1 != 2) +DynamicAbort.h:9: Error: Expected (2 == 3), found (2 != 3) +In DynamicAbort::test_Dont_abort_in_this_test: +DynamicAbort.h:15: Error: Expected (1 == 2), found (1 != 2) +DynamicAbort.h:16: Error: Expected (2 == 3), found (2 != 3) +In DynamicAbort::test_Revert_to_abort: +DynamicAbort.h:21: Error: Expected (1 == 2), found (1 != 2) +DynamicAbort.h:22: Error: Expected (2 == 3), found (2 != 3) +In SetUpWorksAllTests::test_Dont_abort_in_this_test: +DynamicAbort.h:36: Error: Expected (1 == 2), found (1 != 2) +DynamicAbort.h:37: Error: Expected (2 == 3), found (2 != 3) +In SetUpWorksAllTests::test_Dont_abort_in_this_test_either: +DynamicAbort.h:42: Error: Expected (1 == 2), found (1 != 2) +DynamicAbort.h:43: Error: Expected (2 == 3), found (2 != 3) +In SetUpWorksAllTests::test_Override_in_this_test: +DynamicAbort.h:49: Error: Expected (1 == 2), found (1 != 2) +Failed 12 of 13 tests +Success rate: 7% +Error level = 12 diff --git a/tools/cxxtest/test/eh_plus_abort.out b/tools/cxxtest/test/eh_plus_abort.out new file mode 100644 index 0000000..329134f --- /dev/null +++ b/tools/cxxtest/test/eh_plus_abort.out @@ -0,0 +1,63 @@ +Running 25 tests +In DynamicAbort::test_Abort_on_fail_in_this_test: +DynamicAbort.h:8: Error: Expected (1 == 2), found (1 != 2) +In DynamicAbort::test_Dont_abort_in_this_test: +DynamicAbort.h:15: Error: Expected (1 == 2), found (1 != 2) +DynamicAbort.h:16: Error: Expected (2 == 3), found (2 != 3) +In DynamicAbort::test_Revert_to_abort: +DynamicAbort.h:21: Error: Expected (1 == 2), found (1 != 2) +In SetUpWorksAllTests::test_Dont_abort_in_this_test: +DynamicAbort.h:36: Error: Expected (1 == 2), found (1 != 2) +DynamicAbort.h:37: Error: Expected (2 == 3), found (2 != 3) +In SetUpWorksAllTests::test_Dont_abort_in_this_test_either: +DynamicAbort.h:42: Error: Expected (1 == 2), found (1 != 2) +DynamicAbort.h:43: Error: Expected (2 == 3), found (2 != 3) +In SetUpWorksAllTests::test_Override_in_this_test: +DynamicAbort.h:49: Error: Expected (1 == 2), found (1 != 2) +In DeepAbort::testAssertThrowsPassesAbort: +DeepAbort.h:72: Error: Expected (0 == 1), found (0 != 1) +In DeepAbort::testMessageAssertThrowsPassesAbort: +DeepAbort.h:72: Error: Expected (0 == 1), found (0 != 1) +In DeepAbort::testAssertThrowsAborts: +DeepAbort.h:24: Error: Expected (succeed()) to throw (int) but it didn't throw +In DeepAbort::testMessageAssertThrowsAborts: +DeepAbort.h:30: Error: Test failed: succeed() should throw an int +DeepAbort.h:30: Error: Expected (succeed()) to throw (int) but it didn't throw +In DeepAbort::testAssertThrowsNothingPassesAbort: +DeepAbort.h:72: Error: Expected (0 == 1), found (0 != 1) +In DeepAbort::testMessageAssertThrowsNothingPassesAbort: +DeepAbort.h:72: Error: Expected (0 == 1), found (0 != 1) +In DeepAbort::testAssertThrowsNothingAborts: +DeepAbort.h:48: Error: Expected (throwSomething()) not to throw, but it did +In DeepAbort::testMessageAssertThrowsNothingAborts: +DeepAbort.h:54: Error: Test failed: fail() shouldn't throw anything +DeepAbort.h:54: Error: Expected (throwSomething()) not to throw, but it did +In DeepAbort::testAssertThrowsAnything: +DeepAbort.h:60: Error: Expected (succeed()) to throw (...) but it didn't throw +In DeepAbort::testMessageAssertThrowsAnything: +DeepAbort.h:66: Error: Test failed: succeed() should throw something +DeepAbort.h:66: Error: Expected (succeed()) to throw (...) but it didn't throw +In ThrowsAssert::test_TS_ASSERT_THROWS_EQUALS: +ThrowsAssert.h:23: Error: Expected (i == 2), found (1 != 2) +In ThrowsAssert::test_TS_ASSERT_THROWS_DIFFERS: +ThrowsAssert.h:29: Error: Expected (i != 1), found (1) +In ThrowsAssert::test_TS_ASSERT_THROWS_SAME_DATA: +ThrowsAssert.h:35: Error: Expected 3 (3) bytes to be equal at (s) and ("456"), found: +{ 31 32 33 } +differs from +{ 34 35 36 } +In ThrowsAssert::test_TS_ASSERT_THROWS_LESS_THAN: +ThrowsAssert.h:40: Error: Expected (i < 1), found (1 >= 1) +In ThrowsAssert::test_TS_ASSERT_THROWS_LESS_THAN_EQUALS: +ThrowsAssert.h:46: Error: Expected (i <= 0), found (1 > 0) +In ThrowsAssert::test_TS_ASSERT_THROWS_PREDICATE: +ThrowsAssert.h:52: Error: Expected Fail( i ), found !Fail( 1 ) +In ThrowsAssert::test_TS_ASSERT_THROWS_RELATION: +ThrowsAssert.h:58: Error: Expected Fail( i, 1 ), found !Fail( 1, 1 ) +In ThrowsAssert::test_TS_ASSERT_THROWS_DELTA: +ThrowsAssert.h:64: Error: Expected (i == 3) up to 1 (1), found (1 != 3) +In ThrowsAssert::test_TS_ASSERT_THROWS_ASSERT: +ThrowsAssert.h:71: Error: Expected (i == 2), found (1 != 2) +Failed 25 of 25 tests +Success rate: 0% +Error level = 25 diff --git a/tools/cxxtest/test/error.out b/tools/cxxtest/test/error.out new file mode 100644 index 0000000..a66addf --- /dev/null +++ b/tools/cxxtest/test/error.out @@ -0,0 +1,51 @@ +Running 14 tests +In CreatedTest::test_nothing: +CreatedTest.h:26: Error: Test failed: Nothing to test +. +In EnumTraits::test_Enum_traits: +EnumTraits.h:32: Error: Test failed: Yes +EnumTraits.h:33: Error: Test failed: No +EnumTraits.h:34: Error: Test failed: Maybe +EnumTraits.h:35: Error: Test failed: DontKnow +EnumTraits.h:36: Error: Test failed: DontCare +EnumTraits.h:37: Error: Test failed: (Answer)1000 +In ExceptionTest::testAssertion: +ExceptionTest.h:20: Error: Expected (throwThis(5)) to throw (const char *) but it threw something else +ExceptionTest.h:22: Error: Expected (goodFunction(1)) to throw (...) but it didn't throw +ExceptionTest.h:24: Error: Test failed: Unhandled exception +ExceptionTest.h:26: Error: Expected (throwThis(-1)) not to throw, but it did +ExceptionTest.h:31: Error: Test failed: throwThis(3) failed +In FixtureTest::test_strcpy: +FixtureTest.h:32: Error: Expected (_buffer[1] == 'E'), found ('e' != 'E') +In MessageTest::testValues: +MessageTest.h:24: Error: Test failed: My hovercraft +MessageTest.h:24: Error: Assertion failed: value != 0 +MessageTest.h:25: Error: Test failed: of eels +MessageTest.h:25: Error: Expected (value == value * value), found (2 != 4) +In SimpleTest::testEquality: +SimpleTest.h:16: Error: Expected (1 == 2), found (1 != 2) +SimpleTest.h:17: Error: Expected ('a' == 'A'), found ('a' != 'A') +SimpleTest.h:18: Error: Expected (1.0 == -12345678900000000000000000000000000000000000000000.1234), found (1.0000 != -1.2345E50) +In SimpleTest::testAddition: +SimpleTest.h:24: Error: Expected (2 + 2 == 5), found (4 != 5) +In SimpleTest::TestMultiplication: +SimpleTest.h:30: Error: Expected (4 * 4 == 44), found (16 != 44) +SimpleTest.h:31: Error: Expected (-2 * -2 != 4), found (4) +In SimpleTest::testComparison: +SimpleTest.h:37: Error: Expected (-1 < -2), found (-1 >= -2) +In SimpleTest::testTheWorldIsCrazy: +SimpleTest.h:42: Error: Expected (true == false), found (true != false) +In SimpleTest::test_Failure: +SimpleTest.h:47: Error: Test failed: Not implemented +SimpleTest.h:48: Error: Test failed: 1569779912 +In SimpleTest::test_TS_WARN_macro: +SimpleTest.h:53: Warning: Just a friendly warning +SimpleTest.h:54: Warning: Warnings don't abort the test +. +In TestFunky::testPets: +TraitsTest.h:59: Error: Expected (pet1 == pet2), found (Pet("dog") != Pet("cat")) +TraitsTest.h:61: Error: Expected (cat != gato), found (Pet("cat")) +TraitsTest.h:64: Error: Expected (String("Hello") == String("World!")), found ("Hello" != "World!") +Failed 12 of 14 tests +Success rate: 14% +Error level = 12 diff --git a/tools/cxxtest/test/factor.out b/tools/cxxtest/test/factor.out new file mode 100644 index 0000000..260bd6f --- /dev/null +++ b/tools/cxxtest/test/factor.out @@ -0,0 +1,72 @@ +Running 2 :) tests +In Factor::test_Some_numbers: +Factor.h:30: Warning: 53 :) +Factor.h:33: Warning: 0 +Factor.h:33: Warning: 1 +Factor.h:33: Warning: 2 :| +Factor.h:33: Warning: 3 :| +Factor.h:33: Warning: 4 = 2^2 +Factor.h:33: Warning: 5 :| +Factor.h:33: Warning: 6 = 2 * 3 +Factor.h:33: Warning: 7 :| +Factor.h:33: Warning: 8 = 2^3 +Factor.h:33: Warning: 9 = 3^2 +Factor.h:33: Warning: 10 = 2 * 5 +Factor.h:33: Warning: 11 :| +Factor.h:33: Warning: 12 = 2^2 * 3 +Factor.h:33: Warning: 13 :| +Factor.h:33: Warning: 14 = 2 * 7 +Factor.h:33: Warning: 15 = 3 * 5 +Factor.h:33: Warning: 16 = 2^4 +Factor.h:33: Warning: 17 :| +Factor.h:33: Warning: 18 = 2 * 3^2 +Factor.h:33: Warning: 19 :| +Factor.h:33: Warning: 20 = 2^2 * 5 +Factor.h:33: Warning: 21 = 3 * 7 +Factor.h:33: Warning: 22 = 2 * 11 +Factor.h:33: Warning: 23 :| +Factor.h:33: Warning: 24 = 2^3 * 3 +Factor.h:33: Warning: 25 = 5^2 +Factor.h:33: Warning: 26 = 2 * 13 +Factor.h:33: Warning: 27 = 3^3 +Factor.h:33: Warning: 28 = 2^2 * 7 +Factor.h:33: Warning: 29 :| +Factor.h:33: Warning: 30 = 2 * 3 * 5 +Factor.h:33: Warning: 31 :| +Factor.h:32: Error: Expected (n != 32), found (32) +Factor.h:33: Warning: 32 = 2^5 +Factor.h:33: Warning: 33 = 3 * 11 +Factor.h:33: Warning: 34 = 2 * 17 +Factor.h:33: Warning: 35 = 5 * 7 +Factor.h:33: Warning: 36 = 2^2 * 3^2 +Factor.h:33: Warning: 37 :( +Factor.h:33: Warning: 38 = 2 * 19 +Factor.h:33: Warning: 39 = 3 * 13 +Factor.h:33: Warning: 40 = 2^3 * 5 +Factor.h:33: Warning: 41 :( +Factor.h:33: Warning: 42 = 2 * 3 * 7 +Factor.h:33: Warning: 43 :( +Factor.h:33: Warning: 44 = 2^2 * 11 +Factor.h:33: Warning: 45 = 3^2 * 5 +Factor.h:33: Warning: 46 = 2 * 23 +Factor.h:33: Warning: 47 :( +Factor.h:33: Warning: 48 = 2^4 * 3 +Factor.h:33: Warning: 49 = 7^2 +Factor.h:33: Warning: 50 = 2 * 5^2 +Factor.h:33: Warning: 51 = 3 * 17 +Factor.h:33: Warning: 52 = 2^2 * 13 +Factor.h:33: Warning: 53 :( +Factor.h:33: Warning: 54 = 2 * 3^3 +Factor.h:33: Warning: 55 = 5 * 11 +Factor.h:33: Warning: 56 = 2^3 * 7 +Factor.h:33: Warning: 57 = 3 * 19 +Factor.h:33: Warning: 58 = 2 * 29 +Factor.h:33: Warning: 59 :( +Factor.h:33: Warning: 60 = 2^2 * 3 * 5 +Factor.h:33: Warning: 61 :( +Factor.h:33: Warning: 62 = 2 * 31 +Factor.h:33: Warning: 63 = 3^2 * 7 +. +Failed 1 of 2 :( tests +Success rate: 50% +Error level = 1 diff --git a/tools/cxxtest/test/fake/.cvsignore b/tools/cxxtest/test/fake/.cvsignore new file mode 100644 index 0000000..782a42d --- /dev/null +++ b/tools/cxxtest/test/fake/.cvsignore @@ -0,0 +1 @@ +*.cpp *_runner* \ No newline at end of file diff --git a/tools/cxxtest/test/fake/X11/Xlib.h b/tools/cxxtest/test/fake/X11/Xlib.h new file mode 100644 index 0000000..05eddd1 --- /dev/null +++ b/tools/cxxtest/test/fake/X11/Xlib.h @@ -0,0 +1,46 @@ +// Fake Xlib.h + +struct Display {}; +typedef int Window, Colormap, GC; +typedef const char *XID; +struct XFontStruct { int ascent, descent; }; +struct Screen {}; +struct XColor { int pixel; }; + +enum { Success, ExposureMask }; + +inline Display *XOpenDisplay(void *) { return 0; } +inline Colormap DefaultColormap( Display *, int ) { return 0; } +inline void XParseColor( Display *, Colormap, const char *, XColor * ) {} +inline int XAllocColor( Display *, Colormap, XColor *) { return 0; } +inline Window XCreateSimpleWindow( Display *, Window, int, int, int, int, int, int, int ) { return 0; } +inline Window RootWindow( Display *, int ) { return 0; } +inline GC XCreateGC( Display *, Window, int, int ) { return 0; } +inline XID XLoadFont( Display *, const char * ) { return 0; } +inline int XSetFont( Display *, GC, XID ) { return 0; } +inline XID XGContextFromGC( GC ) { return 0; } +inline XFontStruct *XQueryFont( Display *, const char * ) { return 0; } +inline int XFreeFontInfo( char **, XFontStruct *, int ) { return 0; } +inline int XSelectInput( Display *, Window, int ) { return 0; } +inline int XMapWindow( Display *, Window ) { return 0; } +inline Screen *XDefaultScreenOfDisplay( Display * ) { return 0; } +inline int WidthOfScreen( Screen * ) { return 0; } +inline int HeightOfScreen( Screen * ) { return 0; } +inline int XMoveResizeWindow( Display *, Window, int, int, int, int ) { return 0; } + +struct XEvent {}; +inline int XCheckMaskEvent( Display *, int, XEvent * ) { return 0; } +inline int XSetStandardProperties( Display *, Window, const char *, int, int, int, int, int ) { return 0; } + +struct XWindowAttributes { int width, height; }; +inline int XGetWindowAttributes( Display *, Window, XWindowAttributes * ) { return 0; } +inline int XSetForeground( Display *, GC, unsigned long ) { return 0; } +inline int XSetBackground( Display *, GC, unsigned long ) { return 0; } +inline int XFillRectangle( Display *, Window, GC, int, int, int, int ) { return 0; } +inline int XDrawLine( Display *, Window, GC, int, int, int, int ) { return 0; } +inline int XDrawString( Display *, Window, GC, int, int, const char *, int ) { return 0; } +inline int XFlush( Display * ) { return 0; } +inline int XFreeGC( Display *, GC ) { return 0; } +inline int XDestroyWindow( Display *, Window ) { return 0; } +inline int XCloseDisplay( Display * ) { return 0; } +inline int XTextWidth( XFontStruct *, const char *, int ) { return 0; } diff --git a/tools/cxxtest/test/fake/X11/Xutil.h b/tools/cxxtest/test/fake/X11/Xutil.h new file mode 100644 index 0000000..b2da513 --- /dev/null +++ b/tools/cxxtest/test/fake/X11/Xutil.h @@ -0,0 +1 @@ +// Fake Xutil.h diff --git a/tools/cxxtest/test/fake/commctrl.h b/tools/cxxtest/test/fake/commctrl.h new file mode 100644 index 0000000..b07e267 --- /dev/null +++ b/tools/cxxtest/test/fake/commctrl.h @@ -0,0 +1,25 @@ +#ifndef __FAKE__COMMCTRL_H__ +#define __FAKE__COMMCTRL_H__ + +#include + +#define PROGRESS_CLASS TEXT("PROGRESS_CLASS") +#define STATUSCLASSNAME TEXT("STATUSCLASSNAME") + +enum { PBM_SETRANGE32, PBM_SETRANGE, PBM_SETPOS, PBM_SETSTEP, PBM_STEPIT, PBM_SETBARCOLOR, + SB_SETTEXTA, SB_SETPARTS, BS_AUTOCHECKBOX, BM_SETCHECK, BST_UNCHECKED, BM_GETCHECK, + BST_CHECKED, PBS_SMOOTH }; + +#define ICC_BAR_CLASSES 1 +#define ICC_PROGRESS_CLASS 2 + +struct INITCOMMONCONTROLSEX +{ + DWORD dwSize; + DWORD dwICC; +}; + +inline void InitCommonControls() {} +inline int InitCommonControlsEx(INITCOMMONCONTROLSEX *) { return 0; } + +#endif // __FAKE__COMMCTRL_H__ diff --git a/tools/cxxtest/test/fake/qapplication.h b/tools/cxxtest/test/fake/qapplication.h new file mode 100644 index 0000000..f49d677 --- /dev/null +++ b/tools/cxxtest/test/fake/qapplication.h @@ -0,0 +1,14 @@ +// fake QApplication + +class QWidget; + +class QApplication +{ +public: + QApplication( int &, char ** ) {} + void exec() {} + void setMainWidget( void * ) {} + void processEvents() {} + static QWidget *desktop() { return 0; } + void *activeWindow() { return 0; } +}; diff --git a/tools/cxxtest/test/fake/qglobal.h b/tools/cxxtest/test/fake/qglobal.h new file mode 100644 index 0000000..7ae8e67 --- /dev/null +++ b/tools/cxxtest/test/fake/qglobal.h @@ -0,0 +1,2 @@ +// fake qglobal.h +#define QT_VERSION 0x030000 diff --git a/tools/cxxtest/test/fake/qlabel.h b/tools/cxxtest/test/fake/qlabel.h new file mode 100644 index 0000000..478709d --- /dev/null +++ b/tools/cxxtest/test/fake/qlabel.h @@ -0,0 +1,10 @@ +// fake QLabel +#include +#include + +class QLabel +{ +public: + QLabel( void * ) {} + void setText( const QString & ) {} +}; diff --git a/tools/cxxtest/test/fake/qlayout.h b/tools/cxxtest/test/fake/qlayout.h new file mode 100644 index 0000000..05eb0df --- /dev/null +++ b/tools/cxxtest/test/fake/qlayout.h @@ -0,0 +1,8 @@ +// fake qlayout.h + +class QVBoxLayout +{ +public: + QVBoxLayout( void * ) {} + void addWidget( void * ) {} +}; diff --git a/tools/cxxtest/test/fake/qmessagebox.h b/tools/cxxtest/test/fake/qmessagebox.h new file mode 100644 index 0000000..bf24a00 --- /dev/null +++ b/tools/cxxtest/test/fake/qmessagebox.h @@ -0,0 +1,8 @@ +// fake qmessagebox.h + +class QMessageBox +{ +public: + enum Icon { Information, Warning, Critical }; + static void *standardIcon( Icon ) { return 0; } +}; diff --git a/tools/cxxtest/test/fake/qpixmap.h b/tools/cxxtest/test/fake/qpixmap.h new file mode 100644 index 0000000..fae33d0 --- /dev/null +++ b/tools/cxxtest/test/fake/qpixmap.h @@ -0,0 +1,2 @@ +// fake qpixmap.h + diff --git a/tools/cxxtest/test/fake/qprogressbar.h b/tools/cxxtest/test/fake/qprogressbar.h new file mode 100644 index 0000000..9da6104 --- /dev/null +++ b/tools/cxxtest/test/fake/qprogressbar.h @@ -0,0 +1,29 @@ +// fake qprogressbar.h + +class QColorGroup +{ +public: + enum { Highlight }; +}; + +class QColor +{ +public: + QColor( int, int, int ) {} +}; + +class QPalette +{ +public: + void setColor( int, const QColor & ) {} +}; + +class QProgressBar +{ +public: + QProgressBar( int, void * ) {} + void setProgress( int ) {} + int progress() { return 0; } + QPalette palette() { return QPalette(); } + void setPalette( const QPalette & ) {} +}; diff --git a/tools/cxxtest/test/fake/qstatusbar.h b/tools/cxxtest/test/fake/qstatusbar.h new file mode 100644 index 0000000..b1efdc2 --- /dev/null +++ b/tools/cxxtest/test/fake/qstatusbar.h @@ -0,0 +1,10 @@ +// fake qstatusbar.h + +class QStatusBar +{ +public: + QStatusBar( void * ) {} + void setProgress() {} + void addWidget( void *, int ) {} + void removeWidget( void * ) {} +}; diff --git a/tools/cxxtest/test/fake/qstring.h b/tools/cxxtest/test/fake/qstring.h new file mode 100644 index 0000000..09e8205 --- /dev/null +++ b/tools/cxxtest/test/fake/qstring.h @@ -0,0 +1,17 @@ +// fake qstring.h +#ifndef __FAKE__QSTRING_H +#define __FAKE__QSTRING_H + +class QString +{ +public: + QString() {} + QString( const char * ) {} + bool operator==( const QString & ) { return false; } + + static QString number( int ) { return QString(); } +}; + +inline QString operator+( const QString &, const QString & ) { return QString(); } + +#endif // __FAKE__QSTRING_H diff --git a/tools/cxxtest/test/fake/qwidget.h b/tools/cxxtest/test/fake/qwidget.h new file mode 100644 index 0000000..c8752ef --- /dev/null +++ b/tools/cxxtest/test/fake/qwidget.h @@ -0,0 +1,23 @@ +// fake qwidget.h +#ifndef __FAKE__QWIDGET_H +#define __FAKE__QWIDGET_H + +class QString; + +class QWidget +{ +public: + bool isMinimized() { return false; } + void close( bool ) {} + void showMinimized() {} + void showNormal() {} + void setCaption( const QString & ) {} + void setIcon( void * ) {} + int x() { return 0; } + int y() { return 0; } + int width() { return 0; } + int height() { return 0; } + void setGeometry( int, int, int, int ) {} +}; + +#endif // __FAKE__QWIDGET_H diff --git a/tools/cxxtest/test/fake/windows.h b/tools/cxxtest/test/fake/windows.h new file mode 100644 index 0000000..1b6bf68 --- /dev/null +++ b/tools/cxxtest/test/fake/windows.h @@ -0,0 +1,122 @@ +#ifndef __FAKE__WINDOWS_H__ +#define __FAKE__WINDOWS_H__ + +#include + +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned int UINT; +typedef long LONG; +typedef unsigned long DWORD, ULONG, LRESULT, LPARAM, WPARAM; + +typedef int BOOL; +enum { FALSE, TRUE }; + +typedef struct _HANDLE {} *HANDLE; +typedef struct _HBRUSH {} *HBRUSH; +typedef struct _HCURSOR {} *HCURSOR; +typedef struct _HEAP {} *HEAP; +typedef struct _HICON {} *HICON; +typedef struct _HINSTANCE {} *HINSTANCE; +typedef struct _HMENU {} *HMENU; +typedef struct _HMODULE {} *HMODULE; +typedef struct _HWND {} *HWND; + +enum { INFINITE, CS_HREDRAW, CS_VREDRAW, COLOR_WINDOW, GWL_USERDATA, HWND_TOP, SPI_GETWORKAREA, + WS_CHILD, WS_VISIBLE, SM_CYCAPTION, SM_CYFRAME, SM_CXSCREEN, SM_CYSCREEN, + SW_SHOWNORMAL, SW_MINIMIZE, WM_SIZE, WM_SETICON, ICON_BIG, WS_OVERLAPPEDWINDOW, + WM_CREATE, WM_TIMER, WM_CLOSE, WM_DESTROY, WM_QUIT }; + +typedef void *LPVOID; + +#ifdef UNICODE +typedef wchar_t TCHAR; +#define TEXT(x) L##x +#else +typedef char TCHAR; +#define TEXT(x) x +#endif + +typedef const TCHAR *LPCTSTR; + +typedef char *LPSTR; +typedef const char *LPCSTR; +#define IDI_INFORMATION TEXT("IDI_INFORMATION") +#define IDI_WARNING TEXT("IDI_WARNING") +#define IDI_ERROR TEXT("IDI_ERROR") + +typedef void (*LPPROC)( void ); + +#define WINAPI +#define CALLBACK + +struct WNDCLASSEX +{ + int cbSize; + int style; + LRESULT CALLBACK (*lpfnWndProc)( HWND, UINT, WPARAM, LPARAM ); + int cbClsExtra; + int cbWndExtra; + HINSTANCE hInstance; + HICON hIcon; + HCURSOR hCursor; + HBRUSH hbrBackground; + LPCTSTR lpszMenuName; + LPCTSTR lpszClassName; + HICON hIconSm; +}; + +struct RECT +{ + LONG left, right, top, bottom; +}; + +struct MSG +{ +}; + +typedef struct +{ + LPVOID lpCreateParams; +} CREATESTRUCT, *LPCREATESTRUCT; + +inline HANDLE CreateEvent( LPVOID, BOOL, BOOL, LPVOID ) { return 0; } +inline HANDLE CreateThread( LPVOID, int, DWORD WINAPI (*)( LPVOID ), LPVOID, int, LPVOID ) { return 0; } +inline int WaitForSingleObject( HANDLE, int ) { return 0; } +inline int RegisterClassEx( WNDCLASSEX * ) { return 0; } +inline int SetWindowLong( HWND, int, LONG ) { return 0; } +inline LPARAM MAKELPARAM( unsigned short, unsigned short ) { return 0; } +inline HWND CreateWindow( LPCTSTR, LPVOID, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID ) { return 0; } +inline LRESULT SendMessage( HWND, UINT, WPARAM, LPARAM ) { return 0; } +inline LONG GetSystemMetrics( int ) { return 0; } +inline int SetWindowPos( HWND, int, LONG, LONG, LONG, LONG, int ) { return 0; } +inline int SystemParametersInfo( int, int, LPVOID, int ) { return 0; } +inline int ShowWindow( HWND, int ) { return 0; } +inline int UpdateWindow( HWND ) { return 0; } +inline int SetEvent( HANDLE ) { return 0; } +inline BOOL GetMessage( MSG *, LPVOID, int, int ) { return FALSE; } +inline int DispatchMessage( MSG * ) { return 0; } +inline int GetClientRect( HWND, RECT * ) { return 0; } +inline HICON LoadIcon( HINSTANCE, LPCTSTR ) { return 0; } +inline unsigned lstrlenA( LPCSTR ) { return 0; } +inline int lstrcmpA( LPCSTR, LPCSTR ) { return 0; } +inline int lstrcpyA( LPSTR, LPCSTR ) { return 0; } +inline int lstrcatA( LPSTR, LPCSTR ) { return 0; } +#define wsprintfA sprintf +inline int SetWindowTextA( HWND, LPCSTR ) { return 0; } +inline LPVOID HeapAlloc( HEAP, int, ULONG ) { return 0; } +inline HEAP GetProcessHeap() { return 0; } +inline int HeapFree( HEAP, int, LPVOID ) { return 0; } +inline int DestroyWindow( HWND ) { return 0; } +inline LONG GetWindowLong( HWND, int ) { return 0; } +inline LRESULT CALLBACK DefWindowProc( HWND, UINT, WPARAM, LPARAM ) { return 0; } +inline HMODULE LoadLibraryA( LPCSTR ) { return 0; } +inline LPPROC GetProcAddress( HMODULE, LPCSTR ) { return 0; } +inline int SetTimer( HWND, unsigned, unsigned, unsigned ) { return 0; } +inline int KillTimer( HWND, unsigned ) { return 0; } +inline DWORD GetTickCount() { return 0; } +inline int ExitProcess( int ) { return 0; } +inline bool IsIconic( HWND ) { return 0; } +inline HWND GetForegroundWindow() { return 0; } + +#endif // __FAKE__WINDOWS_H__ diff --git a/tools/cxxtest/test/gfsuf.out b/tools/cxxtest/test/gfsuf.out new file mode 100644 index 0000000..b10a9db --- /dev/null +++ b/tools/cxxtest/test/gfsuf.out @@ -0,0 +1,6 @@ +Running 1 test +In Suite::testOne: +GfSetUpFails.h:24: Error: Test failed: Error in GlobalFixture::setUp() +Failed 1 of 1 test +Success rate: 0% +Error level = 1 diff --git a/tools/cxxtest/test/gfsut.out b/tools/cxxtest/test/gfsut.out new file mode 100644 index 0000000..703083c --- /dev/null +++ b/tools/cxxtest/test/gfsut.out @@ -0,0 +1,6 @@ +Running 1 test +In Suite::testOne: +GfSetUpThrows.h:24: Error: Test failed: Error in GlobalFixture::setUp() +Failed 1 of 1 test +Success rate: 0% +Error level = 1 diff --git a/tools/cxxtest/test/gftdf.out b/tools/cxxtest/test/gftdf.out new file mode 100644 index 0000000..e6ff594 --- /dev/null +++ b/tools/cxxtest/test/gftdf.out @@ -0,0 +1,9 @@ +Running 2 tests +In Suite::testOne: +GfTearDownFails.h:24: Error: Test failed: Error in GlobalFixture::tearDown() +In Suite::testTwo: +GfTearDownFails.h:25: Warning: Testing should go on! +GfTearDownFails.h:25: Error: Test failed: Error in GlobalFixture::tearDown() +Failed 2 of 2 tests +Success rate: 0% +Error level = 2 diff --git a/tools/cxxtest/test/gftdt.out b/tools/cxxtest/test/gftdt.out new file mode 100644 index 0000000..15b009b --- /dev/null +++ b/tools/cxxtest/test/gftdt.out @@ -0,0 +1,9 @@ +Running 2 tests +In Suite::testOne: +GfTearDownThrows.h:24: Error: Test failed: Error in GlobalFixture::tearDown() +In Suite::testTwo: +GfTearDownThrows.h:25: Warning: Testing should go on! +GfTearDownThrows.h:25: Error: Test failed: Error in GlobalFixture::tearDown() +Failed 2 of 2 tests +Success rate: 0% +Error level = 2 diff --git a/tools/cxxtest/test/gfxs.out b/tools/cxxtest/test/gfxs.out new file mode 100644 index 0000000..77a56b5 --- /dev/null +++ b/tools/cxxtest/test/gfxs.out @@ -0,0 +1,2 @@ +Running 6 tests......OK! +Error level = 0 diff --git a/tools/cxxtest/test/good.out b/tools/cxxtest/test/good.out new file mode 100644 index 0000000..7b8cb27 --- /dev/null +++ b/tools/cxxtest/test/good.out @@ -0,0 +1,2 @@ +Running 18 tests..................OK! +Error level = 0 diff --git a/tools/cxxtest/test/gui.out b/tools/cxxtest/test/gui.out new file mode 100644 index 0000000..74edb6f --- /dev/null +++ b/tools/cxxtest/test/gui.out @@ -0,0 +1,15 @@ +{Start 7 tests} Running 7 tests {GreenYellowRed::test_Start_green()} . {GreenYellowRed::test_Green_again()} +In GreenYellowRed::test_Green_again: +GreenYellowRed.h:26: Trace: Still green +. {GreenYellowRed::test_Now_yellow()} {Yellow} +In GreenYellowRed::test_Now_yellow: +GreenYellowRed.h:32: Warning: Yellow +. {GreenYellowRed::test_Cannot_go_back()} . {GreenYellowRed::test_Finally_red()} {Red} +In GreenYellowRed::test_Finally_red: +GreenYellowRed.h:43: Error: Test failed: Red +{GreenYellowRed::test_Cannot_go_back_to_yellow()} In GreenYellowRed::test_Cannot_go_back_to_yellow: +GreenYellowRed.h:49: Warning: Yellow? +. {GreenYellowRed::test_Cannot_go_back_to_green()} . {Stop} +Failed 1 of 7 tests +Success rate: 85% +Error level = 1 diff --git a/tools/cxxtest/test/gui_paren.out b/tools/cxxtest/test/gui_paren.out new file mode 100644 index 0000000..c83a73d --- /dev/null +++ b/tools/cxxtest/test/gui_paren.out @@ -0,0 +1,15 @@ +{Start 7 tests} Running 7 tests {GreenYellowRed::test_Start_green()} . {GreenYellowRed::test_Green_again()} +In GreenYellowRed::test_Green_again: +test/../sample/gui/GreenYellowRed.h(26): Trace: Still green +. {GreenYellowRed::test_Now_yellow()} {Yellow} +In GreenYellowRed::test_Now_yellow: +test/../sample/gui/GreenYellowRed.h(32): Warning: Yellow +. {GreenYellowRed::test_Cannot_go_back()} . {GreenYellowRed::test_Finally_red()} {Red} +In GreenYellowRed::test_Finally_red: +test/../sample/gui/GreenYellowRed.h(43): Error: Test failed: Red +{GreenYellowRed::test_Cannot_go_back_to_yellow()} In GreenYellowRed::test_Cannot_go_back_to_yellow: +test/../sample/gui/GreenYellowRed.h(49): Warning: Yellow? +. {GreenYellowRed::test_Cannot_go_back_to_green()} . {Stop} +Failed 1 of 7 tests +Success rate: 85% +Error level = 1 diff --git a/tools/cxxtest/test/include.out b/tools/cxxtest/test/include.out new file mode 100644 index 0000000..43893b9 --- /dev/null +++ b/tools/cxxtest/test/include.out @@ -0,0 +1,6 @@ +Running 1 test +In IncludesTest::testTraits: +IncludeTest.h:12: Warning: (void *) +IncludeTest.h:13: Warning: (long *) +.OK! +Error level = 0 diff --git a/tools/cxxtest/test/infinite.out b/tools/cxxtest/test/infinite.out new file mode 100644 index 0000000..9215892 --- /dev/null +++ b/tools/cxxtest/test/infinite.out @@ -0,0 +1,11 @@ +Running 3 tests +In TestNonFinite::testNaN: +TestNonFinite.h:17: Error: Expected (nan == nan), found (nan != nan) +TestNonFinite.h:18: Error: Expected (nan == zero), found (nan != 0.0000) +In TestNonFinite::testPlusInf: +TestNonFinite.h:23: Error: Expected (3.0 == plus_inf), found (3.0000 != inf) +In TestNonFinite::testMinusInf: +TestNonFinite.h:28: Error: Expected (1.0/3.0 == minus_inf), found (0.3333 != -inf) +Failed 3 of 3 tests +Success rate: 0% +Error level = 3 diff --git a/tools/cxxtest/test/inheritance.out b/tools/cxxtest/test/inheritance.out new file mode 100644 index 0000000..b99c4f1 --- /dev/null +++ b/tools/cxxtest/test/inheritance.out @@ -0,0 +1,44 @@ +Running 14 tests +In InheritedTests1::testEquality: +InheritedTest.h:16: Error: Expected (1 == 2), found (1 != 2) +InheritedTest.h:17: Error: Expected ('a' == 'A'), found ('a' != 'A') +InheritedTest.h:18: Error: Expected (1.0 == -12345678900000000000000000000000000000000000000000.1234), found (1.0000 != -1.2345E50) +In InheritedTests1::testAddition: +InheritedTest.h:24: Error: Expected (2 + 2 == 5), found (4 != 5) +In InheritedTests1::TestMultiplication: +InheritedTest.h:30: Error: Expected (4 * 4 == 44), found (16 != 44) +InheritedTest.h:31: Error: Expected (-2 * -2 != 4), found (4) +In InheritedTests1::testComparison: +InheritedTest.h:37: Error: Expected (-1 < -2), found (-1 >= -2) +In InheritedTests1::testTheWorldIsCrazy: +InheritedTest.h:42: Error: Expected (true == false), found (true != false) +In InheritedTests1::test_Failure: +InheritedTest.h:47: Error: Test failed: Not implemented +InheritedTest.h:48: Error: Test failed: 1569779912 +In InheritedTests1::test_TS_WARN_macro: +InheritedTest.h:53: Warning: Just a friendly warning +InheritedTest.h:54: Warning: Warnings don't abort the test +. +In InheritedTests2::testEquality: +InheritedTest.h:16: Error: Expected (1 == 2), found (1 != 2) +InheritedTest.h:17: Error: Expected ('a' == 'A'), found ('a' != 'A') +InheritedTest.h:18: Error: Expected (1.0 == -12345678900000000000000000000000000000000000000000.1234), found (1.0000 != -1.2345E50) +In InheritedTests2::testAddition: +InheritedTest.h:24: Error: Expected (2 + 2 == 5), found (4 != 5) +In InheritedTests2::TestMultiplication: +InheritedTest.h:30: Error: Expected (4 * 4 == 44), found (16 != 44) +InheritedTest.h:31: Error: Expected (-2 * -2 != 4), found (4) +In InheritedTests2::testComparison: +InheritedTest.h:37: Error: Expected (-1 < -2), found (-1 >= -2) +In InheritedTests2::testTheWorldIsCrazy: +InheritedTest.h:42: Error: Expected (true == false), found (true != false) +In InheritedTests2::test_Failure: +InheritedTest.h:47: Error: Test failed: Not implemented +InheritedTest.h:48: Error: Test failed: 1569779912 +In InheritedTests2::test_TS_WARN_macro: +InheritedTest.h:53: Warning: Just a friendly warning +InheritedTest.h:54: Warning: Warnings don't abort the test +. +Failed 12 of 14 tests +Success rate: 14% +Error level = 12 diff --git a/tools/cxxtest/test/int64.cpp b/tools/cxxtest/test/int64.cpp new file mode 100644 index 0000000..c529f72 --- /dev/null +++ b/tools/cxxtest/test/int64.cpp @@ -0,0 +1,8 @@ +// +// This program is used to check if the compiler supports __int64 +// +int main() +{ + __int64 ll = 0; + return (int)ll; +} diff --git a/tools/cxxtest/test/int64.out b/tools/cxxtest/test/int64.out new file mode 100644 index 0000000..920a838 --- /dev/null +++ b/tools/cxxtest/test/int64.out @@ -0,0 +1,8 @@ +Running 1 test +In Int64::testInt64: +Int64.h:12: Error: Expected ((__int64)1 == (__int64)2), found (1 != 2) +Int64.h:13: Error: Expected ((__int64)3 != (__int64)3), found (3) +Int64.h:14: Error: Expected ((__int64)5 < (__int64)4), found (5 >= 4) +Failed 1 of 1 test +Success rate: 0% +Error level = 1 diff --git a/tools/cxxtest/test/longlong.cpp b/tools/cxxtest/test/longlong.cpp new file mode 100644 index 0000000..a744e04 --- /dev/null +++ b/tools/cxxtest/test/longlong.cpp @@ -0,0 +1,8 @@ +// +// This program is used to check if the compiler supports "long long" +// +int main() +{ + long long ll = 0; + return (int)ll; +} diff --git a/tools/cxxtest/test/longlong.out b/tools/cxxtest/test/longlong.out new file mode 100644 index 0000000..f834eec --- /dev/null +++ b/tools/cxxtest/test/longlong.out @@ -0,0 +1,8 @@ +Running 1 test +In LongLongTest::testLongLong: +LongLong.h:12: Error: Expected ((long long)1 == (long long)2), found (1 != 2) +LongLong.h:13: Error: Expected ((long long)3 != (long long)3), found (3) +LongLong.h:14: Error: Expected ((long long)5 < (long long)4), found (5 >= 4) +Failed 1 of 1 test +Success rate: 0% +Error level = 1 diff --git a/tools/cxxtest/test/main.cpp b/tools/cxxtest/test/main.cpp new file mode 100644 index 0000000..afb6aa2 --- /dev/null +++ b/tools/cxxtest/test/main.cpp @@ -0,0 +1,33 @@ +#include +#include +#include + +// +// This test runner printer some statistics at the end of the run. +// Note that it uses and not for compatibility +// with older compilers. +// + +using namespace CxxTest; + +class SummaryPrinter : public CxxTest::TestListener +{ +public: + void run() + { + CxxTest::TestRunner::runAllTests( *this ); + } + + void leaveWorld( const CxxTest::WorldDescription &wd ) + { + printf( "Number of suites: %u\n", wd.numSuites() ); + printf( "Number of tests: %u\n", wd.numTotalTests() ); + printf( "Number of failed tests: %u\n", TestTracker::tracker().failedTests() ); + } +}; + +int main() +{ + SummaryPrinter().run(); + return 0; +} diff --git a/tools/cxxtest/test/max.out b/tools/cxxtest/test/max.out new file mode 100644 index 0000000..8a4b98f --- /dev/null +++ b/tools/cxxtest/test/max.out @@ -0,0 +1,56 @@ +Running 10 tests +In DynamicMax::test_Max_size_from_define: +DynamicMax.h:19: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 ... } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC ... } +In DynamicMax::test_Set_max_size: +DynamicMax.h:25: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ... } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 ... } +In DynamicMax::test_Revert_to_max_size_from_define: +DynamicMax.h:30: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 ... } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC ... } +In DynamicMax::test_Set_max_size_to_zero__dumps_all: +DynamicMax.h:36: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 E8 } +In SetUpAffectsAllTests::test_Use_12_in_this_test: +DynamicMax.h:58: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B ... } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 ... } +In SetUpAffectsAllTests::test_Use_12_in_this_test_too: +DynamicMax.h:63: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B ... } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 ... } +In SameData::testAssertSameData: +SameData.h:23: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 ... } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC ... } +In SameData::testAssertMessageSameData: +SameData.h:28: Error: Test failed: Not same data +SameData.h:28: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 ... } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC ... } +In SameData::testSafeAssertSameData: +SameData.h:33: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 ... } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC ... } +In SameData::testSafeAssertMessageSameData: +SameData.h:38: Error: Test failed: Not same data +SameData.h:38: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 ... } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC ... } +Failed 10 of 10 tests +Success rate: 0% +Error level = 10 diff --git a/tools/cxxtest/test/normal.out b/tools/cxxtest/test/normal.out new file mode 100644 index 0000000..bd5ac1e --- /dev/null +++ b/tools/cxxtest/test/normal.out @@ -0,0 +1,204 @@ +Running 35 tests +In LessThanEquals::testLessThanEquals: +LessThanEquals.h:16: Error: Expected (1 <= 0), found (1 > 0) +LessThanEquals.h:17: Error: Test failed: 1 <=? 0 +LessThanEquals.h:17: Error: Expected (1 <= 0), found (1 > 0) +LessThanEquals.h:19: Error: Expected (1 < 0), found (1 >= 0) +LessThanEquals.h:20: Error: Test failed: 1 <=? 0 +LessThanEquals.h:20: Error: Expected (1 <= 0), found (1 > 0) +In Relation::testPredicate: +Relation.h:19: Error: Expected MyNegative( 1 ), found !MyNegative( 1 ) +Relation.h:20: Error: Test failed: 1 ( 2, 1 ), found !MyLess( 2, 1 ) +Relation.h:30: Error: Test failed: 2 ( 2, 1 ), found !MyLess( 2, 1 ) +Relation.h:32: Warning: 1 +Relation.h:34: Warning: 1 +In DefaultTraits::testSmallDefaultTraits: +DefaultTraits.h:21: Error: Test failed: { 00 01 02 03 04 05 06 07 } +In DefaultTraits::testBigDefaultTraits: +DefaultTraits.h:35: Error: Test failed: { 98 99 9A 9B 9C 9D 9E 9F ... } +In DoubleCall::testAssertEqualsWithSideEffects: +DoubleCall.h:21: Error: Expected (increment() == 3), found (1 != 3) +In DoubleCall::testAssertDiffersWithSideEffects: +DoubleCall.h:26: Error: Expected (increment() != 1), found (1) +In DoubleCall::testAssertDeltaWithSideEffects: +DoubleCall.h:31: Error: Expected (increment() == 2.0) up to 0.5 (0.5000), found (1 != 2.0000) +In SameData::testAssertSameData: +SameData.h:23: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 E8 } +In SameData::testAssertMessageSameData: +SameData.h:28: Error: Test failed: Not same data +SameData.h:28: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 E8 } +In SameData::testSafeAssertSameData: +SameData.h:33: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 E8 } +In SameData::testSafeAssertMessageSameData: +SameData.h:38: Error: Test failed: Not same data +SameData.h:38: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 E8 } +. +In SameFiles::testAssertFileShorter: +SameFiles.h:18: Error: File 'SameFiles.h' ended before file 'SameFilesLonger.h' (line 42) += } += }; += +< + +In SameFiles::testAssertFileLonger: +SameFiles.h:23: Error: File 'SameFiles.h' ended before file 'SameFilesLonger.h' (line 42) += } += }; += +> + +In SameFiles::testAssertMessageSameFiles: +SameFiles.h:28: Error: Test failed: Not same files +SameFiles.h:28: Error: Files 'SameFiles.h' and 'SameData.h' differ at line 4 += #include += += // +< // This test suite demonstrates TS_ASSERT_SAME_ATA + +> // This test suite demonstrates TS_ASSERT_SAME_// + +. +In SameFiles::testSafeAssertMessageSameFiles: +SameFiles.h:38: Error: Test failed: Not same files +SameFiles.h:38: Error: Files 'SameFiles.h' and 'SameData.h' differ at line 4 += #include += += // +< // This test suite demonstrates TS_ASSERT_SAME_ATA + +> // This test suite demonstrates TS_ASSERT_SAME_// + +In TestMessageMacros::testMessageMacros: +Tsm.h:15: Error: Test failed: String +Tsm.h:15: Error: Assertion failed: false +Tsm.h:16: Error: Test failed: 42 +Tsm.h:16: Error: Assertion failed: false +Tsm.h:17: Error: Test failed: String +Tsm.h:17: Error: Expected (2 + 2 == 5), found (4 != 5) +Tsm.h:18: Error: Test failed: 42 +Tsm.h:18: Error: Expected (2 + 2 == 5), found (4 != 5) +Tsm.h:19: Error: Test failed: String +Tsm.h:19: Error: Expected 1 (1) bytes to be equal at (&x) and (&y), found: +{ 78 } +differs from +{ 79 } +Tsm.h:20: Error: Test failed: 42 +Tsm.h:20: Error: Expected 1 (1) bytes to be equal at (&x) and (&y), found: +{ 78 } +differs from +{ 79 } +Tsm.h:21: Error: Test failed: String +Tsm.h:21: Error: Expected (1.0 == 2.0) up to 0.5 (0.5000), found (1.0000 != 2.0000) +Tsm.h:22: Error: Test failed: 42 +Tsm.h:22: Error: Expected (1.0 == 2.0) up to 0.5 (0.5000), found (1.0000 != 2.0000) +Tsm.h:23: Error: Test failed: String +Tsm.h:23: Error: Expected (0 != 0), found (0) +Tsm.h:24: Error: Test failed: 42 +Tsm.h:24: Error: Expected (0 != 0), found (0) +Tsm.h:25: Error: Test failed: String +Tsm.h:25: Error: Expected (2 < 1), found (2 >= 1) +Tsm.h:26: Error: Test failed: 42 +Tsm.h:26: Error: Expected (2 < 1), found (2 >= 1) +Tsm.h:27: Error: Test failed: String +Tsm.h:27: Error: Expected (throwNothing()) to throw (int) but it didn't throw +Tsm.h:28: Error: Test failed: 42 +Tsm.h:28: Error: Expected (throwNothing()) to throw (int) but it didn't throw +Tsm.h:29: Error: Test failed: String +Tsm.h:29: Error: Expected (throwNothing()) to throw (...) but it didn't throw +Tsm.h:30: Error: Test failed: 42 +Tsm.h:30: Error: Expected (throwNothing()) to throw (...) but it didn't throw +Tsm.h:31: Error: Test failed: String +Tsm.h:31: Error: Expected (throwInteger( n )) not to throw, but it did +Tsm.h:32: Error: Test failed: 42 +Tsm.h:32: Error: Expected (throwInteger( n )) not to throw, but it did +Tsm.h:33: Error: Test failed: String +Tsm.h:33: Error: Expected (throwNothing()) to throw (int) but it didn't throw +Tsm.h:34: Error: Test failed: 42 +Tsm.h:34: Error: Expected (throwNothing()) to throw (int) but it didn't throw +Tsm.h:35: Error: Test failed: String +Tsm.h:35: Error: Expected (throwNothing()) to throw (int) but it didn't throw +Tsm.h:36: Error: Test failed: 42 +Tsm.h:36: Error: Expected (throwNothing()) to throw (int) but it didn't throw +Tsm.h:37: Error: Test failed: String +Tsm.h:37: Error: Expected (i == 43), found (42 != 43) +Tsm.h:38: Error: Test failed: 42 +Tsm.h:38: Error: Expected (i == 43), found (42 != 43) +In TraitsTest::testIntegerTraits: +TraitsTest.h:13: Error: Test failed: 1 +TraitsTest.h:14: Error: Test failed: '\x0F' +TraitsTest.h:15: Error: Test failed: -12 +TraitsTest.h:16: Error: Test failed: 34 +TraitsTest.h:17: Error: Test failed: -123 +TraitsTest.h:18: Error: Test failed: 456 +TraitsTest.h:19: Error: Test failed: -12345 +TraitsTest.h:20: Error: Test failed: 67890 +In TraitsTest::testFloatingPointTraits: +TraitsTest.h:25: Error: Test failed: 0.1234 +TraitsTest.h:26: Error: Test failed: 0.1234 +In TraitsTest::testBoolTraits: +TraitsTest.h:31: Error: Test failed: true +TraitsTest.h:32: Error: Test failed: false +In TraitsTest::testCharTraits: +TraitsTest.h:37: Error: Test failed: 'A' +TraitsTest.h:38: Error: Test failed: '\x04' +TraitsTest.h:39: Error: Test failed: '\x1B' +TraitsTest.h:40: Error: Test failed: '\0' +TraitsTest.h:41: Error: Test failed: '\r' +TraitsTest.h:42: Error: Test failed: '\n' +TraitsTest.h:43: Error: Test failed: '\b' +TraitsTest.h:44: Error: Test failed: '\t' +TraitsTest.h:45: Error: Test failed: '\a' +TraitsTest.h:46: Error: Test failed: '\xFB' +In TraitsTest::testStringTraits: +TraitsTest.h:51: Error: Test failed: (char *) is displayed as-is + +In TraitsTest::testStdStringTraits: +TraitsTest.h:57: Error: Test failed: "std::string is displayed with \"\"" +TraitsTest.h:58: Error: Test failed: "Escapes\rAre\rTranslated" +TraitsTest.h:59: Error: Test failed: "As are unprintable chars: \x124Vx" +.. +In MockTest::test_Unimplemented: +MockTest.h:33: Error: Test failed: T::one( void ) called with no T::Base_one object +MockTest.h:129: Error: Expected (T::one() == 1), found (0 != 1) +. +In MockTest::test_Mock_traits: +MockTest.h:40: Error: Test failed: T::getOpaque( int i ) called with no T::Base_getOpaque object +MockTest.h:143: Error: Expected (T::getOpaque( 3 ).value == 72), found (42 != 72) +In MockTest::test_Override: +MockTest.h:33: Error: Test failed: T::one( void ) called with no T::Base_one object +MockTest.h:157: Error: Expected (T::one() == 1), found (0 != 1) +. +In MockTest::test_Unimplemented_supply: +MockTest.h:42: Error: Test failed: T::supplyOne( void ) called with no T::Base_supplyOne object +MockTest.h:168: Error: Expected (supplyOne() == 1), found (0 != 1) +. +In SameZero::test_TS_ASSERT_SAME_DATA_passed_zero: +SameZero.h:20: Error: Expected sizeof(data) (4) bytes to be equal at (data) and (0), found: +{ 00 01 02 03 } +differs from +(null) +SameZero.h:21: Error: Expected sizeof(data) (4) bytes to be equal at (0) and (data), found: +(null) +differs from +{ 00 01 02 03 } +Failed 28 of 35 tests +Success rate: 20% +Error level = 28 diff --git a/tools/cxxtest/test/normal.xml b/tools/cxxtest/test/normal.xml new file mode 100644 index 0000000..b09a2c1 --- /dev/null +++ b/tools/cxxtest/test/normal.xml @@ -0,0 +1,437 @@ + + + +Error: Expected (1 <= 0), found (1 > 0) +Test failed: 1 <=? 0 +Error: Expected (1 <= 0), found (1 > 0) +Error: Expected (1 < 0), found (1 >= 0) +Test failed: 1 <=? 0 +Error: Expected (1 <= 0), found (1 > 0) + +In LessThanEquals::testLessThanEquals: +LessThanEquals.h:16: Error: Expected (1 <= 0), found (1 > 0) +LessThanEquals.h:17: Error: Test failed: 1 <=? 0 +LessThanEquals.h:17: Error: Expected (1 <= 0), found (1 > 0) +LessThanEquals.h:19: Error: Expected (1 < 0), found (1 >= 0) +LessThanEquals.h:20: Error: Test failed: 1 <=? 0 +LessThanEquals.h:20: Error: Expected (1 <= 0), found (1 > 0) + + + +Error: Expected MyNegative( 1 ), found !MyNegative( 1 ) +Test failed: 1 <? 0 +Error: Expected MyNegative( 1 ), found !MyNegative( 1 ) +1 +1 +In Relation::testPredicate: +Relation.h:19: Error: Expected MyNegative( 1 ), found !MyNegative( 1 ) +Relation.h:20: Error: Test failed: 1 <? 0 +Relation.h:20: Error: Expected MyNegative( 1 ), found !MyNegative( 1 ) +Relation.h:22: Warning: 1 +Relation.h:24: Warning: 1 + + + +Error: Expected MyLess<int>( 2, 1 ), found !MyLess<int>( 2, 1 ) +Test failed: 2 <? 1 +Error: Expected MyLess<int>( 2, 1 ), found !MyLess<int>( 2, 1 ) +1 +1 +In Relation::testRelation: +Relation.h:29: Error: Expected MyLess<int>( 2, 1 ), found !MyLess<int>( 2, 1 ) +Relation.h:30: Error: Test failed: 2 <? 1 +Relation.h:30: Error: Expected MyLess<int>( 2, 1 ), found !MyLess<int>( 2, 1 ) +Relation.h:32: Warning: 1 +Relation.h:34: Warning: 1 + + + +Test failed: { 00 01 02 03 04 05 06 07 } +In DefaultTraits::testSmallDefaultTraits: +DefaultTraits.h:21: Error: Test failed: { 00 01 02 03 04 05 06 07 } + + + +Test failed: { 98 99 9A 9B 9C 9D 9E 9F ... } +In DefaultTraits::testBigDefaultTraits: +DefaultTraits.h:35: Error: Test failed: { 98 99 9A 9B 9C 9D 9E 9F ... } + + + +Error: Expected (increment() == 3), found (1 != 3) +In DoubleCall::testAssertEqualsWithSideEffects: +DoubleCall.h:21: Error: Expected (increment() == 3), found (1 != 3) + + + +Error: Expected (increment() != 1), found (1) +In DoubleCall::testAssertDiffersWithSideEffects: +DoubleCall.h:26: Error: Expected (increment() != 1), found (1) + + + +Error: Expected (increment() == 2.0) up to 0.5 (0.5000), found (1 != 2.0000) +In DoubleCall::testAssertDeltaWithSideEffects: +DoubleCall.h:31: Error: Expected (increment() == 2.0) up to 0.5 (0.5000), found (1 != 2.0000) + + + +Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found +In SameData::testAssertSameData: +SameData.h:23: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 E8 } + + + +Test failed: Not same data +Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found +In SameData::testAssertMessageSameData: +SameData.h:28: Error: Test failed: Not same data +SameData.h:28: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 E8 } + + + +Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found +In SameData::testSafeAssertSameData: +SameData.h:33: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 E8 } + + + +Test failed: Not same data +Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found +In SameData::testSafeAssertMessageSameData: +SameData.h:38: Error: Test failed: Not same data +SameData.h:38: Error: Expected DATA_SIZE (24) bytes to be equal at (x) and (y), found: +{ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 } +differs from +{ FF FE FD FC FB FA F9 F8 F7 F6 F5 F4 F3 F2 F1 F0 EF EE ED EC EB EA E9 E8 } + + + + +Error: File 'SameFiles.h' ended before file 'SameFilesLonger.h' (line 42) += } += }; += +< + + +In SameFiles::testAssertFileShorter: +SameFiles.h:18: Error: File 'SameFiles.h' ended before file 'SameFilesLonger.h' (line 42) += } += }; += +< + + + + +Error: File 'SameFiles.h' ended before file 'SameFilesLonger.h' (line 42) += } += }; += +> + +In SameFiles::testAssertFileLonger: +SameFiles.h:23: Error: File 'SameFiles.h' ended before file 'SameFilesLonger.h' (line 42) += } += }; += +> + + + + +Test failed: Not same files +Error: Files 'SameFiles.h' and 'SameData.h' differ at line 4 += #include <cxxtest/TestSuite.h> += += // +< // This test suite demonstrates TS_ASSERT_SAME_ATA + +> // This test suite demonstrates TS_ASSERT_SAME_// + +In SameFiles::testAssertMessageSameFiles: +SameFiles.h:28: Error: Test failed: Not same files +SameFiles.h:28: Error: Files 'SameFiles.h' and 'SameData.h' differ at line 4 += #include <cxxtest/TestSuite.h> += += // +< // This test suite demonstrates TS_ASSERT_SAME_ATA + +> // This test suite demonstrates TS_ASSERT_SAME_// + + + + + +Test failed: Not same files +Error: Files 'SameFiles.h' and 'SameData.h' differ at line 4 += #include <cxxtest/TestSuite.h> += += // +< // This test suite demonstrates TS_ASSERT_SAME_ATA + +> // This test suite demonstrates TS_ASSERT_SAME_// + + +In SameFiles::testSafeAssertMessageSameFiles: +SameFiles.h:38: Error: Test failed: Not same files +SameFiles.h:38: Error: Files 'SameFiles.h' and 'SameData.h' differ at line 4 += #include <cxxtest/TestSuite.h> += += // +< // This test suite demonstrates TS_ASSERT_SAME_ATA + +> // This test suite demonstrates TS_ASSERT_SAME_// + + + + +Test failed: String +Assertion failed: false +Test failed: 42 +Assertion failed: false +Test failed: String +Error: Expected (2 + 2 == 5), found (4 != 5) +Test failed: 42 +Error: Expected (2 + 2 == 5), found (4 != 5) +Test failed: String +Error: Expected 1 (1) bytes to be equal at (&x) and (&y), found +Test failed: 42 +Error: Expected 1 (1) bytes to be equal at (&x) and (&y), found +Test failed: String +Error: Expected (1.0 == 2.0) up to 0.5 (0.5000), found (1.0000 != 2.0000) +Test failed: 42 +Error: Expected (1.0 == 2.0) up to 0.5 (0.5000), found (1.0000 != 2.0000) +Test failed: String +Error: Expected (0 != 0), found (0) +Test failed: 42 +Error: Expected (0 != 0), found (0) +Test failed: String +Error: Expected (2 < 1), found (2 >= 1) +Test failed: 42 +Error: Expected (2 < 1), found (2 >= 1) +Test failed: String +Error: Expected (throwNothing()) to throw (int) but it didn't throw +Test failed: 42 +Error: Expected (throwNothing()) to throw (int) but it didn't throw +Test failed: String +Error: Expected (throwNothing()) to throw (...) but it didn't throw +Test failed: 42 +Error: Expected (throwNothing()) to throw (...) but it didn't throw +Test failed: String +Error: Expected (throwInteger( n )) not to throw, but it did +Test failed: 42 +Error: Expected (throwInteger( n )) not to throw, but it did +Test failed: String +Error: Expected (throwNothing()) to throw (int) but it didn't throw +Test failed: 42 +Error: Expected (throwNothing()) to throw (int) but it didn't throw +Test failed: String +Error: Expected (throwNothing()) to throw (int) but it didn't throw +Test failed: 42 +Error: Expected (throwNothing()) to throw (int) but it didn't throw +Test failed: String +Error: Expected (i == 43), found (42 != 43) +Test failed: 42 +Error: Expected (i == 43), found (42 != 43) +In TestMessageMacros::testMessageMacros: +Tsm.h:15: Error: Test failed: String +Tsm.h:15: Error: Assertion failed: false +Tsm.h:16: Error: Test failed: 42 +Tsm.h:16: Error: Assertion failed: false +Tsm.h:17: Error: Test failed: String +Tsm.h:17: Error: Expected (2 + 2 == 5), found (4 != 5) +Tsm.h:18: Error: Test failed: 42 +Tsm.h:18: Error: Expected (2 + 2 == 5), found (4 != 5) +Tsm.h:19: Error: Test failed: String +Tsm.h:19: Error: Expected 1 (1) bytes to be equal at (&x) and (&y), found: +{ 78 } +differs from +{ 79 } +Tsm.h:20: Error: Test failed: 42 +Tsm.h:20: Error: Expected 1 (1) bytes to be equal at (&x) and (&y), found: +{ 78 } +differs from +{ 79 } +Tsm.h:21: Error: Test failed: String +Tsm.h:21: Error: Expected (1.0 == 2.0) up to 0.5 (0.5000), found (1.0000 != 2.0000) +Tsm.h:22: Error: Test failed: 42 +Tsm.h:22: Error: Expected (1.0 == 2.0) up to 0.5 (0.5000), found (1.0000 != 2.0000) +Tsm.h:23: Error: Test failed: String +Tsm.h:23: Error: Expected (0 != 0), found (0) +Tsm.h:24: Error: Test failed: 42 +Tsm.h:24: Error: Expected (0 != 0), found (0) +Tsm.h:25: Error: Test failed: String +Tsm.h:25: Error: Expected (2 < 1), found (2 >= 1) +Tsm.h:26: Error: Test failed: 42 +Tsm.h:26: Error: Expected (2 < 1), found (2 >= 1) +Tsm.h:27: Error: Test failed: String +Tsm.h:27: Error: Expected (throwNothing()) to throw (int) but it didn't throw +Tsm.h:28: Error: Test failed: 42 +Tsm.h:28: Error: Expected (throwNothing()) to throw (int) but it didn't throw +Tsm.h:29: Error: Test failed: String +Tsm.h:29: Error: Expected (throwNothing()) to throw (...) but it didn't throw +Tsm.h:30: Error: Test failed: 42 +Tsm.h:30: Error: Expected (throwNothing()) to throw (...) but it didn't throw +Tsm.h:31: Error: Test failed: String +Tsm.h:31: Error: Expected (throwInteger( n )) not to throw, but it did +Tsm.h:32: Error: Test failed: 42 +Tsm.h:32: Error: Expected (throwInteger( n )) not to throw, but it did +Tsm.h:33: Error: Test failed: String +Tsm.h:33: Error: Expected (throwNothing()) to throw (int) but it didn't throw +Tsm.h:34: Error: Test failed: 42 +Tsm.h:34: Error: Expected (throwNothing()) to throw (int) but it didn't throw +Tsm.h:35: Error: Test failed: String +Tsm.h:35: Error: Expected (throwNothing()) to throw (int) but it didn't throw +Tsm.h:36: Error: Test failed: 42 +Tsm.h:36: Error: Expected (throwNothing()) to throw (int) but it didn't throw +Tsm.h:37: Error: Test failed: String +Tsm.h:37: Error: Expected (i == 43), found (42 != 43) +Tsm.h:38: Error: Test failed: 42 +Tsm.h:38: Error: Expected (i == 43), found (42 != 43) + + + +Test failed: 1 +Test failed: '\x0F' +Test failed: -12 +Test failed: 34 +Test failed: -123 +Test failed: 456 +Test failed: -12345 +Test failed: 67890 +In TraitsTest::testIntegerTraits: +TraitsTest.h:13: Error: Test failed: 1 +TraitsTest.h:14: Error: Test failed: '\x0F' +TraitsTest.h:15: Error: Test failed: -12 +TraitsTest.h:16: Error: Test failed: 34 +TraitsTest.h:17: Error: Test failed: -123 +TraitsTest.h:18: Error: Test failed: 456 +TraitsTest.h:19: Error: Test failed: -12345 +TraitsTest.h:20: Error: Test failed: 67890 + + + +Test failed: 0.1234 +Test failed: 0.1234 +In TraitsTest::testFloatingPointTraits: +TraitsTest.h:25: Error: Test failed: 0.1234 +TraitsTest.h:26: Error: Test failed: 0.1234 + + + +Test failed: true +Test failed: false +In TraitsTest::testBoolTraits: +TraitsTest.h:31: Error: Test failed: true +TraitsTest.h:32: Error: Test failed: false + + + +Test failed: 'A' +Test failed: '\x04' +Test failed: '\x1B' +Test failed: '\0' +Test failed: '\r' +Test failed: '\n' +Test failed: '\b' +Test failed: '\t' +Test failed: '\a' +Test failed: '\xFB' +In TraitsTest::testCharTraits: +TraitsTest.h:37: Error: Test failed: 'A' +TraitsTest.h:38: Error: Test failed: '\x04' +TraitsTest.h:39: Error: Test failed: '\x1B' +TraitsTest.h:40: Error: Test failed: '\0' +TraitsTest.h:41: Error: Test failed: '\r' +TraitsTest.h:42: Error: Test failed: '\n' +TraitsTest.h:43: Error: Test failed: '\b' +TraitsTest.h:44: Error: Test failed: '\t' +TraitsTest.h:45: Error: Test failed: '\a' +TraitsTest.h:46: Error: Test failed: '\xFB' + + + +Test failed: (char *) is displayed as-is + +In TraitsTest::testStringTraits: +TraitsTest.h:51: Error: Test failed: (char *) is displayed as-is + + + + +Test failed: "std::string is displayed with \"\"" +Test failed: "Escapes\rAre\rTranslated" +Test failed: "As are unprintable chars: \x124Vx" +In TraitsTest::testStdStringTraits: +TraitsTest.h:57: Error: Test failed: "std::string is displayed with \"\"" +TraitsTest.h:58: Error: Test failed: "Escapes\rAre\rTranslated" +TraitsTest.h:59: Error: Test failed: "As are unprintable chars: \x124Vx" + + + + + +Test failed: T::one( void ) called with no T::Base_one object +Error: Expected (T::one() == 1), found (0 != 1) + +In MockTest::test_Unimplemented: +MockTest.h:33: Error: Test failed: T::one( void ) called with no T::Base_one object +MockTest.h:129: Error: Expected (T::one() == 1), found (0 != 1) + + + + +Test failed: T::getOpaque( int i ) called with no T::Base_getOpaque object +Error: Expected (T::getOpaque( 3 ).value == 72), found (42 != 72) + +In MockTest::test_Mock_traits: +MockTest.h:40: Error: Test failed: T::getOpaque( int i ) called with no T::Base_getOpaque object +MockTest.h:143: Error: Expected (T::getOpaque( 3 ).value == 72), found (42 != 72) + + + +Test failed: T::one( void ) called with no T::Base_one object +Error: Expected (T::one() == 1), found (0 != 1) +In MockTest::test_Override: +MockTest.h:33: Error: Test failed: T::one( void ) called with no T::Base_one object +MockTest.h:157: Error: Expected (T::one() == 1), found (0 != 1) + + + + +Test failed: T::supplyOne( void ) called with no T::Base_supplyOne object +Error: Expected (supplyOne() == 1), found (0 != 1) + +In MockTest::test_Unimplemented_supply: +MockTest.h:42: Error: Test failed: T::supplyOne( void ) called with no T::Base_supplyOne object +MockTest.h:168: Error: Expected (supplyOne() == 1), found (0 != 1) + + + + +Error: Expected sizeof(data) (4) bytes to be equal at (data) and (0), found +Error: Expected sizeof(data) (4) bytes to be equal at (0) and (data), found + +In SameZero::test_TS_ASSERT_SAME_DATA_passed_zero: +SameZero.h:20: Error: Expected sizeof(data) (4) bytes to be equal at (data) and (0), found: +{ 00 01 02 03 } +differs from +(null) +SameZero.h:21: Error: Expected sizeof(data) (4) bytes to be equal at (0) and (data), found: +(null) +differs from +{ 00 01 02 03 } + + + diff --git a/tools/cxxtest/test/paren.out b/tools/cxxtest/test/paren.out new file mode 100644 index 0000000..c0f966a --- /dev/null +++ b/tools/cxxtest/test/paren.out @@ -0,0 +1,51 @@ +Running 14 tests +In CreatedTest::test_nothing: +sample/CreatedTest.h(26): Error: Test failed: Nothing to test +. +In EnumTraits::test_Enum_traits: +sample/EnumTraits.h(32): Error: Test failed: Yes +sample/EnumTraits.h(33): Error: Test failed: No +sample/EnumTraits.h(34): Error: Test failed: Maybe +sample/EnumTraits.h(35): Error: Test failed: DontKnow +sample/EnumTraits.h(36): Error: Test failed: DontCare +sample/EnumTraits.h(37): Error: Test failed: (Answer)1000 +In ExceptionTest::testAssertion: +sample/ExceptionTest.h(20): Error: Expected (throwThis(5)) to throw (const char *) but it threw something else +sample/ExceptionTest.h(22): Error: Expected (goodFunction(1)) to throw (...) but it didn't throw +sample/ExceptionTest.h(24): Error: Test failed: Unhandled exception +sample/ExceptionTest.h(26): Error: Expected (throwThis(-1)) not to throw, but it did +sample/ExceptionTest.h(31): Error: Test failed: throwThis(3) failed +In FixtureTest::test_strcpy: +sample/FixtureTest.h(32): Error: Expected (_buffer[1] == 'E'), found ('e' != 'E') +In MessageTest::testValues: +sample/MessageTest.h(24): Error: Test failed: My hovercraft +sample/MessageTest.h(24): Error: Assertion failed: value != 0 +sample/MessageTest.h(25): Error: Test failed: of eels +sample/MessageTest.h(25): Error: Expected (value == value * value), found (2 != 4) +In SimpleTest::testEquality: +sample/SimpleTest.h(16): Error: Expected (1 == 2), found (1 != 2) +sample/SimpleTest.h(17): Error: Expected ('a' == 'A'), found ('a' != 'A') +sample/SimpleTest.h(18): Error: Expected (1.0 == -12345678900000000000000000000000000000000000000000.1234), found (1.0000 != -1.2345E50) +In SimpleTest::testAddition: +sample/SimpleTest.h(24): Error: Expected (2 + 2 == 5), found (4 != 5) +In SimpleTest::TestMultiplication: +sample/SimpleTest.h(30): Error: Expected (4 * 4 == 44), found (16 != 44) +sample/SimpleTest.h(31): Error: Expected (-2 * -2 != 4), found (4) +In SimpleTest::testComparison: +sample/SimpleTest.h(37): Error: Expected (-1 < -2), found (-1 >= -2) +In SimpleTest::testTheWorldIsCrazy: +sample/SimpleTest.h(42): Error: Expected (true == false), found (true != false) +In SimpleTest::test_Failure: +sample/SimpleTest.h(47): Error: Test failed: Not implemented +sample/SimpleTest.h(48): Error: Test failed: 1569779912 +In SimpleTest::test_TS_WARN_macro: +sample/SimpleTest.h(53): Warning: Just a friendly warning +sample/SimpleTest.h(54): Warning: Warnings don't abort the test +. +In TestFunky::testPets: +sample/TraitsTest.h(59): Error: Expected (pet1 == pet2), found (Pet("dog") != Pet("cat")) +sample/TraitsTest.h(61): Error: Expected (cat != gato), found (Pet("cat")) +sample/TraitsTest.h(64): Error: Expected (String("Hello") == String("World!")), found ("Hello" != "World!") +Failed 12 of 14 tests +Success rate: 14% +Error level = 12 diff --git a/tools/cxxtest/test/parts.out b/tools/cxxtest/test/parts.out new file mode 100644 index 0000000..fc4be03 --- /dev/null +++ b/tools/cxxtest/test/parts.out @@ -0,0 +1,2 @@ +Running 2 tests..OK! +Error level = 0 diff --git a/tools/cxxtest/test/preamble.out b/tools/cxxtest/test/preamble.out new file mode 100644 index 0000000..be2a0de --- /dev/null +++ b/tools/cxxtest/test/preamble.out @@ -0,0 +1,67 @@ +Running 14 tests +In CreatedTest::test_nothing: +CreatedTest.h:26: Error: Test failed: Nothing to test +. +In EnumTraits::test_Enum_traits: +EnumTraits.h:32: Error: Test failed: Yes +In ExceptionTest::testAssertion: +ExceptionTest.h:20: Error: Expected (throwThis(5)) to throw (const char *) but it threw something else +In FixtureTest::test_strcpy: +FixtureTest.h:32: Error: Expected (_buffer[1] == 'E'), found ('e' != 'E') +In MessageTest::testValues: +MessageTest.h:24: Error: Test failed: My hovercraft +MessageTest.h:24: Error: Assertion failed: value != 0 +In SimpleTest::testEquality: +SimpleTest.h:16: Error: Expected (1 == 2), found (1 != 2) +In SimpleTest::testAddition: +SimpleTest.h:24: Error: Expected (2 + 2 == 5), found (4 != 5) +In SimpleTest::TestMultiplication: +SimpleTest.h:30: Error: Expected (4 * 4 == 44), found (16 != 44) +In SimpleTest::testComparison: +SimpleTest.h:37: Error: Expected (-1 < -2), found (-1 >= -2) +In SimpleTest::testTheWorldIsCrazy: +SimpleTest.h:42: Error: Expected (true == false), found (true != false) +In SimpleTest::test_Failure: +SimpleTest.h:47: Error: Test failed: Not implemented +In SimpleTest::test_TS_WARN_macro: +SimpleTest.h:53: Warning: Just a friendly warning +SimpleTest.h:54: Warning: Warnings don't abort the test +. +In TestFunky::testPets: +TraitsTest.h:59: Error: Expected (pet1 == pet2), found (Pet("dog") != Pet("cat")) +Failed 12 of 14 tests +Success rate: 14% +Running 14 tests +In CreatedTest::test_nothing: +CreatedTest.h:26: Error: Test failed: Nothing to test +. +In EnumTraits::test_Enum_traits: +EnumTraits.h:32: Error: Test failed: Yes +In ExceptionTest::testAssertion: +ExceptionTest.h:20: Error: Expected (throwThis(5)) to throw (const char *) but it threw something else +In FixtureTest::test_strcpy: +FixtureTest.h:32: Error: Expected (_buffer[1] == 'E'), found ('e' != 'E') +In MessageTest::testValues: +MessageTest.h:24: Error: Test failed: My hovercraft +MessageTest.h:24: Error: Assertion failed: value != 0 +In SimpleTest::testEquality: +SimpleTest.h:16: Error: Expected (1 == 2), found (1 != 2) +In SimpleTest::testAddition: +SimpleTest.h:24: Error: Expected (2 + 2 == 5), found (4 != 5) +In SimpleTest::TestMultiplication: +SimpleTest.h:30: Error: Expected (4 * 4 == 44), found (16 != 44) +In SimpleTest::testComparison: +SimpleTest.h:37: Error: Expected (-1 < -2), found (-1 >= -2) +In SimpleTest::testTheWorldIsCrazy: +SimpleTest.h:42: Error: Expected (true == false), found (true != false) +In SimpleTest::test_Failure: +SimpleTest.h:47: Error: Test failed: Not implemented +In SimpleTest::test_TS_WARN_macro: +SimpleTest.h:53: Warning: Just a friendly warning +SimpleTest.h:54: Warning: Warnings don't abort the test +. +In TestFunky::testPets: +TraitsTest.h:59: Error: Expected (pet1 == pet2), found (Pet("dog") != Pet("cat")) +Failed 12 of 14 tests +Success rate: 14% +Error level = 24 diff --git a/tools/cxxtest/test/preamble.tpl b/tools/cxxtest/test/preamble.tpl new file mode 100644 index 0000000..a15356b --- /dev/null +++ b/tools/cxxtest/test/preamble.tpl @@ -0,0 +1,29 @@ +// -*- C++ -*- + +#define CXXTEST_ABORT_TEST_ON_FAIL + +// CxxTest definitions and headers + + +// Make sure this worked +#ifndef TS_ASSERT +# error The preamble does not work! +#endif + +#include + +int main() +{ + CxxTest::StdioPrinter runner; + + TS_FAIL( "This will not be displayed" ); + int result = runner.run() + runner.run(); + TS_FAIL( "This will not be displayed" ); + + return result; +} + + +// The CxxTest "world" + + diff --git a/tools/cxxtest/test/runner.out b/tools/cxxtest/test/runner.out new file mode 100644 index 0000000..7225774 --- /dev/null +++ b/tools/cxxtest/test/runner.out @@ -0,0 +1 @@ +Error level = 12 diff --git a/tools/cxxtest/test/simple_inheritance.out b/tools/cxxtest/test/simple_inheritance.out new file mode 100644 index 0000000..836fae6 --- /dev/null +++ b/tools/cxxtest/test/simple_inheritance.out @@ -0,0 +1,2 @@ +Running 4 tests....OK! +Error level = 0 diff --git a/tools/cxxtest/test/simple_inheritance2.out b/tools/cxxtest/test/simple_inheritance2.out new file mode 100644 index 0000000..fc4be03 --- /dev/null +++ b/tools/cxxtest/test/simple_inheritance2.out @@ -0,0 +1,2 @@ +Running 2 tests..OK! +Error level = 0 diff --git a/tools/cxxtest/test/std.out b/tools/cxxtest/test/std.out new file mode 100644 index 0000000..d642556 --- /dev/null +++ b/tools/cxxtest/test/std.out @@ -0,0 +1,6 @@ +Running 1 test +In HaveStd::testHaveStd: +HaveStd.h:13: Error: Expected (something() == "Something"), found ("something" != Something) +Failed 1 of 1 test +Success rate: 0% +Error level = 1 diff --git a/tools/cxxtest/test/stl.out b/tools/cxxtest/test/stl.out new file mode 100644 index 0000000..274999a --- /dev/null +++ b/tools/cxxtest/test/stl.out @@ -0,0 +1,46 @@ +Running 9 tests +In StlTraits::test_Pair: +StlTraits.h:13: Error: Test failed: <3, "Three"> +StlTraits.h:15: Error: Test failed: <"Four", 4.0000> +In StlTraits::test_Vector: +StlTraits.h:21: Trace: {} +StlTraits.h:25: Error: Test failed: { 1, 2, 3 } +StlTraits.h:28: Trace: {} +StlTraits.h:32: Error: Test failed: { "One", "Two", "Three" } +StlTraits.h:35: Trace: {} +StlTraits.h:39: Error: Test failed: { <1, "One">, <2, "Two">, <3, "Three"> } +In StlTraits::test_List: +StlTraits.h:45: Trace: {} +StlTraits.h:49: Error: Test failed: { 1, 2, 3 } +StlTraits.h:52: Trace: {} +StlTraits.h:56: Error: Test failed: { "One", "Two", "Three" } +StlTraits.h:59: Trace: {} +StlTraits.h:63: Error: Test failed: { <1, "One">, <2, "Two">, <3, "Three"> } +In StlTraits::test_Set: +StlTraits.h:69: Trace: {} +StlTraits.h:73: Error: Test failed: { 1, 2, 3 } +StlTraits.h:76: Trace: {} +StlTraits.h:80: Error: Test failed: { "One", "Three", "Two" } +StlTraits.h:83: Trace: {} +StlTraits.h:87: Error: Test failed: { <1, "One">, <2, "Two">, <3, "Three"> } +In StlTraits::test_Map: +StlTraits.h:93: Trace: {} +StlTraits.h:99: Error: Test failed: { <"Humpty", "Dumpty">, <"Jack", "Jill">, <"Ren", "Stimpy"> } +StlTraits.h:102: Trace: {} +StlTraits.h:111: Error: Test failed: { <6, { 2, 3 }>, <210, { 2, 3, 5, 7 }> } +In StlTraits::test_Deque: +StlTraits.h:117: Trace: {} +StlTraits.h:122: Error: Test failed: { 4, 3, 2, 1 } +In StlTraits::test_MultiMap: +StlTraits.h:128: Trace: {} +StlTraits.h:132: Error: Test failed: { <"One", 1.0000>, <"Two", 2.0000> } +In StlTraits::test_MultiSet: +StlTraits.h:138: Trace: {} +StlTraits.h:142: Error: Test failed: { 123, 456 } +In StlTraits::test_Complex: +StlTraits.h:148: Error: Test failed: (3.1400 + 2.7100 * i) +StlTraits.h:149: Error: Test failed: (1.0000 * i) +StlTraits.h:150: Error: Test failed: 1.0000 +Failed 9 of 9 tests +Success rate: 0% +Error level = 9 diff --git a/tools/cxxtest/test/stpltpl.cpp b/tools/cxxtest/test/stpltpl.cpp new file mode 100644 index 0000000..f541dc5 --- /dev/null +++ b/tools/cxxtest/test/stpltpl.cpp @@ -0,0 +1,6 @@ +#include + +#ifdef _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION +int main() { return 0; } +#endif // !_CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION + diff --git a/tools/cxxtest/test/suite.out b/tools/cxxtest/test/suite.out new file mode 100644 index 0000000..9cf4378 --- /dev/null +++ b/tools/cxxtest/test/suite.out @@ -0,0 +1,24 @@ +Running 7 tests +In SimpleTest::testEquality: +SimpleTest.h:16: Error: Expected (1 == 2), found (1 != 2) +SimpleTest.h:17: Error: Expected ('a' == 'A'), found ('a' != 'A') +SimpleTest.h:18: Error: Expected (1.0 == -12345678900000000000000000000000000000000000000000.1234), found (1.0000 != -1.2345E50) +In SimpleTest::testAddition: +SimpleTest.h:24: Error: Expected (2 + 2 == 5), found (4 != 5) +In SimpleTest::TestMultiplication: +SimpleTest.h:30: Error: Expected (4 * 4 == 44), found (16 != 44) +SimpleTest.h:31: Error: Expected (-2 * -2 != 4), found (4) +In SimpleTest::testComparison: +SimpleTest.h:37: Error: Expected (-1 < -2), found (-1 >= -2) +In SimpleTest::testTheWorldIsCrazy: +SimpleTest.h:42: Error: Expected (true == false), found (true != false) +In SimpleTest::test_Failure: +SimpleTest.h:47: Error: Test failed: Not implemented +SimpleTest.h:48: Error: Test failed: 1569779912 +In SimpleTest::test_TS_WARN_macro: +SimpleTest.h:53: Warning: Just a friendly warning +SimpleTest.h:54: Warning: Warnings don't abort the test +. +Failed 6 of 7 tests +Success rate: 14% +Error level = 6 diff --git a/tools/cxxtest/test/suite_test.out b/tools/cxxtest/test/suite_test.out new file mode 100644 index 0000000..b269608 --- /dev/null +++ b/tools/cxxtest/test/suite_test.out @@ -0,0 +1,6 @@ +Running 1 test +In SimpleTest::testAddition: +SimpleTest.h:24: Error: Expected (2 + 2 == 5), found (4 != 5) +Failed 1 of 1 test +Success rate: 0% +Error level = 1 diff --git a/tools/cxxtest/test/suwe.out b/tools/cxxtest/test/suwe.out new file mode 100644 index 0000000..43a0289 --- /dev/null +++ b/tools/cxxtest/test/suwe.out @@ -0,0 +1,6 @@ +Running 2 tests +In ::: +SetUpWorldError.h:12: Error: Test failed: THIS IS BAD +RealDescriptions.cpp:5: Warning: Error setting up world +OK! +Error level = 0 diff --git a/tools/cxxtest/test/suwf.out b/tools/cxxtest/test/suwf.out new file mode 100644 index 0000000..aa10abd --- /dev/null +++ b/tools/cxxtest/test/suwf.out @@ -0,0 +1,5 @@ +Running 1 test +In ::: +RealDescriptions.cpp:5: Warning: Error setting up world +OK! +Error level = 0 diff --git a/tools/cxxtest/test/suwt.out b/tools/cxxtest/test/suwt.out new file mode 100644 index 0000000..aa10abd --- /dev/null +++ b/tools/cxxtest/test/suwt.out @@ -0,0 +1,5 @@ +Running 1 test +In ::: +RealDescriptions.cpp:5: Warning: Error setting up world +OK! +Error level = 0 diff --git a/tools/cxxtest/test/tdwf.out b/tools/cxxtest/test/tdwf.out new file mode 100644 index 0000000..7b68b61 --- /dev/null +++ b/tools/cxxtest/test/tdwf.out @@ -0,0 +1,5 @@ +Running 1 test. +In ::: +RealDescriptions.cpp:5: Warning: Error tearing down world +OK! +Error level = 0 diff --git a/tools/cxxtest/test/tdwt.out b/tools/cxxtest/test/tdwt.out new file mode 100644 index 0000000..7b68b61 --- /dev/null +++ b/tools/cxxtest/test/tdwt.out @@ -0,0 +1,5 @@ +Running 1 test. +In ::: +RealDescriptions.cpp:5: Warning: Error tearing down world +OK! +Error level = 0 diff --git a/tools/cxxtest/test/template.out b/tools/cxxtest/test/template.out new file mode 100644 index 0000000..fc4be03 --- /dev/null +++ b/tools/cxxtest/test/template.out @@ -0,0 +1,2 @@ +Running 2 tests..OK! +Error level = 0 diff --git a/tools/cxxtest/test/test_cxxtest.py b/tools/cxxtest/test/test_cxxtest.py new file mode 100644 index 0000000..79c8d56 --- /dev/null +++ b/tools/cxxtest/test/test_cxxtest.py @@ -0,0 +1,704 @@ +import sys +import os +import os.path +import glob +import difflib +import subprocess +import re +if sys.version_info < (2,7): + import unittest2 as unittest +else: + import unittest +try: + import ply + ply_available=True +except: + ply_available=False + +currdir = os.path.dirname(os.path.abspath(__file__))+os.sep +sampledir = os.path.dirname(os.path.dirname(currdir))+'/sample'+os.sep +cxxtestdir = os.path.dirname(os.path.dirname(currdir))+os.sep + +compilerre = re.compile("^(?P[^:]+)(?P:[0-9]+:.*)$") +dirre = re.compile("^([^"+os.sep+"]*/)*") +xmlre = re.compile("\"(?P[^\"]*/[^\"]*)\"") + +# Headers from the cxxtest/sample directory +samples = ' '.join(file for file in sorted(glob.glob(sampledir+'*.h'))) +guiInputs=currdir+'../sample/gui/GreenYellowRed.h' +if sys.platform.startswith('win'): + target_suffix = '.exe' +else: + target_suffix = '' +# Create a file with the list of sample files +OUTPUT = open(currdir+'Samples.txt','w') +for line in sorted(glob.glob(sampledir+'*.h')): + OUTPUT.write(line+'\n') +OUTPUT.close() + +def available(compiler, exe_option): + cmd = "cd %s; %s %s %s %s > %s 2>&1" % (currdir, compiler, exe_option, currdir+'anything', currdir+'anything.cpp', currdir+'anything.log') + ##print cmd + status = subprocess.call(cmd, shell=True) + flag = status == 0 and os.path.exists(currdir+'anything') + os.remove(currdir+'anything.log') + if os.path.exists(currdir+'anything'): + os.remove(currdir+'anything') + return flag + +def remove_absdir(filename): + INPUT=open(filename, 'r') + lines = [line.strip() for line in INPUT] + INPUT.close() + OUTPUT=open(filename, 'w') + for line in lines: + # remove basedir at front of line + match = compilerre.match(line) # see if we can remove the basedir + if match: + parts = match.groupdict() + line = dirre.sub("", parts['path']) + parts['rest'] + OUTPUT.write(line+'\n') + OUTPUT.close() + +def normalize_line_for_diff(line): + # add spaces around {}<>() + line = re.sub("[{}<>()]", r" \0 ", line) + + # beginnig and ending whitespace + line = line.strip() + + # remove all whitespace + # and leave a single space + line = ' '.join(line.split()) + + # remove spaces around "=" + line = re.sub(" ?= ?", "=", line) + + + # remove all absolute path prefixes + line = ''.join(line.split(cxxtestdir)) + # for xml, remove prefixes from everything that looks like a + # file path inside "" + line = xmlre.sub( + lambda match: '"'+re.sub("^[^/]+/", "", match.group(1))+'"', + line + ) + return line + +def make_diff_readable(diff): + i = 0 + while i+1 < len(diff): + if diff[i][0] == '-' and diff[i+1][0] == '+': + l1 = diff[i] + l2 = diff[i+1] + for j in range(1, min([len(l1), len(l2)])): + if l1[j] != l2[j]: + if j > 4: + j = j-2; + l1 = l1[j:] + l2 = l2[j:] + diff[i] = '-(...)' + l1 + diff[i+1] = '+(...)' + l2 + break + i+=1 + +def file_diff(filename1, filename2): + remove_absdir(filename1) + remove_absdir(filename2) + # + INPUT=open(filename1, 'r') + lines1 = INPUT.readlines() + INPUT.close() + # + INPUT=open(filename2, 'r') + lines2 = INPUT.readlines() + INPUT.close() + # + lines1cmp = [normalize_line_for_diff(line) for line in lines1] + lines2cmp = [normalize_line_for_diff(line) for line in lines2] + diff = list(difflib.unified_diff(lines2cmp, lines1cmp, + fromfile=filename2, tofile=filename1)) + if diff: make_diff_readable(diff) + diff = '\n'.join(diff) + return diff + +class BaseTestCase(object): + + fog='' + + def setUp(self): + self.passed=False + self.prefix='' + self.py_out='' + self.py_cpp='' + self.px_pre='' + self.px_out='' + self.build_log='' + self.build_target='' + + def tearDown(self): + if not self.passed: + return + if os.path.exists(self.py_out): + os.remove(self.py_out) + if os.path.exists(self.py_cpp) and not 'CXXTEST_GCOV_FLAGS' in os.environ: + os.remove(self.py_cpp) + if os.path.exists(self.px_pre): + os.remove(self.px_pre) + if os.path.exists(self.px_out): + os.remove(self.px_out) + if os.path.exists(self.build_log): + os.remove(self.build_log) + if os.path.exists(self.build_target) and not 'CXXTEST_GCOV_FLAGS' in os.environ: + os.remove(self.build_target) + + def check_if_supported(self, filename, msg): + target=currdir+'check'+'px'+target_suffix + log=currdir+'check'+'_build.log' + cmd = "cd %s; %s %s %s %s. %s%s../ %s > %s 2>&1" % (currdir, self.compiler, self.exe_option, target, self.include_option, self.include_option, currdir, filename, log) + ##print cmd + status = subprocess.call(cmd, shell=True) + os.remove(log) + if status != 0 or not os.path.exists(target): + self.skipTest(msg) + os.remove(target) + + def init(self, prefix): + # + self.prefix = self.__class__.__name__+'_'+prefix + self.py_out = currdir+self.prefix+'_py.out' + self.py_cpp = currdir+self.prefix+'_py.cpp' + self.px_pre = currdir+self.prefix+'_px.pre' + self.px_out = currdir+self.prefix+'_px.out' + self.build_log = currdir+self.prefix+'_build.log' + self.build_target = currdir+self.prefix+'px'+target_suffix + + def check_root(self, prefix='', output=None): + self.init(prefix) + args = "--have-eh --abort-on-fail --root --error-printer" + cmd = "cd %s; %s %s../bin/cxxtestgen %s -o %s %s > %s 2>&1" % (currdir, sys.executable, currdir, self.fog, self.py_cpp, args, self.py_out) + #print self.fog, "CMD", cmd + status = subprocess.call(cmd, shell=True) + self.assertEqual(status, 0, 'Error executing cxxtestgen') + # + files = [self.py_cpp] + for i in [1,2]: + args = "--have-eh --abort-on-fail --part Part%s.h" % str(i) + file = currdir+self.prefix+'_py%s.cpp' % str(i) + files.append(file) + cmd = "cd %s; %s %s../bin/cxxtestgen %s -o %s %s > %s 2>&1" % (currdir, sys.executable, currdir, self.fog, file, args, self.py_out) + ##print cmd + status = subprocess.call(cmd, shell=True) + self.assertEqual(status, 0, 'Error executing cxxtestgen') + # + cmd = "cd %s; %s %s %s %s. %s%s../ %s > %s 2>&1" % (currdir, self.compiler, self.exe_option, self.build_target, self.include_option, self.include_option, currdir, ' '.join(files), self.build_log) + ##print cmd + status = subprocess.call(cmd, shell=True) + for file in files: + if os.path.exists(file): + os.remove(file) + self.assertEqual(status, 0, 'Error executing command: '+cmd) + # + status = subprocess.call("cd %s; %s -v > %s 2>&1" % (currdir, self.build_target, self.px_pre), shell=True) + OUTPUT = open(self.px_pre,'a') + OUTPUT.write('Error level = '+str(status)+'\n') + OUTPUT.close() + diffstr = file_diff(self.px_pre, currdir+output) + if not diffstr == '': + self.fail("Unexpected differences in output:\n"+diffstr) + # + self.passed=True + + def compile(self, prefix='', args=None, compile='', output=None, main=None, failGen=False, run=None, logfile=None, failBuild=False): + self.init(prefix) + # + cmd = "cd %s; %s %s../bin/cxxtestgen %s -o %s %s > %s 2>&1" % (currdir, sys.executable, currdir, self.fog, self.py_cpp, args, self.py_out) + #print ("HERE "+cmd) + status = subprocess.call(cmd, shell=True) + if failGen: + if status == 0: + self.fail('Expected cxxtestgen to fail.') + else: + self.passed=True + return + self.assertEqual(status, 0, 'Error executing command: '+cmd) + # + if not main is None: + # Compile with main + cmd = "cd %s; %s %s %s %s. %s%s../ %s main.cpp %s > %s 2>&1" % (currdir, self.compiler, self.exe_option, self.build_target, self.include_option, self.include_option, currdir, compile, self.py_cpp, self.build_log) + else: + # Compile without main + cmd = "cd %s; %s %s %s %s. %s%s../ %s %s > %s 2>&1" % (currdir, self.compiler, self.exe_option, self.build_target, self.include_option, self.include_option, currdir, compile, self.py_cpp, self.build_log) + status = subprocess.call(cmd, shell=True) + if failBuild: + if status == 0: + self.fail('Expected compiler to fail.') + else: + self.passed=True + return + else: + self.assertEqual(status, 0, 'Error executing command: '+cmd) + # + if compile == '' and not output is None: + if run is None: + cmd = "cd %s; %s -v > %s 2>&1" % (currdir, self.build_target, self.px_pre) + else: + cmd = run % (self.build_target, self.px_pre) + status = subprocess.call(cmd, shell=True) + #print "HERE-status",status + OUTPUT = open(self.px_pre,'a') + OUTPUT.write('Error level = '+str(status)+'\n') + OUTPUT.close() + if logfile is None: + diffstr = file_diff(self.px_pre, currdir+output) + else: + diffstr = file_diff(currdir+logfile, currdir+output) + if not diffstr == '': + self.fail("Unexpected differences in output:\n"+diffstr) + if not logfile is None: + os.remove(currdir+logfile) + # + if compile == '' and output is None and os.path.exists(self.py_cpp): + self.fail("Output cpp file %s should not have been generated." % self.py_cpp) + # + self.passed=True + + # + # Tests for cxxtestgen + # + + def test_root_or_part(self): + """Root/Part""" + self.check_root(prefix='root_or_part', output="parts.out") + + def test_root_plus_part(self): + """Root + Part""" + self.compile(prefix='root_plus_part', args="--error-printer --root --part "+samples, output="error.out") + + def test_wildcard(self): + """Wildcard input""" + self.compile(prefix='wildcard', args='../sample/*.h', main=True, output="wildcard.out") + + def test_stdio_printer(self): + """Stdio printer""" + self.compile(prefix='stdio_printer', args="--runner=StdioPrinter "+samples, output="error.out") + + def test_paren_printer(self): + """Paren printer""" + self.compile(prefix='paren_printer', args="--runner=ParenPrinter "+samples, output="paren.out") + + def test_yn_runner(self): + """Yes/No runner""" + self.compile(prefix='yn_runner', args="--runner=YesNoRunner "+samples, output="runner.out") + + def test_no_static_init(self): + """No static init""" + self.compile(prefix='no_static_init', args="--error-printer --no-static-init "+samples, output="error.out") + + def test_samples_file(self): + """Samples file""" + self.compile(prefix='samples_file', args="--error-printer --headers Samples.txt", output="error.out") + + def test_have_std(self): + """Have Std""" + self.compile(prefix='have_std', args="--runner=StdioPrinter --have-std HaveStd.h", output="std.out") + + def test_comments(self): + """Comments""" + self.compile(prefix='comments', args="--error-printer Comments.h", output="comments.out") + + def test_longlong(self): + """Long long""" + self.check_if_supported('longlong.cpp', "Long long is not supported by this compiler") + self.compile(prefix='longlong', args="--error-printer --longlong='long long' LongLong.h", output="longlong.out") + + def test_int64(self): + """Int64""" + self.check_if_supported('int64.cpp', "64-bit integers are not supported by this compiler") + self.compile(prefix='int64', args="--error-printer --longlong=__int64 Int64.h", output="int64.out") + + def test_include(self): + """Include""" + self.compile(prefix='include', args="--include=VoidTraits.h --include=LongTraits.h --error-printer IncludeTest.h", output="include.out") + + # + # Template file tests + # + + def test_preamble(self): + """Preamble""" + self.compile(prefix='preamble', args="--template=preamble.tpl "+samples, output="preamble.out") + + def test_activate_all(self): + """Activate all""" + self.compile(prefix='activate_all', args="--template=activate.tpl "+samples, output="error.out") + + def test_only_suite(self): + """Only Suite""" + self.compile(prefix='only_suite', args="--template=%s../sample/only.tpl %s" % (currdir, samples), run="%s SimpleTest > %s 2>&1", output="suite.out") + + def test_only_test(self): + """Only Test""" + self.compile(prefix='only_test', args="--template=%s../sample/only.tpl %s" % (currdir, samples), run="%s SimpleTest testAddition > %s 2>&1", output="suite_test.out") + + def test_have_std_tpl(self): + """Have Std - Template""" + self.compile(prefix='have_std_tpl', args="--template=HaveStd.tpl HaveStd.h", output="std.out") + + def test_exceptions_tpl(self): + """Exceptions - Template""" + self.compile(prefix='exceptions_tpl', args="--template=HaveEH.tpl "+self.ehNormals, output="eh_normals.out") + + # + # Test cases which do not require exception handling + # + + def test_no_errors(self): + """No errors""" + self.compile(prefix='no_errors', args="--error-printer GoodSuite.h", output="good.out") + + def test_infinite_values(self): + """Infinite values""" + self.compile(prefix='infinite_values', args="--error-printer --have-std TestNonFinite.h", output="infinite.out") + + def test_max_dump_size(self): + """Max dump size""" + self.compile(prefix='max_dump_size', args="--error-printer --include=MaxDump.h DynamicMax.h SameData.h", output='max.out') + + def test_wide_char(self): + """Wide char""" + self.check_if_supported('wchar.cpp', "The file wchar.cpp is not supported.") + self.compile(prefix='wide_char', args="--error-printer WideCharTest.h", output="wchar.out") + + #def test_factor(self): + #"""Factor""" + #self.compile(prefix='factor', args="--error-printer --factor Factor.h", output="factor.out") + + def test_user_traits(self): + """User traits""" + self.compile(prefix='user_traits', args="--template=UserTraits.tpl UserTraits.h", output='user.out') + + normals = " ".join(currdir+file for file in ["LessThanEquals.h","Relation.h","DefaultTraits.h","DoubleCall.h","SameData.h","SameFiles.h","Tsm.h","TraitsTest.h","MockTest.h","SameZero.h"]) + + def test_normal_behavior_xunit(self): + """Normal Behavior with XUnit Output""" + self.compile(prefix='normal_behavior_xunit', args="--xunit-printer "+self.normals, logfile='TEST-cxxtest.xml', output="normal.xml") + + def test_normal_behavior(self): + """Normal Behavior""" + self.compile(prefix='normal_behavior', args="--error-printer "+self.normals, output="normal.out") + + def test_normal_plus_abort(self): + """Normal + Abort""" + self.compile(prefix='normal_plus_abort', args="--error-printer --have-eh --abort-on-fail "+self.normals, output="abort.out") + + def test_stl_traits(self): + """STL Traits""" + self.check_if_supported('stpltpl.cpp', "The file stpltpl.cpp is not supported.") + self.compile(prefix='stl_traits', args="--error-printer StlTraits.h", output="stl.out") + + # + # Test cases which do require exception handling + # + def test_throw_wo_std(self): + """Throw w/o Std""" + self.compile(prefix='test_throw_wo_std', args="--template=ThrowNoStd.tpl ThrowNoStd.h", output='throw.out') + + ehNormals = "Exceptions.h DynamicAbort.h" + + def test_exceptions(self): + """Exceptions""" + self.compile(prefix='exceptions', args="--error-printer --have-eh "+self.ehNormals, output="eh_normals.out") + + def test_exceptions_plus_abort(self): + """Exceptions plus abort""" + self.compile(prefix='exceptions', args="--error-printer --abort-on-fail --have-eh DynamicAbort.h DeepAbort.h ThrowsAssert.h", output="eh_plus_abort.out") + + def test_default_abort(self): + """Default abort""" + self.compile(prefix='default_abort', args="--error-printer --include=DefaultAbort.h "+self.ehNormals+ " DeepAbort.h ThrowsAssert.h", output="default_abort.out") + + def test_default_no_abort(self): + """Default no abort""" + self.compile(prefix='default_no_abort', args="--error-printer "+self.ehNormals+" DeepAbort.h ThrowsAssert.h", output="default_abort.out") + + # + # Global Fixtures + # + + def test_global_fixtures(self): + """Global fixtures""" + self.compile(prefix='global_fixtures', args="--error-printer GlobalFixtures.h WorldFixtures.h", output="gfxs.out") + + def test_gf_suw_fails(self): + """GF:SUW fails""" + self.compile(prefix='gf_suw_fails', args="--error-printer SetUpWorldFails.h", output="suwf.out") + + def test_gf_suw_error(self): + """GF:SUW error""" + self.compile(prefix='gf_suw_error', args="--error-printer SetUpWorldError.h", output="suwe.out") + + def test_gf_suw_throws(self): + """GF:SUW throws""" + self.compile(prefix='gf_suw_throws', args="--error-printer SetUpWorldThrows.h", output="suwt.out") + + def test_gf_su_fails(self): + """GF:SU fails""" + self.compile(prefix='gf_su_fails', args="--error-printer GfSetUpFails.h", output="gfsuf.out") + + def test_gf_su_throws(self): + """GF:SU throws""" + self.compile(prefix='gf_su_throws', args="--error-printer GfSetUpThrows.h", output="gfsut.out") + + def test_gf_td_fails(self): + """GF:TD fails""" + self.compile(prefix='gf_td_fails', args="--error-printer GfTearDownFails.h", output="gftdf.out") + + def test_gf_td_throws(self): + """GF:TD throws""" + self.compile(prefix='gf_td_throws', args="--error-printer GfTearDownThrows.h", output="gftdt.out") + + def test_gf_tdw_fails(self): + """GF:TDW fails""" + self.compile(prefix='gf_tdw_fails', args="--error-printer TearDownWorldFails.h", output="tdwf.out") + + def test_gf_tdw_throws(self): + """GF:TDW throws""" + self.compile(prefix='gf_tdw_throws', args="--error-printer TearDownWorldThrows.h", output="tdwt.out") + + # + # GUI + # + + def test_gui(self): + """GUI""" + self.compile(prefix='gui', args='--gui=DummyGui %s' % guiInputs, output ="gui.out") + + def test_gui_runner(self): + """GUI + runner""" + self.compile(prefix='gui_runner', args="--gui=DummyGui --runner=ParenPrinter %s" % guiInputs, output="gui_paren.out") + + def test_qt_gui(self): + """QT GUI""" + self.compile(prefix='qt_gui', args="--gui=QtGui GoodSuite.h", compile=self.qtFlags) + + def test_win32_gui(self): + """Win32 GUI""" + self.compile(prefix='win32_gui', args="--gui=Win32Gui GoodSuite.h", compile=self.w32Flags) + + def test_win32_unicode(self): + """Win32 Unicode""" + self.compile(prefix='win32_unicode', args="--gui=Win32Gui GoodSuite.h", compile=self.w32Flags+' -DUNICODE') + + def test_x11_gui(self): + """X11 GUI""" + self.check_if_supported('wchar.cpp', "Cannot compile wchar.cpp") + self.compile(prefix='x11_gui', args="--gui=X11Gui GoodSuite.h", compile=self.x11Flags) + + + # + # Tests for when the compiler doesn't support exceptions + # + + def test_no_exceptions(self): + """No exceptions""" + if self.no_eh_option is None: + self.skipTest("This compiler does not have an exception handling option") + self.compile(prefix='no_exceptions', args='--runner=StdioPrinter NoEh.h', output="no_eh.out", compile=self.no_eh_option) + + def test_force_no_eh(self): + """Force no EH""" + if self.no_eh_option is None: + self.skipTest("This compiler does not have an exception handling option") + self.compile(prefix="force_no_eh", args="--runner=StdioPrinter --no-eh ForceNoEh.h", output="no_eh.out", compile=self.no_eh_option) + + # + # Invalid input to cxxtestgen + # + + def test_no_tests(self): + """No tests""" + self.compile(prefix='no_tests', args='EmptySuite.h', failGen=True) + + def test_missing_input(self): + """Missing input""" + self.compile(prefix='missing_input', args='--template=NoSuchFile.h', failGen=True) + + def test_missing_template(self): + """Missing template""" + self.compile(prefix='missing_template', args='--template=NoSuchFile.h '+samples, failGen=True) + + def test_inheritance(self): + """Test relying on inheritance""" + self.compile(prefix='inheritance', args='--error-printer InheritedTest.h', output='inheritance_old.out') + + # + # Tests that illustrate differences between the different C++ parsers + # + + def test_inheritance(self): + """Test relying on inheritance""" + if self.fog == '': + self.compile(prefix='inheritance', args='--error-printer InheritedTest.h', failGen=True) + else: + self.compile(prefix='inheritance', args='--error-printer InheritedTest.h', output='inheritance.out') + + def test_simple_inheritance(self): + """Test relying on simple inheritance""" + self.compile(prefix='simple_inheritance', args='--error-printer SimpleInheritedTest.h', output='simple_inheritance.out') + + def test_simple_inheritance2(self): + """Test relying on simple inheritance (2)""" + if self.fog == '': + self.compile(prefix='simple_inheritance2', args='--error-printer SimpleInheritedTest2.h', failGen=True) + else: + self.compile(prefix='simple_inheritance2', args='--error-printer SimpleInheritedTest2.h', output='simple_inheritance2.out') + + def test_comments2(self): + """Comments2""" + if self.fog == '': + self.compile(prefix='comments2', args="--error-printer Comments2.h", failBuild=True) + else: + self.compile(prefix='comments2', args="--error-printer Comments2.h", output='comments2.out') + + def test_cpp_template1(self): + """C++ Templates""" + if self.fog == '': + self.compile(prefix='cpp_template1', args="--error-printer CppTemplateTest.h", failGen=True) + else: + self.compile(prefix='cpp_template1', args="--error-printer CppTemplateTest.h", output='template.out') + + def test_bad1(self): + """BadTest1""" + if self.fog == '': + self.compile(prefix='bad1', args="--error-printer BadTest.h", failGen=True) + else: + self.compile(prefix='bad1', args="--error-printer BadTest.h", output='bad.out') + + +class TestCpp(BaseTestCase, unittest.TestCase): + + # Compiler specifics + exe_option = '-o' + include_option = '-I' + compiler='c++ -Wall -W -Werror -g' + no_eh_option = None + qtFlags='-Ifake' + x11Flags='-Ifake' + w32Flags='-Ifake' + + def run(self, *args, **kwds): + if available('c++', '-o'): + return unittest.TestCase.run(self, *args, **kwds) + + def setUp(self): + BaseTestCase.setUp(self) + + def tearDown(self): + BaseTestCase.tearDown(self) + + +class TestCppFOG(TestCpp): + + fog='-f' + + def run(self, *args, **kwds): + if ply_available: + return TestCpp.run(self, *args, **kwds) + + +class TestGpp(BaseTestCase, unittest.TestCase): + + # Compiler specifics + exe_option = '-o' + include_option = '-I' + compiler='g++ -g -ansi -pedantic -Wmissing-declarations -Werror -Wall -W -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wreorder -Wsign-promo %s' % os.environ.get('CXXTEST_GCOV_FLAGS','') + no_eh_option = '-fno-exceptions' + qtFlags='-Ifake' + x11Flags='-Ifake' + w32Flags='-Ifake' + + def run(self, *args, **kwds): + if available('g++', '-o'): + return unittest.TestCase.run(self, *args, **kwds) + + def setUp(self): + BaseTestCase.setUp(self) + + def tearDown(self): + BaseTestCase.tearDown(self) + + +class TestGppFOG(TestGpp): + + fog='-f' + + def run(self, *args, **kwds): + if ply_available: + return TestGpp.run(self, *args, **kwds) + + +class TestClang(BaseTestCase, unittest.TestCase): + + # Compiler specifics + exe_option = '-o' + include_option = '-I' + compiler='clang++ -v -g -Wall -W -Wshadow -Woverloaded-virtual -Wnon-virtual-dtor -Wreorder -Wsign-promo' + no_eh_option = '-fno-exceptions' + qtFlags='-Ifake' + x11Flags='-Ifake' + w32Flags='-Ifake' + + def run(self, *args, **kwds): + if available('clang++', '-o'): + return unittest.TestCase.run(self, *args, **kwds) + + def setUp(self): + BaseTestCase.setUp(self) + + def tearDown(self): + BaseTestCase.tearDown(self) + + +class TestClangFOG(TestClang): + + fog='-f' + + def run(self, *args, **kwds): + if ply_available: + return TestClang.run(self, *args, **kwds) + + +class TestCL(BaseTestCase, unittest.TestCase): + + # Compiler specifics + exe_option = '-o' + include_option = '-I' + compiler='cl -nologo -GX -W4 -WX' + no_eh_option = '-GX-' + qtFlags='-Ifake' + x11Flags='-Ifake' + w32Flags='-Ifake' + + def run(self, *args, **kwds): + if available('cl', '-o'): + return unittest.TestCase.run(self, *args, **kwds) + + def setUp(self): + BaseTestCase.setUp(self) + + def tearDown(self): + BaseTestCase.tearDown(self) + + +class TestCLFOG(TestCL): + + fog='-f' + + def run(self, *args, **kwds): + if ply_available: + return TestCL.run(self, *args, **kwds) + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/cxxtest/test/test_doc.py b/tools/cxxtest/test/test_doc.py new file mode 100644 index 0000000..c927c7b --- /dev/null +++ b/tools/cxxtest/test/test_doc.py @@ -0,0 +1,26 @@ +# +# Import and execute the Python test driver for the user guide examples +# + +# Imports +try: + import pyutilib.th as unittest + pyutilib_available=True +except: + pyutilib_available=False +import os +from os.path import dirname, abspath, abspath, basename +import sys + +if pyutilib_available: + currdir = dirname(abspath(__file__))+os.sep + datadir = os.sep.join([dirname(dirname(abspath(__file__))),'doc','examples'])+os.sep + + os.chdir(datadir) + sys.path.insert(0, datadir) + + from test_examples import * + +# Execute the tests +if __name__ == '__main__': + unittest.main() diff --git a/tools/cxxtest/test/throw.out b/tools/cxxtest/test/throw.out new file mode 100644 index 0000000..41d8c73 --- /dev/null +++ b/tools/cxxtest/test/throw.out @@ -0,0 +1,2 @@ +Running 1 test.OK! +Error level = 0 diff --git a/tools/cxxtest/test/tpltpl.cpp b/tools/cxxtest/test/tpltpl.cpp new file mode 100644 index 0000000..29ffd25 --- /dev/null +++ b/tools/cxxtest/test/tpltpl.cpp @@ -0,0 +1,10 @@ +#include + +#ifndef _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION +template class X {} x; +template class Pair {} p; +template class X< Pair > {} xp; + +int main() { return 0; } +#endif // !_CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION + diff --git a/tools/cxxtest/test/unit/LinkedList_test.t.h b/tools/cxxtest/test/unit/LinkedList_test.t.h new file mode 100644 index 0000000..995f317 --- /dev/null +++ b/tools/cxxtest/test/unit/LinkedList_test.t.h @@ -0,0 +1,57 @@ +#ifndef LINKEDLIST_TEST_H +#define LINKEDLIST_TEST_H + +#include + +class TestLink : public CxxTest::Link +{ + public: + bool setUp() { return true; } + bool tearDown() { return true; } +}; + +#include +class LinkedList_test : public CxxTest::TestSuite +{ +public: + void test_initialize() + { + CxxTest::List list; + list.initialize(); + TS_ASSERT_EQUALS((CxxTest::Link*)0, list.head()); + TS_ASSERT_EQUALS((CxxTest::Link*)0, list.tail()); + TS_ASSERT_EQUALS(0, list.size()); + TS_ASSERT(list.empty()); + } + + void test_attach() + { + CxxTest::List list; + TestLink link; + + list.initialize(); + link.attach(list); + + TS_ASSERT_EQUALS(1, list.size()); + TS_ASSERT_EQUALS((CxxTest::Link*)&link, list.head()); + TS_ASSERT_EQUALS((CxxTest::Link*)&link, list.tail()); + } + + void test_detach() + { + CxxTest::List list; + TestLink link; + + list.initialize(); + link.attach(list); + link.detach(list); + + TS_ASSERT_EQUALS((CxxTest::Link*)0, list.head()); + TS_ASSERT_EQUALS((CxxTest::Link*)0, list.tail()); + TS_ASSERT_EQUALS(0, list.size()); + TS_ASSERT(list.empty()); + } +}; + + +#endif // __SIMPLETEST_H diff --git a/tools/cxxtest/test/unit/SConstruct b/tools/cxxtest/test/unit/SConstruct new file mode 100644 index 0000000..aaba221 --- /dev/null +++ b/tools/cxxtest/test/unit/SConstruct @@ -0,0 +1,12 @@ +CxxTestBuilder_path = '../../build_tools/SCons/cxxtest.py' +CxxTest_dir = '../..' + +# First a little python magic to pull in CxxTestBuilder +import imp +cxxtest = imp.load_source('cxxtest', CxxTestBuilder_path) +env = Environment() +cxxtest.generate(env, CXXTEST_INSTALL_DIR=CxxTest_dir) + +for test in env.Glob('*.t.h'): + env.CxxTest(test) + diff --git a/tools/cxxtest/test/user.out b/tools/cxxtest/test/user.out new file mode 100644 index 0000000..f883261 --- /dev/null +++ b/tools/cxxtest/test/user.out @@ -0,0 +1,6 @@ +Running 1 test +In TestUserTraits::testUserTraits: +UserTraits.h:34: Error: Test failed: 0x7F +Failed 1 of 1 test +Success rate: 0% +Error level = 1 diff --git a/tools/cxxtest/test/wchar.cpp b/tools/cxxtest/test/wchar.cpp new file mode 100644 index 0000000..ef2b1db --- /dev/null +++ b/tools/cxxtest/test/wchar.cpp @@ -0,0 +1,11 @@ +// +// This program is used to check if the compiler supports basic_string +// +#include + +int main() +{ + std::basic_string s(L"s"); + return 0; +} + diff --git a/tools/cxxtest/test/wchar.out b/tools/cxxtest/test/wchar.out new file mode 100644 index 0000000..b82b812 --- /dev/null +++ b/tools/cxxtest/test/wchar.out @@ -0,0 +1,7 @@ +Running 1 test +In WideCharTest::testWideStringTraits: +WideCharTest.h:14: Error: Test failed: L"std::wstring is displayed with L\"\"" +WideCharTest.h:16: Error: Test failed: L"\x1234\x5678" +Failed 1 of 1 test +Success rate: 0% +Error level = 1 diff --git a/tools/cxxtest/test/wildcard.out b/tools/cxxtest/test/wildcard.out new file mode 100644 index 0000000..680c1b1 --- /dev/null +++ b/tools/cxxtest/test/wildcard.out @@ -0,0 +1,4 @@ +Number of suites: 8 +Number of tests: 14 +Number of failed tests: 12 +Error level = 0 diff --git a/tools/rake_utils/buildconfig.rb b/tools/rake_utils/buildconfig.rb new file mode 100644 index 0000000..6abfe57 --- /dev/null +++ b/tools/rake_utils/buildconfig.rb @@ -0,0 +1,44 @@ +require "#{File.expand_path(File.dirname(__FILE__))}/plainconfig" +require 'rake' +require 'rake/clean' + +class BuildConfig < PlainConfig + def initialize(config) + super(config) + + # Register output directories + register_directory("#{@settings[:output_dir]}/bin") + register_directory("#{@settings[:output_dir]}/obj") + register_directory("#{@settings[:output_dir]}/test") + + # set output name + @settings[:bin_name] = "#{@settings[:output_dir]}/bin/#{@settings[:name]}#{get_bin_extension()}" + CLEAN.include(@settings[:bin_name]) + + # Create object file list + @settings[:object_source_lookup] = {} + @settings[:object_files] = [] + @settings[:source_files].each{ |f| + obj_file = @settings[:output_dir] + '/obj/' + File.basename(f).ext('o') + CLEAN.include(obj_file) + @settings[:object_files].push( obj_file ) + @settings[:object_source_lookup][obj_file] = f + } + end + + def binary_name() + return @settings[:bin_name] + end + + def objects() + return @settings[:object_files] + end + + def source_from_obj(obj) + return @settings[:object_source_lookup][obj] + end + + def obj_src_lookup() + return lambda{|obj| @settings[:object_source_lookup][obj]} + end +end diff --git a/tools/rake_utils/plainconfig.rb b/tools/rake_utils/plainconfig.rb new file mode 100644 index 0000000..aeebaaa --- /dev/null +++ b/tools/rake_utils/plainconfig.rb @@ -0,0 +1,96 @@ +require 'pp' + +class PlainConfig + def initialize(config) + @settings = defaults() + @settings.merge!(config) + + # Process Source paths + @settings[:source_files] = make_file_list( @settings[:source_files] ) + + # Process Include paths + @settings[:include_dirs] = make_file_list( @settings[:include_dirs] ) + @settings[:include_dirs] = make_option_list( '-I', @settings[:include_dirs] ) + + # Process compiler options + @settings[:compiler_options] = make_option_list('',@settings[:compiler_options]) + + # Process linker options + @settings[:linker_options] = make_option_list('',@settings[:linker_options]) + + # Process preprocessor defines + @settings[:preprocessor_defines] = make_option_list('-D',@settings[:preprocessor_defines]) + end + + def defaults() + return { + :name => 'binary', + :output_dir => 'build', + + :compiler_bin => 'c++', + :compiler_options => ['-c'], + :preprocessor_defines => [], + + :linker_bin => 'c++', + :linker_options => [], + + :source_files => [ 'source/*.c*' ], + :include_dirs => [ 'source/**/' ], + :directories => [] + } + end + + def to_s + pp @settings + end + + def get_bin_extension() + if ENV['OS'] == 'Windows_NT' then + return '.exe' + else + return '' + end + end + + def make_option_list(prefix,list) + if list != nil then + return list.collect{|opt| "#{prefix}#{opt} "} + else + return list + end + end + + def make_file_list(patt_list) + file_list = [] + patt_list.each {|f| + file_list.concat( FileList[f] ) + } + return file_list + end + + def register_directory(dir_name) + @settings[:directories].push(dir_name) + directory dir_name + CLOBBER.include(dir_name) + end + + def directories() + return @settings[:directories] + end + + def compile(input,output) + config = @settings + sh "#{config[:compiler_bin]} #{config[:compiler_options]} #{config[:preprocessor_defines]} #{config[:include_dirs]} -o #{output} #{input}" + end + + def link(*args) + config = @settings + if args.size == 2 then + file_list = args[0] + output = args[1] + sh "#{config[:linker_bin]} #{config[:linker_options]} -o #{output} #{file_list.collect{|x| x + ' '}}" + else + sh "#{config[:linker_bin]} #{config[:linker_options]} -o #{config[:bin_name]} #{config[:object_files].collect{|x| x + ' '}}" + end + end +end diff --git a/tools/rake_utils/testconfig.rb b/tools/rake_utils/testconfig.rb new file mode 100644 index 0000000..2806d37 --- /dev/null +++ b/tools/rake_utils/testconfig.rb @@ -0,0 +1,82 @@ +require "#{File.expand_path(File.dirname(__FILE__))}/plainconfig" +require 'rake' +require 'rake/clean' + +class TestConfig < PlainConfig + def initialize(config) + super(config) + + # Register test output directory + register_directory("#{@settings[:output_dir]}/test") + + # Process test paths + @settings[:test_files] = make_file_list( @settings[:test_files] ) + + # Create source to runner lookup table + @settings[:src_test_lookup] = {} + @settings[:test_files].each{ |test| + out_dir = "#{@settings[:output_dir]}/test" + runner = "#{out_dir}/#{File.basename(test).ext('')}_runner.cpp" + @settings[:src_test_lookup][runner] = test + @settings[:runners].push( runner.ext(get_bin_extension()) ) + } + end + + def defaults() + defs = super() + defs.merge!({ + :test_gen_bin => 'python tools/cxxtest/bin/cxxtestgen', + :test_gen_options => ['--error-printer'], + :output_dir => 'build', + :test_files => ['tests/source/**.h'], + :include_dirs => [ '.','tests/**/', 'source/**/', 'tools/cxxtest' ], + :runners => [] + }) + return defs + end + + def directories() + dir_list = [ "#{@settings[:output_dir]}/test" ] + directory dir_list[0] + CLOBBER.include(dir_list[0]) + return dir_list + end + + def runners() + return @settings[:runners] + end + + def bin_obj_lookup() + return lambda{|bin| bin.ext('.o')} + end + + def obj_src_lookup() + return lambda{|obj| obj.ext('.cpp')} + end + + def src_test_lookup() + return lambda{|src| @settings[:src_test_lookup][src] } + end + + def generate_test_runner(input,output) + sh "#{@settings[:test_gen_bin]} #{@settings[:test_gen_options]} -o #{output} #{input}" + end + + def run_all_test_runners() + succeeded = true + puts '' + puts '------------------' + puts ' Unit Tests' + puts '------------------' + puts '' + @settings[:runners].each{|runner| + status = system(runner) + succeeded = (succeeded and status) + puts '' + } + if not succeeded then + abort('Error: There are unit test failures') + end + end +end + -- 2.52.0