diff options
author | Patrick Venture <venture@google.com> | 2019-05-17 19:21:35 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2019-05-20 13:39:15 -0700 |
commit | 00d5f0de56f3e453be37c2ffc45418fb406396a2 (patch) | |
tree | b80981789421f0262ff87f53bb47a8aa683e0bea /test/ipmi_stat_unittest.cpp | |
parent | 9260be38323f5205c3968de37117993001984847 (diff) | |
download | phosphor-ipmi-blobs-00d5f0de56f3e453be37c2ffc45418fb406396a2.tar.gz phosphor-ipmi-blobs-00d5f0de56f3e453be37c2ffc45418fb406396a2.zip |
blobs-ipmid: use enum class for BlobOEMCommands
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ic5aa3e38b4df33a2cfa29c575f17097e38d06605
Diffstat (limited to 'test/ipmi_stat_unittest.cpp')
-rw-r--r-- | test/ipmi_stat_unittest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ipmi_stat_unittest.cpp b/test/ipmi_stat_unittest.cpp index cbff23d..b4f542d 100644 --- a/test/ipmi_stat_unittest.cpp +++ b/test/ipmi_stat_unittest.cpp @@ -32,7 +32,7 @@ TEST(BlobStatTest, InvalidRequestLengthReturnsFailure) auto req = reinterpret_cast<struct BmcBlobStatTx*>(request); std::string blobId = "abc"; - req->cmd = BlobOEMCommands::bmcBlobStat; + req->cmd = static_cast<std::uint8_t>(BlobOEMCommands::bmcBlobStat); req->crc = 0; // length() doesn't include the nul-terminator. std::memcpy(req->blobId, blobId.c_str(), blobId.length()); @@ -54,7 +54,7 @@ TEST(BlobStatTest, RequestRejectedReturnsFailure) auto req = reinterpret_cast<struct BmcBlobStatTx*>(request); std::string blobId = "a"; - req->cmd = BlobOEMCommands::bmcBlobStat; + req->cmd = static_cast<std::uint8_t>(BlobOEMCommands::bmcBlobStat); req->crc = 0; // length() doesn't include the nul-terminator, request buff is initialized // to 0s @@ -81,7 +81,7 @@ TEST(BlobStatTest, RequestSucceedsNoMetadata) auto req = reinterpret_cast<struct BmcBlobStatTx*>(request); std::string blobId = "a"; - req->cmd = BlobOEMCommands::bmcBlobStat; + req->cmd = static_cast<std::uint8_t>(BlobOEMCommands::bmcBlobStat); req->crc = 0; // length() doesn't include the nul-terminator, request buff is initialized // to 0s @@ -120,7 +120,7 @@ TEST(BlobStatTest, RequestSucceedsWithMetadata) auto req = reinterpret_cast<struct BmcBlobStatTx*>(request); std::string blobId = "a"; - req->cmd = BlobOEMCommands::bmcBlobStat; + req->cmd = static_cast<std::uint8_t>(BlobOEMCommands::bmcBlobStat); req->crc = 0; // length() doesn't include the nul-terminator, request buff is initialized // to 0s |