tests/ceftests/command_line_unittest.cc
// Test creating a command line from argc/argv or string.
Test creating a command line from argc/argv or string.
Test creating a command line from argc / argv or string .
TEST(CommandLineTest, Init) {
  CefRefPtr<CefCommandLine> command_line = CefCommandLine::CreateCommandLine();
  EXPECT_TRUE(command_line.get() != nullptr);
#if defined(OS_WIN)
  command_line->InitFromString(
      "test.exe --switch1 -switch2=VAL2 /switch3=val3 "
      "-switch4=\"val 4\" arg1 \"arg 2\"");
#else
  const char* args[] = {"test.exe",      "--switch1",      "-switch2=VAL2",
                        "-switch3=val3", "-switch4=val 4", "arg1",
                        "arg 2"};
  command_line->InitFromArgv(sizeof(args) / sizeof(char*), args);
#endif
  VerifyCommandLine(command_line);
}
TEST ( CommandLineTest , Init ) { CefRefPtr < CefCommandLine > command_line = CefCommandLine :: CreateCommandLine ( ) ; EXPECT_TRUE ( command_line . get ( ) != nullptr ) ; #if defined ( OS_WIN ) command_line -> InitFromString ( " " " \" \" \" \" " ) ; #else const char * args [ ] = { " " , " " , " " , " " , " " , " " , " " } ; command_line -> InitFromArgv ( sizeof ( args ) / sizeof ( char * ) , args ) ; #endif VerifyCommandLine ( command_line ) ; }
Test creating a command line from argc/argv or string.
Test creating a command line from argc / argv or string .