summaryrefslogtreecommitdiff
path: root/src/mongo/unittest/unittest-inl.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2012-09-28 16:25:42 -0400
committerMathias Stearn <mathias@10gen.com>2012-09-30 21:13:50 -0400
commitb897ff2d1d6c32e43f4efbcbd4956b645bd3eb8b (patch)
tree023ddb4b34eb3e9ddb9fd255dc1484a29d6aba84 /src/mongo/unittest/unittest-inl.h
parent7ce347287c153ef15067e0e2f8039ea33f1d90df (diff)
downloadmongo-b897ff2d1d6c32e43f4efbcbd4956b645bd3eb8b.tar.gz
Support templated unittest test suites.
Diffstat (limited to 'src/mongo/unittest/unittest-inl.h')
-rw-r--r--src/mongo/unittest/unittest-inl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/unittest/unittest-inl.h b/src/mongo/unittest/unittest-inl.h
index 86539d3ab1a..57d561dd29a 100644
--- a/src/mongo/unittest/unittest-inl.h
+++ b/src/mongo/unittest/unittest-inl.h
@@ -19,6 +19,12 @@
namespace mongo {
namespace unittest {
+ template <typename Test>
+ TemplateSuiteRegistrationAgent<Test>::TemplateSuiteRegistrationAgent() {
+ Suite::getSuite(Test::suite())->add(Test::test(), Test::run);
+
+ }
+
template <typename T>
Test::RegistrationAgent<T>::RegistrationAgent(const std::string& suiteName,
const std::string& testName) {