File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/test/java/il/ac/bgu/cs/bp/bpjs Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -91,9 +91,13 @@ public void brokenSyntaxRunTest() throws IOException {
9191
9292 @ Test (expected =BPjsCodeEvaluationException .class )
9393 public void brokenSyntaxDfsTest () throws Exception {
94- BProgram bp = new ResourceBProgram ("broken/syntaxError.js" );
95- DfsBProgramVerifier vfr = new DfsBProgramVerifier ();
96- vfr .verify (bp );
94+ try (InputStream resource = Thread .currentThread ().getContextClassLoader ().getResourceAsStream ("broken/syntaxError.js" )) {
95+ String raw = new String (resource .readAllBytes (), StandardCharsets .UTF_8 );
96+ String post = Arrays .asList ( raw .split ("\n " ) ).stream ().filter (s ->!s .contains ("REMOVE" )).collect (joining ("\n " ));
97+ BProgram bp = new StringBProgram (post );
98+ DfsBProgramVerifier vfr = new DfsBProgramVerifier ();
99+ vfr .verify (bp );
100+ }
97101 }
98102
99103 @ Test ()
You can’t perform that action at this time.
0 commit comments