summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Moreland2017-01-03 19:06:57 -0600
committerSteven Moreland2017-01-04 12:40:05 -0600
commitb6438421923590b765905efe151e26129dce4094 (patch)
treef80ccca80838fb5e40d900165fc73d7d6c314a7f /boot/1.0/vts
parent5bf8664c7e0c6bf746d724ee1f07d98fa14f0cf2 (diff)
downloadplatform-hardware-interfaces-b6438421923590b765905efe151e26129dce4094.tar.gz
platform-hardware-interfaces-b6438421923590b765905efe151e26129dce4094.tar.xz
platform-hardware-interfaces-b6438421923590b765905efe151e26129dce4094.zip
Return<*> getStatus().isOk() -> isOk()
Bug: 31348667 Test: compiles Change-Id: If8d5a23f80dbc04127635b49f1ef77398fc9f8a1
Diffstat (limited to 'boot/1.0/vts')
-rw-r--r--boot/1.0/vts/functional/boot_hidl_hal_test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/boot/1.0/vts/functional/boot_hidl_hal_test.cpp b/boot/1.0/vts/functional/boot_hidl_hal_test.cpp
index 7b002b9d..cdca7e2b 100644
--- a/boot/1.0/vts/functional/boot_hidl_hal_test.cpp
+++ b/boot/1.0/vts/functional/boot_hidl_hal_test.cpp
@@ -75,7 +75,7 @@ TEST_F(BootHidlTest, GetCurrentSlot) {
75TEST_F(BootHidlTest, MarkBootSuccessful) { 75TEST_F(BootHidlTest, MarkBootSuccessful) {
76 CommandResult cr; 76 CommandResult cr;
77 Return<void> result = boot->markBootSuccessful(generate_callback(&cr)); 77 Return<void> result = boot->markBootSuccessful(generate_callback(&cr));
78 ASSERT_TRUE(result.getStatus().isOk()); 78 ASSERT_TRUE(result.isOk());
79 if (cr.success) { 79 if (cr.success) {
80 Slot curSlot = boot->getCurrentSlot(); 80 Slot curSlot = boot->getCurrentSlot();
81 BoolResult ret = boot->isSlotMarkedSuccessful(curSlot); 81 BoolResult ret = boot->isSlotMarkedSuccessful(curSlot);
@@ -88,14 +88,14 @@ TEST_F(BootHidlTest, SetActiveBootSlot) {
88 for (Slot s = 0; s < 2; s++) { 88 for (Slot s = 0; s < 2; s++) {
89 CommandResult cr; 89 CommandResult cr;
90 Return<void> result = boot->setActiveBootSlot(s, generate_callback(&cr)); 90 Return<void> result = boot->setActiveBootSlot(s, generate_callback(&cr));
91 EXPECT_TRUE(result.getStatus().isOk()); 91 EXPECT_TRUE(result.isOk());
92 } 92 }
93 { 93 {
94 CommandResult cr; 94 CommandResult cr;
95 uint32_t slots = boot->getNumberSlots(); 95 uint32_t slots = boot->getNumberSlots();
96 Return<void> result = 96 Return<void> result =
97 boot->setActiveBootSlot(slots, generate_callback(&cr)); 97 boot->setActiveBootSlot(slots, generate_callback(&cr));
98 ASSERT_TRUE(result.getStatus().isOk()); 98 ASSERT_TRUE(result.isOk());
99 EXPECT_EQ(false, cr.success); 99 EXPECT_EQ(false, cr.success);
100 } 100 }
101} 101}
@@ -108,7 +108,7 @@ TEST_F(BootHidlTest, SetSlotAsUnbootable) {
108 Slot otherSlot = curSlot ? 0 : 1; 108 Slot otherSlot = curSlot ? 0 : 1;
109 Return<void> result = 109 Return<void> result =
110 boot->setSlotAsUnbootable(otherSlot, generate_callback(&cr)); 110 boot->setSlotAsUnbootable(otherSlot, generate_callback(&cr));
111 EXPECT_TRUE(result.getStatus().isOk()); 111 EXPECT_TRUE(result.isOk());
112 if (cr.success) { 112 if (cr.success) {
113 EXPECT_EQ(BoolResult::FALSE, boot->isSlotBootable(otherSlot)); 113 EXPECT_EQ(BoolResult::FALSE, boot->isSlotBootable(otherSlot));
114 boot->setActiveBootSlot(otherSlot, generate_callback(&cr)); 114 boot->setActiveBootSlot(otherSlot, generate_callback(&cr));
@@ -120,7 +120,7 @@ TEST_F(BootHidlTest, SetSlotAsUnbootable) {
120 uint32_t slots = boot->getNumberSlots(); 120 uint32_t slots = boot->getNumberSlots();
121 Return<void> result = 121 Return<void> result =
122 boot->setSlotAsUnbootable(slots, generate_callback(&cr)); 122 boot->setSlotAsUnbootable(slots, generate_callback(&cr));
123 EXPECT_TRUE(result.getStatus().isOk()); 123 EXPECT_TRUE(result.isOk());
124 EXPECT_EQ(false, cr.success); 124 EXPECT_EQ(false, cr.success);
125 } 125 }
126} 126}
@@ -150,7 +150,7 @@ TEST_F(BootHidlTest, GetSuffix) {
150 for (Slot i = 0; i < 2; i++) { 150 for (Slot i = 0; i < 2; i++) {
151 CommandResult cr; 151 CommandResult cr;
152 Return<void> result = boot->getSuffix(i, cb); 152 Return<void> result = boot->getSuffix(i, cb);
153 EXPECT_TRUE(result.getStatus().isOk()); 153 EXPECT_TRUE(result.isOk());
154 char correctSuffix[3]; 154 char correctSuffix[3];
155 snprintf(correctSuffix, sizeof(correctSuffix), "_%c", 'a' + i); 155 snprintf(correctSuffix, sizeof(correctSuffix), "_%c", 'a' + i);
156 ASSERT_EQ(0, strcmp(suffixPtr, correctSuffix)); 156 ASSERT_EQ(0, strcmp(suffixPtr, correctSuffix));
@@ -158,7 +158,7 @@ TEST_F(BootHidlTest, GetSuffix) {
158 { 158 {
159 char emptySuffix[] = ""; 159 char emptySuffix[] = "";
160 Return<void> result = boot->getSuffix(boot->getNumberSlots(), cb); 160 Return<void> result = boot->getSuffix(boot->getNumberSlots(), cb);
161 EXPECT_TRUE(result.getStatus().isOk()); 161 EXPECT_TRUE(result.isOk());
162 ASSERT_EQ(0, strcmp(emptySuffix, suffixPtr)); 162 ASSERT_EQ(0, strcmp(emptySuffix, suffixPtr));
163 } 163 }
164} 164}