diff options
author | Andy Schwerin <schwerin@10gen.com> | 2012-05-30 17:48:52 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2012-06-04 13:08:27 -0400 |
commit | c04922ad14ebe43d99ba056b7b3ae79860b8cd91 (patch) | |
tree | 5057ff729113f61028ed4c94ae96c26796d49c92 /src/mongo/unittest/crutch.cpp | |
parent | 7cb8e1f11959d8cb45954fcb1cfe13cdc6caa169 (diff) | |
download | mongo-c04922ad14ebe43d99ba056b7b3ae79860b8cd91.tar.gz |
SERVER-5702: C++ unit test framework that can be compiled separately.
Includes a unit test of the unit test framework written in the unit test
framework, itself.
Diffstat (limited to 'src/mongo/unittest/crutch.cpp')
-rw-r--r-- | src/mongo/unittest/crutch.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/mongo/unittest/crutch.cpp b/src/mongo/unittest/crutch.cpp new file mode 100644 index 00000000000..e17a5e5428c --- /dev/null +++ b/src/mongo/unittest/crutch.cpp @@ -0,0 +1,34 @@ +/** +* Copyright (C) 2012 10gen Inc. +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License, version 3, +* as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +/** + * This file should go away. It contains stubs of functions that were needed to link the unit test + * framework. As we refactor the system, the contents of this file should _ONLY_ shrink, and + * eventually it should contain nothing. + */ + +#include "mongo/pch.h" + +#include "mongo/db/lasterror.h" +#include "mongo/util/assert_util.h" +#include "mongo/util/goodies.h" + +namespace mongo { + bool inShutdown() { return false; } + std::string getThreadName() { return "UNKNOWN"; } + void setLastError(int code, const char* msg) {} + bool StaticObserver::_destroyingStatics = false; +} // namespace mongo |