summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-05-12 01:08:11 -0600
committerbd-912 <bdunahu@colostate.edu>2024-05-12 01:08:11 -0600
commit42a95045240803c8ce2f3af9b63ab5a10c07ce0c (patch)
tree6b477b7ce4b2f706349faa3c245fa3f937131469
parent40d176b0e5a6e3bc964f97bc68fa22cf23a2efa2 (diff)
Add new tests
-rw-r--r--output/ex17.java36
-rw-r--r--output/ex18.java22
-rw-r--r--output/ex19.java22
-rw-r--r--output/negative/RecursiveExtends-error.java36
4 files changed, 116 insertions, 0 deletions
diff --git a/output/ex17.java b/output/ex17.java
new file mode 100644
index 0000000..36b4cc7
--- /dev/null
+++ b/output/ex17.java
@@ -0,0 +1,36 @@
+class RecursiveExtends //Class_extends_boolean
+{
+ public static void main(String[] a){
+ System.out.println(new test1().methodInTest());
+ }
+}
+
+class test1
+{
+ int a;
+
+ public int methodInTest()
+ {
+ return 1;
+ }
+}
+
+class test2 extends test6
+{
+}
+
+class test3
+{
+}
+
+class test4 extends test3
+{
+}
+
+class test5 extends test4
+{
+}
+
+class test6 extends test5
+{
+}
diff --git a/output/ex18.java b/output/ex18.java
new file mode 100644
index 0000000..b730257
--- /dev/null
+++ b/output/ex18.java
@@ -0,0 +1,22 @@
+class ex18 {
+ public static void main(String[] a){
+ System.out.println(new Test().start());
+ }
+}
+
+class Test {
+
+ Test test;
+ int[] i;
+
+ public int start() {
+ i = new int[10];
+ test = (this.next()).next();
+ return 0;
+ }
+
+ public Test next() {
+ System.out.println(1);
+ return test;
+ }
+}
diff --git a/output/ex19.java b/output/ex19.java
new file mode 100644
index 0000000..7afc43c
--- /dev/null
+++ b/output/ex19.java
@@ -0,0 +1,22 @@
+class ex19 {
+ public static void main(String[] a){
+ System.out.println(new Test().start());
+ }
+}
+
+class Test {
+
+ Test test;
+ int[] i;
+
+ public int start() {
+ i = new int[10];
+ test = (this).next();
+ return 0;
+ }
+
+ public Test next() {
+ System.out.println(1);
+ return test;
+ }
+}
diff --git a/output/negative/RecursiveExtends-error.java b/output/negative/RecursiveExtends-error.java
new file mode 100644
index 0000000..b20f8ea
--- /dev/null
+++ b/output/negative/RecursiveExtends-error.java
@@ -0,0 +1,36 @@
+class RecursiveExtends //Class_extends_boolean
+{
+ public static void main(String[] a){
+ System.out.println(new test1().methodInTest());
+ }
+}
+
+class test1
+{
+ int a;
+
+ public int methodInTest()
+ {
+ return 1;
+ }
+}
+
+class test2 extends test6
+{
+}
+
+class test3 extends test2 //TE
+{
+}
+
+class test4 extends test3
+{
+}
+
+class test5 extends test4
+{
+}
+
+class test6 extends test5
+{
+}