Home | History | Annotate | Download | only in base

Lines Matching defs:cl

47   CommandLine cl(arraysize(argv), argv);
49 EXPECT_FALSE(cl.GetCommandLineString().empty());
50 EXPECT_FALSE(cl.HasSwitch("cruller"));
51 EXPECT_FALSE(cl.HasSwitch("flim"));
52 EXPECT_FALSE(cl.HasSwitch("program"));
53 EXPECT_FALSE(cl.HasSwitch("dog"));
54 EXPECT_FALSE(cl.HasSwitch("cat"));
55 EXPECT_FALSE(cl.HasSwitch("output-rotation"));
56 EXPECT_FALSE(cl.HasSwitch("not-a-switch"));
57 EXPECT_FALSE(cl.HasSwitch("--"));
60 cl.GetProgram().value());
62 EXPECT_TRUE(cl.HasSwitch("foo"));
63 EXPECT_TRUE(cl.HasSwitch("bAr"));
64 EXPECT_TRUE(cl.HasSwitch("baz"));
65 EXPECT_TRUE(cl.HasSwitch("spaetzle"));
67 EXPECT_TRUE(cl.HasSwitch("SPAETZLE"));
69 EXPECT_TRUE(cl.HasSwitch("other-switches"));
70 EXPECT_TRUE(cl.HasSwitch("input-translation"));
72 EXPECT_EQ("Crepe", cl.GetSwitchValueASCII("spaetzle"));
73 EXPECT_EQ("", cl.GetSwitchValueASCII("Foo"));
74 EXPECT_EQ("", cl.GetSwitchValueASCII("bar"));
75 EXPECT_EQ("", cl.GetSwitchValueASCII("cruller"));
76 EXPECT_EQ("--dog=canine --cat=feline", cl.GetSwitchValueASCII(
78 EXPECT_EQ("45--output-rotation", cl.GetSwitchValueASCII("input-translation"));
80 const CommandLine::StringVector& args = cl.GetArgs();
105 CommandLine cl = CommandLine::FromString(
114 EXPECT_FALSE(cl.GetCommandLineString().empty());
115 EXPECT_FALSE(cl.HasSwitch("cruller"));
116 EXPECT_FALSE(cl.HasSwitch("flim"));
117 EXPECT_FALSE(cl.HasSwitch("program"));
118 EXPECT_FALSE(cl.HasSwitch("dog"));
119 EXPECT_FALSE(cl.HasSwitch("cat"));
120 EXPECT_FALSE(cl.HasSwitch("output-rotation"));
121 EXPECT_FALSE(cl.HasSwitch("not-a-switch"));
122 EXPECT_FALSE(cl.HasSwitch("--"));
125 cl.GetProgram().value());
127 EXPECT_TRUE(cl.HasSwitch("foo"));
128 EXPECT_TRUE(cl.HasSwitch("bar"));
129 EXPECT_TRUE(cl.HasSwitch("baz"));
130 EXPECT_TRUE(cl.HasSwitch("spaetzle"));
131 EXPECT_TRUE(cl.HasSwitch("SPAETZLE"));
132 EXPECT_TRUE(cl.HasSwitch("other-switches"));
133 EXPECT_TRUE(cl.HasSwitch("input-translation"));
134 EXPECT_TRUE(cl.HasSwitch("quotes"));
136 EXPECT_EQ("Crepe", cl.GetSwitchValueASCII("spaetzle"));
137 EXPECT_EQ("", cl.GetSwitchValueASCII("Foo"));
138 EXPECT_EQ("", cl.GetSwitchValueASCII("bar"));
139 EXPECT_EQ("", cl.GetSwitchValueASCII("cruller"));
140 EXPECT_EQ("--dog=canine --cat=feline", cl.GetSwitchValueASCII(
142 EXPECT_EQ("45--output-rotation", cl.GetSwitchValueASCII("input-translation"));
143 EXPECT_EQ(kTricky, cl.GetSwitchValueNative("quotes"));
145 const CommandLine::StringVector& args = cl.GetArgs();
162 CommandLine cl_duplicate = CommandLine::FromString(cl.GetCommandLineString());
163 EXPECT_EQ(cl.GetCommandLineString(), cl_duplicate.GetCommandLineString());
194 CommandLine cl(CommandLine::NO_PROGRAM);
195 cl.AppendSwitchPath(kFirstArgName, FilePath(kPath1));
196 cl.AppendSwitchPath(kSecondArgName, FilePath(kPath2));
197 cl.AppendArg(kThirdArgName);
198 cl.AppendArg(kFourthArgName);
242 EXPECT_EQ(expected_str, cl.GetArgumentsString());
257 CommandLine cl(FilePath(FILE_PATH_LITERAL("Program")));
259 cl.AppendSwitch(switch1);
260 cl.AppendSwitchASCII(switch2, value2);
261 cl.AppendSwitchASCII(switch3, value3);
262 cl.AppendSwitchASCII(switch4, value4);
263 cl.AppendSwitchNative(switch5, value5);
265 EXPECT_TRUE(cl.HasSwitch(switch1));
266 EXPECT_TRUE(cl.HasSwitch(switch2));
267 EXPECT_EQ(value2, cl.GetSwitchValueASCII(switch2));
268 EXPECT_TRUE(cl.HasSwitch(switch3));
269 EXPECT_EQ(value3, cl.GetSwitchValueASCII(switch3));
270 EXPECT_TRUE(cl.HasSwitch(switch4));
271 EXPECT_EQ(value4, cl.GetSwitchValueASCII(switch4));
272 EXPECT_TRUE(cl.HasSwitch(switch5));
273 EXPECT_EQ(value5, cl.GetSwitchValueNative(switch5));
282 cl.GetCommandLineString());
290 CommandLine cl(arraysize(raw_argv), raw_argv);
292 cl.AppendSwitch("switch1");
293 cl.AppendSwitchASCII("switch2", "foo");
295 cl.AppendArg("--arg2");
298 cl.GetCommandLineString());
299 CommandLine::StringVector cl_argv = cl.argv();