summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/tests
Commit message (Collapse)AuthorAgeFilesLines
* glcpp: Clean up intermediate file when test suite is interrupted.Carl Worth2010-08-111-0/+2
| | | | | The glcpp-test script was leaving around bogus *.valgrind-errors files if a valgrind test was interrupted.
* glcpp: Additional fixes for not evaluating skipped #if/#elif expressions.Carl Worth2010-08-114-0/+20
| | | | | | This adds a couple of test cases to expand our coverage of invalid #if and being skipped, (either by being nested inside an #if/#elif that evaluates to zero or by being after an #if/#elif that evaluates to non-zero).
* glcpp/tests: Commit forgotten file 074-elif-undef.c.expected.Kenneth Graunke2010-08-101-0/+4
|
* glcpp: Discard output of cmp when running the test suite.Carl Worth2010-08-101-1/+1
| | | | | | | We're already using the return-value of cmp to print either PASS or FAIL and in the case of failure, we're subsequently running and showing the output of diff. So any warnings/errors from cmp itself are not actually needed, and can be quite confusing.
* glcpp: Fix expected result for the 064-version.c test.Carl Worth2010-08-101-0/+1
| | | | | | Commit d4a04f315560704bf1103df0b93723e468725df7 caused this test case to produce an additional blank line, which is otherwise harmless, but does need to be reflected in the .expected file for the test to pass.
* 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