xref: /freebsd/contrib/libcbor/examples/bazel/src/hello_test.cc (revision e64bea71c21eb42e97aa615188ba91f6cce0d36d)
1 #include "src/hello.h"
2 #include "cbor.h"
3 
4 #include "gtest/gtest.h"
5 
6 class CborTest : public ::testing::Test {};
7 
8 TEST_F(CborTest, IntegerItem) {
9   cbor_item_t * answer = cbor_build_uint8(42);
10   EXPECT_EQ(cbor_get_uint8(answer), 42);
11   cbor_decref(&answer);
12   EXPECT_EQ(answer, nullptr);
13 }
14 
15