MCPcopy Create free account
hub / github.com/apache/fory / TEST_F

Function TEST_F

cpp/fory/util/result_test.cc:29–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27class ResultTest : public ::testing::Test {};
28
29TEST_F(ResultTest, BasicValue) {
30 Result<int, Error> res(42);
31 ASSERT_TRUE(res.ok());
32 ASSERT_TRUE(res.has_value());
33 ASSERT_EQ(res.value(), 42);
34 ASSERT_EQ(*res, 42);
35}
36
37TEST_F(ResultTest, BasicError) {
38 Result<int, Error> res = Unexpected(Error::invalid("invalid value"));

Callers

nothing calls this directly

Calls 15

UnexpectedClass · 0.85
helper_okFunction · 0.85
helper_errorFunction · 0.85
compute_okFunction · 0.85
compute_errorFunction · 0.85
value_orMethod · 0.80
valueMethod · 0.65
errorMethod · 0.65
stringFunction · 0.50
okMethod · 0.45
has_valueMethod · 0.45
codeMethod · 0.45

Tested by

no test coverage detected