Skip to content

Commit 8b858c4

Browse files
author
Jianxiong Cai
committed
Mark passed testcases
1 parent 6fa3ed4 commit 8b858c4

File tree

2 files changed

+23
-28
lines changed

2 files changed

+23
-28
lines changed

PA4/test/unit/dispatch_loop.cl

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- Tested and passed. --
2+
-- Jianxiong Cai 14 Jun, 2018 --
3+
14
class Main{
25
a: Int <- 1;
36
b: Main;

PA4/test/unit/dispatch_static.cl

+20-28
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,27 @@
1-
class Int3 inherits Int2{
1+
-- Tested and passed. --
2+
-- Jianxiong Cai 14 Jun, 2018 --
23

3-
bar2(x: Bool, y:Int): Int{
4-
1
5-
};
4+
class Main{
5+
a: A <- new A;
6+
b: B <- new B;
67

7-
foo(x: Bool, y:Int): Int{
8-
2
9-
};
8+
cout: IO <- new IO;
109

11-
ba3(x: Bool, y:Int): Int{
12-
1
13-
};
10+
main(): Int{{
11+
b.getA();
12+
a.getA();
13+
b@A.getA();
14+
1;
15+
}};
1416
};
1517

16-
class Int2{
17-
a2: Int;
18-
19-
foo(x: Bool, y:Int): Int{
20-
1
21-
};
18+
class A{
19+
a: Int <- 1;
20+
cout2: IO <- new IO;
21+
getA(): Int {{ cout2.out_string("A.getA get called\n"); a; }};
2222
};
2323

24-
class Main{
25-
a: Int3 <- new Int3;
26-
27-
bar(x: Bool, y:Int): Int{
28-
1
29-
};
30-
31-
main(): Int{{
32-
a@Int2.foo(true,1);
33-
0;
34-
}};
35-
};
24+
class B inherits A {
25+
incA(): Int {{ a <- a + 1; 10; }};
26+
getA(): Int {{ cout2.out_string("B.getA get called\n"); a; }};
27+
};

0 commit comments

Comments
 (0)