firmware: add handler for static layout
Add static layout handler.
Change-Id: I5c4cfe9782d59d32b16556e1d82b468c119eeb76
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/firmware_handler_unittest.cpp b/test/firmware_handler_unittest.cpp
index 8ef74c1..16395df 100644
--- a/test/firmware_handler_unittest.cpp
+++ b/test/firmware_handler_unittest.cpp
@@ -1,7 +1,9 @@
#include "firmware_handler.hpp"
+#include "image_mock.hpp"
#include <algorithm>
#include <memory>
+#include <vector>
#include <gtest/gtest.h>
@@ -15,7 +17,13 @@
}
TEST(FirmwareHandlerTest, CreateEmptyListVerifyHasHash)
{
- auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler({"asdf"}, 0);
+ ImageHandlerMock imageMock;
+
+ std::vector<HandlerPack> blobs = {
+ {"asdf", &imageMock},
+ };
+
+ auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(blobs, 0);
auto result = handler->getBlobIds();
EXPECT_EQ(2, result.size());
EXPECT_EQ(2, std::count(result.begin(), result.end(), "asdf") +