Convert tabs into spaces
This commit is contained in:
parent
c79759115b
commit
2abfd7a0d5
|
@ -28,39 +28,39 @@ using ::testing::NiceMock;
|
||||||
bool
|
bool
|
||||||
server_stubParseGenericArgs(int, const char* const*, int&)
|
server_stubParseGenericArgs(int, const char* const*, int&)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
server_stubCheckUnexpectedArgs()
|
server_stubCheckUnexpectedArgs()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(ServerArgsParsingTests, parseServerArgs_addressArg_setSynergyAddress)
|
TEST(ServerArgsParsingTests, parseServerArgs_addressArg_setSynergyAddress)
|
||||||
{
|
{
|
||||||
NiceMock<MockArgParser> argParser;
|
NiceMock<MockArgParser> argParser;
|
||||||
ON_CALL(argParser, parseGenericArgs(_, _, _)).WillByDefault(Invoke(server_stubParseGenericArgs));
|
ON_CALL(argParser, parseGenericArgs(_, _, _)).WillByDefault(Invoke(server_stubParseGenericArgs));
|
||||||
ON_CALL(argParser, checkUnexpectedArgs()).WillByDefault(Invoke(server_stubCheckUnexpectedArgs));
|
ON_CALL(argParser, checkUnexpectedArgs()).WillByDefault(Invoke(server_stubCheckUnexpectedArgs));
|
||||||
ServerArgs serverArgs;
|
ServerArgs serverArgs;
|
||||||
const int argc = 3;
|
const int argc = 3;
|
||||||
const char* kAddressCmd[argc] = { "stub", "--address", "mock_address" };
|
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)
|
TEST(ServerArgsParsingTests, parseServerArgs_configArg_setConfigFile)
|
||||||
{
|
{
|
||||||
NiceMock<MockArgParser> argParser;
|
NiceMock<MockArgParser> argParser;
|
||||||
ON_CALL(argParser, parseGenericArgs(_, _, _)).WillByDefault(Invoke(server_stubParseGenericArgs));
|
ON_CALL(argParser, parseGenericArgs(_, _, _)).WillByDefault(Invoke(server_stubParseGenericArgs));
|
||||||
ON_CALL(argParser, checkUnexpectedArgs()).WillByDefault(Invoke(server_stubCheckUnexpectedArgs));
|
ON_CALL(argParser, checkUnexpectedArgs()).WillByDefault(Invoke(server_stubCheckUnexpectedArgs));
|
||||||
ServerArgs serverArgs;
|
ServerArgs serverArgs;
|
||||||
const int argc = 3;
|
const int argc = 3;
|
||||||
const char* kConfigCmd[argc] = { "stub", "--config", "mock_configFile" };
|
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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue