Lines Matching refs:expect

61 static void expect(const char* expected, const std::string& expr_str, CauseCode cause_code,  in expect()  function
87 static void expect(const char* expected, const std::string& expr_str, CauseCode cause_code) { in expect() function
89 expect(expected, expr_str, cause_code, &updater); in expect()
238 expect(android::base::GetProperty("ro.product.device", "").c_str(), in TEST_F()
242 expect(android::base::GetProperty("ro.build.fingerprint", "").c_str(), in TEST_F()
247 expect(nullptr, "getprop()", kArgsParsingFailure); in TEST_F()
248 expect(nullptr, "getprop(\"arg1\", \"arg2\")", kArgsParsingFailure); in TEST_F()
253 expect(nullptr, "patch_partition_check()", kArgsParsingFailure); in TEST_F()
270 expect(nullptr, "patch_partition_check(\"" + source.ToString() + "\")", kArgsParsingFailure); in TEST_F()
271 expect(nullptr, "patch_partition_check(\"" + target.ToString() + "\")", kArgsParsingFailure); in TEST_F()
276 expect("t", cmd, kNoCause); in TEST_F()
281 expect("t", cmd, kNoCause); in TEST_F()
286 expect("t", cmd, kNoCause); in TEST_F()
291 expect("", cmd, kNoCause); in TEST_F()
296 expect(nullptr, "file_getprop()", kArgsParsingFailure); in TEST_F()
297 expect(nullptr, "file_getprop(\"arg1\")", kArgsParsingFailure); in TEST_F()
298 expect(nullptr, "file_getprop(\"arg1\", \"arg2\", \"arg3\")", kArgsParsingFailure); in TEST_F()
301 expect(nullptr, "file_getprop(\"/doesntexist\", \"key1\")", kFreadFailure); in TEST_F()
318 expect("tardis", script1, kNoCause); in TEST_F()
322 expect("magic", script2, kNoCause); in TEST_F()
327 expect("", script3, kNoCause); in TEST_F()
331 expect("", script4, kNoCause); in TEST_F()
335 expect("", script5, kNoCause); in TEST_F()
339 expect("", script6, kNoCause); in TEST_F()
345 expect(nullptr, "package_extract_file()", kArgsParsingFailure); in TEST_F()
346 expect(nullptr, "package_extract_file(\"arg1\", \"arg2\", \"arg3\")", kArgsParsingFailure); in TEST_F()
358 expect("t", script, kNoCause, &updater_); in TEST_F()
367 expect("t", script, kNoCause, &updater_); in TEST_F()
374 expect("", script, kNoCause, &updater_); in TEST_F()
378 expect("", script, kNoCause, &updater_); in TEST_F()
383 expect("t", script, kNoCause, &updater_); in TEST_F()
386 expect("t", script, kNoCause, &updater_); in TEST_F()
390 expect(nullptr, script, kPackageExtractFileFailure, &updater_); in TEST_F()
395 expect(nullptr, "read_file()", kArgsParsingFailure); in TEST_F()
396 expect(nullptr, "read_file(\"arg1\", \"arg2\")", kArgsParsingFailure); in TEST_F()
401 expect("t", script, kNoCause); in TEST_F()
404 expect("t", script, kNoCause); in TEST_F()
407 expect("", script, kNoCause); in TEST_F()
411 expect("", script, kNoCause); in TEST_F()
496 expect(nullptr, "write_value()", kArgsParsingFailure); in TEST_F()
497 expect(nullptr, "write_value(\"arg1\")", kArgsParsingFailure); in TEST_F()
498 expect(nullptr, "write_value(\"arg1\", \"arg2\", \"arg3\")", kArgsParsingFailure); in TEST_F()
501 expect(nullptr, "write_value(\"value\", \"\")", kArgsParsingFailure); in TEST_F()
507 expect("t", script, kNoCause); in TEST_F()
516 expect("t", script, kNoCause); in TEST_F()
524 expect("", script, kNoCause); in TEST_F()
529 expect(nullptr, "get_stage()", kArgsParsingFailure); in TEST_F()
530 expect(nullptr, "get_stage(\"arg1\", \"arg2\")", kArgsParsingFailure); in TEST_F()
531 expect(nullptr, "get_stage(\"arg1\", \"arg2\", \"arg3\")", kArgsParsingFailure); in TEST_F()
543 expect("2/3", script, kNoCause); in TEST_F()
547 expect("", script, kNoCause); in TEST_F()
552 expect(nullptr, "set_stage()", kArgsParsingFailure); in TEST_F()
553 expect(nullptr, "set_stage(\"arg1\")", kArgsParsingFailure); in TEST_F()
554 expect(nullptr, "set_stage(\"arg1\", \"arg2\", \"arg3\")", kArgsParsingFailure); in TEST_F()
567 expect(tf.path, script, kNoCause); in TEST_F()
579 expect("", script, kNoCause); in TEST_F()
582 expect("", script, kNoCause); in TEST_F()
587 expect(nullptr, "set_progress()", kArgsParsingFailure); in TEST_F()
588 expect(nullptr, "set_progress(\"arg1\", \"arg2\")", kArgsParsingFailure); in TEST_F()
591 expect(nullptr, "set_progress(\"arg1\")", kArgsParsingFailure); in TEST_F()
592 expect(nullptr, "set_progress(\"3x+5\")", kArgsParsingFailure); in TEST_F()
593 expect(nullptr, "set_progress(\".3.5\")", kArgsParsingFailure); in TEST_F()
597 expect(".52", "set_progress(\".52\")", kNoCause, &updater_); in TEST_F()
609 expect(nullptr, "show_progress()", kArgsParsingFailure); in TEST_F()
610 expect(nullptr, "show_progress(\"arg1\")", kArgsParsingFailure); in TEST_F()
611 expect(nullptr, "show_progress(\"arg1\", \"arg2\", \"arg3\")", kArgsParsingFailure); in TEST_F()
614 expect(nullptr, "show_progress(\"arg1\", \"arg2\")", kArgsParsingFailure); in TEST_F()
615 expect(nullptr, "show_progress(\"3x+5\", \"10\")", kArgsParsingFailure); in TEST_F()
616 expect(nullptr, "show_progress(\".3\", \"5a\")", kArgsParsingFailure); in TEST_F()
620 expect(".52", "show_progress(\".52\", \"10\")", kNoCause, &updater_); in TEST_F()