Skip to content

Commit 6175830

Browse files
committed
updated test scripts to always include model.
1 parent 9971d4e commit 6175830

File tree

5 files changed

+19
-25
lines changed

5 files changed

+19
-25
lines changed

test/new_ast/Foreach.java

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import java.util.List;
22

33
class Foreach {
4-
harness void mn() {
4+
public static void main(String[] args) {
55
// A[5] a = {1,2,3,4,5};
66
// assert s(a) == 15;
77
}
@@ -10,17 +10,12 @@ void m(List<Object> t) {
1010
int j = 0;
1111
}
1212
}
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+
// }
2621
}

test/new_ast/UninterpretedClass.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class UninterpretedClass {
22
String s;
3-
void main() {
3+
harness void main() {
44

55
}
66
}

test/test_lib.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@
1010

1111
class TestJava(TestCommon):
1212
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/'])
1414
ret = java_sk.main.main(_fs, '30')
1515
self.assertEqual(ret, 0)
1616

1717
def test_ArrayList(self):
18-
self.__test(["ArrayList_test.java", "../../model"])
18+
self.__test(["ArrayList_test.java"])
1919

2020
def test_HashMap(self):
21-
self.__test(["HashMap_test.java", "../../model/"])
21+
self.__test(["HashMap_test.java"])
2222

2323
def test_String(self):
24-
self.__test(["String_test.java", "../../model/"])
24+
self.__test(["String_test.java"])
2525

2626
def test_Integer(self):
27-
self.__test(["Integer_test.java", "../../model/"])
27+
self.__test(["Integer_test.java"])
2828

2929
# something is wrong here i dont understand
3030
# def test_Float(self):

test/test_mini.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
class TestMini(TestCommon):
1111

1212
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/'])
1514
ret = java_sk.main.main(_fs, '30')
1615
self.assertEqual(ret, 0)
1716

test/test_new_ast.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class TestJava(TestCommon):
1212
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/'])
1414
ret = java_sk.main.main(_fs, '30')
1515
self.assertEqual(ret, 0)
1616

@@ -57,7 +57,7 @@ def test_FieldFromImport(self):
5757
self.__test(["FieldFromImport.java"])
5858

5959
def test_FieldGenericArg(self):
60-
self.__test(["FieldGenericArg.java", "../../model/"])
60+
self.__test(["FieldGenericArg.java"])
6161

6262
def test_FieldMethod(self):
6363
self.__test(["FieldMethod.java"])
@@ -109,7 +109,7 @@ def test_NonLocalCalls(self):
109109
# self.__test(["Override.java"])
110110

111111
def test_PolymorphicFunctions(self):
112-
self.__test(["PolymorphicFunctions.java", "../../model/"])
112+
self.__test(["PolymorphicFunctions.java"])
113113

114114
# not ready for this yet.
115115
# def test_PolyStuff(self):

0 commit comments

Comments
 (0)