summaryrefslogtreecommitdiff
path: root/src/mongo/unittest
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2012-10-01 15:09:04 -0400
committerMathias Stearn <mathias@10gen.com>2012-10-01 15:09:04 -0400
commit122deef984b65d61345eadbfe16c608292a61026 (patch)
treebec6a5a0a46620096bf0c41f4435fdd2a71184f7 /src/mongo/unittest
parent88f44d3af09e31b13fa10571ade67aa3319900c7 (diff)
downloadmongo-122deef984b65d61345eadbfe16c608292a61026.tar.gz
Revert "Support templated unittest tests"
This reverts commit 7ce347287c153ef15067e0e2f8039ea33f1d90df.
Diffstat (limited to 'src/mongo/unittest')
-rw-r--r--src/mongo/unittest/unittest.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/mongo/unittest/unittest.h b/src/mongo/unittest/unittest.h
index b25785bfce9..f1556cf291b 100644
--- a/src/mongo/unittest/unittest.h
+++ b/src/mongo/unittest/unittest.h
@@ -27,8 +27,6 @@
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/noncopyable.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/stringize.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
@@ -111,35 +109,6 @@
_TEST_TYPE_NAME(CASE_NAME, TEST_NAME)::_agent(#CASE_NAME, #TEST_NAME); \
void _TEST_TYPE_NAME(CASE_NAME, TEST_NAME)::_doTest()
-/** Define a templated test. The template<...> portion goes above.
- *
- * Usage:
- *
- * template<int a, int b>
- * TEMPLATE_TEST(Silly, Example) {
- * ASSERT_EQUALS(a, b);
- * }
- *
- * TEMPLATE_TEST_INSTANCE(Silly, Example, 1, 1); // passes
- * TEMPLATE_TEST_INSTANCE(Silly, Example, 1, 2); // fails
- *
- * Note this must be used with TEMPLATE_TEST_INSTANCE
- */
-#define TEMPLATE_TEST(CASE_NAME, TEST_NAME) \
- void _TEST_TYPE_NAME(CASE_NAME, TEST_NAME)()
-
-/** Instantiate and register a template test with specified template arguments.
- *
- * Usage: see TEMPLATE_TEST
- */
-#define TEMPLATE_TEST_INSTANCE(CASE_NAME, TEST_NAME, ...) \
- static bool BOOST_PP_CAT(runCode_, __LINE__) = \
- (::mongo::unittest::Suite::getSuite(#CASE_NAME) \
- ->add((#TEST_NAME BOOST_PP_STRINGIZE((__VA_ARGS__))), \
- ::mongo::unittest::TestFunction( \
- _TEST_TYPE_NAME(CASE_NAME, TEST_NAME)<__VA_ARGS__>)) \
- , &BOOST_PP_CAT(runCode_, __LINE__)) /* makes run_code not be considered unused */
-
/**
* Construct a single test named TEST_NAME that has access to a common class (a "fixture")
* named "FIXTURE_NAME".