summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/tests
Commit message (Collapse)AuthorAgeFilesLines
* glcpp/tests: Add a corollary to testcase 073 for testing #elif.Kenneth Graunke2010-08-041-0/+3
|
* glcpp/tests: Fix 073-if-in-ifdef.c to use #ifdef, not #if.Kenneth Graunke2010-08-041-1/+1
| | | | The original intention was to use #ifdef.
* glcpp: Add a testcase for the failure in compiling xonotic's shader.Eric Anholt2010-08-012-0/+9
| | | | gcc and mesa master agree that this is OK.
* glcpp: Add expected output for a recently-added test.Carl Worth2010-07-281-0/+3
| | | | I simply forgot to add this file when adding the test case originally.
* glcpp: Fix function-like macros with an argument used multiple times.Carl Worth2010-07-221-0/+2
| | | | | | | | | | | It's really hard to believe that this case has been broken, but apparently no test previously exercised it. So this commit adds such a test and fixes it by making a copy of the argument token-list before expanding it. This fix causes the following glean tests to now pass: glsl1-Preprocessor test 6 (#if 0, #define macro) glsl1-Preprocessor test 7 (multi-line #define)
* glcpp: Avoid accidental token pasting in preprocessed result.Carl Worth2010-07-204-2/+25
| | | | | | | | | | | | | | | | | | | | | Consider this test case: #define EMPTY int foo = 1+EMPTY+4; The expression should compile as the sequence of tokens 1, PLUS, UNARY_POSITIVE, 4. But glcpp has been failing for this case since it results in the string "1++4" which a compiler correctly sees as a syntax error, (1, POST_INCREMENT, 4). We fix this by changing any macro with an empty definition to result in a single SPACE token rather than nothing. This then gives "1+ +4" which compiles correctly. This commit does touch up the two existing test cases which already have empty macros, (to add the space to the expected result). It also adds a new test case to exercise the above scenario.
* glcpp: Fix support for nested #ifdef and nested #ifndefCarl Worth2010-07-202-0/+81
| | | | | | | | | | | Previously, if the outer #ifdef/#ifndef evaluated to false, the inner directive would not be parsed correctly, (the identifier as the subject of the #ifdef/#ifndef would inadvertently be skipped along with the other content correctly being skipped). We fix this by setting the lexing_if state in each case here. We also add a new test to the test suite to ensure that this case is tested.
* glcpp: Support #if(expression) with no intervening space.Carl Worth2010-07-202-0/+7
| | | | And add a test case to ensure that this works.
* glcpp: Make test suite test for valgrind cleanliness.Carl Worth2010-07-201-1/+21
| | | | | | As it turns out, 4 of our current tests are not valgrind clean, (use after free errors or so), so this will be helpful for investigating and fixing those.
* glcpp: Make test suite report final count of passed/total tests.Carl Worth2010-07-201-2/+22
| | | | And report PASS or FAIL for each test along the way as well.
* glsl2: Move the compiler to the subdirectory it will live in in Mesa.Eric Anholt2010-06-24139-0/+889