MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / TEST

Function TEST

test/text_literal_test.cpp:28–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26using ::testing::Eq;
27
28TEST(TextLiteral, GoodI32) {
29 spv_literal_t l;
30
31 ASSERT_EQ(SPV_SUCCESS, spvTextToLiteral("-0", &l));
32 EXPECT_EQ(SPV_LITERAL_TYPE_INT_32, l.type);
33 EXPECT_EQ(0, l.value.i32);
34
35 ASSERT_EQ(SPV_SUCCESS, spvTextToLiteral("-2147483648", &l));
36 EXPECT_EQ(SPV_LITERAL_TYPE_INT_32, l.type);
37 EXPECT_EQ((-2147483647L - 1), l.value.i32);
38}
39
40TEST(TextLiteral, GoodU32) {
41 spv_literal_t l;

Callers

nothing calls this directly

Calls 7

spvTextToLiteralFunction · 0.85
MakeLongUTF8StringFunction · 0.85
failedEncodeFunction · 0.85
Make_Bad_SignedFunction · 0.85
Make_Bad_UnsignedFunction · 0.85
c_strMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected