diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2021-10-09 10:29:50 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2021-10-09 10:39:22 +0200 |
commit | 4fe5a375fa6cb07f1c5cb6507b3c4e3b38e6fcef (patch) | |
tree | d703741f5da8698d412360afba1bacba4551749e /examples/c/glr/c++-types.test | |
parent | 7c90a28f17e97b3ec8213ff6e0b0a5d2382f8929 (diff) | |
download | bison-4fe5a375fa6cb07f1c5cb6507b3c4e3b38e6fcef.tar.gz |
tests: make it easier to spot failures
* examples/c/glr/c++-types.test: Split in several small test cases.
Diffstat (limited to 'examples/c/glr/c++-types.test')
-rw-r--r-- | examples/c/glr/c++-types.test | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/examples/c/glr/c++-types.test b/examples/c/glr/c++-types.test index 074d72cc..e63dd31e 100644 --- a/examples/c/glr/c++-types.test +++ b/examples/c/glr/c++-types.test @@ -17,31 +17,46 @@ cat >input <<EOF z + q; +EOF +run 0 "1.0-5: +(z, q)" +cat >input <<EOF T x; +EOF +run 0 "1.0-3: <declare>(T, x)" +cat >input <<EOF T x = y; +EOF +run 0 "1.0-7: <init-declare>(T, x, y)" +cat >input <<EOF x = y; +EOF +run 0 "1.0-5: =(x, y)" +cat >input <<EOF T (x) + y; +EOF +run 0 "1.0-9: +(<cast>(x, T), y)" +cat >input <<EOF T (x); +EOF +run 0 "1.0-5: <OR>(<declare>(T, x), <cast>(x, T))" +cat >input <<EOF T (y) = z + q; +EOF +run 0 "1.0-13: <OR>(<init-declare>(T, y, +(z, q)), =(<cast>(y, T), +(z, q)))" +cat >input <<EOF T (y y) = z + q; +EOF +run 0 "1.0-15: <error> +err: 1.5: syntax error, unexpected identifier, expecting '=' or '+' or ')'" +cat >input <<EOF z + q; EOF -run 0 "\ -1.0-5: +(z, q) -3.0-3: <declare>(T, x) -5.0-7: <init-declare>(T, x, y) -7.0-5: =(x, y) -9.0-9: +(<cast>(x, T), y) -11.0-5: <OR>(<declare>(T, x), <cast>(x, T)) -13.0-13: <OR>(<init-declare>(T, y, +(z, q)), =(<cast>(y, T), +(z, q))) -15.0-15: <error> -17.0-5: +(z, q) -err: 15.5: syntax error, unexpected identifier, expecting '=' or '+' or ')'" +run 0 "1.0-5: +(z, q)" |