mesa/src/glsl/glcpp/tests
Carl Worth 828686d4eb glsl/glcpp: Drop extra, final newline from most output
The glcpp parser is line-based, so it needs to see a NEWLINE token at the end
of each line. This causes a trick for files that end without a final newline.

Previously, the lexer for glcpp punted in this case by unconditionally
returning a NEWLINE token at end-of-file, (causing most files to have an extra
blank line at the end). Here, we refine this by lexing end-of-file as a
NEWLINE token only if the immediately preceding token was not a NEWLINE token.

The patch is a minor change that only looks huge for two reasons:

	1. Almost all glcpp test result ".expected" files are updated to drop
	   the extra newline.

	2. All return statements from the lexer are adjusted to use a new
	   RETURN_TOKEN macro that tracks the last-token-was-a-newline state.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2014-07-29 15:11:49 -07:00
..
000-content-with-spaces.c glcpp: Do not remove spaces to preserve locations. 2014-03-08 01:38:32 -08:00
000-content-with-spaces.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
001-define.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
001-define.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
002-define-chain.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
002-define-chain.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
003-define-chain-reverse.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
003-define-chain-reverse.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
004-define-recursive.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
004-define-recursive.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
005-define-composite-chain.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
005-define-composite-chain.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
006-define-composite-chain-reverse.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
006-define-composite-chain-reverse.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
007-define-composite-recursive.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
007-define-composite-recursive.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
008-define-empty.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
008-define-empty.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
009-undef.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
009-undef.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
010-undef-re-define.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
010-undef-re-define.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
011-define-func-empty.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
011-define-func-empty.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
012-define-func-no-args.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
012-define-func-no-args.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
013-define-func-1-arg-unused.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
013-define-func-1-arg-unused.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
014-define-func-2-arg-unused.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
014-define-func-2-arg-unused.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
015-define-object-with-parens.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
015-define-object-with-parens.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
016-define-func-1-arg.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
016-define-func-1-arg.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
017-define-func-2-args.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
017-define-func-2-args.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
018-define-func-macro-as-parameter.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
018-define-func-macro-as-parameter.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
019-define-func-1-arg-multi.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
019-define-func-1-arg-multi.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
020-define-func-2-arg-multi.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
020-define-func-2-arg-multi.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
021-define-func-compose.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
021-define-func-compose.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
022-define-func-arg-with-parens.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
022-define-func-arg-with-parens.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
023-define-extra-whitespace.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
023-define-extra-whitespace.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
024-define-chain-to-self-recursion.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
024-define-chain-to-self-recursion.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
025-func-macro-as-non-macro.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
025-func-macro-as-non-macro.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
026-define-func-extra-newlines.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
026-define-func-extra-newlines.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
027-define-chain-obj-to-func.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
027-define-chain-obj-to-func.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
028-define-chain-obj-to-non-func.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
028-define-chain-obj-to-non-func.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
029-define-chain-obj-to-func-with-args.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
029-define-chain-obj-to-func-with-args.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
030-define-chain-obj-to-func-compose.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
030-define-chain-obj-to-func-compose.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
031-define-chain-func-to-func-compose.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
031-define-chain-func-to-func-compose.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
032-define-func-self-recurse.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
032-define-func-self-recurse.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
033-define-func-self-compose.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
033-define-func-self-compose.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
034-define-func-self-compose-non-func.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
034-define-func-self-compose-non-func.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
035-define-func-self-compose-non-func-multi-token-argument.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
035-define-func-self-compose-non-func-multi-token-argument.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
036-define-func-non-macro-multi-token-argument.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
036-define-func-non-macro-multi-token-argument.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
037-finalize-unexpanded-macro.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
037-finalize-unexpanded-macro.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
038-func-arg-with-commas.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
038-func-arg-with-commas.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
039-func-arg-obj-macro-with-comma.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
039-func-arg-obj-macro-with-comma.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
040-token-pasting.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
040-token-pasting.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
041-if-0.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
041-if-0.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
042-if-1.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
042-if-1.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
043-if-0-else.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
043-if-0-else.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
044-if-1-else.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
044-if-1-else.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
045-if-0-elif.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
045-if-0-elif.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
046-if-1-elsif.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
046-if-1-elsif.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
047-if-elif-else.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
047-if-elif-else.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
048-if-nested.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
048-if-nested.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
049-if-expression-precedence.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
049-if-expression-precedence.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
050-if-defined.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
050-if-defined.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
051-if-relational.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
051-if-relational.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
052-if-bitwise.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
052-if-bitwise.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
053-if-divide-and-shift.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
053-if-divide-and-shift.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
054-if-with-macros.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
054-if-with-macros.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
055-define-chain-obj-to-func-parens-in-text.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
055-define-chain-obj-to-func-parens-in-text.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
056-macro-argument-with-comma.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
056-macro-argument-with-comma.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
057-empty-arguments.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
057-empty-arguments.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
058-token-pasting-empty-arguments.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
058-token-pasting-empty-arguments.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
059-token-pasting-integer.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
059-token-pasting-integer.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
060-left-paren-in-macro-right-paren-in-text.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
060-left-paren-in-macro-right-paren-in-text.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
061-define-chain-obj-to-func-multi.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
061-define-chain-obj-to-func-multi.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
062-if-0-skips-garbage.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
062-if-0-skips-garbage.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
063-comments.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
063-comments.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
064-version.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
064-version.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
065-if-defined-parens.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
065-if-defined-parens.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
066-if-nospace-expression.c glcpp: Support #if(expression) with no intervening space. 2010-07-20 17:01:11 -07:00
066-if-nospace-expression.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
067-nested-ifdef-ifndef.c glcpp: Fix support for nested #ifdef and nested #ifndef 2010-07-20 17:01:11 -07:00
067-nested-ifdef-ifndef.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
068-accidental-pasting.c glcpp: Avoid accidental token pasting in preprocessed result. 2010-07-20 17:01:12 -07:00
068-accidental-pasting.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
069-repeated-argument.c glcpp: Fix function-like macros with an argument used multiple times. 2010-07-22 16:38:12 -07:00
069-repeated-argument.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
070-undefined-macro-in-expression.c glsl: glcpp: Allow "#if undefined-macro' to evaluate to false. 2012-06-26 15:20:03 -07:00
070-undefined-macro-in-expression.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
071-punctuator.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
071-punctuator.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
072-token-pasting-same-line.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
072-token-pasting-same-line.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
073-if-in-ifdef.c glcpp/tests: Fix 073-if-in-ifdef.c to use #ifdef, not #if. 2010-08-04 23:37:19 -07:00
073-if-in-ifdef.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
074-elif-undef.c glcpp/tests: Add a corollary to testcase 073 for testing #elif. 2010-08-04 23:37:19 -07:00
074-elif-undef.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
075-elif-elif-undef.c glcpp: Additional fixes for not evaluating skipped #if/#elif expressions. 2010-08-11 12:43:44 -07:00
075-elif-elif-undef.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
076-elif-undef-nested.c glcpp: Additional fixes for not evaluating skipped #if/#elif expressions. 2010-08-11 12:43:44 -07:00
076-elif-undef-nested.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
077-else-without-if.c glcpp: Add several tests for diagnostics. 2010-08-11 14:38:03 -07:00
077-else-without-if.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
078-elif-without-if.c glcpp: Add several tests for diagnostics. 2010-08-11 14:38:03 -07:00
078-elif-without-if.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
079-endif-without-if.c glcpp: Add several tests for diagnostics. 2010-08-11 14:38:03 -07:00
079-endif-without-if.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
080-if-without-expression.c glcpp: Add several tests for diagnostics. 2010-08-11 14:38:03 -07:00
080-if-without-expression.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
081-elif-without-expression.c glcpp: Add several tests for diagnostics. 2010-08-11 14:38:03 -07:00
081-elif-without-expression.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
082-invalid-paste.c glcpp: Extend the invalid-paste test 2012-11-29 13:03:01 -08:00
082-invalid-paste.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
083-unterminated-if.c glcpp: Add several tests for diagnostics. 2010-08-11 14:38:03 -07:00
083-unterminated-if.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
084-unbalanced-parentheses.c glcpp: Add several tests for diagnostics. 2010-08-11 14:38:03 -07:00
084-unbalanced-parentheses.c.expected Add an expected file for 084-unbalanced-parentheses 2011-04-14 14:43:11 -07:00
085-incorrect-argument-count.c glcpp: Add several tests for diagnostics. 2010-08-11 14:38:03 -07:00
085-incorrect-argument-count.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
086-reserved-macro-names.c glcpp: Raise error if defining any macro containing two consecutive underscores 2011-09-30 11:44:16 -07:00
086-reserved-macro-names.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
087-if-comments.c glcpp: Add testcase for #if handling bug that breaks Savage2. 2010-08-17 17:51:10 -07:00
087-if-comments.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
088-redefine-macro-legitimate.c glsl/glcpp: Fixup glcpp tests for redefining a macro with whitespace changes. 2014-07-09 12:05:13 -07:00
088-redefine-macro-legitimate.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
089-redefine-macro-error.c glcpp: Add two new tests for testing redefined macros. 2010-08-17 23:41:53 -07:00
089-redefine-macro-error.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
090-hash-error.c glcpp: Add test for the #error directive. 2010-08-23 10:48:10 -07:00
090-hash-error.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
091-hash-line.c glsl: glcpp: Extend testing of #line directives 2012-06-26 15:23:55 -07:00
091-hash-line.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
092-redefine-macro-error-2.c glcpp: Add negative tests for redefintions with valueless macros. 2010-12-27 23:20:35 -08:00
092-redefine-macro-error-2.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
093-divide-by-zero.c glcpp: Add division by zero test cases. 2011-01-04 13:18:19 -08:00
093-divide-by-zero.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
094-divide-by-zero-short-circuit.c Add an expected file for 094-divide-by-zero-short-circuit 2011-04-14 14:42:52 -07:00
094-divide-by-zero-short-circuit.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
095-recursive-define.c glcpp: Add test for recursive #define. 2011-01-04 16:39:19 -08:00
095-recursive-define.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
096-paste-twice.c glcpp: Add a test for a macro that implements token pasting twice. 2011-09-30 11:43:40 -07:00
096-paste-twice.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
097-paste-with-non-function-macro.c glcpp: Test a non-function-like macro using the token paste operator 2011-09-30 11:44:04 -07:00
097-paste-with-non-function-macro.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
098-elif-undefined.c glsl: glcpp: Allow "#if undefined-macro' to evaluate to false. 2012-06-26 15:20:03 -07:00
098-elif-undefined.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
099-c99-example.c glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
099-c99-example.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
100-macro-with-colon.c glcpp: Add new test showing bug where a trailing ':' prevents macro expansion 2012-02-02 12:05:21 -08:00
100-macro-with-colon.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
101-macros-used-twice.c glsl: Add glcpp tests for a macro used twice 2012-02-02 12:05:21 -08:00
101-macros-used-twice.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
102-garbage-after-endif.c glcpp: Reject garbage after #else and #endif tokens 2012-11-09 14:33:08 -08:00
102-garbage-after-endif.c.expected glcpp: Reject garbage after #else and #endif tokens 2012-11-09 14:33:08 -08:00
103-garbage-after-else-0.c glsl/glcpp: Fix glcpp to catch garbage after #if 1 ... #else 2014-07-09 12:05:13 -07:00
103-garbage-after-else-0.c.expected glsl/glcpp: Fix glcpp to catch garbage after #if 1 ... #else 2014-07-09 12:05:13 -07:00
104-hash-line-followed-by-code.c glcpp/tests: Add test to check #line followed by code 2012-11-09 14:33:08 -08:00
104-hash-line-followed-by-code.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
105-multiline-hash-line.c glcpp/tests: Add test for multiline #line 2012-11-09 14:33:08 -08:00
105-multiline-hash-line.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
106-multiline-hash-if.c glcpp/tests: Add test for multiline #if 2012-11-09 14:33:08 -08:00
106-multiline-hash-if.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
107-multiline-hash-elif.c glcpp/tests: Add tests for multiline #elif 2012-11-09 14:33:08 -08:00
107-multiline-hash-elif.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
108-no-space-after-hash-version.c glcpp: Reject #version and #line not followed by whitespace 2012-11-28 10:26:53 -08:00
108-no-space-after-hash-version.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
109-no-space-after-hash-line.c glcpp: Reject #version and #line not followed by whitespace 2012-11-28 10:26:53 -08:00
109-no-space-after-hash-line.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
110-no-space-digits-after-hash-elif.c glcpp: Support #elif(expression) with no intervening space. 2012-11-28 10:27:02 -08:00
110-no-space-digits-after-hash-elif.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
111-no-space-operator-after-hash-if.c glcpp: Support #elif(expression) with no intervening space. 2012-11-28 10:27:02 -08:00
111-no-space-operator-after-hash-if.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
112-no-space-operator-after-hash-elif.c glcpp: Support #elif(expression) with no intervening space. 2012-11-28 10:27:02 -08:00
112-no-space-operator-after-hash-elif.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
113-line-and-file-macros.c glcpp: Add support for __LINE__ and __FILE__ macros 2012-11-29 13:03:01 -08:00
113-line-and-file-macros.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
114-paste-integer-tokens.c glcpp: Add test involving token pasting of INTEGER tokens. 2012-11-29 13:03:02 -08:00
114-paste-integer-tokens.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
115-line-continuations.c glcpp: Add tests for line continuation 2013-01-11 13:55:41 -08:00
115-line-continuations.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
116-disable-line-continuations.c glcpp: Add tests for line continuation 2013-01-11 13:55:41 -08:00
116-disable-line-continuations.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
117-line-continuation-and-non-continuation-backslash.c glcpp: Add test case for recently fixed loop-control underflow bug. 2013-06-03 13:33:32 -07:00
117-line-continuation-and-non-continuation-backslash.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
118-comment-becomes-space.c glcpp: Replace multi-line comment with a space (even as part of macro definition) 2014-01-02 14:15:51 -08:00
118-comment-becomes-space.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
118-multiple-else.c glcpp: error on multiple #else/#elif directives 2014-01-02 14:22:58 -08:00
118-multiple-else.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
119-elif-after-else.c glcpp: error on multiple #else/#elif directives 2014-01-02 14:22:58 -08:00
119-elif-after-else.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
120-undef-builtin.c glsl/glcpp: Add test to ensure compiler won't allow #undef for some builtins 2014-07-09 12:05:13 -07:00
120-undef-builtin.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
121-comment-bug-72686.c glcpp: Add "make check" test for comment-parsing bug 2014-01-31 10:02:54 -08:00
121-comment-bug-72686.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
122-redefine-whitespace.c glsl/glcpp: Fixup glcpp tests for redefining a macro with whitespace changes. 2014-07-09 12:05:13 -07:00
122-redefine-whitespace.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
123-garbage-after-else-1.c glsl/glcpp: Fix glcpp to catch garbage after #if 1 ... #else 2014-07-09 12:05:13 -07:00
123-garbage-after-else-1.c.expected glsl/glcpp: Fix glcpp to catch garbage after #if 1 ... #else 2014-07-09 12:05:13 -07:00
124-preprocessing-numbers.c glsl/glcpp: Fix glcpp to properly lex entire "preprocessing numbers" 2014-07-09 12:05:13 -07:00
124-preprocessing-numbers.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
125-es-short-circuit-undefined.c glsl/glcpp: Add short-circuiting for || and && in #if/#elif for OpenGL ES. 2014-07-09 12:05:13 -07:00
125-es-short-circuit-undefined.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
126-garbage-after-directive.c glsl/glcpp: Promote "extra token at end of directive" from warning to error 2014-07-09 12:05:14 -07:00
126-garbage-after-directive.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
127-pragma-empty.c glsl/glcpp: Don't choke on an empty pragma 2014-07-09 12:05:14 -07:00
127-pragma-empty.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
128-space-before-hash.c glsl/glcpp: Add testing for directives preceded by a space 2014-07-29 15:11:48 -07:00
128-space-before-hash.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
129-define-non-identifier.c glsl/glcpp: Emit proper error for #define with a non-identifier 2014-07-29 15:11:48 -07:00
129-define-non-identifier.c.expected glsl/glcpp: Emit proper error for #define with a non-identifier 2014-07-29 15:11:48 -07:00
130-define-comment.c glsl/glcpp: Add support for comments between #define and macro identifier 2014-07-29 15:11:48 -07:00
130-define-comment.c.expected glsl/glcpp: Drop extra, final newline from most output 2014-07-29 15:11:49 -07:00
131-eof-without-newline.c glsl/glcpp: Add testing for EOF sans newline (and fix for <DEFINE>, <COMMENT>) 2014-07-29 15:11:48 -07:00
131-eof-without-newline.c.expected glsl/glcpp: Add testing for EOF sans newline (and fix for <DEFINE>, <COMMENT>) 2014-07-29 15:11:48 -07:00
132-eof-without-newline-define.c glsl/glcpp: Add testing for EOF sans newline (and fix for <DEFINE>, <COMMENT>) 2014-07-29 15:11:48 -07:00
132-eof-without-newline-define.c.expected glsl/glcpp: Add testing for EOF sans newline (and fix for <DEFINE>, <COMMENT>) 2014-07-29 15:11:48 -07:00
133-eof-without-newline-comment.c glsl/glcpp: Add testing for EOF sans newline (and fix for <DEFINE>, <COMMENT>) 2014-07-29 15:11:48 -07:00
133-eof-without-newline-comment.c.expected glsl/glcpp: Add testing for EOF sans newline (and fix for <DEFINE>, <COMMENT>) 2014-07-29 15:11:48 -07:00
glcpp-test glsl/build: Build glcpp via the glsl Makefile 2013-01-22 14:33:20 -08:00