Skip to content

Commit f165f8b

Browse files
committed
Removed useless unit test on complexity
1 parent 45bd568 commit f165f8b

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

dart-lang/src/test/java/fr/insideapp/sonarqube/dart/lang/antlr/CyclomaticComplexityVisitorTest.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,7 @@
3434
public class CyclomaticComplexityVisitorTest {
3535

3636
@Test
37-
public void complexity1() throws IOException {
38-
final CharStream charStream = CharStreams.fromStream(this.getClass().getResourceAsStream("/dart/main.dart"));
39-
final Dart2Lexer lexer = new Dart2Lexer(charStream);
40-
lexer.removeErrorListeners();
41-
final CommonTokenStream stream = new CommonTokenStream(lexer);
42-
stream.fill();
43-
final Dart2Parser parser = new Dart2Parser(stream);
44-
parser.removeErrorListeners();
45-
final ParseTree root = parser.compilationUnit();
46-
47-
CyclomaticComplexityVisitor visitor = new CyclomaticComplexityVisitor();
48-
CustomTreeVisitor customTreeVisitor = new CustomTreeVisitor(visitor);
49-
customTreeVisitor.visit(root);
50-
assertThat(visitor.getComplexity()).isEqualTo(1);
51-
}
52-
53-
@Test
54-
public void complexity2() throws IOException {
37+
public void complexity() throws IOException {
5538
final CharStream charStream = CharStreams.fromStream(this.getClass().getResourceAsStream("/dart/complexity.dart"));
5639
final Dart2Lexer lexer = new Dart2Lexer(charStream);
5740
lexer.removeErrorListeners();

0 commit comments

Comments
 (0)