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

Side by Side Diff: runtime/vm/parser_test.cc

Issue 8509031: Revert r1380 that is breaking frog. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/resolver_test.cc » ('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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 5
6 #include "vm/ast_printer.h" 6 #include "vm/ast_printer.h"
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/longjump.h" 8 #include "vm/longjump.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/parser.h" 10 #include "vm/parser.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 "} \n"; 113 "} \n";
114 114
115 String& url = String::Handle(String::New("dart-test:Parser_TopLevel")); 115 String& url = String::Handle(String::New("dart-test:Parser_TopLevel"));
116 String& source = String::Handle(String::New(script_chars)); 116 String& source = String::Handle(String::New(script_chars));
117 Script& script = Script::Handle(Script::New(url, source, RawScript::kSource)); 117 Script& script = Script::Handle(Script::New(url, source, RawScript::kSource));
118 Library& lib = Library::ZoneHandle(Library::CoreLibrary()); 118 Library& lib = Library::ZoneHandle(Library::CoreLibrary());
119 119
120 script.Tokenize(String::Handle(String::New(""))); 120 script.Tokenize(String::Handle(String::New("")));
121 121
122 Parser::ParseCompilationUnit(lib, script); 122 Parser::ParseCompilationUnit(lib, script);
123 EXPECT(ClassFinalizer::FinalizeAllClasses()); 123 EXPECT(ClassFinalizer::FinalizePendingClasses());
124 CheckField(lib, "A", "f1", false, false); 124 CheckField(lib, "A", "f1", false, false);
125 CheckField(lib, "A", "f2", false, true); 125 CheckField(lib, "A", "f2", false, true);
126 CheckField(lib, "A", "f3", false, true); 126 CheckField(lib, "A", "f3", false, true);
127 CheckField(lib, "A", "f4", false, true); 127 CheckField(lib, "A", "f4", false, true);
128 CheckField(lib, "A", "s1", true, false); 128 CheckField(lib, "A", "s1", true, false);
129 CheckField(lib, "A", "s2", true, false); 129 CheckField(lib, "A", "s2", true, false);
130 // No field entries are added for static const fields. 130 // No field entries are added for static const fields.
131 String& fieldname = String::Handle(String::New("s3")); 131 String& fieldname = String::Handle(String::New("s3"));
132 const String& classname = String::Handle(String::NewSymbol("A")); 132 const String& classname = String::Handle(String::NewSymbol("A"));
133 const Class& cls = Class::Handle(lib.LookupClass(classname)); 133 const Class& cls = Class::Handle(lib.LookupClass(classname));
(...skipping 23 matching lines...) Expand all
157 "} \n"; 157 "} \n";
158 158
159 String& url = String::Handle(String::New("dart-test:Parser_TopLevel")); 159 String& url = String::Handle(String::New("dart-test:Parser_TopLevel"));
160 String& source = String::Handle(String::New(script_chars)); 160 String& source = String::Handle(String::New(script_chars));
161 Script& script = Script::Handle(Script::New(url, source, RawScript::kSource)); 161 Script& script = Script::Handle(Script::New(url, source, RawScript::kSource));
162 Library& lib = Library::ZoneHandle(Library::CoreLibrary()); 162 Library& lib = Library::ZoneHandle(Library::CoreLibrary());
163 163
164 script.Tokenize(String::Handle(String::New(""))); 164 script.Tokenize(String::Handle(String::New("")));
165 165
166 Parser::ParseCompilationUnit(lib, script); 166 Parser::ParseCompilationUnit(lib, script);
167 EXPECT(ClassFinalizer::FinalizeAllClasses()); 167 EXPECT(ClassFinalizer::FinalizePendingClasses());
168 168
169 DumpFunction(lib, "A", "foo"); 169 DumpFunction(lib, "A", "foo");
170 DumpFunction(lib, "A", "bar"); 170 DumpFunction(lib, "A", "bar");
171 DumpFunction(lib, "A", "baz"); 171 DumpFunction(lib, "A", "baz");
172 DumpFunction(lib, "B", "bam"); 172 DumpFunction(lib, "B", "bam");
173 } 173 }
174 174
175 } // namespace dart 175 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/resolver_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698