tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

macro-expansion-tricky.html (1157B)


      1 <!--
      2 Copyright (c) 2019 The Khronos Group Inc.
      3 Use of this source code is governed by an MIT-style license that can be
      4 found in the LICENSE.txt file.
      5 -->
      6 
      7 <!DOCTYPE html>
      8 <html>
      9 <head>
     10 <meta charset="utf-8">
     11 <title>Tricky macro expansion</title>
     12 <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
     13 <script src="../../../js/js-test-pre.js"></script>
     14 <script src="../../../js/webgl-test-utils.js"></script>
     15 <script src="../../../js/glsl-conformance-test.js"></script>
     16 </head>
     17 <body>
     18 <div id="description"></div>
     19 <div id="console"></div>
     20 <script id="fshaderRecursiveMacroNameInsideIncompleteMacroInvocationInMacroExpansion" type="x-shader/x-fragment">
     21 #define m(a)
     22 #define a m((a)
     23 a)
     24 
     25 precision mediump float;
     26 
     27 void main() {
     28    gl_FragColor = vec4(0.0);
     29 }
     30 </script>
     31 <script type="application/javascript">
     32 "use strict";
     33 description();
     34 
     35 GLSLConformanceTester.runTests([
     36 {
     37  fShaderId: 'fshaderRecursiveMacroNameInsideIncompleteMacroInvocationInMacroExpansion',
     38  fShaderSuccess: true,
     39  linkSuccess: true,
     40  passMsg: 'Recursive macro name inside incomplete macro invocation in macro expansion should not crash'
     41 }
     42 ]);
     43 </script>
     44 </body>
     45 </html>