|
44 | 44 | import wybs.util.SequentialBuildProject; |
45 | 45 | import wyc.lang.WhileyFile; |
46 | 46 | import wyc.task.CompileTask; |
| 47 | +import wyc.testing.AllValidTest; |
47 | 48 | import wyc.util.TestUtils; |
| 49 | +import wyc.util.TestUtils.Environment; |
48 | 50 | import wycc.util.Pair; |
49 | 51 | import wyfs.lang.Content; |
50 | 52 | import wyfs.lang.Path; |
@@ -88,46 +90,13 @@ public class RuntimeValidTests { |
88 | 90 | // =================================================== |
89 | 91 | // WyC problems |
90 | 92 | // =================================================== |
91 | | - // Normalisation for Method Subtyping |
92 | | - IGNORED.put("Lifetime_Lambda_Valid_2", "#794"); |
93 | | - IGNORED.put("Lifetime_Lambda_Valid_5", "#794"); |
94 | | - IGNORED.put("Lifetime_Lambda_Valid_6", "#794"); |
95 | | - // Support Captured Lifetime Parameters |
96 | | - IGNORED.put("Lifetime_Lambda_Valid_7", "#795"); |
97 | | - // Problem Type Checking Union Type |
98 | | - IGNORED.put("RecordSubtype_Valid_1", "#696"); |
99 | | - IGNORED.put("RecordSubtype_Valid_2", "#696"); |
100 | | - // Function Overloading for Nominal Types |
101 | | - IGNORED.put("Function_Valid_11", "#702"); |
102 | | - IGNORED.put("Function_Valid_15", "#702"); |
103 | | - // Redesigned Interpreter |
104 | | - IGNORED.put("Lambda_Valid_7", "908"); |
105 | | - IGNORED.put("Lambda_Valid_11", "908"); |
106 | | - IGNORED.put("Template_Valid_35", "908"); |
107 | | - IGNORED.put("Template_Valid_36", "908"); |
108 | | - // Bug with Template Inference |
109 | | - IGNORED.put("Template_Valid_38", "912"); |
110 | | - // Semantics of Runtime Type Tests |
111 | | - IGNORED.put("RecursiveType_Valid_7", "936"); |
112 | | - IGNORED.put("TypeEquals_Valid_61", "936"); |
113 | | - IGNORED.put("TypeEquals_Valid_62", "936"); |
114 | | - // FlowTyping over Logical Conditions |
115 | | - IGNORED.put("Complex_Valid_3", "936"); |
116 | | - IGNORED.put("RecursiveType_Valid_12", "936"); |
117 | | - IGNORED.put("RecursiveType_Valid_30", "936"); |
118 | | - // Subtype Operator for Casting |
119 | | - IGNORED.put("Coercion_Valid_9", "938"); |
120 | | - IGNORED.put("RecordCoercion_Valid_1", "938"); |
121 | | - // Unclassified |
122 | | - IGNORED.put("Lifetime_Valid_8", "???"); |
123 | | - IGNORED.put("Lifetime_Lambda_Valid_1", "???"); |
124 | | - IGNORED.put("Lifetime_Lambda_Valid_3", "???"); |
125 | | - IGNORED.put("Lifetime_Lambda_Valid_4", "???"); |
126 | | - |
| 93 | + // Bring over all the currently failing tests for the compiler. There's |
| 94 | + // absolutely no point trying to see whether these work or not, since we |
| 95 | + // already know they will not. |
| 96 | + IGNORED.putAll(AllValidTest.IGNORED); |
127 | 97 | // =================================================== |
128 | 98 | // WyJS problems |
129 | 99 | // =================================================== |
130 | | - |
131 | 100 | // Unbound arithmetic |
132 | 101 | IGNORED.put("IntOp_Valid_1", "#15"); |
133 | 102 | IGNORED.put("IntConst_Valid_1", "#15"); |
@@ -207,7 +176,10 @@ public static Pair<Boolean,String> compileWhiley2JavaScript(String whileydir, St |
207 | 176 | try { |
208 | 177 | // Construct the project |
209 | 178 | DirectoryRoot root = new DirectoryRoot(whileydir, registry); |
210 | | - SequentialBuildProject project = new SequentialBuildProject(null, root); |
| 179 | + // Construct temporary build environment |
| 180 | + Build.Environment environment = new Environment(root,false); |
| 181 | + // |
| 182 | + SequentialBuildProject project = new SequentialBuildProject(environment, root); |
211 | 183 | // Identify source files and target files |
212 | 184 | Pair<Path.Entry<WhileyFile>,Path.Entry<WyilFile>> p = TestUtils.findSourceFiles(root,arg); |
213 | 185 | List<Path.Entry<WhileyFile>> sources = Arrays.asList(p.first()); |
|
0 commit comments