aboutsummaryrefslogtreecommitdiff
path: root/check/type
diff options
context:
space:
mode:
Diffstat (limited to 'check/type')
-rw-r--r--check/type/addop/fail-int.p4
-rw-r--r--check/type/addop/fail-real.p5
-rw-r--r--check/type/addop/pass-int.p4
-rw-r--r--check/type/addop/pass-real.p5
-rw-r--r--check/type/arrray/fail-access.p5
-rw-r--r--check/type/arrray/fail-int.p5
-rw-r--r--check/type/arrray/fail-real.p5
-rw-r--r--check/type/arrray/pass-access.p5
-rw-r--r--check/type/arrray/pass-int.p5
-rw-r--r--check/type/arrray/pass-real.p5
-rw-r--r--check/type/assign/fail-int.p5
-rw-r--r--check/type/assign/fail-real.p5
-rw-r--r--check/type/assign/pass-int.p5
-rw-r--r--check/type/assign/pass-real.p5
-rw-r--r--check/type/bool/.pass-bool.c.swpbin0 -> 12288 bytes
-rw-r--r--check/type/bool/fail-and.p7
-rw-r--r--check/type/bool/fail-bool.p5
-rw-r--r--check/type/bool/fail-if.p9
-rw-r--r--check/type/bool/fail-int.p5
-rw-r--r--check/type/bool/fail-or.p6
-rw-r--r--check/type/bool/fail-real.p4
-rw-r--r--check/type/bool/fail-while.p7
-rw-r--r--check/type/bool/pass-bool.p7
-rw-r--r--check/type/bool/pass-if.p9
-rw-r--r--check/type/bool/pass-int.p10
-rw-r--r--check/type/bool/pass-real.p10
-rw-r--r--check/type/bool/pass-while.p7
-rw-r--r--check/type/fail-if.p9
-rw-r--r--check/type/mulop/fail-int.p6
-rw-r--r--check/type/mulop/fail-real.p5
-rw-r--r--check/type/mulop/pass-int.p5
-rw-r--r--check/type/mulop/pass-real.p5
-rw-r--r--check/type/pass-if.p9
33 files changed, 193 insertions, 0 deletions
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
--- /dev/null
+++ b/check/type/bool/.pass-bool.c.swp
Binary files 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.