Modified two test files 27/32127/1
authorsaomenmen <zhangmroy@163.com>
Sat, 2 Jan 2016 07:37:32 +0000 (15:37 +0800)
committersaomenmen <zhangmroy@163.com>
Sat, 2 Jan 2016 07:38:22 +0000 (15:38 +0800)
Change-Id: Ib4f418824b648dab0cffbabeb939f5f2aa57a700
Signed-off-by: saomenmen <zhangmroy@163.com>
nemo-impl/src/test/java/org/opendaylight/nemo/user/vnspacemanager/languagestyle/NEMOParse/NEMOparserTokenManagerTest.java
nemo-impl/src/test/java/org/opendaylight/nemo/user/vnspacemanager/languagestyle/NEMOParse/SimpleCharStreamTest.java

index 5ca54c5544d3d08b25f2f8b92ba8e11e70ad6bd4..394d3a690a46115a4c76085824d3626d302c6815 100644 (file)
@@ -6,12 +6,13 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
  */\r
 /* Generated By:JavaCC: Do not edit this line. NEMOparserTokenManager.java */\r
-package user.vnspacemanager.languagestyle.NEMOParse;\r
+package org.opendaylight.nemo.user.vnspacemanager.languagestyle.NEMOParse;\r
 import junit.framework.TestCase;\r
 import org.junit.Assert;\r
 import org.junit.Before;\r
 import org.junit.BeforeClass;\r
 import org.junit.Test;\r
+import org.junit.runner.RunWith;\r
 import org.opendaylight.nemo.user.vnspacemanager.languagestyle.NEMOParse.NEMOparser;\r
 import org.opendaylight.nemo.user.vnspacemanager.languagestyle.NEMOParse.NEMOparserTokenManager;\r
 import org.opendaylight.nemo.user.vnspacemanager.languagestyle.NEMOParse.SimpleCharStream;\r
@@ -26,9 +27,16 @@ import java.lang.reflect.Method;
 \r
 import static org.junit.Assert.*;\r
 import static org.mockito.Mockito.*;\r
+import org.powermock.api.mockito.PowerMockito;\r
+import org.powermock.api.support.membermodification.MemberMatcher;\r
+import org.powermock.api.support.membermodification.MemberModifier;\r
+import org.powermock.core.classloader.annotations.PrepareForTest;\r
+import org.powermock.modules.junit4.PowerMockRunner;\r
 /**\r
  * Created by zhangmeng on 2015/12/17.\r
  */\r
