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

Unified Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 10915083: Change assert implementation to not depend on a top-level function called 'assert'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/co19/co19-dart2js.status ('k') | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/mock_compiler.dart
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index d61a4b452f1adf06adc03cf4f99bdbfead190144..d6dbabd36d8693cde5857dc2cddbdf724a1ebd39 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -39,7 +39,8 @@ const String DEFAULT_HELPERLIB = @'''
getRuntimeTypeInfo(a) {}
stringTypeCheck(x) {}
interface JavaScriptIndexingBehavior {}
- S() {}''';
+ S() {}
+ assert(a){}''';
const String DEFAULT_INTERCEPTORSLIB = @'''
add$1(receiver, value) {}
@@ -52,7 +53,6 @@ const String DEFAULT_INTERCEPTORSLIB = @'''
const String DEFAULT_CORELIB = @'''
print(var obj) {}
- assert(x) {}
interface int extends num {}
interface double extends num {}
class bool {}
@@ -84,11 +84,11 @@ class MockCompiler extends Compiler {
parseScript(coreSource, coreLibrary);
// We need to set the assert method to avoid calls with a 'null'
// target being interpreted as a call to assert.
- assertMethod = coreLibrary.find(buildSourceString('assert'));
script = new Script(uri, new MockFile(helperSource));
jsHelperLibrary = new LibraryElement(script);
parseScript(helperSource, jsHelperLibrary);
+ assertMethod = jsHelperLibrary.find(buildSourceString('assert'));
script = new Script(uri, new MockFile(interceptorsSource));
interceptorsLibrary = new LibraryElement(script);
« no previous file with comments | « tests/co19/co19-dart2js.status ('k') | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698