use of com.alibaba.fastjson.parser.JSONScanner in project fastjson by alibaba.
the class JSONScannerTest_symbol method test_10.
public void test_10() throws Exception {
SymbolTable symbolTable = new SymbolTable(512);
JSONScanner lexer = new JSONScanner("\"nick \\t name\"");
String symbol = lexer.scanSymbol(symbolTable, '"');
Assert.assertTrue("nick \t name" == symbol);
lexer.close();
}
use of com.alibaba.fastjson.parser.JSONScanner in project fastjson by alibaba.
the class JSONScannerTest_true method test_scan_true_11.
public void test_scan_true_11() throws Exception {
JSONScanner lexer = new JSONScanner("true\ta");
lexer.scanTrue();
}
use of com.alibaba.fastjson.parser.JSONScanner in project fastjson by alibaba.
the class JSONScannerTest_true method test_scan_true_4.
public void test_scan_true_4() throws Exception {
JSONException error = null;
try {
JSONScanner lexer = new JSONScanner("truz");
lexer.scanTrue();
} catch (JSONException e) {
error = e;
}
Assert.assertNotNull(error);
}
use of com.alibaba.fastjson.parser.JSONScanner in project fastjson by alibaba.
the class JSONScannerTest_true method test_scan_true_6.
public void test_scan_true_6() throws Exception {
JSONException error = null;
try {
JSONScanner lexer = new JSONScanner("true\"");
lexer.scanTrue();
} catch (JSONException e) {
error = e;
}
Assert.assertNotNull(error);
}
use of com.alibaba.fastjson.parser.JSONScanner in project fastjson by alibaba.
the class JSONScannerTest_true method test_scan_true_7.
public void test_scan_true_7() throws Exception {
JSONScanner lexer = new JSONScanner("true a");
lexer.scanTrue();
}
Aggregations