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

Unified Diff: test/codegen/expect/language/scope_variable_test_none_multi.js

Issue 2128353002: Check in codegen test expectations. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 5 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
Index: test/codegen/expect/language/scope_variable_test_none_multi.js
diff --git a/test/codegen/expect/language/scope_variable_test_none_multi.js b/test/codegen/expect/language/scope_variable_test_none_multi.js
new file mode 100644
index 0000000000000000000000000000000000000000..3b1516aafb71278eefbe17e5f9a070dbd14794fd
--- /dev/null
+++ b/test/codegen/expect/language/scope_variable_test_none_multi.js
@@ -0,0 +1,56 @@
+dart_library.library('language/scope_variable_test_none_multi', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__scope_variable_test_none_multi(exports, dart_sdk, expect) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const expect$ = expect.expect;
+ const scope_variable_test_none_multi = Object.create(null);
+ let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
+ let VoidToint = () => (VoidToint = dart.constFn(dart.definiteFunctionType(core.int, [])))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ scope_variable_test_none_multi.testSimpleScope = function() {
+ {
+ let a = "Test";
+ let b = 1;
+ }
+ {
+ let c = null;
+ let d = null;
+ expect$.Expect.isNull(c);
+ expect$.Expect.isNull(d);
+ }
+ };
+ dart.fn(scope_variable_test_none_multi.testSimpleScope, VoidTovoid());
+ scope_variable_test_none_multi.testShadowingScope = function() {
+ let a = "Test";
+ {
+ let a = null;
+ expect$.Expect.isNull(a);
+ a = "a";
+ expect$.Expect.equals(a, "a");
+ }
+ expect$.Expect.equals(a, "Test");
+ };
+ dart.fn(scope_variable_test_none_multi.testShadowingScope, VoidTovoid());
+ scope_variable_test_none_multi.testShadowingAfterUse = function() {
+ let a = 1;
+ {
+ let b = 2;
+ let c = a;
+ let d = b + c;
+ return d + a;
+ }
+ };
+ dart.fn(scope_variable_test_none_multi.testShadowingAfterUse, VoidToint());
+ scope_variable_test_none_multi.main = function() {
+ scope_variable_test_none_multi.testSimpleScope();
+ scope_variable_test_none_multi.testShadowingScope();
+ scope_variable_test_none_multi.testShadowingAfterUse();
+ };
+ dart.fn(scope_variable_test_none_multi.main, VoidTodynamic());
+ // Exports:
+ exports.scope_variable_test_none_multi = scope_variable_test_none_multi;
+});

Powered by Google App Engine
This is Rietveld 408576698