style: s/FirmwareUpdateFlags/UpdateFlags/g
Change the enum's name from FirmwareUpdateFlags to UpdateFlags as it now
lives in the FirmwareBlobHandler class and therefore the name can be
reduced to be less specific.
Change-Id: If1e99525d100c1f43e611fd344f3cba665fdd038
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/firmware_open_unittest.cpp b/test/firmware_open_unittest.cpp
index 49d40a0..202c054 100644
--- a/test/firmware_open_unittest.cpp
+++ b/test/firmware_open_unittest.cpp
@@ -23,7 +23,7 @@
{"asdf", &imageMock},
};
std::vector<DataHandlerPack> data = {
- {FirmwareBlobHandler::FirmwareUpdateFlags::ipmi, nullptr},
+ {FirmwareBlobHandler::UpdateFlags::ipmi, nullptr},
};
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(blobs, data);
@@ -31,8 +31,7 @@
EXPECT_CALL(imageMock, open("asdf")).WillOnce(Return(true));
EXPECT_TRUE(handler->open(
- 0, OpenFlags::write | FirmwareBlobHandler::FirmwareUpdateFlags::ipmi,
- "asdf"));
+ 0, OpenFlags::write | FirmwareBlobHandler::UpdateFlags::ipmi, "asdf"));
}
TEST(FirmwareHandlerOpenTest, OpenWithEverythingValidImageHandlerFails)
@@ -47,7 +46,7 @@
{"asdf", &imageMock},
};
std::vector<DataHandlerPack> data = {
- {FirmwareBlobHandler::FirmwareUpdateFlags::ipmi, nullptr},
+ {FirmwareBlobHandler::UpdateFlags::ipmi, nullptr},
};
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(blobs, data);
@@ -55,8 +54,7 @@
EXPECT_CALL(imageMock, open("asdf")).WillOnce(Return(false));
EXPECT_FALSE(handler->open(
- 0, OpenFlags::write | FirmwareBlobHandler::FirmwareUpdateFlags::ipmi,
- "asdf"));
+ 0, OpenFlags::write | FirmwareBlobHandler::UpdateFlags::ipmi, "asdf"));
}
TEST(FirmwareHandlerOpenTest, OpenWithoutWriteFails)
@@ -70,13 +68,13 @@
{"asdf", &imageMock},
};
std::vector<DataHandlerPack> data = {
- {FirmwareBlobHandler::FirmwareUpdateFlags::ipmi, nullptr},
+ {FirmwareBlobHandler::UpdateFlags::ipmi, nullptr},
};
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(blobs, data);
- EXPECT_FALSE(handler->open(
- 0, FirmwareBlobHandler::FirmwareUpdateFlags::ipmi, "asdf"));
+ EXPECT_FALSE(
+ handler->open(0, FirmwareBlobHandler::UpdateFlags::ipmi, "asdf"));
}
TEST(FirmwareHandlerOpenTest, OpenWithInvalidTransportBit)
@@ -90,13 +88,13 @@
{"asdf", &imageMock},
};
std::vector<DataHandlerPack> data = {
- {FirmwareBlobHandler::FirmwareUpdateFlags::ipmi, nullptr},
+ {FirmwareBlobHandler::UpdateFlags::ipmi, nullptr},
};
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(blobs, data);
- EXPECT_FALSE(handler->open(0, FirmwareBlobHandler::FirmwareUpdateFlags::lpc,
- "asdf"));
+ EXPECT_FALSE(
+ handler->open(0, FirmwareBlobHandler::UpdateFlags::lpc, "asdf"));
}
TEST(FirmwareHandlerOpenTest, OpenWithInvalidImageBlobId)
@@ -110,14 +108,13 @@
{"asdf", &imageMock},
};
std::vector<DataHandlerPack> data = {
- {FirmwareBlobHandler::FirmwareUpdateFlags::ipmi, nullptr},
+ {FirmwareBlobHandler::UpdateFlags::ipmi, nullptr},
};
auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(blobs, data);
EXPECT_FALSE(handler->open(
- 0, OpenFlags::write | FirmwareBlobHandler::FirmwareUpdateFlags::ipmi,
- "bcdf"));
+ 0, OpenFlags::write | FirmwareBlobHandler::UpdateFlags::ipmi, "bcdf"));
}
/* TODO: The client sends a request during verification. */