File tree Expand file tree Collapse file tree 5 files changed +19
-25
lines changed Expand file tree Collapse file tree 5 files changed +19
-25
lines changed Original file line number Diff line number Diff line change 1
1
import java .util .List ;
2
2
3
3
class Foreach {
4
- harness void mn ( ) {
4
+ public static void main ( String [] args ) {
5
5
// A[5] a = {1,2,3,4,5};
6
6
// assert s(a) == 15;
7
7
}
@@ -10,17 +10,12 @@ void m(List<Object> t) {
10
10
int j = 0 ;
11
11
}
12
12
}
13
- void m (List <Object > t ) {
14
- for (Object o : t ) {
15
- int j = 0 ;
16
- }
17
- }
18
- int s (A [] alist ) {
19
- // int sum = 0;
20
- // for (A a : alist) {
21
- // sum += a.x;
22
- // }
23
- // return sum;
24
- return 0 ;
25
- }
13
+ // int s(A[] alist) {
14
+ // // int sum = 0;
15
+ // // for (A a : alist) {
16
+ // // sum += a.x;
17
+ // // }
18
+ // // return sum;
19
+ // return 0;
20
+ // }
26
21
}
Original file line number Diff line number Diff line change 1
1
class UninterpretedClass {
2
2
String s ;
3
- void main () {
3
+ harness void main () {
4
4
5
5
}
6
6
}
Original file line number Diff line number Diff line change 10
10
11
11
class TestJava (TestCommon ):
12
12
def __test (self , fs ):
13
- _fs = map (lambda f : os .path .join (tests , f ), fs )
13
+ _fs = map (lambda f : os .path .join (tests , f ), fs + [ '../../model/' ] )
14
14
ret = java_sk .main .main (_fs , '30' )
15
15
self .assertEqual (ret , 0 )
16
16
17
17
def test_ArrayList (self ):
18
- self .__test (["ArrayList_test.java" , "../../model" ])
18
+ self .__test (["ArrayList_test.java" ])
19
19
20
20
def test_HashMap (self ):
21
- self .__test (["HashMap_test.java" , "../../model/" ])
21
+ self .__test (["HashMap_test.java" ])
22
22
23
23
def test_String (self ):
24
- self .__test (["String_test.java" , "../../model/" ])
24
+ self .__test (["String_test.java" ])
25
25
26
26
def test_Integer (self ):
27
- self .__test (["Integer_test.java" , "../../model/" ])
27
+ self .__test (["Integer_test.java" ])
28
28
29
29
# something is wrong here i dont understand
30
30
# def test_Float(self):
Original file line number Diff line number Diff line change 10
10
class TestMini (TestCommon ):
11
11
12
12
def __test (self , fs ):
13
- append_b = lambda f : os .path .join (benchmarks , f )
14
- _fs = map (append_b , fs )
13
+ _fs = map (lambda f : os .path .join (benchmarks , f ), fs + ['../../model/' ])
15
14
ret = java_sk .main .main (_fs , '30' )
16
15
self .assertEqual (ret , 0 )
17
16
Original file line number Diff line number Diff line change 10
10
11
11
class TestJava (TestCommon ):
12
12
def __test (self , fs ):
13
- _fs = map (lambda f : os .path .join (tests , f ), fs )
13
+ _fs = map (lambda f : os .path .join (tests , f ), fs + [ '../../model/' ] )
14
14
ret = java_sk .main .main (_fs , '30' )
15
15
self .assertEqual (ret , 0 )
16
16
@@ -57,7 +57,7 @@ def test_FieldFromImport(self):
57
57
self .__test (["FieldFromImport.java" ])
58
58
59
59
def test_FieldGenericArg (self ):
60
- self .__test (["FieldGenericArg.java" , "../../model/" ])
60
+ self .__test (["FieldGenericArg.java" ])
61
61
62
62
def test_FieldMethod (self ):
63
63
self .__test (["FieldMethod.java" ])
@@ -109,7 +109,7 @@ def test_NonLocalCalls(self):
109
109
# self.__test(["Override.java"])
110
110
111
111
def test_PolymorphicFunctions (self ):
112
- self .__test (["PolymorphicFunctions.java" , "../../model/" ])
112
+ self .__test (["PolymorphicFunctions.java" ])
113
113
114
114
# not ready for this yet.
115
115
# def test_PolyStuff(self):
You can’t perform that action at this time.
0 commit comments