test: flexible array member cannot go into lambda
The flexible array member cannot be captured in a lambda expression.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ia2a8942d6e9c0c3f58a9bf966a0100785a8b6c91
diff --git a/test/ipmi_sessionstat_unittest.cpp b/test/ipmi_sessionstat_unittest.cpp
index 2f407a1..f067c15 100644
--- a/test/ipmi_sessionstat_unittest.cpp
+++ b/test/ipmi_sessionstat_unittest.cpp
@@ -62,11 +62,14 @@
rep.size = 0x100;
rep.metadataLen = 0x00;
+ uint16_t blobState = rep.blobState;
+ uint32_t size = rep.size;
+
EXPECT_CALL(mgr, stat(Matcher<uint16_t>(req->sessionId),
Matcher<BlobMeta*>(NotNull())))
.WillOnce(Invoke([&](uint16_t session, BlobMeta* meta) {
- meta->blobState = rep.blobState;
- meta->size = rep.size;
+ meta->blobState = blobState;
+ meta->size = size;
return true;
}));
diff --git a/test/ipmi_stat_unittest.cpp b/test/ipmi_stat_unittest.cpp
index 5002e69..f173985 100644
--- a/test/ipmi_stat_unittest.cpp
+++ b/test/ipmi_stat_unittest.cpp
@@ -95,11 +95,14 @@
rep.size = 0x100;
rep.metadataLen = 0x00;
+ uint16_t blobState = rep.blobState;
+ uint32_t size = rep.size;
+
EXPECT_CALL(mgr, stat(Matcher<const std::string&>(StrEq(blobId)),
Matcher<BlobMeta*>(NotNull())))
.WillOnce(Invoke([&](const std::string& path, BlobMeta* meta) {
- meta->blobState = rep.blobState;
- meta->size = rep.size;
+ meta->blobState = blobState;
+ meta->size = size;
return true;
}));