use of com.alibaba.fastjson.parser.JSONScanner in project fastjson by alibaba.
the class JSONScannerTest_colon method test_4.
public void test_4() throws Exception {
JSONScanner lexer = new JSONScanner("\t:\ttrue");
lexer.nextTokenWithColon();
Assert.assertEquals(JSONToken.TRUE, lexer.token());
}
use of com.alibaba.fastjson.parser.JSONScanner in project fastjson by alibaba.
the class JSONScannerTest_colon method test_f.
public void test_f() throws Exception {
JSONScanner lexer = new JSONScanner("\f:\btrue");
lexer.nextTokenWithColon();
Assert.assertEquals(JSONToken.TRUE, lexer.token());
}
use of com.alibaba.fastjson.parser.JSONScanner in project fastjson by alibaba.
the class JSONScannerTest_colon method test_6.
public void test_6() throws Exception {
JSONScanner lexer = new JSONScanner("\b:\btrue");
lexer.nextTokenWithColon();
Assert.assertEquals(JSONToken.TRUE, lexer.token());
}
use of com.alibaba.fastjson.parser.JSONScanner in project fastjson by alibaba.
the class JSONScannerTest_colon method test_7.
public void test_7() throws Exception {
JSONException error = null;
try {
JSONScanner lexer = new JSONScanner("true");
lexer.nextTokenWithColon();
} catch (JSONException e) {
error = e;
}
Assert.assertNotNull(error);
}
use of com.alibaba.fastjson.parser.JSONScanner in project fastjson by alibaba.
the class JSONScannerTest_colon method test_5.
public void test_5() throws Exception {
JSONScanner lexer = new JSONScanner("\t:\ftrue");
lexer.nextTokenWithColon();
Assert.assertEquals(JSONToken.TRUE, lexer.token());
}
Aggregations