Skip to content

Commit

Permalink
Remove unused start and end columns
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashering committed Feb 12, 2020
1 parent dbb7e9f commit 8f4b5be
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public enum ProbeMode {
private List<AssertionDefinition> assertions;
private Object exampleResult;
private int exampleDefinitionLine;
private int exampleDefinitionEndColumn;
private String uri;
private String uniqueEmoji;

Expand Down Expand Up @@ -94,7 +93,6 @@ public ExampleDefinition(String exampleName,
int functionStartLine,
String functionName,
int exampleDefinitionLine,
int exampleDefinitionEndColumn,
String uri,
ProbeMode probeMode) {
this.exampleName = exampleName;
Expand All @@ -104,7 +102,6 @@ public ExampleDefinition(String exampleName,
this.probeMode = probeMode;
this.assertions = new ArrayList<>();
this.exampleDefinitionLine = exampleDefinitionLine;
this.exampleDefinitionEndColumn = exampleDefinitionEndColumn;
this.uri = uri;
}

Expand Down Expand Up @@ -171,10 +168,6 @@ public int getExampleDefinitionLine() {
return exampleDefinitionLine;
}

public int getExampleDefinitionEndColumn() {
return exampleDefinitionEndColumn;
}

public String getUri() {
return uri;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
public class ProbeDefinition {
private String uri;
private int line;
private int startColumn;
private int endColumn;
private Object result;

public ProbeDefinition(int line) {
Expand All @@ -23,22 +21,6 @@ public int getLine() {
return line;
}

public int getStartColumn() {
return startColumn;
}

public void setStartColumn(int startColumn) {
this.startColumn = startColumn;
}

public int getEndColumn() {
return endColumn;
}

public void setEndColumn(int endColumn) {
this.endColumn = endColumn;
}

public Object getResult() {
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public List<ExampleDefinition> parseExamples() {
lineNumber,
this.exampleInvocationCode,
this.getExampleDefinitionLine(example[0]),
this.getExampleDefinitionEndColumn(example[0]),
this.uri,
probeMode));
});
Expand Down Expand Up @@ -112,18 +111,6 @@ public int getExampleDefinitionLine(String exampleName) {
return -1;
}

public int getExampleDefinitionEndColumn(String exampleName) {
String pattern = exampleAnnotationPatternPrefix + exampleName;
Pattern m = Pattern.compile(pattern);

for (String line : this.annotatedSource.split("\n")) {
if (m.matcher(line).find())
return line.length();
}

return -1;
}

public String getExampleInvocationCode(Integer lineNumber, Map<String, Object> exampleParameters,
List<LanguageAgnosticFunctionDeclarationDefinition> functionsInSource) {
String functionNameForExample = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,6 @@ public void onReturnValue(EventContext context, VirtualFrame frame, Object resul
example.getProbes().add(probe);
probe.setResult(result);
probe.setUri(uri);
probe.setStartColumn(sourceSection.getStartColumn());
probe.setEndColumn(sourceSection.getEndColumn());
}

if (example.getProbeMode() == ExampleDefinition.ProbeMode.ALL || example.getProbeMode() == ExampleDefinition.ProbeMode.DEFAULT) {
Expand All @@ -286,8 +284,6 @@ public void onReturnValue(EventContext context, VirtualFrame frame, Object resul
example.getAssertions().add(assertion);
assertion.setResult(result);
assertion.setUri(uri);
assertion.setStartColumn(sourceSection.getStartColumn());
assertion.setEndColumn(sourceSection.getEndColumn());
}
}
}
Expand Down

0 comments on commit 8f4b5be

Please sign in to comment.