From 0fb91bbb2f84d586d3e418cb93c0a9258923d28e Mon Sep 17 00:00:00 2001 From: krasimir Date: Wed, 28 Oct 2009 17:59:18 +0000 Subject: [PATCH] added test cases for cyrcular definitions --- testsuite/compiler/check/cyclic/abs-types/Test1Abs.gf | 7 +++++++ testsuite/compiler/check/cyclic/abs-types/Test2Abs.gf | 10 ++++++++++ testsuite/compiler/check/cyclic/abs-types/test1.gfs | 1 + .../compiler/check/cyclic/abs-types/test1.gfs.gold | 4 ++++ testsuite/compiler/check/cyclic/abs-types/test2.gfs | 1 + .../compiler/check/cyclic/abs-types/test2.gfs.gold | 4 ++++ testsuite/compiler/check/cyclic/opers/TestOpers.gf | 10 ++++++++++ testsuite/compiler/check/cyclic/opers/test.gfs | 1 + testsuite/compiler/check/cyclic/opers/test.gfs.gold | 4 ++++ testsuite/compiler/check/cyclic/params/TestParams.gf | 7 +++++++ testsuite/compiler/check/cyclic/params/test.gfs | 1 + testsuite/compiler/check/cyclic/params/test.gfs.gold | 4 ++++ 12 files changed, 54 insertions(+) create mode 100644 testsuite/compiler/check/cyclic/abs-types/Test1Abs.gf create mode 100644 testsuite/compiler/check/cyclic/abs-types/Test2Abs.gf create mode 100644 testsuite/compiler/check/cyclic/abs-types/test1.gfs create mode 100644 testsuite/compiler/check/cyclic/abs-types/test1.gfs.gold create mode 100644 testsuite/compiler/check/cyclic/abs-types/test2.gfs create mode 100644 testsuite/compiler/check/cyclic/abs-types/test2.gfs.gold create mode 100644 testsuite/compiler/check/cyclic/opers/TestOpers.gf create mode 100644 testsuite/compiler/check/cyclic/opers/test.gfs create mode 100644 testsuite/compiler/check/cyclic/opers/test.gfs.gold create mode 100644 testsuite/compiler/check/cyclic/params/TestParams.gf create mode 100644 testsuite/compiler/check/cyclic/params/test.gfs create mode 100644 testsuite/compiler/check/cyclic/params/test.gfs.gold diff --git a/testsuite/compiler/check/cyclic/abs-types/Test1Abs.gf b/testsuite/compiler/check/cyclic/abs-types/Test1Abs.gf new file mode 100644 index 000000000..8358c6928 --- /dev/null +++ b/testsuite/compiler/check/cyclic/abs-types/Test1Abs.gf @@ -0,0 +1,7 @@ +abstract Test1Abs = { + +cat + A B ; + B A ; + +} \ No newline at end of file diff --git a/testsuite/compiler/check/cyclic/abs-types/Test2Abs.gf b/testsuite/compiler/check/cyclic/abs-types/Test2Abs.gf new file mode 100644 index 000000000..c395739bc --- /dev/null +++ b/testsuite/compiler/check/cyclic/abs-types/Test2Abs.gf @@ -0,0 +1,10 @@ +abstract Test2Abs = { + +cat + A ; + B A ; + +fun f : (x : A) -> B (g x) ; + g : (x : A) -> B (f x) ; + +} \ No newline at end of file diff --git a/testsuite/compiler/check/cyclic/abs-types/test1.gfs b/testsuite/compiler/check/cyclic/abs-types/test1.gfs new file mode 100644 index 000000000..a220a2663 --- /dev/null +++ b/testsuite/compiler/check/cyclic/abs-types/test1.gfs @@ -0,0 +1 @@ +i testsuite/compiler/check/cyclic/abs-types/Test1Abs.gf \ No newline at end of file diff --git a/testsuite/compiler/check/cyclic/abs-types/test1.gfs.gold b/testsuite/compiler/check/cyclic/abs-types/test1.gfs.gold new file mode 100644 index 000000000..b8bde0be7 --- /dev/null +++ b/testsuite/compiler/check/cyclic/abs-types/test1.gfs.gold @@ -0,0 +1,4 @@ + + +checking module Test1Abs + circular definitions: A B diff --git a/testsuite/compiler/check/cyclic/abs-types/test2.gfs b/testsuite/compiler/check/cyclic/abs-types/test2.gfs new file mode 100644 index 000000000..889107319 --- /dev/null +++ b/testsuite/compiler/check/cyclic/abs-types/test2.gfs @@ -0,0 +1 @@ +i testsuite/compiler/check/cyclic/abs-types/Test2Abs.gf \ No newline at end of file diff --git a/testsuite/compiler/check/cyclic/abs-types/test2.gfs.gold b/testsuite/compiler/check/cyclic/abs-types/test2.gfs.gold new file mode 100644 index 000000000..4caf3ae2c --- /dev/null +++ b/testsuite/compiler/check/cyclic/abs-types/test2.gfs.gold @@ -0,0 +1,4 @@ + + +checking module Test2Abs + circular definitions: f g diff --git a/testsuite/compiler/check/cyclic/opers/TestOpers.gf b/testsuite/compiler/check/cyclic/opers/TestOpers.gf new file mode 100644 index 000000000..886458b3f --- /dev/null +++ b/testsuite/compiler/check/cyclic/opers/TestOpers.gf @@ -0,0 +1,10 @@ +resource TestOpers = { + +flags + optimize=noexpand; + +oper + A : Str = B ; + B : Str = A ; + +} \ No newline at end of file diff --git a/testsuite/compiler/check/cyclic/opers/test.gfs b/testsuite/compiler/check/cyclic/opers/test.gfs new file mode 100644 index 000000000..5c469f036 --- /dev/null +++ b/testsuite/compiler/check/cyclic/opers/test.gfs @@ -0,0 +1 @@ +i testsuite/compiler/check/cyclic/opers/TestOpers.gf \ No newline at end of file diff --git a/testsuite/compiler/check/cyclic/opers/test.gfs.gold b/testsuite/compiler/check/cyclic/opers/test.gfs.gold new file mode 100644 index 000000000..d09ec7edd --- /dev/null +++ b/testsuite/compiler/check/cyclic/opers/test.gfs.gold @@ -0,0 +1,4 @@ + + +checking module TestOpers + circular definitions: A B diff --git a/testsuite/compiler/check/cyclic/params/TestParams.gf b/testsuite/compiler/check/cyclic/params/TestParams.gf new file mode 100644 index 000000000..5f268db66 --- /dev/null +++ b/testsuite/compiler/check/cyclic/params/TestParams.gf @@ -0,0 +1,7 @@ +resource TestParams = { + +param + A = A1 B ; + B = B1 A ; + +} \ No newline at end of file diff --git a/testsuite/compiler/check/cyclic/params/test.gfs b/testsuite/compiler/check/cyclic/params/test.gfs new file mode 100644 index 000000000..120ad77ce --- /dev/null +++ b/testsuite/compiler/check/cyclic/params/test.gfs @@ -0,0 +1 @@ +i testsuite/compiler/check/cyclic/params/TestParams.gf \ No newline at end of file diff --git a/testsuite/compiler/check/cyclic/params/test.gfs.gold b/testsuite/compiler/check/cyclic/params/test.gfs.gold new file mode 100644 index 000000000..bcd6a118e --- /dev/null +++ b/testsuite/compiler/check/cyclic/params/test.gfs.gold @@ -0,0 +1,4 @@ + + +checking module TestParams + circular definitions: A B