1 group basic "Basic Tests"
18 case invalid_identifier
35 values { output float out0 = 0.0; }
38 precision mediump float;
53 case invalid_directive
68 case missing_identifier
85 values { output float out0 = -1.0; }
88 precision mediump float;
103 values { output float out0 = -1.0; }
106 precision mediump float;
113 out0 = VALUE(2.0) - 1.0;
121 values { output float out0 = 1.0; }
124 precision mediump float;
139 values { output float out0 = 1.0; }
142 precision mediump float;
159 values { output float out0 = 1.0; }
162 precision mediump float;
165 #define A(X, Y) var##X##Y
179 group definitions "Symbol Definition Tests"
181 case define_value_and_function
183 values { output float out0 = 6.0; }
187 precision mediump float;
188 ${DECLARATIONS:single-line}
189 # define VALUE (1.5 + 2.5)
190 # define FUNCTION(__LINE__, b) __LINE__+b
194 out0 = FUNCTION(VALUE, ((0.2) + 1.8) );
200 case undefine_object_invalid_syntax
205 precision mediump float;
213 ${POSITION_FRAG_COLOR} = vec4(VAL);
218 case undefine_function
220 values { output float out0 = 1.0; }
223 precision mediump float;
224 #define FUNCTION(a,b) a+b
226 #define FUNCTION(a,b) a-b
231 out0 = FUNCTION(3.0, 2.0);
237 case undefine_version
239 values { output float out0 = 1.0; }
242 precision mediump float;
248 #if defined(__VERSION__)
258 case undefine_core_profile
261 values { output float out0 = 1.0; }
264 precision mediump float;
265 #undef GL_core_profile
270 #if defined(GL_core_profile)
282 group invalid_definitions "Invalid Definition Tests"
284 case define_non_identifier
289 precision mediump float;
295 ${POSITION_FRAG_COLOR} = vec4(1.0);
300 case undef_non_identifier_1
305 precision mediump float;
311 ${POSITION_FRAG_COLOR} = vec4(1.0);
316 case undef_non_identifier_2
321 precision mediump float;
327 ${POSITION_FRAG_COLOR} = vec4(1.0);
333 end # invalid_definitions
335 group object_redefinitions "Object Redefinition Tests"
337 case invalid_object_ident
342 precision mediump float;
346 # define VALUE (AAA - 1.0)
347 # define VALUE (AAAA - 1.0)
351 ${POSITION_FRAG_COLOR} = vec4(VALUE);
356 case invalid_object_whitespace
361 precision mediump float;
364 # define VALUE (AAA - 1.0)
365 # define VALUE (AAA- 1.0)
369 ${POSITION_FRAG_COLOR} = vec4(VALUE);
374 case invalid_object_op
379 precision mediump float;
382 # define VALUE (AAA - 1.0)
383 # define VALUE (AAA + 1.0)
387 ${POSITION_FRAG_COLOR} = vec4(VALUE);
392 case invalid_object_floatval_1
397 precision mediump float;
400 # define VALUE (AAA - 1.0)
401 # define VALUE (AAA - 1.1)
405 ${POSITION_FRAG_COLOR} = vec4(VALUE);
410 case invalid_object_floatval_2
415 precision mediump float;
418 # define VALUE (AAA - 1.0)
419 # define VALUE (AAA - 1.0e-1)
423 ${POSITION_FRAG_COLOR} = vec4(VALUE);
428 case invalid_object_intval_1
433 precision mediump float;
436 # define VALUE (AAA - 1)
437 # define VALUE (AAA - 2)
441 ${POSITION_FRAG_COLOR} = vec4(VALUE);
446 case invalid_object_intval_2
451 precision mediump float;
454 # define VALUE (AAA - 1)
455 # define VALUE (AAA - 0x1)
459 ${POSITION_FRAG_COLOR} = vec4(VALUE);
464 case redefine_object_1
466 values { output float out0 = 6.0; }
470 precision mediump float;
475 #define RES2 (RES1 * VAL2)
476 #define RES1 (VAL2 / VAL1)
477 #define RES2 (RES1 * VAL2)
478 #define VALUE (RES2 + RES1)
488 case redefine_object_ifdef
490 values { output float out0 = 1.0; }
494 precision mediump float;
513 case redefine_object_undef_ifdef
515 values { output float out0 = 1.0; }
519 precision mediump float;
539 case redefine_object_ifndef
541 values { output float out0 = 1.0; }
545 precision mediump float;
564 case redefine_object_defined_1
566 values { output float out0 = 1.0; }
570 precision mediump float;
589 case redefine_object_defined_2
591 values { output float out0 = 1.0; }
595 precision mediump float;
614 case redefine_object_comment
616 values { output float out0 = 6.0; }
620 precision mediump float;
625 #define RES2 /* fdsjklfdsjkl dsfjkhfdsjkh fdsjklhfdsjkh */ (RES1 * VAL2)
626 #define RES1 (VAL2 / VAL1)
627 #define RES2 /* ewrlkjhsadf */ (RES1 * VAL2)
628 #define VALUE (RES2 + RES1)
638 case redefine_object_multiline_comment
640 values { output float out0 = 6.0; }
644 precision mediump float;
649 #define RES2 /* fdsjklfdsjkl
651 fdsjklhfdsjkh */ (RES1 * VAL2)
652 #define RES1 (VAL2 / VAL1)
653 #define RES2 /* ewrlkjhsadf */ (RES1 * VAL2)
654 #define VALUE (RES2 + RES1)
664 end # object_redefinitions
666 group invalid_redefinitions "Invalid Redefinitions Tests"
668 case invalid_identifier_1
670 values { output int out0 = 1; }
673 precision mediump float;
685 # NOTE case invalid_identifier_2 has been moved to gl44/preprocessor.text
687 end # invalid_redefinitions
689 group comments "Comment Tests"
691 case multiline_comment_define
693 values { output float out0 = 4.2; }
696 precision mediump float;
698 #define VALUE /* current
711 values { output float out0 = 1.0; }
714 precision mediump float;
732 precision mediump float;
737 ${POSITION_FRAG_COLOR} = 1.0;
742 case unterminated_comment_1
747 precision mediump float;
756 case unterminated_comment_2
762 precision mediump float;
772 # NOTE group line_continuation "Line Continuation Tests" have been moved to
773 # gl44/preprocessor.text
775 group function_definitions "Function Definitions Tests"
777 case same_object_and_function_param
779 values { output float out0 = 1.0; }
783 precision mediump float;
786 #define FUNCTION(VALUE, B) (VALUE-B)
790 out0 = FUNCTION(3.0, 2.0);
798 values { output float out0 = 518.5; }
801 precision mediump float;
803 #define AAA(a,b) a*(BBB(a,b))
808 out0 = BBB(AAA(8.0/4.0, 2.0)*BBB(2.0*2.0,0.75*2.0), AAA(40.0,10.0*BBB(5.0,3.0)));
814 case function_definition_with_comments
816 values { output float out0 = 3.0; }
819 precision mediump float;
821 /* sdfljk */ #/* sdfljk */define /* sdfljk */ FUNC( /* jklsfd*/a /*sfdjklh*/, /*sdfklj */b /*sdfklj*/) a+b
825 out0 = FUNC(1.0, 2.0);
831 end # function_definitions
833 group recursion "Recursions Tests"
840 precision mediump float;
846 ${POSITION_FRAG_COLOR} = vec4(AAA);
856 precision mediump float;
863 ${POSITION_FRAG_COLOR} = vec4(AAA);
873 precision mediump float;
875 # define AAA (1.0+BBB)
876 #define BBB (2.0+AAA)
880 ${POSITION_FRAG_COLOR} = vec4(AAA);
890 precision mediump float;
892 # define AAA(a) AAA(a)
896 ${POSITION_FRAG_COLOR} = vec4(AAA(1.0));
906 precision mediump float;
908 # define AAA(a, b) AAA(b, a)
912 ${POSITION_FRAG_COLOR} = vec4(AAA(1.0, 2.0));
919 group function_redefinitions "Function Redefinition Tests"
921 case function_redefinition_1
923 values { output float out0 = 3.0; }
926 precision mediump float;
927 # define FUNC(a,b) a+b
928 # define FUNC( a, b) a+b
933 out0 = FUNC(1.0, 2.0);
939 case function_redefinition_2
941 values { output float out0 = 3.0; }
944 precision mediump float;
945 # define FUNC(a,b) (a +b)
946 # define FUNC( a, b )(a +b)
951 out0 = FUNC(1.0, 2.0);
957 case function_redefinition_3
959 values { output float out0 = 3.0; }
962 precision mediump float;
963 # define FUNC(a,b) (a +b)
964 # define FUNC(a,b)(a /* comment
970 out0 = FUNC(1.0, 2.0);
976 case invalid_function_redefinition_param_1
981 precision mediump float;
982 # define FUNC(a,b) a+b
983 # define FUNC(A,b) A+b
988 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0, 2.0));
993 case invalid_function_redefinition_param_2
998 precision mediump float;
999 # define FUNC(a,b) a+b
1000 # define FUNC(a,b,c) a+b+c
1005 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0, 2.0, 3.0));
1010 case invalid_function_redefinition_param_3
1015 precision mediump float;
1016 # define FUNC(a,b) a+b
1017 # define FUNC(a,b) b+a
1022 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0, 2.0));
1027 end # functions_redefinitions
1029 group invalid_function_definitions "Invalid Function Definition Tests"
1036 precision mediump float;
1037 # define FUNC(a,b) a+b
1042 ${POSITION_FRAG_COLOR} = vec4(FUNC);
1052 precision mediump float;
1053 # define FUNC(a,b) a+b
1058 ${POSITION_FRAG_COLOR} = vec4(FUNC());
1068 precision mediump float;
1069 # define FUNC(a,b) a+b
1074 ${POSITION_FRAG_COLOR} = vec4(FUNC((();
1084 precision mediump float;
1085 # define FUNC(a,b) a+b
1090 ${POSITION_FRAG_COLOR} = vec4(FUNC));
1100 precision mediump float;
1101 # define FUNC(a,b) a+b
1106 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0));
1116 precision mediump float;
1117 # define FUNC(a,b) a+b
1122 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0,2.0);
1132 precision mediump float;
1133 # define FUNC(a,b) a+b
1138 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0,));
1148 precision mediump float;
1149 # define FUNC(a,b) a+b
1154 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0, 2.0, 3.0));
1159 case unique_param_name
1164 precision mediump float;
1165 # define FUNC(a,a) a+a
1170 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0,2.0));
1175 case argument_list_1
1180 precision mediump float;
1181 # define FUNC(a b) a+b
1186 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0,2.0));
1191 case argument_list_2
1196 precision mediump float;
1197 # define FUNC(a + b) a+b
1202 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0,2.0));
1207 case argument_list_3
1212 precision mediump float;
1213 # define FUNC(,a,b) a+b
1218 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0,2.0));
1223 case no_closing_parenthesis_1
1228 precision mediump float;
1234 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0,2.0));
1239 case no_closing_parenthesis_2
1244 precision mediump float;
1250 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0,2.0));
1255 case no_closing_parenthesis_3
1260 precision mediump float;
1261 # define FUNC(A,B,C a+b
1266 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0,2.0));
1271 case no_closing_parenthesis_4
1276 precision mediump float;
1281 end # invalid_function_definitions
1283 group semantic "Semantic Tests"
1285 case ops_as_arguments
1287 values { output float out0 = 20.0; }
1290 precision mediump float;
1292 #define FOO(a, b) (1 a 9) b 2
1296 out0 = float(FOO(+, *));
1304 values { output float out0 = 1.0; }
1307 precision mediump float;
1314 out0 = FUNC(A - 1.0);
1322 group predefined_macros "Predefined Macros Tests"
1326 values { output float out0 = 330.0; }
1329 precision mediump float;
1333 #define AAA __VERSION__
1340 case core_profile_defined
1342 values { output float out0 = 1.0; }
1345 precision mediump float;
1350 #if defined(GL_core_profile)
1360 case core_profile_value
1362 values { output float out0 = 1.0; }
1365 precision mediump float;
1370 out0 = float(GL_core_profile);
1378 values { output float out0 = 2.0; }
1381 const mediump int line = __LINE__;
1382 precision mediump float;
1394 values { output float out0 = 0.0; }
1397 precision mediump float;
1401 out0 = float(__FILE__);
1407 case if_core_profile
1409 values { output float out0 = 1.0; }
1412 precision mediump float;
1428 values { output float out0 = 1.0; }
1431 precision mediump float;
1435 #if __VERSION__ == 330
1445 end # predefined_macros
1447 group conditional_inclusion "Conditional Inclusion Tests"
1451 values { output float out0 = 1.0; }
1454 precision mediump float;
1460 #if defined AAA && !defined(BBB)
1472 values { output float out0 = 1.0; }
1475 precision mediump float;
1479 #define AAA defined(BBB)
1493 values { output float out0 = 1.0; }
1496 precision mediump float;
1516 values { output float out0 = 1.0; }
1519 precision mediump float;
1537 values { output float out0 = 1.0; }
1540 precision mediump float;
1558 values { output float out0 = 1.0; }
1561 precision mediump float;
1565 #if !((~2 >> 1) & 1)
1575 end # conditional_inclusion
1577 group invalid_ops "Invalid Operations Tests"
1584 precision mediump float;
1588 #if !((~(+ ++1 - - - -1) >> 1) & 1)
1589 ${POSITION_FRAG_COLOR} = vec4(-1.0);
1591 ${POSITION_FRAG_COLOR} = vec4(1.0);
1602 precision mediump float;
1606 #if !((~(+ + +1 - -- -1) >> 1) & 1)
1607 ${POSITION_FRAG_COLOR} = vec4(-1.0);
1609 ${POSITION_FRAG_COLOR} = vec4(1.0);
1615 case invalid_defined_expected_identifier_1
1620 precision mediump float;
1627 ${POSITION_FRAG_COLOR} = vec4(1.0);
1633 case invalid_defined_expected_identifier_2
1638 precision mediump float;
1645 ${POSITION_FRAG_COLOR} = vec4(1.0);
1651 case invalid_defined_expected_identifier_3
1656 precision mediump float;
1663 ${POSITION_FRAG_COLOR} = vec4(1.0);
1669 case invalid_defined_expected_identifier_4
1674 precision mediump float;
1681 ${POSITION_FRAG_COLOR} = vec4(1.0);
1687 case invalid_defined_expected_identifier_5
1692 precision mediump float;
1699 ${POSITION_FRAG_COLOR} = vec4(FUNC(1.0,2.0);
1705 case invalid_defined_expected_rparen
1710 precision mediump float;
1717 ${POSITION_FRAG_COLOR} = vec4(1.0);
1725 values { output float out0 = 1.0; }
1728 precision mediump float;
1743 group undefined_identifiers "Undefined Identifiers Tests"
1747 values { output float out0 = 1.0; }
1750 precision mediump float;
1766 values { output float out0 = 1.0; }
1769 precision mediump float;
1783 case not_used_in_eval_1
1785 values { output float out0 = 1.0; }
1788 precision mediump float;
1802 case not_used_in_eval_2
1804 values { output float out0 = 1.0; }
1807 precision mediump float;
1821 end # undefined_identifiers
1823 group invalid_conditionals "Invalid Conditionals Tests"
1830 precision mediump float;
1835 ${POSITION_FRAG_COLOR} = vec4(1.0);
1845 precision mediump float;
1850 ${POSITION_FRAG_COLOR} = vec4(1.0);
1860 precision mediump float;
1865 ${POSITION_FRAG_COLOR} = vec4(1.0);
1875 precision mediump float;
1880 ${POSITION_FRAG_COLOR} = vec4(1.0);
1891 precision mediump float;
1896 ${POSITION_FRAG_COLOR} = vec4(1.0);
1902 case empty_if_defined
1907 precision mediump float;
1912 ${POSITION_FRAG_COLOR} = vec4(1.0);
1917 case unterminated_if_1
1922 precision mediump float;
1927 ${POSITION_FRAG_COLOR} = vec4(1.0);
1932 case unterminated_if_2
1937 precision mediump float;
1942 ${POSITION_FRAG_COLOR} = vec4(1.0);
1947 case unterminated_ifdef
1952 precision mediump float;
1957 ${POSITION_FRAG_COLOR} = vec4(1.0);
1962 case unterminated_ifndef
1967 precision mediump float;
1971 #ifndef GL_core_profile
1972 ${POSITION_FRAG_COLOR} = vec4(1.0);
1977 case unterminated_else_1
1982 precision mediump float;
1988 ${POSITION_FRAG_COLOR} = vec4(1.0);
1993 case unterminated_else_2
1998 precision mediump float;
2004 ${POSITION_FRAG_COLOR} = vec4(1.0);
2009 case unterminated_elif_1
2014 precision mediump float;
2020 ${POSITION_FRAG_COLOR} = vec4(1.0);
2025 case unterminated_elif_2
2030 precision mediump float;
2036 ${POSITION_FRAG_COLOR} = vec4(1.0);
2041 case unterminated_elif_3
2046 precision mediump float;
2052 ${POSITION_FRAG_COLOR} = vec4(2.0);
2057 case elif_after_else
2062 precision mediump float;
2067 ${POSITION_FRAG_COLOR} = vec4(1.0);
2069 ${POSITION_FRAG_COLOR} = vec4(-1.0);
2071 ${POSITION_FRAG_COLOR} = vec4(0.0);
2077 case else_without_if
2082 precision mediump float;
2087 ${POSITION_FRAG_COLOR} = vec4(1.0);
2093 case elif_without_if
2098 precision mediump float;
2103 ${POSITION_FRAG_COLOR} = vec4(1.0);
2109 case endif_without_if
2114 precision mediump float;
2118 ${POSITION_FRAG_COLOR} = vec4(1.0);
2124 case else_after_else
2129 precision mediump float;
2133 #if !GL_core_profile
2134 ${POSITION_FRAG_COLOR} = vec4(1.0);
2136 ${POSITION_FRAG_COLOR} = vec4(-1.0);
2138 ${POSITION_FRAG_COLOR} = vec4(-1.0);
2144 case nested_elif_without_if
2149 precision mediump float;
2154 ${POSITION_FRAG_COLOR} = vec4(1.0);
2156 ${POSITION_FRAG_COLOR} = vec4(0.0);
2168 precision mediump float;
2173 ${POSITION_FRAG_COLOR} = vec4(1.0);
2175 ${POSITION_FRAG_COLOR} = vec4(0.0);
2182 case tokens_after_if
2187 precision mediump float;
2192 ${POSITION_FRAG_COLOR} = vec4(1.0);
2198 case tokens_after_elif
2203 precision mediump float;
2209 ${POSITION_FRAG_COLOR} = vec4(1.0);
2215 case tokens_after_else
2220 precision mediump float;
2227 ${POSITION_FRAG_COLOR} = vec4(1.0);
2232 case tokens_after_endif
2237 precision mediump float;
2244 ${POSITION_FRAG_COLOR} = vec4(1.0);
2249 case tokens_after_ifdef
2254 precision mediump float;
2258 #ifdef FOOBAR foobar
2261 ${POSITION_FRAG_COLOR} = vec4(1.0);
2266 case tokens_after_ifndef
2271 precision mediump float;
2275 #ifndef FOOBAR ,, +- << barbar
2278 ${POSITION_FRAG_COLOR} = vec4(1.0);
2283 case unterminated_nested_blocks
2288 precision mediump float;
2294 ${POSITION_FRAG_COLOR} = vec4(1.0);
2299 end # invalid_conditionals
2301 group conditionals "Conditionals Tests"
2305 values { output float out0 = 1.0; }
2309 precision mediump float;
2325 values { output float out0 = 1.0; }
2329 precision mediump float;
2345 values { output float out0 = 1.0; }
2348 precision mediump float;
2364 values { output float out0 = 1.0; }
2367 precision mediump float;
2383 values { output float out0 = 1.0; }
2386 precision mediump float;
2401 case mixed_conditional_inclusion
2403 values { output float out0 = 1.0; }
2406 precision mediump float;
2422 values { output float out0 = 1.0; }
2425 precision mediump float;
2430 # if __VERSION__ != 330
2443 values { output float out0 = 1.0; }
2446 precision mediump float;
2470 values { output float out0 = 1.0; }
2473 precision mediump float;
2491 group directive "Directive Tests"
2493 case version_with_profile
2495 values { output float out0 = 1.0; }
2498 precision mediump float;
2508 case version_leading_whitespace
2510 values { output float out0 = 1.0; }
2514 precision mediump float;
2524 case version_leading_comment
2526 values { output float out0 = 1.0; }
2531 precision mediump float;
2541 case version_is_less
2546 precision mediump float;
2550 ${POSITION_FRAG_COLOR} = vec4(1.0);
2555 case version_is_more
2560 precision mediump float;
2564 ${POSITION_FRAG_COLOR} = vec4(1.0);
2569 case version_invalid_profile
2574 precision mediump float;
2578 ${POSITION_FRAG_COLOR} = vec4(1.0);
2583 case version_missing
2588 precision mediump float;
2592 ${POSITION_FRAG_COLOR} = vec4(1.0);
2597 case version_not_first_statement_1
2601 precision mediump float;
2606 ${POSITION_FRAG_COLOR} = vec4(1.0);
2611 case version_not_first_statement_2
2617 precision mediump float;
2621 ${POSITION_FRAG_COLOR} = vec4(1.0);
2626 case version_invalid_token_1
2631 precision mediump float;
2635 ${POSITION_FRAG_COLOR} = vec4(1.0);
2640 case version_invalid_token_2
2645 precision mediump float;
2649 ${POSITION_FRAG_COLOR} = vec4(1.0);
2654 case invalid_version
2659 precision mediump float;
2663 ${POSITION_FRAG_COLOR} = vec4(1.0);
2668 case additional_tokens
2673 precision mediump float;
2677 ${POSITION_FRAG_COLOR} = vec4(1.0);
2682 case error_with_no_tokens
2688 precision mediump float;
2692 ${POSITION_FRAG_COLOR} = vec4(1.0);
2703 #error 1 * AAA /* comment */
2704 precision mediump float;
2708 ${POSITION_FRAG_COLOR} = vec4(1.0);
2715 group builtin "Built-in Symbol Tests"
2719 values { output float out0 = 1.0; }
2722 precision mediump float;
2727 out0 = float(__LINE__);
2735 values { output vec4 out0 = vec4(234.0, 234.0, 10.0, 10.0); }
2738 precision mediump float;
2743 out0 = vec4(__LINE__, __LINE__, __FILE__, __FILE__);
2751 group pragmas "Pragma Tests"
2755 values { output float out0 = 1.0; }
2759 #pragma STDGL invariant(all)
2761 #pragma optimize(off)
2763 ${VERTEX_DECLARATIONS}
2771 precision mediump float;
2772 ${FRAGMENT_DECLARATIONS}
2781 case pragma_fragment
2783 values { output float out0 = 1.0; }
2786 ${VERTEX_DECLARATIONS}
2796 #pragma optimize(off)
2798 precision mediump float;
2799 ${FRAGMENT_DECLARATIONS}
2808 case pragma_macro_exp
2810 values { output float out0 = 1.0; }
2814 /* pragma line not macro expanded */
2817 precision mediump float;
2829 group extensions "Extension Tests"
2833 values { output float out0 = 1.0; }
2836 #extension all : warn
2838 precision mediump float;
2850 values { output float out0 = 1.0; }
2855 #extension all : warn
2857 precision mediump float;
2867 case missing_extension_name
2873 precision mediump float;
2877 ${POSITION_FRAG_COLOR} = vec4(1.0);
2882 case invalid_extension_name
2888 precision mediump float;
2892 ${POSITION_FRAG_COLOR} = vec4(1.0);
2903 precision mediump float;
2907 ${POSITION_FRAG_COLOR} = vec4(1.0);
2918 precision mediump float;
2922 ${POSITION_FRAG_COLOR} = vec4(1.0);
2927 case missing_behavior
2933 precision mediump float;
2937 ${POSITION_FRAG_COLOR} = vec4(1.0);
2942 case invalid_behavior_1
2947 #extension all : WARN
2948 precision mediump float;
2952 ${POSITION_FRAG_COLOR} = vec4(1.0);
2957 case invalid_behavior_2
2962 #extension all : require
2963 precision mediump float;
2967 ${POSITION_FRAG_COLOR} = vec4(1.0);
2972 case invalid_char_in_name
2977 #extension all¤ : warn
2978 precision mediump float;
2982 ${POSITION_FRAG_COLOR} = vec4(1.0);
2987 case invalid_char_in_behavior
2992 #extension all : war¤n
2993 precision mediump float;
2997 ${POSITION_FRAG_COLOR} = vec4(1.0);
3002 case unterminated_comment
3007 #extension all : warn /*asd
3008 precision mediump float;
3012 ${POSITION_FRAG_COLOR} = vec4(1.0);
3017 case after_non_preprocessing_tokens
3022 #extension all : warn
3024 precision mediump float;
3028 #extension all : disable
3036 group expressions "Expression Tests"
3040 values { output float out0 = 1.0; }
3043 precision mediump float;
3049 #if (VAL << 2) == 16
3059 values { output float out0 = 1.0; }
3062 precision mediump float;
3078 values { output float out0 = 1.0; }
3081 precision mediump float;
3087 #if (VAL < 6) && (-VAL < -4)
3097 values { output float out0 = 1.0; }
3100 precision mediump float;
3106 #if (VAL <= 6) && (-VAL <= -6)
3116 values { output float out0 = 1.0; }
3119 precision mediump float;
3135 values { output float out0 = 1.0; }
3138 precision mediump float;
3154 values { output float out0 = 1.0; }
3157 precision mediump float;
3173 values { output float out0 = 1.0; }
3176 precision mediump float;
3190 case parenthesis_value
3192 values { output float out0 = 1.0; }
3195 precision mediump float;
3199 #define VAL (( (4 ) ) )
3209 case parenthesis_tricky
3211 values { output float out0 = 1.0; }
3214 precision mediump float;
3218 #define VAL (( (4 ) )
3228 case parenthesis_if_no
3230 values { output float out0 = 1.0; }
3233 precision mediump float;
3249 values { output float out0 = 1.0; }
3252 precision mediump float;
3266 case parenthesis_multi_if
3268 values { output float out0 = 1.0; }
3271 precision mediump float;
3277 #if (((VAL)) >= (4))
3285 case parenthesis_single_if
3287 values { output float out0 = 1.0; }
3290 precision mediump float;
3304 case parenthesis_ifelse_true
3306 values { output float out0 = 1.0; }
3309 precision mediump float;
3324 case parenthesis_ifelse_false
3326 values { output float out0 = 1.0; }
3329 precision mediump float;
3346 values { output float out0 = 1.0; }
3349 precision mediump float;
3365 values { output float out0 = 1.0; }
3368 precision mediump float;
3372 #if (2 * 2) - 3 >= 0
3382 case eval_simple_precedence_0
3384 values { output float out0 = 1.0; }
3387 precision mediump float;
3401 case eval_simple_precedence_1
3403 values { output float out0 = 1.0; }
3406 precision mediump float;
3422 group invalid_expressions "Invalid Expression Tests"
3424 case invalid_unary_expr
3429 precision mediump float;
3434 ${POSITION_FRAG_COLOR} = vec4(1.0);
3439 case invalid_binary_expr
3444 precision mediump float;
3449 ${POSITION_FRAG_COLOR} = vec4(1.0);
3459 precision mediump float;
3464 ${POSITION_FRAG_COLOR} = vec4(1.0);
3474 precision mediump float;
3479 ${POSITION_FRAG_COLOR} = vec4(1.0);
3489 precision mediump float;
3494 ${POSITION_FRAG_COLOR} = vec4(1.0);
3504 precision mediump float;
3509 ${POSITION_FRAG_COLOR} = vec4(1.0);
3514 case unopened_parenthesis
3519 precision mediump float;
3524 ${POSITION_FRAG_COLOR} = vec4(1.0);
3529 case unclosed_parenthesis
3534 precision mediump float;
3539 ${POSITION_FRAG_COLOR} = vec4(1.0);
3544 end # invalid_expressions
3546 group operator_precedence "Operator precedence"
3551 values { output float out0 = 1.0; }
3554 #if ( 8 % ! 0 ) == 0
3560 precision mediump float;
3572 values { output float out0 = 1.0; }
3575 #if ( 8 / ! 0 ) == 8
3581 precision mediump float;
3593 values { output float out0 = 1.0; }
3596 #if ( 8 * ! 0 ) == 8
3602 precision mediump float;
3612 case modulo_vs_bit_invert
3614 values { output float out0 = 1.0; }
3617 #if ( 8 % ~ 4 ) == 3
3623 precision mediump float;
3633 case modulo_vs_minus
3635 values { output float out0 = 1.0; }
3638 #if ( 8 % - 2 ) == 0
3644 precision mediump float;
3656 values { output float out0 = 1.0; }
3659 #if ( 8 % + 2 ) == 0
3665 precision mediump float;
3675 case div_vs_bit_invert
3677 values { output float out0 = 1.0; }
3680 #if ( 8 / ~ 2 ) == -2
3686 precision mediump float;
3698 values { output float out0 = 1.0; }
3701 #if ( 8 / - 2 ) == -4
3707 precision mediump float;
3719 values { output float out0 = 1.0; }
3722 #if ( 8 / + 2 ) == 4
3728 precision mediump float;
3738 case mul_vs_bit_invert
3740 values { output float out0 = 1.0; }
3743 #if ( 8 * ~ 2 ) == -24
3749 precision mediump float;
3761 values { output float out0 = 1.0; }
3764 #if ( 8 * - 2 ) == -16
3770 precision mediump float;
3782 values { output float out0 = 1.0; }
3785 #if ( 8 * + 2 ) == 16
3791 precision mediump float;
3803 values { output float out0 = 1.0; }
3806 #if ( 8 - 3 % 2 ) == 7
3812 precision mediump float;
3824 values { output float out0 = 1.0; }
3827 #if ( 8 - 3 / 2 ) == 7
3833 precision mediump float;
3845 values { output float out0 = 1.0; }
3848 #if ( 8 - 3 * 2 ) == 2
3854 precision mediump float;
3866 values { output float out0 = 1.0; }
3869 #if ( 8 + 3 % 2 ) == 9
3875 precision mediump float;
3887 values { output float out0 = 1.0; }
3890 #if ( 8 + 3 / 2 ) == 9
3896 precision mediump float;
3908 values { output float out0 = 1.0; }
3911 #if ( 8 + 3 * 2 ) == 14
3917 precision mediump float;
3929 values { output float out0 = 1.0; }
3932 #if ( 8 >> 3 - 2 ) == 4
3938 precision mediump float;
3950 values { output float out0 = 1.0; }
3953 #if ( 8 >> 3 + 2 ) == 0
3959 precision mediump float;
3971 values { output float out0 = 1.0; }
3974 #if ( 8 << 3 - 2 ) == 16
3980 precision mediump float;
3992 values { output float out0 = 1.0; }
3995 #if ( 8 << 3 + 2 ) == 256
4001 precision mediump float;
4011 case greater_or_equal_vs_rshift
4013 values { output float out0 = 1.0; }
4016 #if ( 8 >= 3 >> 2 ) == 1
4022 precision mediump float;
4032 case greater_or_equal_vs_lshift
4034 values { output float out0 = 1.0; }
4037 #if ( 8 >= 3 << 2 ) == 0
4043 precision mediump float;
4053 case less_or_equal_vs_rshift
4055 values { output float out0 = 1.0; }
4058 #if ( 8 <= 3 >> 2 ) == 0
4064 precision mediump float;
4074 case less_or_equal_vs_lshift
4076 values { output float out0 = 1.0; }
4079 #if ( 8 <= 3 << 2 ) == 1
4085 precision mediump float;
4095 case greater_vs_rshift
4097 values { output float out0 = 1.0; }
4100 #if ( 8 > 3 >> 2 ) == 1
4106 precision mediump float;
4116 case greater_vs_lshift
4118 values { output float out0 = 1.0; }
4121 #if ( 8 > 3 << 2 ) == 0
4127 precision mediump float;
4139 values { output float out0 = 1.0; }
4142 #if ( 8 < 3 >> 2 ) == 0
4148 precision mediump float;
4160 values { output float out0 = 1.0; }
4163 #if ( 8 < 3 << 2 ) == 1
4169 precision mediump float;
4179 case not_equal_vs_greater_or_equal
4181 values { output float out0 = 1.0; }
4184 #if ( 8 != 3 >= 2 ) == 1
4190 precision mediump float;
4200 case not_equal_vs_less_or_equal
4202 values { output float out0 = 1.0; }
4205 #if ( 8 != 3 <= 2 ) == 1
4211 precision mediump float;
4221 case not_equal_vs_greater
4223 values { output float out0 = 1.0; }
4226 #if ( 8 != 3 > 2 ) == 1
4232 precision mediump float;
4242 case not_equal_vs_less
4244 values { output float out0 = 1.0; }
4247 #if ( 8 != 3 < 2 ) == 1
4253 precision mediump float;
4263 case equal_vs_greater_or_equal
4265 values { output float out0 = 1.0; }
4268 #if ( 8 == 3 >= 2 ) == 0
4274 precision mediump float;
4284 case equal_vs_less_or_equal
4286 values { output float out0 = 1.0; }
4289 #if ( 8 == 3 <= 2 ) == 0
4295 precision mediump float;
4305 case equal_vs_greater
4307 values { output float out0 = 1.0; }
4310 #if ( 8 == 3 > 2 ) == 0
4316 precision mediump float;
4328 values { output float out0 = 1.0; }
4331 #if ( 8 == 3 < 2 ) == 0
4337 precision mediump float;
4347 case bitwise_and_vs_not_equal
4349 values { output float out0 = 1.0; }
4352 #if ( 8 & 3 != 2 ) == 0
4358 precision mediump float;
4368 case bitwise_and_vs_equal
4370 values { output float out0 = 1.0; }
4373 #if ( 8 & 3 == 2 ) == 0
4379 precision mediump float;
4389 case xor_vs_bitwise_and
4391 values { output float out0 = 1.0; }
4394 #if ( 8 ^ 3 & 2 ) == 10
4400 precision mediump float;
4410 case bitwise_or_vs_xor
4412 values { output float out0 = 1.0; }
4415 #if ( 8 | 3 ^ 2 ) == 9
4421 precision mediump float;
4431 case logical_and_vs_bitwise_or
4433 values { output float out0 = 1.0; }
4442 precision mediump float;
4452 case logical_and_vs_bitwise_and
4454 values { output float out0 = 1.0; }
4463 precision mediump float;
4473 case logical_or_vs_logical_and
4475 values { output float out0 = 1.0; }
4484 precision mediump float;
4494 end # operator_precedence