tests: msgbuf: Ensure extraction succeeds before testing values

Fix:

```
In file included from ../tests/msgbuf.cpp:6:
In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = short int; T2 = int]’,
    inlined from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = short int; T2 = int; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’ at ../subprojects/googletest/googletest/include/gtest/gtest.h:1413:64,
    inlined from ‘virtual void msgbuf_extract_one_int16_Test::TestBody()’ at ../tests/msgbuf.cpp:229:5:
../subprojects/googletest/googletest/include/gtest/gtest.h:1394:3: error: ‘val’ may be used uninitialized [-Werror=maybe-uninitialized]
 1394 |   if (lhs == rhs) {
      |   ^~
../tests/msgbuf.cpp: In member function ‘virtual void msgbuf_extract_one_int16_Test::TestBody()’:
../tests/msgbuf.cpp:225:13: note: ‘val’ was declared here
  225 |     int16_t val;
      |             ^~~
In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = unsigned int; T2 = int]’,
    inlined from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = unsigned int; T2 = int; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’ at ../subprojects/googletest/googletest/include/gtest/gtest.h:1413:64,
    inlined from ‘virtual void msgbuf_extract_one_uint32_Test::TestBody()’ at ../tests/msgbuf.cpp:268:5:
../subprojects/googletest/googletest/include/gtest/gtest.h:1394:3: error: ‘val’ may be used uninitialized [-Werror=maybe-uninitialized]
 1394 |   if (lhs == rhs) {
      |   ^~
../tests/msgbuf.cpp: In member function ‘virtual void msgbuf_extract_one_uint32_Test::TestBody()’:
../tests/msgbuf.cpp:264:14: note: ‘val’ was declared here
  264 |     uint32_t val;
      |              ^~~
```

Change-Id: I0aac7ba5958f3278e2079183a245c2258c0e92f4
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/tests/msgbuf.cpp b/tests/msgbuf.cpp
index f6dcad5..68f17ae 100644
--- a/tests/msgbuf.cpp
+++ b/tests/msgbuf.cpp
@@ -225,7 +225,7 @@
     int16_t val;
 
     ASSERT_EQ(pldm_msgbuf_init_errno(ctx, sizeof(buf), buf, sizeof(buf)), 0);
-    EXPECT_EQ(pldm_msgbuf_extract_int16(ctx, val), 0);
+    ASSERT_EQ(pldm_msgbuf_extract_int16(ctx, val), 0);
     EXPECT_EQ(val, INT16_MIN);
     EXPECT_EQ(pldm_msgbuf_complete(ctx), 0);
 }
@@ -264,7 +264,7 @@
     uint32_t val;
 
     ASSERT_EQ(pldm_msgbuf_init_errno(ctx, sizeof(buf), buf, sizeof(buf)), 0);
-    EXPECT_EQ(pldm_msgbuf_extract_uint32(ctx, val), 0);
+    ASSERT_EQ(pldm_msgbuf_extract_uint32(ctx, val), 0);
     EXPECT_EQ(val, 0x5a00ffa5);
     EXPECT_EQ(pldm_msgbuf_complete(ctx), 0);
 }