summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-01-04 20:27:17 +0100
committerandroid-build-merger <android-build-merger@google.com>2017-01-04 20:27:17 +0100
commit74e0ecb25bda6a1c01355d22e3e20bdb3226f3ea (patch)
tree2993d4b32a868c0c7d45fc293508f8a25de11b56 /tests
parentMerge "updater: Refactor parse_range()." am: 466e1b396a am: 6502c50e4b (diff)
parentMerge "recovery: Fix the broken UI text." am: 56fc8fa376 (diff)
downloadandroid_bootable_recovery-74e0ecb25bda6a1c01355d22e3e20bdb3226f3ea.tar
android_bootable_recovery-74e0ecb25bda6a1c01355d22e3e20bdb3226f3ea.tar.gz
android_bootable_recovery-74e0ecb25bda6a1c01355d22e3e20bdb3226f3ea.tar.bz2
android_bootable_recovery-74e0ecb25bda6a1c01355d22e3e20bdb3226f3ea.tar.lz
android_bootable_recovery-74e0ecb25bda6a1c01355d22e3e20bdb3226f3ea.tar.xz
android_bootable_recovery-74e0ecb25bda6a1c01355d22e3e20bdb3226f3ea.tar.zst
android_bootable_recovery-74e0ecb25bda6a1c01355d22e3e20bdb3226f3ea.zip
Diffstat (limited to 'tests')
-rw-r--r--tests/component/verifier_test.cpp70
1 files changed, 38 insertions, 32 deletions
diff --git a/tests/component/verifier_test.cpp b/tests/component/verifier_test.cpp
index 33aadb3fb..b740af96b 100644
--- a/tests/component/verifier_test.cpp
+++ b/tests/component/verifier_test.cpp
@@ -40,38 +40,44 @@
RecoveryUI* ui = NULL;
class MockUI : public RecoveryUI {
- bool Init() { return true; }
- void SetStage(int, int) { }
- void SetLocale(const char*) { }
- void SetBackground(Icon /*icon*/) { }
- void SetSystemUpdateText(bool /*security_update*/) { }
-
- void SetProgressType(ProgressType /*determinate*/) { }
- void ShowProgress(float /*portion*/, float /*seconds*/) { }
- void SetProgress(float /*fraction*/) { }
-
- void ShowText(bool /*visible*/) { }
- bool IsTextVisible() { return false; }
- bool WasTextEverVisible() { return false; }
- void Print(const char* fmt, ...) {
- va_list ap;
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
- }
- void PrintOnScreenOnly(const char* fmt, ...) {
- va_list ap;
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
- }
- void ShowFile(const char*) { }
-
- void StartMenu(const char* const* /*headers*/,
- const char* const* /*items*/,
- int /*initial_selection*/) { }
- int SelectMenu(int /*sel*/) { return 0; }
- void EndMenu() { }
+ bool Init(const std::string&) override {
+ return true;
+ }
+ void SetStage(int, int) override {}
+ void SetBackground(Icon /*icon*/) override {}
+ void SetSystemUpdateText(bool /*security_update*/) override {}
+
+ void SetProgressType(ProgressType /*determinate*/) override {}
+ void ShowProgress(float /*portion*/, float /*seconds*/) override {}
+ void SetProgress(float /*fraction*/) override {}
+
+ void ShowText(bool /*visible*/) override {}
+ bool IsTextVisible() override {
+ return false;
+ }
+ bool WasTextEverVisible() override {
+ return false;
+ }
+ void Print(const char* fmt, ...) override {
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ }
+ void PrintOnScreenOnly(const char* fmt, ...) override {
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ }
+ void ShowFile(const char*) override {}
+
+ void StartMenu(const char* const* /*headers*/, const char* const* /*items*/,
+ int /*initial_selection*/) override {}
+ int SelectMenu(int /*sel*/) override {
+ return 0;
+ }
+ void EndMenu() override {}
};
void