diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2018-06-26 15:27:05 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2018-06-26 16:35:39 -0400 |
commit | 7d7a17213df34b98c79bc016f5e945f6df805f2a (patch) | |
tree | c0f5814f7f0d2782a69e474a96a71f22171d7887 /src/mongo/db/commands_test.cpp | |
parent | dab56eefa101fa2a7c45e362bdae9c8229ddb6e8 (diff) | |
download | mongo-7d7a17213df34b98c79bc016f5e945f6df805f2a.tar.gz |
SERVER-35784 Fix ambiguously named test fixture.
The `TypedCommand` defined in the anonymous namespace in
`commands_test.cpp` conflicts, ambiguously, with `mongo::TypedCommand`
from `commands.h`. This causes problems on Microsoft's compiler,
at this time.
Diffstat (limited to 'src/mongo/db/commands_test.cpp')
-rw-r--r-- | src/mongo/db/commands_test.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/commands_test.cpp b/src/mongo/db/commands_test.cpp index 2cdc620d0d9..bf03dd61a19 100644 --- a/src/mongo/db/commands_test.cpp +++ b/src/mongo/db/commands_test.cpp @@ -328,7 +328,7 @@ ExampleMinimalCommand exampleMinimalCommand; ExampleVoidCommand exampleVoidCommand; CmdT<decltype(throwFn)> throwStatusCommand("throwsStatus", throwFn); -class TypedCommand : public ServiceContextTest { +class TypedCommandTest : public ServiceContextTest { protected: template <typename T> void runIncr(T& command, std::function<void(int, const BSONObj&)> postAssert) { @@ -363,28 +363,28 @@ protected: } }; -TEST_F(TypedCommand, runTyped) { +TEST_F(TypedCommandTest, runTyped) { runIncr(exampleIncrementCommand, [](int i, const BSONObj& reply) { ASSERT_EQ(reply["ok"].Double(), 1.0); ASSERT_EQ(reply["iPlusOne"].Int(), i + 1); }); } -TEST_F(TypedCommand, runMinimal) { +TEST_F(TypedCommandTest, runMinimal) { runIncr(exampleMinimalCommand, [](int i, const BSONObj& reply) { ASSERT_EQ(reply["ok"].Double(), 1.0); ASSERT_EQ(reply["iPlusOne"].Int(), i + 1); }); } -TEST_F(TypedCommand, runVoid) { +TEST_F(TypedCommandTest, runVoid) { runIncr(exampleVoidCommand, [](int i, const BSONObj& reply) { ASSERT_EQ(reply["ok"].Double(), 1.0); ASSERT_EQ(exampleVoidCommand.iCapture, i + 1); }); } -TEST_F(TypedCommand, runThrowStatus) { +TEST_F(TypedCommandTest, runThrowStatus) { runIncr(throwStatusCommand, [](int i, const BSONObj& reply) { Status status = Status::OK(); try { |