Skip to content

Commit

Permalink
Remove unnecessary code from the test generation implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Jan 7, 2017
1 parent b18d5f6 commit e5c61d8
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 166 deletions.
51 changes: 0 additions & 51 deletions tool/test/org/antlr/v4/test/runtime/csharp/Antlr4.Test.mono.csproj

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions tool/test/org/antlr/v4/test/runtime/csharp/App.config

This file was deleted.

35 changes: 0 additions & 35 deletions tool/test/org/antlr/v4/test/runtime/csharp/AssemblyInfo.cs

This file was deleted.

30 changes: 1 addition & 29 deletions tool/test/org/antlr/v4/test/runtime/csharp/BaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,10 @@
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.antlr.v4.CSharpTool;
import org.antlr.v4.Tool;
import org.antlr.v4.runtime.Token;
Expand All @@ -58,9 +55,6 @@ public abstract class BaseTest {
protected String input;
protected String expectedOutput;
protected String expectedErrors;
private String stderrDuringParse;
public static final String newline = System.getProperty("line.separator");
public static final String pathSep = System.getProperty("path.separator");

/**
* Generates C# verbatim style Template String body (WITHOUT surrounding quotes)
Expand Down Expand Up @@ -184,7 +178,6 @@ protected void generateParserTest(String grammarFileName,
lexerName,
"-visitor");
assertTrue(success);
this.stderrDuringParse = null;
if (parserName == null) {
writeLexerTestFile(lexerName, false);
}
Expand Down Expand Up @@ -212,28 +205,7 @@ private boolean rawGenerateRecognizer(String grammarFileName,
String... extraOptions)
{
ErrorQueue equeue = antlr(grammarFileName, grammarStr, defaultListener, extraOptions);
if (!equeue.errors.isEmpty()) {
return false;
}

List<String> files = new ArrayList<String>();
if ( lexerName!=null ) {
files.add(lexerName+".cs");
}
if ( parserName!=null ) {
files.add(parserName+".cs");
Set<String> optionsSet = new HashSet<String>(Arrays.asList(extraOptions));
String grammarName = grammarFileName.substring(0, grammarFileName.lastIndexOf('.'));
if (!optionsSet.contains("-no-listener")) {
files.add(grammarName+"Listener.cs");
files.add(grammarName+"BaseListener.cs");
}
if (optionsSet.contains("-visitor")) {
files.add(grammarName+"Visitor.cs");
files.add(grammarName+"BaseVisitor.cs");
}
}
return true;
return equeue.errors.isEmpty();
}

protected void mkdir(String dir) {
Expand Down

0 comments on commit e5c61d8

Please sign in to comment.