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

Function TEST_F

test/val/val_literals_test.cpp:68–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68TEST_F(ValidateLiterals, LiteralsShaderGood) {
69 std::string str = GenerateShaderCode() + R"(
70%11 = OpConstant %int16 !0x00007FFF
71%12 = OpConstant %int16 !0xFFFF8000
72%13 = OpConstant %int16 !0xFFFFABCD
73%14 = OpConstant %uint16 !0x0000ABCD
74%15 = OpConstant %int16 -32768
75%16 = OpConstant %uint16 65535
76%17 = OpConstant %int32 -2147483648
77%18 = OpConstant %uint32 4294967295
78%19 = OpConstant %int64 -9223372036854775808
79%20 = OpConstant %uint64 18446744073709551615
80%21 = OpConstant %half !0x0000FFFF
81%22 = OpConstant %float !0xFFFFFFFF
82%23 = OpConstant %double !0xFFFFFFFF !0xFFFFFFFF
83 )";
84 CompileSuccessfully(str);
85 ASSERT_EQ(SPV_SUCCESS, ValidateInstructions());
86}
87
88TEST_F(ValidateLiterals, InvalidInt) {
89 std::string str = GenerateShaderCode() + R"(

Callers

nothing calls this directly

Calls 2

GenerateShaderCodeFunction · 0.70
GenerateKernelCodeFunction · 0.70

Tested by

no test coverage detected