diff options
author | Mathias Stearn <mathias@10gen.com> | 2012-09-28 16:25:42 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2012-09-30 21:13:50 -0400 |
commit | b897ff2d1d6c32e43f4efbcbd4956b645bd3eb8b (patch) | |
tree | 023ddb4b34eb3e9ddb9fd255dc1484a29d6aba84 /src/mongo/unittest/unittest-inl.h | |
parent | 7ce347287c153ef15067e0e2f8039ea33f1d90df (diff) | |
download | mongo-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.h | 6 |
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) { |