1# Copyright 2013 the V8 project authors. All rights reserved.
2# Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions
6# are met:
7# 1.  Redistributions of source code must retain the above copyright
8#     notice, this list of conditions and the following disclaimer.
9# 2.  Redistributions in binary form must reproduce the above copyright
10#     notice, this list of conditions and the following disclaimer in the
11#     documentation and/or other materials provided with the distribution.
12#
13# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
24This test verifies that keywords and reserved words match those specified in ES5 section 7.6.
25
26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
27
28
29PASS classifyIdentifier("x") is "identifier"
30PASS classifyIdentifier("id") is "identifier"
31PASS classifyIdentifier("identifier") is "identifier"
32PASS classifyIdentifier("keyword") is "identifier"
33PASS classifyIdentifier("strict") is "identifier"
34PASS classifyIdentifier("use") is "identifier"
35PASS classifyIdentifier("abstract") is "identifier"
36PASS classifyIdentifier("boolean") is "identifier"
37PASS classifyIdentifier("byte") is "identifier"
38PASS classifyIdentifier("char") is "identifier"
39PASS classifyIdentifier("double") is "identifier"
40PASS classifyIdentifier("final") is "identifier"
41PASS classifyIdentifier("float") is "identifier"
42PASS classifyIdentifier("goto") is "identifier"
43PASS classifyIdentifier("int") is "identifier"
44PASS classifyIdentifier("long") is "identifier"
45PASS classifyIdentifier("native") is "identifier"
46PASS classifyIdentifier("short") is "identifier"
47PASS classifyIdentifier("synchronized") is "identifier"
48PASS classifyIdentifier("throws") is "identifier"
49PASS classifyIdentifier("transient") is "identifier"
50PASS classifyIdentifier("volatile") is "identifier"
51PASS classifyIdentifier("break") is "keyword"
52PASS classifyIdentifier("case") is "keyword"
53PASS classifyIdentifier("catch") is "keyword"
54PASS classifyIdentifier("continue") is "keyword"
55PASS classifyIdentifier("debugger") is "keyword"
56PASS classifyIdentifier("default") is "keyword"
57PASS classifyIdentifier("delete") is "keyword"
58PASS classifyIdentifier("do") is "keyword"
59PASS classifyIdentifier("else") is "keyword"
60PASS classifyIdentifier("finally") is "keyword"
61PASS classifyIdentifier("for") is "keyword"
62PASS classifyIdentifier("function") is "keyword"
63PASS classifyIdentifier("if") is "keyword"
64PASS classifyIdentifier("in") is "keyword"
65PASS classifyIdentifier("instanceof") is "keyword"
66PASS classifyIdentifier("new") is "keyword"
67PASS classifyIdentifier("return") is "keyword"
68PASS classifyIdentifier("switch") is "keyword"
69PASS classifyIdentifier("this") is "keyword"
70PASS classifyIdentifier("throw") is "keyword"
71PASS classifyIdentifier("try") is "keyword"
72PASS classifyIdentifier("typeof") is "keyword"
73PASS classifyIdentifier("var") is "keyword"
74PASS classifyIdentifier("void") is "keyword"
75PASS classifyIdentifier("while") is "keyword"
76PASS classifyIdentifier("with") is "keyword"
77PASS classifyIdentifier("class") is "keyword"
78PASS classifyIdentifier("const") is "keyword"
79PASS classifyIdentifier("enum") is "keyword"
80PASS classifyIdentifier("export") is "keyword"
81PASS classifyIdentifier("extends") is "keyword"
82PASS classifyIdentifier("import") is "keyword"
83PASS classifyIdentifier("super") is "keyword"
84PASS classifyIdentifier("implements") is "strict"
85PASS classifyIdentifier("interface") is "strict"
86PASS classifyIdentifier("let") is "strict"
87PASS classifyIdentifier("package") is "strict"
88PASS classifyIdentifier("private") is "strict"
89PASS classifyIdentifier("protected") is "strict"
90PASS classifyIdentifier("public") is "strict"
91PASS classifyIdentifier("static") is "strict"
92PASS classifyIdentifier("yield") is "strict"
93PASS successfullyParsed is true
94
95TEST COMPLETE
96
97