From ec98dd863237aa4a1853e0efb589f2da597c5640 Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Thu, 29 Aug 2019 09:46:20 -0400 Subject: Add more test files --- check/type/addop/fail-int.p | 4 ++++ check/type/addop/fail-real.p | 5 +++++ check/type/addop/pass-int.p | 4 ++++ check/type/addop/pass-real.p | 5 +++++ check/type/arrray/fail-access.p | 5 +++++ check/type/arrray/fail-int.p | 5 +++++ check/type/arrray/fail-real.p | 5 +++++ check/type/arrray/pass-access.p | 5 +++++ check/type/arrray/pass-int.p | 5 +++++ check/type/arrray/pass-real.p | 5 +++++ check/type/assign/fail-int.p | 5 +++++ check/type/assign/fail-real.p | 5 +++++ check/type/assign/pass-int.p | 5 +++++ check/type/assign/pass-real.p | 5 +++++ check/type/bool/.pass-bool.c.swp | Bin 0 -> 12288 bytes check/type/bool/fail-and.p | 7 +++++++ check/type/bool/fail-bool.p | 5 +++++ check/type/bool/fail-if.p | 9 +++++++++ check/type/bool/fail-int.p | 5 +++++ check/type/bool/fail-or.p | 6 ++++++ check/type/bool/fail-real.p | 4 ++++ check/type/bool/fail-while.p | 7 +++++++ check/type/bool/pass-bool.p | 7 +++++++ check/type/bool/pass-if.p | 9 +++++++++ check/type/bool/pass-int.p | 10 ++++++++++ check/type/bool/pass-real.p | 10 ++++++++++ check/type/bool/pass-while.p | 7 +++++++ check/type/fail-if.p | 9 +++++++++ check/type/mulop/fail-int.p | 6 ++++++ check/type/mulop/fail-real.p | 5 +++++ check/type/mulop/pass-int.p | 5 +++++ check/type/mulop/pass-real.p | 5 +++++ check/type/pass-if.p | 9 +++++++++ 33 files changed, 193 insertions(+) create mode 100644 check/type/addop/fail-int.p create mode 100644 check/type/addop/fail-real.p create mode 100644 check/type/addop/pass-int.p create mode 100644 check/type/addop/pass-real.p create mode 100644 check/type/arrray/fail-access.p create mode 100644 check/type/arrray/fail-int.p create mode 100644 check/type/arrray/fail-real.p create mode 100644 check/type/arrray/pass-access.p create mode 100644 check/type/arrray/pass-int.p create mode 100644 check/type/arrray/pass-real.p create mode 100644 check/type/assign/fail-int.p create mode 100644 check/type/assign/fail-real.p create mode 100644 check/type/assign/pass-int.p create mode 100644 check/type/assign/pass-real.p create mode 100644 check/type/bool/.pass-bool.c.swp create mode 100644 check/type/bool/fail-and.p create mode 100644 check/type/bool/fail-bool.p create mode 100644 check/type/bool/fail-if.p create mode 100644 check/type/bool/fail-int.p create mode 100644 check/type/bool/fail-or.p create mode 100644 check/type/bool/fail-real.p create mode 100644 check/type/bool/fail-while.p create mode 100644 check/type/bool/pass-bool.p create mode 100644 check/type/bool/pass-if.p create mode 100644 check/type/bool/pass-int.p create mode 100644 check/type/bool/pass-real.p create mode 100644 check/type/bool/pass-while.p create mode 100644 check/type/fail-if.p create mode 100644 check/type/mulop/fail-int.p create mode 100644 check/type/mulop/fail-real.p create mode 100644 check/type/mulop/pass-int.p create mode 100644 check/type/mulop/pass-real.p create mode 100644 check/type/pass-if.p diff --git a/check/type/addop/fail-int.p b/check/type/addop/fail-int.p new file mode 100644 index 0000000..0d75b0d --- /dev/null +++ b/check/type/addop/fail-int.p @@ -0,0 +1,4 @@ +program main ( input, output ); +begin + 1 + 1.1 +end. diff --git a/check/type/addop/fail-real.p b/check/type/addop/fail-real.p new file mode 100644 index 0000000..865f0fc --- /dev/null +++ b/check/type/addop/fail-real.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: integer; +begin + a := 1.1 + 1 +end. diff --git a/check/type/addop/pass-int.p b/check/type/addop/pass-int.p new file mode 100644 index 0000000..8a65883 --- /dev/null +++ b/check/type/addop/pass-int.p @@ -0,0 +1,4 @@ +program main ( input, output ); +begin + 1 + 1 +end. diff --git a/check/type/addop/pass-real.p b/check/type/addop/pass-real.p new file mode 100644 index 0000000..7cf1450 --- /dev/null +++ b/check/type/addop/pass-real.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: real; +begin + a := 3.1 + 0.04 +end. diff --git a/check/type/arrray/fail-access.p b/check/type/arrray/fail-access.p new file mode 100644 index 0000000..c77aee3 --- /dev/null +++ b/check/type/arrray/fail-access.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: array [1..10] of integer; +begin + a[3.2] := 1 +end. diff --git a/check/type/arrray/fail-int.p b/check/type/arrray/fail-int.p new file mode 100644 index 0000000..672f798 --- /dev/null +++ b/check/type/arrray/fail-int.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: array [1..10] of integer; +begin + a[3] := 1.1 +end. diff --git a/check/type/arrray/fail-real.p b/check/type/arrray/fail-real.p new file mode 100644 index 0000000..993dbf9 --- /dev/null +++ b/check/type/arrray/fail-real.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: array [1..10] of real; +begin + a[3] := 1 +end. diff --git a/check/type/arrray/pass-access.p b/check/type/arrray/pass-access.p new file mode 100644 index 0000000..a6af0ec --- /dev/null +++ b/check/type/arrray/pass-access.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: array [1..10] of integer; +begin + a[3] := 1 +end. diff --git a/check/type/arrray/pass-int.p b/check/type/arrray/pass-int.p new file mode 100644 index 0000000..a6af0ec --- /dev/null +++ b/check/type/arrray/pass-int.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: array [1..10] of integer; +begin + a[3] := 1 +end. diff --git a/check/type/arrray/pass-real.p b/check/type/arrray/pass-real.p new file mode 100644 index 0000000..582bbdb --- /dev/null +++ b/check/type/arrray/pass-real.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: array [1..10] of real; +begin + a[3] := 1.1 +end. diff --git a/check/type/assign/fail-int.p b/check/type/assign/fail-int.p new file mode 100644 index 0000000..d17bc1c --- /dev/null +++ b/check/type/assign/fail-int.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: integer; +begin + a := 1.1 +end. diff --git a/check/type/assign/fail-real.p b/check/type/assign/fail-real.p new file mode 100644 index 0000000..47fde34 --- /dev/null +++ b/check/type/assign/fail-real.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: real; +begin + a := 1 +end. diff --git a/check/type/assign/pass-int.p b/check/type/assign/pass-int.p new file mode 100644 index 0000000..5f150c8 --- /dev/null +++ b/check/type/assign/pass-int.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: integer; +begin + a := 1 +end. diff --git a/check/type/assign/pass-real.p b/check/type/assign/pass-real.p new file mode 100644 index 0000000..13db838 --- /dev/null +++ b/check/type/assign/pass-real.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: real; +begin + a := 1.1 +end. diff --git a/check/type/bool/.pass-bool.c.swp b/check/type/bool/.pass-bool.c.swp new file mode 100644 index 0000000..e18746d Binary files /dev/null and b/check/type/bool/.pass-bool.c.swp differ diff --git a/check/type/bool/fail-and.p b/check/type/bool/fail-and.p new file mode 100644 index 0000000..124de1f --- /dev/null +++ b/check/type/bool/fail-and.p @@ -0,0 +1,7 @@ + +program main ( input, output ); + var a: integer; +begin + a := 1; + (a = 1) and 1 +end. diff --git a/check/type/bool/fail-bool.p b/check/type/bool/fail-bool.p new file mode 100644 index 0000000..4cf0b6e --- /dev/null +++ b/check/type/bool/fail-bool.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: integer; +begin + not 1.1 +end. diff --git a/check/type/bool/fail-if.p b/check/type/bool/fail-if.p new file mode 100644 index 0000000..17126d6 --- /dev/null +++ b/check/type/bool/fail-if.p @@ -0,0 +1,9 @@ +program main ( input, output ); + var a: integer; +begin + if (1) + then + a:= 1 + else + a:= 0 +end. diff --git a/check/type/bool/fail-int.p b/check/type/bool/fail-int.p new file mode 100644 index 0000000..3eb4866 --- /dev/null +++ b/check/type/bool/fail-int.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: integer; +begin + 1 <> 1.1 +end. diff --git a/check/type/bool/fail-or.p b/check/type/bool/fail-or.p new file mode 100644 index 0000000..a48cdf3 --- /dev/null +++ b/check/type/bool/fail-or.p @@ -0,0 +1,6 @@ +program main ( input, output ); + var a: integer; +begin + a := 1; + (a = 1) or 1.1 +end. diff --git a/check/type/bool/fail-real.p b/check/type/bool/fail-real.p new file mode 100644 index 0000000..7c7d00d --- /dev/null +++ b/check/type/bool/fail-real.p @@ -0,0 +1,4 @@ +program main ( input, output ); +begin + 1.1 <> 1 +end. diff --git a/check/type/bool/fail-while.p b/check/type/bool/fail-while.p new file mode 100644 index 0000000..b02048d --- /dev/null +++ b/check/type/bool/fail-while.p @@ -0,0 +1,7 @@ +program main ( input, output ); + var a: integer; +begin + while (1) + do + a:= 0 +end. diff --git a/check/type/bool/pass-bool.p b/check/type/bool/pass-bool.p new file mode 100644 index 0000000..3701bcb --- /dev/null +++ b/check/type/bool/pass-bool.p @@ -0,0 +1,7 @@ +program main ( input, output ); + var a: integer; +begin + not (1.1 = 1.1); + (1.1 = 1.1) or (1 = 2); + (1.1 = 1.1) and (1 = 2) +end. diff --git a/check/type/bool/pass-if.p b/check/type/bool/pass-if.p new file mode 100644 index 0000000..30e5abf --- /dev/null +++ b/check/type/bool/pass-if.p @@ -0,0 +1,9 @@ +program main ( input, output ); + var a: integer; +begin + if ((1 = 1) ) + then + a:= 1 + else + a:= 0 +end. diff --git a/check/type/bool/pass-int.p b/check/type/bool/pass-int.p new file mode 100644 index 0000000..da2bc97 --- /dev/null +++ b/check/type/bool/pass-int.p @@ -0,0 +1,10 @@ +program main ( input, output ); + var a: integer; +begin + 1 = 1; + 1 <= 1; + 1 >= 1; + 1 < 1; + 1 > 1; + 1 <> 1 +end. diff --git a/check/type/bool/pass-real.p b/check/type/bool/pass-real.p new file mode 100644 index 0000000..67e8b99 --- /dev/null +++ b/check/type/bool/pass-real.p @@ -0,0 +1,10 @@ +program main ( input, output ); + var a: integer; +begin + 1.1 = 1.1; + 1.1 <= 1.1; + 1.1 >= 1.1; + 1.1 < 1.1; + 1.1 > 1.1; + 1.1 <> 1.1 +end. diff --git a/check/type/bool/pass-while.p b/check/type/bool/pass-while.p new file mode 100644 index 0000000..160c187 --- /dev/null +++ b/check/type/bool/pass-while.p @@ -0,0 +1,7 @@ +program main ( input, output ); + var a: integer; +begin + while ((1 = 1) ) + do + a:= 1 +end. diff --git a/check/type/fail-if.p b/check/type/fail-if.p new file mode 100644 index 0000000..17126d6 --- /dev/null +++ b/check/type/fail-if.p @@ -0,0 +1,9 @@ +program main ( input, output ); + var a: integer; +begin + if (1) + then + a:= 1 + else + a:= 0 +end. diff --git a/check/type/mulop/fail-int.p b/check/type/mulop/fail-int.p new file mode 100644 index 0000000..fdd83e3 --- /dev/null +++ b/check/type/mulop/fail-int.p @@ -0,0 +1,6 @@ +program main ( input, output ); + var a: integer; +begin + a := 1 * 1.1; + a := 1.1 +end. diff --git a/check/type/mulop/fail-real.p b/check/type/mulop/fail-real.p new file mode 100644 index 0000000..8975458 --- /dev/null +++ b/check/type/mulop/fail-real.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: integer; +begin + a := 1.1 * 1 +end. diff --git a/check/type/mulop/pass-int.p b/check/type/mulop/pass-int.p new file mode 100644 index 0000000..5f1f327 --- /dev/null +++ b/check/type/mulop/pass-int.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: integer; +begin + a := 1 * 1 +end. diff --git a/check/type/mulop/pass-real.p b/check/type/mulop/pass-real.p new file mode 100644 index 0000000..d03ee76 --- /dev/null +++ b/check/type/mulop/pass-real.p @@ -0,0 +1,5 @@ +program main ( input, output ); + var a: real; +begin + a := 3.1 * 0.04 +end. diff --git a/check/type/pass-if.p b/check/type/pass-if.p new file mode 100644 index 0000000..30e5abf --- /dev/null +++ b/check/type/pass-if.p @@ -0,0 +1,9 @@ +program main ( input, output ); + var a: integer; +begin + if ((1 = 1) ) + then + a:= 1 + else + a:= 0 +end. -- cgit v1.1