|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58335 - trunk/libs/test/example
From: gennadiy.rozental_at_[hidden]
Date: 2009-12-12 23:21:44
Author: rogeeff
Date: 2009-12-12 23:21:43 EST (Sat, 12 Dec 2009)
New Revision: 58335
URL: http://svn.boost.org/trac/boost/changeset/58335
Log:
revert wrong changes
Text files modified:
trunk/libs/test/example/unit_test_example_01.cpp | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
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-12-12 23:21:43 EST (Sat, 12 Dec 2009)
@@ -12,8 +12,28 @@
#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
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