< prev index next >

test/langtools/tools/javac/T8019486/WrongLNTForLambdaTest.java

Print this page




 100     };
 101 
 102     static final int[][] lambdaVoid2VoidExpectedLNT = {
 103     //  {line-number, start-pc},
 104         {20,           0},       //number -> number / 1
 105     };
 106 
 107     static final int[][] deserializeExpectedLNT = {
 108     //  {line-number, start-pc},
 109         {05,           0},       //number -> number / 1
 110     };
 111 
 112     static final int[][] lambdaBridgeExpectedLNT = {
 113     //  {line-number, start-pc},
 114         {22,           0},       //number -> number / 1
 115     };
 116 
 117     static final int[][] assignmentExpectedLNT = {
 118     //  {line-number, start-pc},
 119         {26,           0},       //number -> number / 1
 120         {27,           6},       //number -> number / 1
 121     };
 122 
 123     static final int[][] callExpectedLNT = {
 124     //  {line-number, start-pc},
 125         {29,           0},       //number -> number / 1
 126         {31,           10},       //number -> number / 1
 127     };
 128 
 129     public static void main(String[] args) throws Exception {
 130         new WrongLNTForLambdaTest().run();
 131     }
 132 
 133     ToolBox tb = new ToolBox();
 134 
 135     void run() throws Exception {
 136         compileTestClass();
 137         checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
 138                 "Foo.class").toUri()), "lambda$bar$0", simpleLambdaExpectedLNT);
 139         checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
 140                 "Foo.class").toUri()), "lambda$variablesInLambdas$1", lambdaWithVarsExpectedLNT);
 141         checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
 142                 "Foo$1FooBar.class").toUri()), "run", insideLambdaWithVarsExpectedLNT);
 143         checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
 144                 "Foo.class").toUri()), "lambda$variablesInLambdas$2", lambdaVoid2VoidExpectedLNT);
 145         checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
 146                 "Foo.class").toUri()), "$deserializeLambda$", deserializeExpectedLNT);




 100     };
 101 
 102     static final int[][] lambdaVoid2VoidExpectedLNT = {
 103     //  {line-number, start-pc},
 104         {20,           0},       //number -> number / 1
 105     };
 106 
 107     static final int[][] deserializeExpectedLNT = {
 108     //  {line-number, start-pc},
 109         {05,           0},       //number -> number / 1
 110     };
 111 
 112     static final int[][] lambdaBridgeExpectedLNT = {
 113     //  {line-number, start-pc},
 114         {22,           0},       //number -> number / 1
 115     };
 116 
 117     static final int[][] assignmentExpectedLNT = {
 118     //  {line-number, start-pc},
 119         {26,           0},       //number -> number / 1
 120         {27,           3},       //number -> number / 1
 121     };
 122 
 123     static final int[][] callExpectedLNT = {
 124     //  {line-number, start-pc},
 125         {29,           0},       //number -> number / 1
 126         {31,           7},       //number -> number / 1
 127     };
 128 
 129     public static void main(String[] args) throws Exception {
 130         new WrongLNTForLambdaTest().run();
 131     }
 132 
 133     ToolBox tb = new ToolBox();
 134 
 135     void run() throws Exception {
 136         compileTestClass();
 137         checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
 138                 "Foo.class").toUri()), "lambda$bar$0", simpleLambdaExpectedLNT);
 139         checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
 140                 "Foo.class").toUri()), "lambda$variablesInLambdas$1", lambdaWithVarsExpectedLNT);
 141         checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
 142                 "Foo$1FooBar.class").toUri()), "run", insideLambdaWithVarsExpectedLNT);
 143         checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
 144                 "Foo.class").toUri()), "lambda$variablesInLambdas$2", lambdaVoid2VoidExpectedLNT);
 145         checkClassFile(new File(Paths.get(System.getProperty("user.dir"),
 146                 "Foo.class").toUri()), "$deserializeLambda$", deserializeExpectedLNT);


< prev index next >