|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57994 - trunk/libs/test/example
From: gennadiy.rozental_at_[hidden]
Date: 2009-11-28 05:22:25
Author: rogeeff
Date: 2009-11-28 05:22:24 EST (Sat, 28 Nov 2009)
New Revision: 57994
URL: http://svn.boost.org/trac/boost/changeset/57994
Log:
fix in examples
Added:
trunk/libs/test/example/unit_test_example_13.cpp
- copied, changed from r57992, /trunk/libs/test/example/unit_test_example_011.cpp
Removed:
trunk/libs/test/example/unit_test_example_011.cpp
trunk/libs/test/example/unit_test_example_012.cpp
Text files modified:
trunk/libs/test/example/Jamfile.v2 | 2 ++
trunk/libs/test/example/unit_test_example_01.cpp | 20 --------------------
trunk/libs/test/example/unit_test_example_13.cpp | 5 ++---
3 files changed, 4 insertions(+), 23 deletions(-)
Modified: trunk/libs/test/example/Jamfile.v2
==============================================================================
--- trunk/libs/test/example/Jamfile.v2 (original)
+++ trunk/libs/test/example/Jamfile.v2 2009-11-28 05:22:24 EST (Sat, 28 Nov 2009)
@@ -50,6 +50,8 @@
[ run-fail unit_test_example_10.cpp unit_test_framework/<link>static ]
[ run-fail unit_test_example_11.cpp unit_test_framework/<link>static ]
[ link unit_test_example_12.cpp unit_test_framework/<link>static ]
+ [ run unit_test_example_13.cpp ]
+ [ run unit_test_example_14.cpp unit_test_framework/<link>static ]
[ run est_example1.cpp unit_test_framework ]
[ run-fail est_example2.cpp unit_test_framework ]
Modified: trunk/libs/test/example/unit_test_example_01.cpp
==============================================================================
--- trunk/libs/test/example/unit_test_example_01.cpp (original)
+++ trunk/libs/test/example/unit_test_example_01.cpp 2009-11-28 05:22:24 EST (Sat, 28 Nov 2009)
@@ -12,28 +12,8 @@
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
-//____________________________________________________________________________//
-
-// most frequently you implement test cases as a free functions with automatic registration
BOOST_AUTO_TEST_CASE( test1 )
{
- // reports 'error in "test1": test 2 == 1 failed'
- BOOST_CHECK( 2 == 1 );
-}
-
-//____________________________________________________________________________//
-
-// each test file may contain any number of test cases; each test case has to have unique name
-BOOST_AUTO_TEST_CASE( test2 )
-{
- int i = 0;
-
- // reports 'error in "test2": check i == 2 failed [0 != 2]'
- BOOST_CHECK_EQUAL( i, 2 );
-
- BOOST_CHECK_EQUAL( i, 0 );
}
-//____________________________________________________________________________//
-
// EOF
Deleted: trunk/libs/test/example/unit_test_example_011.cpp
==============================================================================
--- trunk/libs/test/example/unit_test_example_011.cpp 2009-11-28 05:22:24 EST (Sat, 28 Nov 2009)
+++ (empty file)
@@ -1,9 +0,0 @@
-#define BOOST_TEST_MODULE broken
-#include <boost/test/included/unit_test.hpp>
-
-
-BOOST_AUTO_TEST_CASE( broken_test )
-{
- ::system("ls");
-}
-
Deleted: trunk/libs/test/example/unit_test_example_012.cpp
==============================================================================
--- trunk/libs/test/example/unit_test_example_012.cpp 2009-11-28 05:22:24 EST (Sat, 28 Nov 2009)
+++ (empty file)
@@ -1,24 +0,0 @@
-#include <boost/test/unit_test.hpp>
-#include <cstdlib>
-
-using boost::unit_test::test_suite;
-
-void Vektor3Test1() { }
-
-test_suite* Vektor3_test_suite()
-{
- test_suite *test = BOOST_TEST_SUITE("Vektor3 test suite");
- test->add(BOOST_TEST_CASE(&Vektor3Test1));
-
- return test;
-}
-
-test_suite* init_unit_test_suite(int, char *[])
-{
- std::system("true");
- // leads to "Test setup error: child has exited; pid: 1001; uid: 30540; exit value: 0"
-
- test_suite *test = BOOST_TEST_SUITE("Master test suite");
- test->add(Vektor3_test_suite());
- return test;
-}
\ No newline at end of file
Copied: trunk/libs/test/example/unit_test_example_13.cpp (from r57992, /trunk/libs/test/example/unit_test_example_011.cpp)
==============================================================================
--- /trunk/libs/test/example/unit_test_example_011.cpp (original)
+++ trunk/libs/test/example/unit_test_example_13.cpp 2009-11-28 05:22:24 EST (Sat, 28 Nov 2009)
@@ -1,9 +1,8 @@
-#define BOOST_TEST_MODULE broken
+#define BOOST_TEST_MODULE system call test example
#include <boost/test/included/unit_test.hpp>
-
BOOST_AUTO_TEST_CASE( broken_test )
{
- ::system("ls");
+ BOOST_CHECK_EQUAL( ::system("ls"), 0 );
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk