diff --git a/src/test/unittests/synergy/ServerArgsParsingTests.cpp b/src/test/unittests/synergy/ServerArgsParsingTests.cpp index f931f7e5..cb330cb6 100644 --- a/src/test/unittests/synergy/ServerArgsParsingTests.cpp +++ b/src/test/unittests/synergy/ServerArgsParsingTests.cpp @@ -28,39 +28,39 @@ using ::testing::NiceMock; bool server_stubParseGenericArgs(int, const char* const*, int&) { - return false; + return false; } bool server_stubCheckUnexpectedArgs() { - return false; + return false; } TEST(ServerArgsParsingTests, parseServerArgs_addressArg_setSynergyAddress) { - NiceMock argParser; - ON_CALL(argParser, parseGenericArgs(_, _, _)).WillByDefault(Invoke(server_stubParseGenericArgs)); - ON_CALL(argParser, checkUnexpectedArgs()).WillByDefault(Invoke(server_stubCheckUnexpectedArgs)); - ServerArgs serverArgs; - const int argc = 3; - const char* kAddressCmd[argc] = { "stub", "--address", "mock_address" }; + NiceMock argParser; + ON_CALL(argParser, parseGenericArgs(_, _, _)).WillByDefault(Invoke(server_stubParseGenericArgs)); + ON_CALL(argParser, checkUnexpectedArgs()).WillByDefault(Invoke(server_stubCheckUnexpectedArgs)); + ServerArgs serverArgs; + const int argc = 3; + const char* kAddressCmd[argc] = { "stub", "--address", "mock_address" }; - argParser.parseServerArgs(serverArgs, argc, kAddressCmd); + argParser.parseServerArgs(serverArgs, argc, kAddressCmd); - EXPECT_EQ("mock_address", serverArgs.m_synergyAddress); + EXPECT_EQ("mock_address", serverArgs.m_synergyAddress); } TEST(ServerArgsParsingTests, parseServerArgs_configArg_setConfigFile) { - NiceMock argParser; - ON_CALL(argParser, parseGenericArgs(_, _, _)).WillByDefault(Invoke(server_stubParseGenericArgs)); - ON_CALL(argParser, checkUnexpectedArgs()).WillByDefault(Invoke(server_stubCheckUnexpectedArgs)); - ServerArgs serverArgs; - const int argc = 3; - const char* kConfigCmd[argc] = { "stub", "--config", "mock_configFile" }; + NiceMock argParser; + ON_CALL(argParser, parseGenericArgs(_, _, _)).WillByDefault(Invoke(server_stubParseGenericArgs)); + ON_CALL(argParser, checkUnexpectedArgs()).WillByDefault(Invoke(server_stubCheckUnexpectedArgs)); + ServerArgs serverArgs; + const int argc = 3; + const char* kConfigCmd[argc] = { "stub", "--config", "mock_configFile" }; - argParser.parseServerArgs(serverArgs, argc, kConfigCmd); + argParser.parseServerArgs(serverArgs, argc, kConfigCmd); - EXPECT_EQ("mock_configFile", serverArgs.m_configFile); + EXPECT_EQ("mock_configFile", serverArgs.m_configFile); }