+@RunWith(PowerMockRunner.class)\r
+@PrepareForTest({NEMOparserTokenManager.class,SimpleCharStream.class})\r
 public class NEMOparserTokenManagerTest extends TestCase {\r
     private SimpleCharStream simpleCharStream;\r
     private int lexState;\r
@@ -40,6 +48,7 @@ public class NEMOparserTokenManagerTest extends TestCase {
         class1 = NEMOparserTokenManager.class;\r
         field = class1.getDeclaredField("input_stream");\r
         field.setAccessible(true);\r
+        field.set(class1,null);\r
 \r
         simpleCharStream = mock(SimpleCharStream.class);\r
         lexState = 0;\r
@@ -59,38 +68,752 @@ public class NEMOparserTokenManagerTest extends TestCase {
     public void testSetDebugStream() throws Exception {\r
         NEMOparserTokenManager.setDebugStream(null);\r
         Field field1 = class1.getField("debugStream");\r
+        field1.setAccessible(true);\r
         Assert.assertTrue(field1.get(class1) == null);\r
     }\r
 \r
 \r
     @Test\r
     public void testJjFillToken() throws Exception {\r
-        /*\r
-        *  tested  in method "testGetNextToken"\r
-        * */\r
+        nemOparserTokenManager = new NEMOparserTokenManager(simpleCharStream);\r
+        PowerMockito.mockStatic(SimpleCharStream.class);\r
+        PowerMockito.when(SimpleCharStream.GetImage()).thenReturn("test");\r
+        Assert.assertTrue(NEMOparserTokenManager.jjFillToken() != null);\r
     }\r
 \r
     @Test\r
     public void testGetNextToken() throws Exception {\r
-//        Class<SimpleCharStream> simpleCharStreamClass = SimpleCharStream.class;\r
-//        Field field1 = simpleCharStreamClass.getDeclaredField("")\r
+        char curChar = 40;\r
         nemOparserTokenManager = new NEMOparserTokenManager(simpleCharStream);\r
-        Assert.assertTrue(field.get(class1) == simpleCharStream);\r
+        Assert.assertTrue(field.get(nemOparserTokenManager) == simpleCharStream);\r
+        PowerMockito.mockStatic(SimpleCharStream.class);\r
+        PowerMockito.when(SimpleCharStream.BeginToken()).thenReturn(curChar);\r
+//        System.out.println("out :" + NEMOparserTokenManager.getNextToken());\r
+        Assert.assertTrue(NEMOparserTokenManager.getNextToken() != null);\r
+    }\r
+\r
+    @Test\r
+    public void testjjStartNfa_0() throws Exception{\r
+        Method method = class1.getDeclaredMethod("jjStartNfa_0",new Class[]{int.class,long.class});\r
+        method.setAccessible(true);\r
+        int pos = 1;\r
+        long active0 = 1L;\r
+\r
+        Assert.assertTrue((Integer) method.invoke(class1, pos, active0) == 3);\r
+//        System.out.println("method.invoke(class1,pos,active0):" + method.invoke(class1,pos,active0));\r
+    }\r
+\r
+    @Test\r
+    public void testjjStopStringLiteralDfa_0() throws Exception{\r
+        Method method = class1.getDeclaredMethod("jjStopStringLiteralDfa_0",new Class[]{\r
+                int.class,\r
+                long.class\r
+        });\r
+        method.setAccessible(true);\r
+//        System.out.println("testjjStopStringLiteralDfa_0" + method.invoke(class1, 0, 0));\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0, 0) == -1);\r
+//        System.out.println("testjjStopStringLiteralDfa_0" + method.invoke(class1, 0, 0x74800000000000L));\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0, 0x74800000000000L) == 205);\r
+//        System.out.println("testjjStopStringLiteralDfa_0" + method.invoke(class1, 0, 0x3000000000000L));\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0, 0x3000000000000L) == 81);\r
+        //case1\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1, 0x77800000000000L) == 205);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1, 0) == -1);\r
+        //case2\r
+        Assert.assertTrue((Integer) method.invoke(class1, 2, 0x77800000000000L) == 205);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 2, 0) == -1);\r
+        //case3\r
+        Assert.assertTrue((Integer) method.invoke(class1, 3, 0x77800000000000L) == 205);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 3, 0) == -1);\r
+        //case4\r
+        Assert.assertTrue((Integer) method.invoke(class1, 4, 0x35000000000000L) == 205);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 4, 0x42800000000000L) == 205);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 4, 0) == -1);\r
+        //case5\r
+        Assert.assertTrue((Integer) method.invoke(class1, 5, 0x25000000000000L) == 205);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 5, 0x10000000000000L) == 205);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 5, 0) == -1);\r
+        //case6\r
+        Assert.assertTrue((Integer) method.invoke(class1, 6, 0x5000000000000L) == 205);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 6, 0x20000000000000L) == 205);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 6, 0) == -1);\r
+        //case7\r
+        Assert.assertTrue((Integer) method.invoke(class1, 7, 0x5000000000000L) == 205);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 7, 0) == -1);\r
+        //case8\r
+        Assert.assertTrue((Integer) method.invoke(class1, 8, 0x5000000000000L) == 205);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 8, 0) == -1);\r
+        //case9\r
+        Assert.assertTrue((Integer) method.invoke(class1, 9, 0x4000000000000L) == 205);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 9, 0x1000000000000L) == 205);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 9, 0) == -1);\r
+        //case default\r
+        Assert.assertTrue((Integer) method.invoke(class1, 10, 0) == -1);\r
+\r
+    }\r
+\r
+    @Test\r
+    public void testjjStopAtPos() throws Exception{\r
+        Method method = class1.getDeclaredMethod("jjStopAtPos",new Class[]{\r
+                int.class,\r
+                int.class\r
+        });\r
+        method.setAccessible(true);\r
+\r
+        Assert.assertTrue((Integer) method.invoke(class1,1,1) == 2);\r
+    }\r
+\r
+    @Test\r
+    public void testjjMoveStringLiteralDfa0_0() throws Exception{\r
+        Method method = class1.getDeclaredMethod("jjMoveStringLiteralDfa0_0");\r
+        method.setAccessible(true);\r
+        Field field = class1.getDeclaredField("curChar");\r
+        field.setAccessible(true);\r
+\r
+        PowerMockito.mockStatic(SimpleCharStream.class);\r
+        PowerMockito.when(SimpleCharStream.readChar()).thenReturn((char) 0);\r
+\r
+        NEMOparserTokenManager.curChar = 33;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 38;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 40;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 41;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 42;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 43;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 44;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 58;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 59;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 60;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 61;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 65;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 66;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 67;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 68;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 69;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 70;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 73;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 77;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 78;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 79;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 80;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 81;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 84;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 85;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 91;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 93;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 99;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 102;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 105;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 110;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 111;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 114;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 115;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 124;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+        NEMOparserTokenManager.curChar = 1;\r
+//        System.out.println("jjMoveStringLiteralDfa0_0" + method.invoke(class1));\r
+        Assert.assertTrue((Integer) method.invoke(class1) != 0);\r
+    }\r
+\r
+    @Test\r
+    public void testjjMoveStringLiteralDfa1_0() throws Exception{\r
+        Method method = class1.getDeclaredMethod("jjMoveStringLiteralDfa1_0",new Class[]{long.class});\r
+        method.setAccessible(true);\r
 \r
-        simpleCharStream = new SimpleCharStream(new Reader() {\r
-            @Override\r
-            public int read(char[] cbuf, int off, int len) throws IOException {\r
-                return 0;\r
-            }\r
+        PowerMockito.mockStatic(SimpleCharStream.class);\r
+        PowerMockito.when(SimpleCharStream.readChar())\r
+                .thenReturn((char) 0)\r
+                .thenReturn((char) 38)\r
+                .thenReturn((char) 61)\r
+                .thenReturn((char) 61)\r
+                .thenReturn((char) 61)\r
+                .thenReturn((char) 69)\r
+                .thenReturn((char) 77)\r
+                .thenReturn((char) 80)\r
+                .thenReturn((char) 82)\r
+                .thenReturn((char) 97)\r
+                .thenReturn((char) 99)\r
+                .thenReturn((char) 101)\r
+                .thenReturn((char) 108)\r
+                .thenReturn((char) 110)\r
+                .thenReturn((char) 111)\r
+                .thenReturn((char) 112)\r
+                .thenReturn((char) 114)\r
+                .thenReturn((char) 116)\r
+                .thenReturn((char) 117)\r
+                .thenReturn((char) 121)\r
+                .thenReturn((char) 124);\r
+\r
+        //case default\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 0);\r
+        //case 38 and so on\r
+//        System.out.println("0x8000L" + method.invoke(class1, 0x1000L));\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x1000L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 38);\r
+//        System.out.println("0x8000L" + method.invoke(class1, 0x8000L));\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x8000L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 61);\r
+//        System.out.println("0x8000L" + method.invoke(class1,0x40000L));\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x40000L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 61);\r
+//        System.out.println("0x8000L" + method.invoke(class1,0x80000L));\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x80000L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 61);\r
+//        System.out.println("0x8000L" + method.invoke(class1,0L));\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 69);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 77);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 80);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 82);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 97);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 99);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 101);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 108);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 110);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 111);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 112);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 114);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 116);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 117);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 121);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0L) == 2);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 124);\r
+    }\r
+\r
+    @Test\r
+    public void testjjMoveStringLiteralDfa2_0() throws Exception{\r
+        Method method = class1.getDeclaredMethod("jjMoveStringLiteralDfa2_0",new Class[]{\r
+                long.class,\r
+                long.class\r
+        });\r
+        method.setAccessible(true);\r
+\r
+        PowerMockito.mockStatic(SimpleCharStream.class);\r
+        PowerMockito.when(SimpleCharStream.readChar())\r
+                .thenReturn((char) 0)\r
+                .thenReturn((char) 68)\r
+                .thenReturn((char) 69)\r
+                .thenReturn((char) 76)\r
+                .thenReturn((char) 80)\r
+                .thenReturn((char) 97)\r
+                .thenReturn((char) 100)\r
+                .thenReturn((char) 101)\r
+                .thenReturn((char) 103)\r
+                .thenReturn((char) 105)\r
+                .thenReturn((char) 110)\r
+                .thenReturn((char) 111)\r
+                .thenReturn((char) 112)\r
+                .thenReturn((char) 114)\r
+                .thenReturn((char) 116);\r
+\r
+        //case default\r
+//        System.out.println("0x8000L" + method.invoke(class1, 1L, 1L));\r
+        Assert.assertTrue((Integer)method.invoke(class1,1L,1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 0);\r
+        //case others\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 68);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 69);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 76);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 80);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 97);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 100);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 101);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 103);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 105);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 110);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 111);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 112);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 114);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 3);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 116);\r
+\r
+    }\r
+\r
+    @Test\r
+    public void testjjMoveStringLiteralDfa3_0() throws Exception{\r
+        Method method = class1.getDeclaredMethod("jjMoveStringLiteralDfa3_0",new Class[]{\r
+                long.class,\r
+                long.class\r
+        });\r
+        method.setAccessible(true);\r
+\r
+        PowerMockito.mockStatic(SimpleCharStream.class);\r
+        PowerMockito.when(SimpleCharStream.readChar())\r
+                .thenReturn((char) 0)\r
+                .thenReturn((char) 65)\r
+                .thenReturn((char) 69)\r
+                .thenReturn((char) 79)\r
+                .thenReturn((char) 99)\r
+                .thenReturn((char) 100)\r
+                .thenReturn((char) 101)\r
+                .thenReturn((char) 103)\r
+                .thenReturn((char) 105)\r
+                .thenReturn((char) 109)\r
+                .thenReturn((char) 110)\r
+                .thenReturn((char) 111)\r
+                .thenReturn((char) 112)\r
+                .thenReturn((char) 114)\r
+                .thenReturn((char) 116)\r
+                .thenReturn((char) 119);\r
+\r
+        //case default\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 0);\r
+        //case others\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 65);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 69);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 79);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 99);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 100);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 101);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 103);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 105);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 109);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 110);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 111);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 112);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 114);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 116);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 4);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 119);\r
+\r
+    }\r
+\r
+    @Test\r
+    public void testjjMoveStringLiteralDfa4_0() throws Exception{\r
+        Method method = class1.getDeclaredMethod("jjMoveStringLiteralDfa4_0",new Class[]{\r
+                long.class,\r
+                long.class\r
+        });\r
+        method.setAccessible(true);\r
+\r
+        PowerMockito.mockStatic(SimpleCharStream.class);\r
+        PowerMockito.when(SimpleCharStream.readChar())\r
+                .thenReturn((char) 0)\r
+                .thenReturn((char) 77)\r
+                .thenReturn((char) 82)\r
+                .thenReturn((char) 84)\r
+                .thenReturn((char) 97)\r
+                .thenReturn((char) 101)\r
+//                .thenReturn((char) 101)\r
+                .thenReturn((char) 103)\r
+                .thenReturn((char) 104)\r
+//                .thenReturn((char) 104)\r
+                .thenReturn((char) 105)\r
+//                .thenReturn((char) 110)\r
+                .thenReturn((char) 110)\r
+                .thenReturn((char) 111)\r
+                .thenReturn((char) 114)\r
+//                .thenReturn((char) 115)\r
+//                .thenReturn((char) 115)\r
+                .thenReturn((char) 115)\r
+                .thenReturn((char) 121);\r
+\r
+        //case default:\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 0);\r
+        //case others\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 77);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 82);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 84);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 97);\r
+//        Assert.assertTrue((Integer) method.invoke(class1, 0x40000000000000L, 0x40000000000000L) == 5);\r
+//        System.out.println("0x40000000000000L" + method.invoke(class1, 0x40000000000000L, 0x40000000000000L));\r
+//        Assert.assertTrue(NEMOparserTokenManager.curChar == 101);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 101);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 103);\r
+//        System.out.println("0x40000000000000L" + method.invoke(class1, 0x1000000000L, 0x1000000000L));\r
+//        Assert.assertTrue(NEMOparserTokenManager.curChar == 104);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 104);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 105);\r
+//        System.out.println("0x40000000000000L" + method.invoke(class1, 0x200000000000L, 0x200000000000L));\r
+//        Assert.assertTrue(NEMOparserTokenManager.curChar == 110);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 110);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 111);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 114);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 115);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 5);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 121);\r
+    }\r
+\r
+    @Test\r
+    public void testjjMoveStringLiteralDfa5_0() throws Exception{\r
+        Method method = class1.getDeclaredMethod("jjMoveStringLiteralDfa5_0",new Class[]{\r
+                long.class,\r
+                long.class\r
+        });\r
+        method.setAccessible(true);\r
 \r
-            @Override\r
-            public void close() throws IOException {\r
+        PowerMockito.mockStatic(SimpleCharStream.class);\r
+        PowerMockito.when(SimpleCharStream.readChar())\r
+                .thenReturn((char) 0)\r
+                .thenReturn((char) 69)\r
+                .thenReturn((char) 69)\r
+                .thenReturn((char) 69)\r
+                .thenReturn((char) 84)\r
+                .thenReturn((char) 97)\r
+                .thenReturn((char) 99)\r
+                .thenReturn((char) 100)\r
+                .thenReturn((char) 101)\r
+                .thenReturn((char) 103)\r
+                .thenReturn((char) 105)\r
+                .thenReturn((char) 110)\r
+                .thenReturn((char) 111)\r
+                .thenReturn((char) 114)\r
+                .thenReturn((char) 116)\r
+                .thenReturn((char) 116);\r
+\r
+\r
+        //case default:\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 0);\r
+        //case others\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x2000000L, 0x2000000L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 69);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x10000000L, 0x10000000L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 69);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x8000000L, 0x8000000L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 69);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x4000000L, 0x4000000L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 84);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 97);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 99);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 100);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 101);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 103);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 105);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x10000000000L, 0x10000000000L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 110);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 111);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 114);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x4000000000L, 0x4000000000L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 116);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 6);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 116);\r
+    }\r
+\r
+    @Test\r
+    public void testjjMoveStringLiteralDfa6_0() throws Exception{\r
+        Method method = class1.getDeclaredMethod("jjMoveStringLiteralDfa6_0",new Class[]{\r
+                long.class,\r
+                long.class\r
+        });\r
+        method.setAccessible(true);\r
+\r
+        PowerMockito.mockStatic(SimpleCharStream.class);\r
+        PowerMockito.when(SimpleCharStream.readChar())\r
+                .thenReturn((char) 0)\r
+                .thenReturn((char) 99)\r
+                .thenReturn((char) 100)\r
+                .thenReturn((char) 101)\r
+                .thenReturn((char) 105)\r
+                .thenReturn((char) 110)\r
+                .thenReturn((char) 114)\r
+                .thenReturn((char) 116);\r
+\r
+        //case default\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 7);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 0);\r
+        //case others\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 7);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 99);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 7);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 100);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 7);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 101);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 7);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 105);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x80000000L, 0x80000000L) == 7);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 110);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 7);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 114);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 7);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 116);\r
+\r
+    }\r
+\r
+    @Test\r
+    public void testjjMoveStringLiteralDfa7_0() throws Exception{\r
+        Method method = class1.getDeclaredMethod("jjMoveStringLiteralDfa7_0",new Class[]{\r
+                long.class,\r
+                long.class\r
+        });\r
+        method.setAccessible(true);\r
+\r
+        PowerMockito.mockStatic(SimpleCharStream.class);\r
+        PowerMockito.when(SimpleCharStream.readChar())\r
+                .thenReturn((char) 0)\r
+                .thenReturn((char) 101)\r
+                .thenReturn((char) 105)\r
+                .thenReturn((char) 111)\r
+                .thenReturn((char) 115)\r
+                .thenReturn((char) 116)\r
+                .thenReturn((char) 121)\r
+                .thenReturn((char) 121);\r
+\r
+        //case default:\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 8);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 0);\r
+\r
+        //case others:\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 8);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 101);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 8);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 105);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 8);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 111);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x400000000L, 0x400000000L) == 8);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 115);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 8);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 116);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x100000000L, 0x100000000L) == 8);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 121);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x80000000000L, 0x80000000000L) == 8);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 121);\r
+    }\r
+\r
+    @Test\r
+    public void testjjMoveStringLiteralDfa8_0() throws Exception{\r
+        Method method = class1.getDeclaredMethod("jjMoveStringLiteralDfa8_0",new Class[]{\r
+                long.class,\r
+                long.class\r
+        });\r
+        method.setAccessible(true);\r
+\r
+        PowerMockito.mockStatic(SimpleCharStream.class);\r
+        PowerMockito.when(SimpleCharStream.readChar())\r
+                .thenReturn((char) 0)\r
+                .thenReturn((char) 105)\r
+                .thenReturn((char) 108)\r
+                .thenReturn((char) 110)\r
+                .thenReturn((char) 110)\r
+                .thenReturn((char) 110)\r
+                .thenReturn((char) 111);\r
+\r
+        //case default:\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 9);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 0);\r
+\r
+        //case others\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 9);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 105);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x8000000000000L, 0x8000000000000L) == 9);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 108);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x2000000000L, 0x2000000000L) == 9);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 110);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x8000000000L, 0x8000000000L) == 9);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 110);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 9);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 110);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 9);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 111);\r
+    }\r
+\r
+    @Test\r
+    public void testjjMoveStringLiteralDfa9_0() throws Exception{\r
+        Method method = class1.getDeclaredMethod("jjMoveStringLiteralDfa9_0",new Class[]{\r
+                long.class,\r
+                long.class\r
+        });\r
+        method.setAccessible(true);\r
+\r
+        PowerMockito.mockStatic(SimpleCharStream.class);\r
+        PowerMockito.when(SimpleCharStream.readChar())\r
+                .thenReturn((char) 0)\r
+                .thenReturn((char) 110)\r
+                .thenReturn((char) 110)\r
+                .thenReturn((char) 111)\r
+                .thenReturn((char) 115);\r
+\r
+        //case default:\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 10);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 0);\r
+\r
+        //case others\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x200000000L, 0x200000000L) == 10);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 110);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 10);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 110);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 10);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 111);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 10);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 115);\r
+    }\r
+\r
+    @Test\r
+    public void testjjMoveStringLiteralDfa10_0() throws Exception {\r
+        Method method = class1.getDeclaredMethod("jjMoveStringLiteralDfa10_0", new Class[]{\r
+                long.class,\r
+                long.class\r
+        });\r
+        method.setAccessible(true);\r
+\r
+        PowerMockito.mockStatic(SimpleCharStream.class);\r
+        PowerMockito.when(SimpleCharStream.readChar())\r
+                .thenReturn((char) 0)\r
+                .thenReturn((char) 110)\r
+                .thenReturn((char) 115);\r
+\r
+        //case default:\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 11);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 0);\r
+\r
+        //case others\r
+        Assert.assertTrue((Integer) method.invoke(class1, 0x100000000000L, 0x100000000000L) == 11);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 110);\r
+        Assert.assertTrue((Integer) method.invoke(class1, 1L, 1L) == 11);\r
+        Assert.assertTrue(NEMOparserTokenManager.curChar == 115);\r
+    }\r
+\r
+    @Test\r
+    public void testjjStartNfaWithStates_0() throws Exception {\r
+    }\r
+\r
+    @Test\r
+    public void testjjMoveNfa_0() throws Exception {\r
+    }\r
+\r
+    @Test\r
+    public void testjjCheckNAdd() throws Exception {\r
+        Field field = class1.getDeclaredField("jjrounds");\r
+        field.setAccessible(true);\r
+        Field field1 = class1.getDeclaredField("jjround");\r
+        field1.setAccessible(true);\r
 \r
-            }\r
-        }, 1, 1, 1);\r
-//        System.out.println("BeginToken" + SimpleCharStream.BeginToken());\r
+        int state  = 1;\r
+        int jjrounds[] = new int[205];\r
+        jjrounds[0] = 1;\r
+        int jjround = 1;\r
 \r
-//        System.out.println(SimpleCharStream.BeginToken());\r
-//        NEMOparserTokenManager.getNextToken();\r
     }\r
 }
