• Home
  • Raw
  • Download

Lines Matching refs:EXPECT_EQUAL

136 #define EXPECT_EQUAL(a, b)  expect_equal(r, __LINE__, (a), (b))  macro
141 EXPECT_EQUAL(All(GreaterThan(Float4(1), Float4(0))), "true"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
144 EXPECT_EQUAL(Declare(x), "int x;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
149 EXPECT_EQUAL(All(GreaterThan(Float4(1), Float4(0))), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
156 EXPECT_EQUAL(Declare(x), "int _0_x;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
170 EXPECT_EQUAL(Float2(0), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
172 EXPECT_EQUAL(Float2(-0.5, 1), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
174 EXPECT_EQUAL(Float3(0.75), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
176 EXPECT_EQUAL(Float3(Float2(0, 1), -2), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
178 EXPECT_EQUAL(Float3(0, 1, 2), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
180 EXPECT_EQUAL(Float4(0), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
182 EXPECT_EQUAL(Float4(Float2(0, 1), Float2(2, 3)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
184 EXPECT_EQUAL(Float4(0, 1, Float2(2, 3)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
186 EXPECT_EQUAL(Float4(0, 1, 2, 3), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
190 EXPECT_EQUAL(x = 1.0, "(x = 1.0)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
191 EXPECT_EQUAL(x = 1.0f, "(x = 1.0)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
194 EXPECT_EQUAL(y.x() = 1.0, "(y.x = 1.0)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
195 EXPECT_EQUAL(y.x() = 1.0f, "(y.x = 1.0)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
230 EXPECT_EQUAL(Half2(0), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
232 EXPECT_EQUAL(Half2(-0.5, 1), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
234 EXPECT_EQUAL(Half3(0.75), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
236 EXPECT_EQUAL(Half3(Half2(0, 1), -2), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
238 EXPECT_EQUAL(Half3(0, 1, 2), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
240 EXPECT_EQUAL(Half4(0), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
242 EXPECT_EQUAL(Half4(Half2(0, 1), Half2(2, 3)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
244 EXPECT_EQUAL(Half4(0, 1, Half2(2, 3)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
246 EXPECT_EQUAL(Half4(0, 1, 2, 3), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
275 EXPECT_EQUAL(Int(std::numeric_limits<int32_t>::max()), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
277 EXPECT_EQUAL(Int2(std::numeric_limits<int32_t>::min()), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
279 EXPECT_EQUAL(Int2(0, 1), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
281 EXPECT_EQUAL(Int3(0), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
283 EXPECT_EQUAL(Int3(Int2(0, 1), -2), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
285 EXPECT_EQUAL(Int3(0, 1, 2), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
287 EXPECT_EQUAL(Int4(0), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
289 EXPECT_EQUAL(Int4(Int2(0, 1), Int2(2, 3)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
291 EXPECT_EQUAL(Int4(0, 1, Int2(2, 3)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
293 EXPECT_EQUAL(Int4(0, 1, 2, 3), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
312 EXPECT_EQUAL(UInt(std::numeric_limits<uint32_t>::max()), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
314 EXPECT_EQUAL(UInt2(std::numeric_limits<uint32_t>::min()), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
316 EXPECT_EQUAL(UInt2(0, 1), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
318 EXPECT_EQUAL(UInt3(0), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
320 EXPECT_EQUAL(UInt3(UInt2(0, 1), -2), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
322 EXPECT_EQUAL(UInt3(0, 1, 2), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
324 EXPECT_EQUAL(UInt4(0), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
326 EXPECT_EQUAL(UInt4(UInt2(0, 1), UInt2(2, 3)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
328 EXPECT_EQUAL(UInt4(0, 1, UInt2(2, 3)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
330 EXPECT_EQUAL(UInt4(0, 1, 2, 3), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
349 EXPECT_EQUAL(Short(std::numeric_limits<int16_t>::max()), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
351 EXPECT_EQUAL(Short2(std::numeric_limits<int16_t>::min()), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
353 EXPECT_EQUAL(Short2(0, 1), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
355 EXPECT_EQUAL(Short3(0), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
357 EXPECT_EQUAL(Short3(Short2(0, 1), -2), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
359 EXPECT_EQUAL(Short3(0, 1, 2), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
361 EXPECT_EQUAL(Short4(0), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
363 EXPECT_EQUAL(Short4(Short2(0, 1), Short2(2, 3)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
365 EXPECT_EQUAL(Short4(0, 1, Short2(2, 3)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
367 EXPECT_EQUAL(Short4(0, 1, 2, 3), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
386 EXPECT_EQUAL(UShort(std::numeric_limits<uint16_t>::max()), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
388 EXPECT_EQUAL(UShort2(std::numeric_limits<uint16_t>::min()), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
390 EXPECT_EQUAL(UShort2(0, 1), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
392 EXPECT_EQUAL(UShort3(0), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
394 EXPECT_EQUAL(UShort3(UShort2(0, 1), -2), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
396 EXPECT_EQUAL(UShort3(0, 1, 2), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
398 EXPECT_EQUAL(UShort4(0), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
400 EXPECT_EQUAL(UShort4(UShort2(0, 1), UShort2(2, 3)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
402 EXPECT_EQUAL(UShort4(0, 1, UShort2(2, 3)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
404 EXPECT_EQUAL(UShort4(0, 1, 2, 3), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
423 EXPECT_EQUAL(Bool2(false), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
425 EXPECT_EQUAL(Bool2(false, true), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
427 EXPECT_EQUAL(Bool3(false), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
429 EXPECT_EQUAL(Bool3(Bool2(false, true), false), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
431 EXPECT_EQUAL(Bool3(false, true, false), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
433 EXPECT_EQUAL(Bool4(false), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
435 EXPECT_EQUAL(Bool4(Bool2(false, true), Bool2(false, true)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
437 EXPECT_EQUAL(Bool4(false, true, Bool2(false, true)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
439 EXPECT_EQUAL(Bool4(false, true, false, true), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
550 EXPECT_EQUAL(f22 = Float2x2(1), "(f22 = float2x2(1.0))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
552 EXPECT_EQUAL(f32 = Float3x2(1, 2, 3, 4, 5, 6), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
555 EXPECT_EQUAL(f42 = Float4x2(Float4(1, 2, 3, 4), 5, 6, 7, 8), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
558 EXPECT_EQUAL(f23 = Float2x3(1, Float2(2, 3), 4, Float2(5, 6)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
561 EXPECT_EQUAL(f33 = Float3x3(Float3(1, 2, 3), 4, Float2(5, 6), 7, 8, 9), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
564 EXPECT_EQUAL(f43 = Float4x3(Float4(1, 2, 3, 4), Float4(5, 6, 7, 8), Float4(9, 10, 11, 12)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
567 EXPECT_EQUAL(f24 = Float2x4(1, 2, 3, 4, 5, 6, 7, 8), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
570 EXPECT_EQUAL(f34 = Float3x4(1, 2, 3, 4, 5, 6, 7, 8, 9, Float3(10, 11, 12)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
573 EXPECT_EQUAL(f44 = Float4x4(1), "(f44 = float4x4(1.0))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
576 EXPECT_EQUAL(h22 = Half2x2(1), "(h22 = half2x2(1.0))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
578 EXPECT_EQUAL(h32 = Half3x2(1, 2, 3, 4, 5, 6), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
581 EXPECT_EQUAL(h42 = Half4x2(Half4(1, 2, 3, 4), 5, 6, 7, 8), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
584 EXPECT_EQUAL(h23 = Half2x3(1, Half2(2, 3), 4, Half2(5, 6)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
587 EXPECT_EQUAL(h33 = Half3x3(Half3(1, 2, 3), 4, Half2(5, 6), 7, 8, 9), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
590 EXPECT_EQUAL(h43 = Half4x3(Half4(1, 2, 3, 4), Half4(5, 6, 7, 8), Half4(9, 10, 11, 12)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
593 EXPECT_EQUAL(h24 = Half2x4(1, 2, 3, 4, 5, 6, 7, 8), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
596 EXPECT_EQUAL(h34 = Half3x4(1, 2, 3, 4, 5, 6, 7, 8, 9, Half3(10, 11, 12)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
599 EXPECT_EQUAL(h44 = Half4x4(1), "(h44 = half4x4(1.0))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
601 EXPECT_EQUAL(f22 * 2, "(f22 * 2.0)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
602 EXPECT_EQUAL(f22 == Float2x2(1), "(f22 == float2x2(1.0))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
603 EXPECT_EQUAL(h42[0][1], "h42[0].y"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
604 EXPECT_EQUAL(f43 * Float4(0), "(f43 * float4(0.0))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
605 EXPECT_EQUAL(h23 * 2, "(h23 * 2.0)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
606 EXPECT_EQUAL(Inverse(f44), "inverse(f44)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
648 EXPECT_EQUAL(a + b, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
650 EXPECT_EQUAL(a + 1, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
652 EXPECT_EQUAL(0.5 + a + -99, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
654 EXPECT_EQUAL(a += b + 1, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
656 EXPECT_EQUAL(+a, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
658 EXPECT_EQUAL(+(a + b), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
687 EXPECT_EQUAL(a - b, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
689 EXPECT_EQUAL(a - 1, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
691 EXPECT_EQUAL(2 - a - b, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
693 EXPECT_EQUAL(a -= b + 1, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
695 EXPECT_EQUAL(-a, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
697 EXPECT_EQUAL(-(a - b), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
726 EXPECT_EQUAL(a * b, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
728 EXPECT_EQUAL(a * 2, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
730 EXPECT_EQUAL(0.5 * a * -99, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
732 EXPECT_EQUAL(a *= b + 1, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
755 EXPECT_EQUAL(a / b, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
757 EXPECT_EQUAL(a / 2, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
759 EXPECT_EQUAL(0.5 / a / -99, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
761 EXPECT_EQUAL(b / (a - 1), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
763 EXPECT_EQUAL(a /= b + 1, in DEF_GPUTEST_FOR_MOCK_CONTEXT()
797 EXPECT_EQUAL(e1, "(a % b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
800 EXPECT_EQUAL(e2, "(a % 2)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
803 EXPECT_EQUAL(e3, "((10 % a) % -99)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
806 EXPECT_EQUAL(e4, "(a %= (b + 1))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
839 EXPECT_EQUAL(e1, "(a << b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
842 EXPECT_EQUAL(e2, "(a << 1)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
845 EXPECT_EQUAL(e3, "((1 << a) << 2)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
848 EXPECT_EQUAL(e4, "(a <<= (b + 1))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
870 EXPECT_EQUAL(e1, "(a >> b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
873 EXPECT_EQUAL(e2, "(a >> 1)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
876 EXPECT_EQUAL(e3, "((1 >> a) >> 2)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
879 EXPECT_EQUAL(e4, "(a >>= (b + 1))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
901 EXPECT_EQUAL(e1, "(a & b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
904 EXPECT_EQUAL(e2, "(a & 1)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
907 EXPECT_EQUAL(e3, "((1 & a) & 2)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
910 EXPECT_EQUAL(e4, "(a &= (b + 1))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
932 EXPECT_EQUAL(e1, "(a | b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
935 EXPECT_EQUAL(e2, "(a | 1)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
938 EXPECT_EQUAL(e3, "((1 | a) | 2)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
941 EXPECT_EQUAL(e4, "(a |= (b + 1))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
963 EXPECT_EQUAL(e1, "(a ^ b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
966 EXPECT_EQUAL(e2, "(a ^ 1)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
969 EXPECT_EQUAL(e3, "((1 ^ a) ^ 2)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
972 EXPECT_EQUAL(e4, "(a ^= (b + 1))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
994 EXPECT_EQUAL(e1, "(a && b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
997 EXPECT_EQUAL(e2, "(a && b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1000 EXPECT_EQUAL(e3, "false"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1012 EXPECT_EQUAL(e1, "(a || b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1015 EXPECT_EQUAL(e2, "true"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1018 EXPECT_EQUAL(e3, "(a || b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1030 EXPECT_EQUAL(e1, "((a += b) , b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1033 EXPECT_EQUAL(e2, "(((a += b) , (b += b)) , int2(a))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1040 EXPECT_EQUAL(e1, "(a == b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1043 EXPECT_EQUAL(e2, "(a == 5)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1055 EXPECT_EQUAL(e1, "(a != b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1058 EXPECT_EQUAL(e2, "(a != 5)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1070 EXPECT_EQUAL(e1, "(a > b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1073 EXPECT_EQUAL(e2, "(a > 5)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1085 EXPECT_EQUAL(e1, "(a >= b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1088 EXPECT_EQUAL(e2, "(a >= 5)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1100 EXPECT_EQUAL(e1, "(a < b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1103 EXPECT_EQUAL(e2, "(a < 5)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1115 EXPECT_EQUAL(e1, "(a <= b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1118 EXPECT_EQUAL(e2, "(a <= 5)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1130 EXPECT_EQUAL(e1, "!(a <= b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1142 EXPECT_EQUAL(e1, "~a"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1154 EXPECT_EQUAL(e1, "++a"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1157 EXPECT_EQUAL(e2, "a++"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1184 EXPECT_EQUAL(e1, "--a"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1187 EXPECT_EQUAL(e2, "a--"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1216 EXPECT_EQUAL(sqrt(std::move(args)), "sqrt(1.0)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1226 EXPECT_EQUAL(pow(std::move(args)), "pow(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1232 EXPECT_EQUAL(Block(), "{ }"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1234 EXPECT_EQUAL(Block(Declare(a), Declare(b), a = b), "{ int a = 1; int b = 2; (a = b); }"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1236 EXPECT_EQUAL((If(a > 0, --a), ++b), "if ((a > 0)) --a; ++b;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1241 EXPECT_EQUAL(Block(std::move(statements)), "{ (a = 0); ++a; }"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1253 EXPECT_EQUAL(*DSLWriter::ProgramElements()[0], in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1273 EXPECT_EQUAL(*DSLWriter::ProgramElements()[0], in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1288 EXPECT_EQUAL(x, "half4 a;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1290 EXPECT_EQUAL(y, "half4 b = half4(1.0);"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1319 EXPECT_EQUAL(*DSLWriter::ProgramElements()[0], "int x = 0;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1320 EXPECT_EQUAL(*DSLWriter::ProgramElements()[1], "uniform float2 y;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1326 EXPECT_EQUAL(x, "if ((sqrt(1.0) > 0.0)) discard;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1332 EXPECT_EQUAL(x, "do {} while (true);"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1336 EXPECT_EQUAL(y, "do { a++; --b; } while ((a != b));"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1346 EXPECT_EQUAL(For(Statement(), Expression(), Expression(), Block()), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1350 EXPECT_EQUAL(For(Declare(i), i < 10, ++i, i += 5), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1355 EXPECT_EQUAL(For((Declare(j), Declare(k)), j < k, ++j, Block()), R"( in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1381 EXPECT_EQUAL(*DSLWriter::ProgramElements()[0], in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1391 EXPECT_EQUAL(sqr(sk_FragCoord().x()), "sqr(sk_FragCoord.x)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1393 EXPECT_EQUAL(*DSLWriter::ProgramElements()[0], "float sqr(float x) { return (x * x); }"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1404 EXPECT_EQUAL(dot(Float2(1.0f, 2.0f), Float2(3.0f, 4.0f)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1407 EXPECT_EQUAL(*DSLWriter::ProgramElements()[0], in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1423 EXPECT_EQUAL(pair(varArg1, varArg2), "pair(varArg1, varArg2)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1499 EXPECT_EQUAL(x, "if ((a > b)) (a -= b);"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1502 EXPECT_EQUAL(y, "if ((a > b)) (a -= b); else (b -= a);"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1505 EXPECT_EQUAL(z, "@if ((a > b)) (a -= b); else (b -= a);"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1517 EXPECT_EQUAL(x, "return;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1520 EXPECT_EQUAL(y, "return true;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1527 EXPECT_EQUAL(x, "((a > 0) ? 1 : -1)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1554 EXPECT_EQUAL(x, R"( in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1569 EXPECT_EQUAL(y, R"( in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1578 EXPECT_EQUAL(Switch(b), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1581 EXPECT_EQUAL(Switch(b, Default(), Case(0), Case(1)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1605 EXPECT_EQUAL(a.x(), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1607 EXPECT_EQUAL(a.y(), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1609 EXPECT_EQUAL(a.z(), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1611 EXPECT_EQUAL(a.w(), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1613 EXPECT_EQUAL(a.r(), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1615 EXPECT_EQUAL(a.g(), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1617 EXPECT_EQUAL(a.b(), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1619 EXPECT_EQUAL(a.a(), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1621 EXPECT_EQUAL(Swizzle(a, R), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1623 EXPECT_EQUAL(Swizzle(a, ZERO, G), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1625 EXPECT_EQUAL(Swizzle(a, B, G, G), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1627 EXPECT_EQUAL(Swizzle(a, R, G, B, ONE), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1629 EXPECT_EQUAL(Swizzle(a, B, G, R, ONE).r(), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1644 EXPECT_EQUAL(Statement(Block(Declare(a), a = 123)), in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1651 EXPECT_EQUAL(x, "for (; true;) {}"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1655 EXPECT_EQUAL(y, "for (; (a != b);) { a++; --b; }"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1667 EXPECT_EQUAL(a[0], "a[0]"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1668 EXPECT_EQUAL(a[b], "a[b]"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1693 EXPECT_EQUAL(Abs(a), "abs(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1694 EXPECT_EQUAL(All(b4), "all(b4)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1695 EXPECT_EQUAL(Any(b4), "any(b4)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1696 EXPECT_EQUAL(Atan(a), "atan(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1697 EXPECT_EQUAL(Atan(a, b), "atan(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1698 EXPECT_EQUAL(Ceil(a), "ceil(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1699 EXPECT_EQUAL(Clamp(a, 0, 1), "clamp(a, 0.0, 1.0)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1700 EXPECT_EQUAL(Cos(a), "cos(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1701 EXPECT_EQUAL(Cross(h3, h3), "cross(h3, h3)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1702 EXPECT_EQUAL(Degrees(a), "degrees(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1703 EXPECT_EQUAL(Distance(a, b), "distance(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1704 EXPECT_EQUAL(Dot(a, b), "dot(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1705 EXPECT_EQUAL(Equal(a, b), "equal(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1706 EXPECT_EQUAL(Exp(a), "exp(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1707 EXPECT_EQUAL(Exp2(a), "exp2(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1708 EXPECT_EQUAL(Faceforward(a, b, c), "faceforward(a, b, c)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1709 EXPECT_EQUAL(Floor(a), "floor(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1710 EXPECT_EQUAL(Fract(a), "fract(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1711 EXPECT_EQUAL(GreaterThan(a, b), "greaterThan(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1712 EXPECT_EQUAL(GreaterThanEqual(a, b), "greaterThanEqual(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1713 EXPECT_EQUAL(Inversesqrt(a), "inversesqrt(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1714 EXPECT_EQUAL(LessThan(a, b), "lessThan(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1715 EXPECT_EQUAL(LessThanEqual(a, b), "lessThanEqual(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1716 EXPECT_EQUAL(Length(a), "length(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1717 EXPECT_EQUAL(Log(a), "log(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1718 EXPECT_EQUAL(Log2(a), "log2(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1719 EXPECT_EQUAL(Max(a, b), "max(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1720 EXPECT_EQUAL(Min(a, b), "min(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1721 EXPECT_EQUAL(Mix(a, b, c), "mix(a, b, c)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1722 EXPECT_EQUAL(Mod(a, b), "mod(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1723 EXPECT_EQUAL(Normalize(a), "normalize(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1724 EXPECT_EQUAL(NotEqual(a, b), "notEqual(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1725 EXPECT_EQUAL(Pow(a, b), "pow(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1726 EXPECT_EQUAL(Radians(a), "radians(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1727 EXPECT_EQUAL(Reflect(a, b), "reflect(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1728 EXPECT_EQUAL(Refract(a, b, 1), "refract(a, b, 1.0)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1729 EXPECT_EQUAL(Saturate(a), "saturate(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1730 EXPECT_EQUAL(Sign(a), "sign(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1731 EXPECT_EQUAL(Sin(a), "sin(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1732 EXPECT_EQUAL(Smoothstep(a, b, c), "smoothstep(a, b, c)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1733 EXPECT_EQUAL(Sqrt(a), "sqrt(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1734 EXPECT_EQUAL(Step(a, b), "step(a, b)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1735 EXPECT_EQUAL(Tan(a), "tan(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1736 EXPECT_EQUAL(Unpremul(a), "unpremul(a)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1751 EXPECT_EQUAL(d1, "const int v1 = 0;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1794 EXPECT_EQUAL(Declare(v1), "layout (location = 1, offset = 4, binding = 3, index = 5, set = 2, " in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1798 EXPECT_EQUAL(Declare(v2), "layout (origin_upper_left) float2 v2;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1801 EXPECT_EQUAL(Declare(v3), "layout (override_coverage) half v3;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1804 EXPECT_EQUAL(Declare(v4), "layout (push_constant) bool v4;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1807 EXPECT_EQUAL(Declare(v5), "layout (blend_support_all_equations) half4 v5;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1811 EXPECT_EQUAL(*DSLWriter::ProgramElements()[0], "layout (srgb_unpremul) uniform bool v6;"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1882 EXPECT_EQUAL(Sample(child), "sample(child)"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1883 EXPECT_EQUAL(Sample(child, Float2(0, 0)), "sample(child, float2(0.0, 0.0))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1884 EXPECT_EQUAL(Sample(child, Half4(1)), "sample(child, half4(1.0))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1885 EXPECT_EQUAL(Sample(child, Float2(0), Half4(1)), "sample(child, float2(0.0), half4(1.0))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1897 EXPECT_EQUAL(Sample(shader, Float2(0, 0)), "sample(shader, float2(0.0, 0.0))"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1922 EXPECT_EQUAL(*DSLWriter::ProgramElements()[0], in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1924 EXPECT_EQUAL(*DSLWriter::ProgramElements()[1], in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1933 EXPECT_EQUAL(*DSLWriter::ProgramElements()[2], in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1942 EXPECT_EQUAL(std::move(*exprs[0]), "1"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()
1943 EXPECT_EQUAL(std::move(*exprs[1]), "2.0"); in DEF_GPUTEST_FOR_MOCK_CONTEXT()