Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Side by Side Diff: test/cctest/test-parsing.cc

Issue 7739020: Rename scanner.* to scanner-character-streams.* and scanner-base.* to scanner.* (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: rename scanner-base.* to scanner.* Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/v8conversions.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 13 matching lines...) Expand all
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 "v8.h"
33 33
34 #include "cctest.h"
35 #include "execution.h"
34 #include "isolate.h" 36 #include "isolate.h"
37 #include "parser.h"
38 #include "preparser.h"
39 #include "scanner-character-streams.h"
35 #include "token.h" 40 #include "token.h"
36 #include "scanner.h"
37 #include "parser.h"
38 #include "utils.h" 41 #include "utils.h"
39 #include "execution.h"
40 #include "preparser.h"
41 #include "cctest.h"
42 42
43 TEST(ScanKeywords) { 43 TEST(ScanKeywords) {
44 struct KeywordToken { 44 struct KeywordToken {
45 const char* keyword; 45 const char* keyword;
46 i::Token::Value token; 46 i::Token::Value token;
47 }; 47 };
48 48
49 static const KeywordToken keywords[] = { 49 static const KeywordToken keywords[] = {
50 #define KEYWORD(t, s, d) { s, i::Token::t }, 50 #define KEYWORD(t, s, d) { s, i::Token::t },
51 TOKEN_LIST(IGNORE_TOKEN, KEYWORD) 51 TOKEN_LIST(IGNORE_TOKEN, KEYWORD)
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 TestScanRegExp("/[\\u12]/flipperwald", "[\\u12]"); 699 TestScanRegExp("/[\\u12]/flipperwald", "[\\u12]");
700 TestScanRegExp("/[\\u123]/flipperwald", "[\\u123]"); 700 TestScanRegExp("/[\\u123]/flipperwald", "[\\u123]");
701 // Escaped ']'s wont end the character class. 701 // Escaped ']'s wont end the character class.
702 TestScanRegExp("/[\\]/]/flipperwald", "[\\]/]"); 702 TestScanRegExp("/[\\]/]/flipperwald", "[\\]/]");
703 // Escaped slashes are not terminating. 703 // Escaped slashes are not terminating.
704 TestScanRegExp("/\\//flipperwald", "\\/"); 704 TestScanRegExp("/\\//flipperwald", "\\/");
705 // Starting with '=' works too. 705 // Starting with '=' works too.
706 TestScanRegExp("/=/", "="); 706 TestScanRegExp("/=/", "=");
707 TestScanRegExp("/=?/", "=?"); 707 TestScanRegExp("/=?/", "=?");
708 } 708 }
OLDNEW
« no previous file with comments | « src/v8conversions.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698