\ No newline at end of file
index 126a681e89f24d5de3fc0596c1ce6427935cb081..02a5fd223f5760f456dc75f2838b8f40ab3e6e77 100644 (file)
-/*\r
- * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 5.0 */\r
-/* JavaCCOptions:STATIC=true,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */\r
-package user.vnspacemanager.languagestyle.NEMOParse;\r
-\r
-import junit.framework.TestCase;\r
-import org.junit.Assert;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.opendaylight.nemo.user.vnspacemanager.languagestyle.NEMOParse.SimpleCharStream;\r
-\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.io.Reader;\r
-\r
-import static org.junit.Assert.*;\r
-import static org.mockito.Mockito.*;\r
-/**\r
- * Created by zhangmeng on 2015/12/16.\r
- */\r
-public class SimpleCharStreamTest extends TestCase {\r
-    private SimpleCharStream simpleCharStream;\r
-    private Reader reader;\r
-    private InputStream inputStream;\r
-    private Reader reader_empty;\r
-    @Before\r
-    public void setUp() throws Exception {\r
-        reader = new Reader() {\r
-            @Override\r
-            public int read(char[] cbuf, int off, int len) throws IOException {\r
-                return 0;\r
-            }\r
-\r
-            @Override\r
-            public void close() throws IOException {\r
-\r
-            }\r
-        };\r
-        inputStream = new InputStream() {\r
-            @Override\r
-            public int read() throws IOException {\r
-                return 0;\r
-            }\r
-        };\r
-        reader_empty = null;\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testInit()throws  Exception{\r
-        InputStream inputStream_empty = null;\r
-\r
-        simpleCharStream = new SimpleCharStream(reader,1,1,1);\r
-        Assert.assertTrue(simpleCharStream != null);\r
-        simpleCharStream.ReInit(reader_empty, 1, 1, 1);\r
-\r
-        simpleCharStream = new SimpleCharStream(reader,1,1);\r
-        Assert.assertTrue(simpleCharStream != null);\r
-        simpleCharStream.ReInit(reader_empty, 1, 1);\r
-\r
-        simpleCharStream = new SimpleCharStream(reader);\r
-        Assert.assertTrue(simpleCharStream != null);\r
-        simpleCharStream.ReInit(reader_empty);\r
-\r
-        simpleCharStream = new SimpleCharStream(inputStream,null,1,1,1);\r
-        Assert.assertTrue(simpleCharStream != null);\r
-        simpleCharStream.ReInit(inputStream, null, 1, 1, 1);\r
-        simpleCharStream.ReInit(reader_empty);\r
-\r
-        simpleCharStream = new SimpleCharStream(inputStream,null,1,1);\r
-        Assert.assertTrue(simpleCharStream != null);\r
-        simpleCharStream.ReInit(inputStream, null, 1, 1);\r
-        simpleCharStream.ReInit(reader_empty);\r
-\r
-        simpleCharStream = new SimpleCharStream(inputStream,1,1);\r
-        Assert.assertTrue(simpleCharStream != null);\r
-        simpleCharStream.ReInit(inputStream, 1, 1);\r
-        simpleCharStream.ReInit(reader_empty);\r
-\r
-        simpleCharStream = new SimpleCharStream(inputStream,null);\r
-        Assert.assertTrue(simpleCharStream != null);\r
-        simpleCharStream.ReInit(inputStream, null);\r
-        simpleCharStream.ReInit(reader_empty);\r
-\r
-        simpleCharStream = new SimpleCharStream(inputStream);\r
-        Assert.assertTrue(simpleCharStream != null);\r
-        simpleCharStream.ReInit(inputStream);\r
-        simpleCharStream.ReInit(reader_empty);\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testSetTabSize() throws Exception {\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testGetTabSize() throws Exception {\r
-\r
-    }\r
-\r
-    @Test\r
-    public void testBeginToken_ReadChar_FillBuff_ExpandBuff() throws Exception {\r
-        Assert.assertTrue(simpleCharStream == null);\r
-        simpleCharStream = new SimpleCharStream(reader,1,1,1);\r
-        SimpleCharStream.BeginToken();\r
-        Assert.assertTrue(simpleCharStream != null);\r
-\r
-//        Assert.assertTrue(SimpleCharStream.getColumn() == 0);\r
-//        Assert.assertTrue(SimpleCharStream.getLine() == 0);\r
-        Assert.assertTrue(SimpleCharStream.getEndColumn() != 0);\r
-        Assert.assertTrue(SimpleCharStream.getEndLine() != 0);\r
-        Assert.assertTrue(SimpleCharStream.getBeginColumn() != 0);\r
-        Assert.assertTrue(SimpleCharStream.getBeginLine() != 0);\r
-\r
-        SimpleCharStream.backup(1);\r
-        Assert.assertTrue(SimpleCharStream.GetImage() != null);\r
-        Assert.assertTrue(SimpleCharStream.GetSuffix(1).length != 0);\r
-        SimpleCharStream.adjustBeginLineColumn(1, 1);\r
-        SimpleCharStream.Done();\r
-        simpleCharStream.ReInit(reader_empty);\r
-\r
-    }\r
-\r
-\r
-\r
+/*
+ * Copyright (c) 2015 Huawei, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 5.0 */
+/* JavaCCOptions:STATIC=true,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
+package user.vnspacemanager.languagestyle.NEMOParse;
+
+import junit.framework.TestCase;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.opendaylight.nemo.user.vnspacemanager.languagestyle.NEMOParse.SimpleCharStream;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.lang.reflect.Field;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
+/**
+ * Created by zhangmeng on 2015/12/16.
+ */
+public class SimpleCharStreamTest extends TestCase {
+    private SimpleCharStream simpleCharStream;
+    private Reader reader;
+    private InputStream inputStream;
+    private Reader reader_empty;
+    private Class<SimpleCharStream> class1 ;
+    private Field field;
+    @Before
+    public void setUp() throws Exception {
+        class1 = SimpleCharStream.class;
+        field = class1.getDeclaredField("inputStream");
+        field.setAccessible(true);
+        field.set(class1,null);
+        reader = new Reader() {
+            @Override
+            public int read(char[] cbuf, int off, int len) throws IOException {
+                return 0;
+            }
+
+            @Override
+            public void close() throws IOException {
+
+            }
+        };
+        inputStream = new InputStream() {
+            @Override
+            public int read() throws IOException {
+                return 0;
+            }
+        };
+        reader_empty = null;
+
+    }
+
+    @Test
+    public void testInit()throws  Exception{
+        InputStream inputStream_empty = null;
+
+        simpleCharStream = new SimpleCharStream(reader,1,1,1);
+        Assert.assertTrue(simpleCharStream != null);
+        simpleCharStream.ReInit(reader_empty, 1, 1, 1);
+
+        simpleCharStream = new SimpleCharStream(reader,1,1);
+        Assert.assertTrue(simpleCharStream != null);
+        simpleCharStream.ReInit(reader_empty, 1, 1);
+
+        simpleCharStream = new SimpleCharStream(reader);
+        Assert.assertTrue(simpleCharStream != null);
+        simpleCharStream.ReInit(reader_empty);
+
+        simpleCharStream = new SimpleCharStream(inputStream,null,1,1,1);
+        Assert.assertTrue(simpleCharStream != null);
+        simpleCharStream.ReInit(inputStream, null, 1, 1, 1);
+        simpleCharStream.ReInit(reader_empty);
+
+        simpleCharStream = new SimpleCharStream(inputStream,null,1,1);
+        Assert.assertTrue(simpleCharStream != null);
+        simpleCharStream.ReInit(inputStream, null, 1, 1);
+        simpleCharStream.ReInit(reader_empty);
+
+        simpleCharStream = new SimpleCharStream(inputStream,1,1);
+        Assert.assertTrue(simpleCharStream != null);
+        simpleCharStream.ReInit(inputStream, 1, 1);
+        simpleCharStream.ReInit(reader_empty);
+
+        simpleCharStream = new SimpleCharStream(inputStream,null);
+        Assert.assertTrue(simpleCharStream != null);
+        simpleCharStream.ReInit(inputStream, null);
+        simpleCharStream.ReInit(reader_empty);
+
+        simpleCharStream = new SimpleCharStream(inputStream);
+        Assert.assertTrue(simpleCharStream != null);
+        simpleCharStream.ReInit(inputStream);
+        simpleCharStream.ReInit(reader_empty);
+
+    }
+
+    @Test
+    public void testSetTabSize() throws Exception {
+
+    }
+
+    @Test
+    public void testGetTabSize() throws Exception {
+
+    }
+
+    @Test
+    public void testBeginToken_ReadChar_FillBuff_ExpandBuff() throws Exception {
+        Assert.assertTrue(simpleCharStream == null);
+        simpleCharStream = new SimpleCharStream(reader,1,1,1);
+        SimpleCharStream.BeginToken();
+        Assert.assertTrue(simpleCharStream != null);
+
+//        Assert.assertTrue(SimpleCharStream.getColumn() == 0);
+//        Assert.assertTrue(SimpleCharStream.getLine() == 0);
+        Assert.assertTrue(SimpleCharStream.getEndColumn() != 0);
+        Assert.assertTrue(SimpleCharStream.getEndLine() != 0);
+        Assert.assertTrue(SimpleCharStream.getBeginColumn() != 0);
+        Assert.assertTrue(SimpleCharStream.getBeginLine() != 0);
+
+        SimpleCharStream.backup(1);
+        Assert.assertTrue(SimpleCharStream.GetImage() != null);
+        Assert.assertTrue(SimpleCharStream.GetSuffix(1).length != 0);
+        SimpleCharStream.adjustBeginLineColumn(1, 1);
+        SimpleCharStream.Done();
+        simpleCharStream.ReInit(reader_empty);
+
+    }
+
+
+
 }
\ No newline at end of file