Examples of scanFieldSymbol()


Examples of com.alibaba.fastjson.parser.JSONScanner.scanFieldSymbol()

*/
public class JSONScannerTest_scanSymbol extends TestCase {

    public void test_0() throws Exception {
        JSONScanner lexer = new JSONScanner("\"value\":\"aa\\n\"");
        String text = lexer.scanFieldSymbol("\"value\":".toCharArray(), new SymbolTable());
        Assert.assertNull(text);
        Assert.assertEquals(JSONScanner.NOT_MATCH, lexer.matchStat);
    }

    public void test_1() throws Exception {
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONScanner.scanFieldSymbol()

        Assert.assertEquals(JSONScanner.NOT_MATCH, lexer.matchStat);
    }

    public void test_1() throws Exception {
        JSONScanner lexer = new JSONScanner("\"value\":\"aa\"},");
        String text = lexer.scanFieldSymbol("\"value\":".toCharArray(), new SymbolTable());
        Assert.assertEquals("aa", text);
        Assert.assertEquals(JSONScanner.END, lexer.matchStat);
        Assert.assertEquals(JSONToken.COMMA, lexer.token());
    }
   
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONScanner.scanFieldSymbol()

        Assert.assertEquals(JSONToken.COMMA, lexer.token());
    }
   
    public void test_2() throws Exception {
        JSONScanner lexer = new JSONScanner("\"value\":\"aa\"}]");
        String text = lexer.scanFieldSymbol("\"value\":".toCharArray(), new SymbolTable());
        Assert.assertEquals("aa", text);
        Assert.assertEquals(JSONScanner.END, lexer.matchStat);
        Assert.assertEquals(JSONToken.RBRACKET, lexer.token());
    }
   
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONScanner.scanFieldSymbol()

        Assert.assertEquals(JSONToken.RBRACKET, lexer.token());
    }
   
    public void test_3() throws Exception {
        JSONScanner lexer = new JSONScanner("\"value\":\"aa\"}}");
        String text = lexer.scanFieldSymbol("\"value\":".toCharArray(), new SymbolTable());
        Assert.assertEquals("aa", text);
        Assert.assertEquals(JSONScanner.END, lexer.matchStat);
        Assert.assertEquals(JSONToken.RBRACE, lexer.token());
    }
   
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONScanner.scanFieldSymbol()

        Assert.assertEquals(JSONToken.RBRACE, lexer.token());
    }
   
    public void test_4() throws Exception {
      JSONScanner lexer = new JSONScanner("\"value\":\"aa\"}");
      String text = lexer.scanFieldSymbol("\"value\":".toCharArray(), new SymbolTable());
      Assert.assertEquals("aa", text);
      Assert.assertEquals(JSONScanner.END, lexer.matchStat);
      Assert.assertEquals(JSONToken.EOF, lexer.token());
    }
   
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONScanner.scanFieldSymbol()

      Assert.assertEquals(JSONToken.EOF, lexer.token());
    }
   
    public void test_6() throws Exception {
      JSONScanner lexer = new JSONScanner("\"value\":\"aa\"}{");
      String text = lexer.scanFieldSymbol("\"value\":".toCharArray(), new SymbolTable());
      Assert.assertEquals(null, text);
      Assert.assertEquals(JSONScanner.NOT_MATCH, lexer.matchStat);
    }
   
    public void test_7() throws Exception {
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONScanner.scanFieldSymbol()

      Assert.assertEquals(JSONScanner.NOT_MATCH, lexer.matchStat);
    }
   
    public void test_7() throws Exception {
      JSONScanner lexer = new JSONScanner("\"value\":\"aa\"");
      String text = lexer.scanFieldSymbol("\"value\":".toCharArray(), new SymbolTable());
      Assert.assertEquals(null, text);
      Assert.assertEquals(JSONScanner.NOT_MATCH, lexer.matchStat);
    }
}
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONScanner.scanFieldSymbol()

*/
public class JSONScannerTest_scanSymbol extends TestCase {

    public void test_0() throws Exception {
        JSONScanner lexer = new JSONScanner("\"value\":\"aa\\n\"");
        String text = lexer.scanFieldSymbol("\"value\":".toCharArray(), new SymbolTable());
        Assert.assertNull(text);
        Assert.assertEquals(JSONScanner.NOT_MATCH, lexer.matchStat());
    }

    public void test_1() throws Exception {
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONScanner.scanFieldSymbol()

        Assert.assertEquals(JSONScanner.NOT_MATCH, lexer.matchStat());
    }

    public void test_1() throws Exception {
        JSONScanner lexer = new JSONScanner("\"value\":\"aa\"},");
        String text = lexer.scanFieldSymbol("\"value\":".toCharArray(), new SymbolTable());
        Assert.assertEquals("aa", text);
        Assert.assertEquals(JSONScanner.END, lexer.matchStat());
        Assert.assertEquals(JSONToken.COMMA, lexer.token());
    }
   
View Full Code Here

Examples of com.alibaba.fastjson.parser.JSONScanner.scanFieldSymbol()

        Assert.assertEquals(JSONToken.COMMA, lexer.token());
    }
   
    public void test_2() throws Exception {
        JSONScanner lexer = new JSONScanner("\"value\":\"aa\"}]");
        String text = lexer.scanFieldSymbol("\"value\":".toCharArray(), new SymbolTable());
        Assert.assertEquals("aa", text);
        Assert.assertEquals(JSONScanner.END, lexer.matchStat());
        Assert.assertEquals(JSONToken.RBRACKET, lexer.token());
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.