OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 11 matching lines...) Expand all Loading... |
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include <stdlib.h> | 28 #include <stdlib.h> |
29 #include <stdio.h> | 29 #include <stdio.h> |
30 #include <string.h> | 30 #include <string.h> |
31 | 31 |
32 #include "v8.h" | 32 #include "src/v8.h" |
33 | 33 |
34 #include "cctest.h" | 34 #include "test/cctest/cctest.h" |
35 #include "compiler.h" | 35 #include "src/compiler.h" |
36 #include "execution.h" | 36 #include "src/execution.h" |
37 #include "isolate.h" | 37 #include "src/isolate.h" |
38 #include "objects.h" | 38 #include "src/objects.h" |
39 #include "parser.h" | 39 #include "src/parser.h" |
40 #include "preparser.h" | 40 #include "src/preparser.h" |
41 #include "scanner-character-streams.h" | 41 #include "src/scanner-character-streams.h" |
42 #include "token.h" | 42 #include "src/token.h" |
43 #include "utils.h" | 43 #include "src/utils.h" |
44 | 44 |
45 TEST(ScanKeywords) { | 45 TEST(ScanKeywords) { |
46 struct KeywordToken { | 46 struct KeywordToken { |
47 const char* keyword; | 47 const char* keyword; |
48 i::Token::Value token; | 48 i::Token::Value token; |
49 }; | 49 }; |
50 | 50 |
51 static const KeywordToken keywords[] = { | 51 static const KeywordToken keywords[] = { |
52 #define KEYWORD(t, s, d) { s, i::Token::t }, | 52 #define KEYWORD(t, s, d) { s, i::Token::t }, |
53 TOKEN_LIST(IGNORE_TOKEN, KEYWORD) | 53 TOKEN_LIST(IGNORE_TOKEN, KEYWORD) |
(...skipping 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2450 RunParserSyncTest(assignment_context_data, bad_statement_data_common, kError); | 2450 RunParserSyncTest(assignment_context_data, bad_statement_data_common, kError); |
2451 RunParserSyncTest(assignment_context_data, bad_statement_data_for_assignment, | 2451 RunParserSyncTest(assignment_context_data, bad_statement_data_for_assignment, |
2452 kError); | 2452 kError); |
2453 | 2453 |
2454 RunParserSyncTest(prefix_context_data, good_statement_data, kSuccess); | 2454 RunParserSyncTest(prefix_context_data, good_statement_data, kSuccess); |
2455 RunParserSyncTest(prefix_context_data, bad_statement_data_common, kError); | 2455 RunParserSyncTest(prefix_context_data, bad_statement_data_common, kError); |
2456 | 2456 |
2457 RunParserSyncTest(postfix_context_data, good_statement_data, kSuccess); | 2457 RunParserSyncTest(postfix_context_data, good_statement_data, kSuccess); |
2458 RunParserSyncTest(postfix_context_data, bad_statement_data_common, kError); | 2458 RunParserSyncTest(postfix_context_data, bad_statement_data_common, kError); |
2459 } | 2459 } |
OLD | NEW |