Convert tabs into spaces

This commit is contained in:
XinyuHou 2016-12-29 16:11:21 +00:00 committed by Andrew Nelless
parent c79759115b
commit 2abfd7a0d5

View File

@ -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<MockArgParser> 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<MockArgParser> 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<MockArgParser> 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<MockArgParser> 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);
}