blob: 48e170ed9f1c2e767adf31893d324f4ed2405c5e [file] [log] [blame]
This test verifies that keywords and reserved words match those specified in ES5 section 7.6.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS classifyIdentifier("x") is "identifier"
PASS classifyIdentifier("id") is "identifier"
PASS classifyIdentifier("identifier") is "identifier"
PASS classifyIdentifier("keyword") is "identifier"
PASS classifyIdentifier("strict") is "identifier"
PASS classifyIdentifier("use") is "identifier"
PASS classifyIdentifier("abstract") is "identifier"
PASS classifyIdentifier("boolean") is "identifier"
PASS classifyIdentifier("byte") is "identifier"
PASS classifyIdentifier("char") is "identifier"
PASS classifyIdentifier("double") is "identifier"
PASS classifyIdentifier("final") is "identifier"
PASS classifyIdentifier("float") is "identifier"
PASS classifyIdentifier("goto") is "identifier"
PASS classifyIdentifier("int") is "identifier"
PASS classifyIdentifier("long") is "identifier"
PASS classifyIdentifier("native") is "identifier"
PASS classifyIdentifier("short") is "identifier"
PASS classifyIdentifier("synchronized") is "identifier"
PASS classifyIdentifier("throws") is "identifier"
PASS classifyIdentifier("transient") is "identifier"
PASS classifyIdentifier("volatile") is "identifier"
PASS classifyIdentifier("break") is "keyword"
PASS classifyIdentifier("case") is "keyword"
PASS classifyIdentifier("catch") is "keyword"
PASS classifyIdentifier("continue") is "keyword"
PASS classifyIdentifier("debugger") is "keyword"
PASS classifyIdentifier("default") is "keyword"
PASS classifyIdentifier("delete") is "keyword"
PASS classifyIdentifier("do") is "keyword"
PASS classifyIdentifier("else") is "keyword"
PASS classifyIdentifier("finally") is "keyword"
PASS classifyIdentifier("for") is "keyword"
PASS classifyIdentifier("function") is "keyword"
PASS classifyIdentifier("if") is "keyword"
PASS classifyIdentifier("in") is "keyword"
PASS classifyIdentifier("instanceof") is "keyword"
PASS classifyIdentifier("new") is "keyword"
PASS classifyIdentifier("return") is "keyword"
PASS classifyIdentifier("switch") is "keyword"
PASS classifyIdentifier("this") is "keyword"
PASS classifyIdentifier("throw") is "keyword"
PASS classifyIdentifier("try") is "keyword"
PASS classifyIdentifier("typeof") is "keyword"
PASS classifyIdentifier("var") is "keyword"
PASS classifyIdentifier("void") is "keyword"
PASS classifyIdentifier("while") is "keyword"
PASS classifyIdentifier("with") is "keyword"
PASS classifyIdentifier("class") is "keyword"
PASS classifyIdentifier("const") is "keyword"
PASS classifyIdentifier("enum") is "keyword"
PASS classifyIdentifier("export") is "keyword"
PASS classifyIdentifier("extends") is "keyword"
PASS classifyIdentifier("import") is "keyword"
PASS classifyIdentifier("super") is "keyword"
PASS classifyIdentifier("implements") is "strict"
PASS classifyIdentifier("interface") is "strict"
PASS classifyIdentifier("package") is "strict"
PASS classifyIdentifier("private") is "strict"
PASS classifyIdentifier("protected") is "strict"
PASS classifyIdentifier("public") is "strict"
PASS classifyIdentifier("static") is "strict"
PASS isKeyword("let") is false
PASS isStrictKeyword("let") is true
PASS isKeyword("yield") is false
PASS isStrictKeyword("yield") is true
PASS successfullyParsed is true
TEST COMPLETE