33const { expect } = require ( "chai" ) ;
44const javaParser = require ( "../src/index" ) ;
55
6- // TODO: we don't need to copy the describe section so many times in this file...
7- // `IT` should be nested under describe...
86describe ( "The Java Parser fixed bugs" , ( ) => {
9- it ( "issue #129 - this.<bar>.baz()" , ( ) => {
10- const input = "this.<Number>anyIterableType()" ;
11- expect ( ( ) => javaParser . parse ( input , "expression" ) ) . to . not . throw ( ) ;
12- } ) ;
13-
147 it ( "issue #112 - Special handling of transitive keyword in module requires statement" , ( ) => {
158 const input = `module foo {
169 // Regular requires statement (without modifier)
@@ -23,39 +16,7 @@ describe("The Java Parser fixed bugs", () => {
2316 ` ;
2417 expect ( ( ) => javaParser . parse ( input ) ) . to . not . throw ( ) ;
2518 } ) ;
26- } ) ;
27-
28- describe ( "The Java Parser fixed bugs" , ( ) => {
29- it ( "issue #131 - 1.0e-10" , ( ) => {
30- const input = "1.0e-10" ;
31- expect ( ( ) => javaParser . parse ( input , "expression" ) ) . to . not . throw ( ) ;
32- } ) ;
33- } ) ;
34-
35- describe ( "The Java Parser fixed bugs" , ( ) => {
36- it ( "issue #130 - enumConstantList" , ( ) => {
37- const input = "enum Foo { BAR, }" ;
38- expect ( ( ) => javaParser . parse ( input ) ) . to . not . throw ( ) ;
39- } ) ;
40- } ) ;
41-
42- describe ( "The Java Parser fixed bugs" , ( ) => {
43- it ( "issue #158 - semicolons inside imports" , ( ) => {
44- const input = "import Foo;;import Bar;" ;
45- expect ( ( ) =>
46- javaParser . parse ( input , "ordinaryCompilationUnit" )
47- ) . to . not . throw ( ) ;
48- } ) ;
49- } ) ;
50-
51- describe ( "The Java Parser fixed bugs" , ( ) => {
52- it ( "issue #177 - annotation in packageDeclaration" , ( ) => {
53- const input = "@Test public class Foo{}" ;
54- expect ( ( ) => javaParser . parse ( input ) ) . to . not . throw ( ) ;
55- } ) ;
56- } ) ;
5719
58- describe ( "The Java Parser fixed bugs" , ( ) => {
5920 it ( "issue #113 - Bit shifting operators must not include whitespace - >>" , ( ) => {
6021 const input = "public class Foo{int hello = 1 >> 5;}" ;
6122 expect ( ( ) => javaParser . parse ( input ) ) . to . not . throw ( ) ;
@@ -89,4 +50,31 @@ describe("The Java Parser fixed bugs", () => {
8950 const input = "public class Foo{int hello = 1 < < 5;}" ;
9051 expect ( ( ) => javaParser . parse ( input ) ) . to . throw ( ) ;
9152 } ) ;
53+
54+ it ( "issue #129 - this.<bar>.baz()" , ( ) => {
55+ const input = "this.<Number>anyIterableType()" ;
56+ expect ( ( ) => javaParser . parse ( input , "expression" ) ) . to . not . throw ( ) ;
57+ } ) ;
58+
59+ it ( "issue #131 - 1.0e-10" , ( ) => {
60+ const input = "1.0e-10" ;
61+ expect ( ( ) => javaParser . parse ( input , "expression" ) ) . to . not . throw ( ) ;
62+ } ) ;
63+
64+ it ( "issue #130 - enumConstantList" , ( ) => {
65+ const input = "enum Foo { BAR, }" ;
66+ expect ( ( ) => javaParser . parse ( input ) ) . to . not . throw ( ) ;
67+ } ) ;
68+
69+ it ( "issue #158 - semicolons inside imports" , ( ) => {
70+ const input = "import Foo;;import Bar;" ;
71+ expect ( ( ) =>
72+ javaParser . parse ( input , "ordinaryCompilationUnit" )
73+ ) . to . not . throw ( ) ;
74+ } ) ;
75+
76+ it ( "issue #177 - annotation in packageDeclaration" , ( ) => {
77+ const input = "@Test public class Foo{}" ;
78+ expect ( ( ) => javaParser . parse ( input ) ) . to . not . throw ( ) ;
79+ } ) ;
9280} ) ;
0 commit comments