Lines Matching refs:expect

62 static void expect(const char* expected, const std::string& expr_str, CauseCode cause_code,  in expect()  function
131 expect(result.c_str(), script, cause_code, &updater_info); in RunBlockImageUpdate()
205 expect(android::base::GetProperty("ro.product.device", "").c_str(), in TEST_F()
209 expect(android::base::GetProperty("ro.build.fingerprint", "").c_str(), in TEST_F()
214 expect(nullptr, "getprop()", kArgsParsingFailure); in TEST_F()
215 expect(nullptr, "getprop(\"arg1\", \"arg2\")", kArgsParsingFailure); in TEST_F()
220 expect(nullptr, "patch_partition_check()", kArgsParsingFailure); in TEST_F()
237 expect(nullptr, "patch_partition_check(\"" + source.ToString() + "\")", kArgsParsingFailure); in TEST_F()
238 expect(nullptr, "patch_partition_check(\"" + target.ToString() + "\")", kArgsParsingFailure); in TEST_F()
243 expect("t", cmd, kNoCause); in TEST_F()
248 expect("t", cmd, kNoCause); in TEST_F()
253 expect("t", cmd, kNoCause); in TEST_F()
258 expect("", cmd, kNoCause); in TEST_F()
263 expect(nullptr, "file_getprop()", kArgsParsingFailure); in TEST_F()
264 expect(nullptr, "file_getprop(\"arg1\")", kArgsParsingFailure); in TEST_F()
265 expect(nullptr, "file_getprop(\"arg1\", \"arg2\", \"arg3\")", kArgsParsingFailure); in TEST_F()
268 expect(nullptr, "file_getprop(\"/doesntexist\", \"key1\")", kFreadFailure); in TEST_F()
285 expect("tardis", script1, kNoCause); in TEST_F()
289 expect("magic", script2, kNoCause); in TEST_F()
294 expect("", script3, kNoCause); in TEST_F()
298 expect("", script4, kNoCause); in TEST_F()
302 expect("", script5, kNoCause); in TEST_F()
306 expect("", script6, kNoCause); in TEST_F()
312 expect(nullptr, "package_extract_file()", kArgsParsingFailure); in TEST_F()
313 expect(nullptr, "package_extract_file(\"arg1\", \"arg2\", \"arg3\")", kArgsParsingFailure); in TEST_F()
326 expect("t", script, kNoCause, &updater_info); in TEST_F()
335 expect("t", script, kNoCause, &updater_info); in TEST_F()
342 expect("", script, kNoCause, &updater_info); in TEST_F()
346 expect("", script, kNoCause, &updater_info); in TEST_F()
351 expect("t", script, kNoCause, &updater_info); in TEST_F()
354 expect("t", script, kNoCause, &updater_info); in TEST_F()
358 expect(nullptr, script, kPackageExtractFileFailure, &updater_info); in TEST_F()
365 expect(nullptr, "read_file()", kArgsParsingFailure); in TEST_F()
366 expect(nullptr, "read_file(\"arg1\", \"arg2\")", kArgsParsingFailure); in TEST_F()
371 expect("t", script, kNoCause); in TEST_F()
374 expect("t", script, kNoCause); in TEST_F()
377 expect("", script, kNoCause); in TEST_F()
381 expect("", script, kNoCause); in TEST_F()
466 expect(nullptr, "write_value()", kArgsParsingFailure); in TEST_F()
467 expect(nullptr, "write_value(\"arg1\")", kArgsParsingFailure); in TEST_F()
468 expect(nullptr, "write_value(\"arg1\", \"arg2\", \"arg3\")", kArgsParsingFailure); in TEST_F()
471 expect(nullptr, "write_value(\"value\", \"\")", kArgsParsingFailure); in TEST_F()
477 expect("t", script, kNoCause); in TEST_F()
486 expect("t", script, kNoCause); in TEST_F()
494 expect("", script, kNoCause); in TEST_F()
499 expect(nullptr, "get_stage()", kArgsParsingFailure); in TEST_F()
500 expect(nullptr, "get_stage(\"arg1\", \"arg2\")", kArgsParsingFailure); in TEST_F()
501 expect(nullptr, "get_stage(\"arg1\", \"arg2\", \"arg3\")", kArgsParsingFailure); in TEST_F()
513 expect("2/3", script, kNoCause); in TEST_F()
517 expect("", script, kNoCause); in TEST_F()
522 expect(nullptr, "set_stage()", kArgsParsingFailure); in TEST_F()
523 expect(nullptr, "set_stage(\"arg1\")", kArgsParsingFailure); in TEST_F()
524 expect(nullptr, "set_stage(\"arg1\", \"arg2\", \"arg3\")", kArgsParsingFailure); in TEST_F()
537 expect(tf.path, script, kNoCause); in TEST_F()
549 expect("", script, kNoCause); in TEST_F()
552 expect("", script, kNoCause); in TEST_F()
557 expect(nullptr, "set_progress()", kArgsParsingFailure); in TEST_F()
558 expect(nullptr, "set_progress(\"arg1\", \"arg2\")", kArgsParsingFailure); in TEST_F()
561 expect(nullptr, "set_progress(\"arg1\")", kArgsParsingFailure); in TEST_F()
562 expect(nullptr, "set_progress(\"3x+5\")", kArgsParsingFailure); in TEST_F()
563 expect(nullptr, "set_progress(\".3.5\")", kArgsParsingFailure); in TEST_F()
568 expect(".52", "set_progress(\".52\")", kNoCause, &updater_info); in TEST_F()
581 expect(nullptr, "show_progress()", kArgsParsingFailure); in TEST_F()
582 expect(nullptr, "show_progress(\"arg1\")", kArgsParsingFailure); in TEST_F()
583 expect(nullptr, "show_progress(\"arg1\", \"arg2\", \"arg3\")", kArgsParsingFailure); in TEST_F()
586 expect(nullptr, "show_progress(\"arg1\", \"arg2\")", kArgsParsingFailure); in TEST_F()
587 expect(nullptr, "show_progress(\"3x+5\", \"10\")", kArgsParsingFailure); in TEST_F()
588 expect(nullptr, "show_progress(\".3\", \"5a\")", kArgsParsingFailure); in TEST_F()
593 expect(".52", "show_progress(\".52\", \"10\")", kNoCause, &updater_info); in TEST_F()