Package com.alibaba.json.bvt.parser

Source Code of com.alibaba.json.bvt.parser.JSONLexerTest_8

package com.alibaba.json.bvt.parser;

import junit.framework.TestCase;

import com.alibaba.fastjson.parser.JSONReaderScanner;
import com.alibaba.fastjson.parser.JSONScanner;
import com.alibaba.fastjson.parser.JSONToken;

public class JSONLexerTest_8 extends TestCase {

    public void test_ident() throws Exception {
        JSONScanner lexer = new JSONScanner("123");
        lexer.nextIdent();
        org.junit.Assert.assertEquals(JSONToken.LITERAL_INT, lexer.token());
        lexer.close();
    }

    public void test_ident_2() throws Exception {
        JSONScanner lexer = new JSONScanner("\uFEFF123");
        lexer.nextIdent();
        org.junit.Assert.assertEquals(JSONToken.LITERAL_INT, lexer.token());
        lexer.close();
    }
   
    public void test_ident_3() throws Exception {
        JSONReaderScanner lexer = new JSONReaderScanner("\uFEFF123");
        lexer.nextIdent();
        org.junit.Assert.assertEquals(JSONToken.LITERAL_INT, lexer.token());
        lexer.close();
    }
}
TOP

Related Classes of com.alibaba.json.bvt.parser.JSONLexerTest_8

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.