From 240deb44a5005f618c969df95f73385666729cef Mon Sep 17 00:00:00 2001 From: matt rice Date: Tue, 2 Jan 2024 03:13:51 -0800 Subject: [PATCH] Add ctfails tests for warnings_are_errors. --- lrpar/cttests/src/ctfails/warnings.test | 12 ++++++++++++ lrpar/cttests/src/ctfails/warnings_flags.test | 13 +++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 lrpar/cttests/src/ctfails/warnings.test create mode 100644 lrpar/cttests/src/ctfails/warnings_flags.test diff --git a/lrpar/cttests/src/ctfails/warnings.test b/lrpar/cttests/src/ctfails/warnings.test new file mode 100644 index 000000000..6b4c28c3f --- /dev/null +++ b/lrpar/cttests/src/ctfails/warnings.test @@ -0,0 +1,12 @@ +name: Test warnings are treated as errors by default. +yacckind: Original(YaccOriginalActionKind::GenericParseTree) +grammar: | + %start A + %token b + %% + A : 'a'; + B : 'b'; +lexer: | + %% + a 'a' + b 'b' diff --git a/lrpar/cttests/src/ctfails/warnings_flags.test b/lrpar/cttests/src/ctfails/warnings_flags.test new file mode 100644 index 000000000..14e586a7c --- /dev/null +++ b/lrpar/cttests/src/ctfails/warnings_flags.test @@ -0,0 +1,13 @@ +name: Test enabling warnings are errors. +yacckind: Original(YaccOriginalActionKind::GenericParseTree) +yacc_flags: [ warnings_are_errors ] +grammar: | + %start A + %token b + %% + A : 'a'; + B : 'b'; +lexer: | + %% + a 'a' + b 'b'