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

Unified Diff: test/codegen/expect/language/for_in2_test.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
« no previous file with comments | « test/codegen/expect/language/for2_test.js ('k') | test/codegen/expect/language/for_in_side_effects_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/language/for_in2_test.js
diff --git a/test/codegen/expect/language/for_in2_test.js b/test/codegen/expect/language/for_in2_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..9f10b221ce5140ad71e21757b08c8ae96bf531b0
--- /dev/null
+++ b/test/codegen/expect/language/for_in2_test.js
@@ -0,0 +1,48 @@
+dart_library.library('language/for_in2_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__for_in2_test(exports, dart_sdk, expect) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const _interceptors = dart_sdk._interceptors;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const expect$ = expect.expect;
+ const for_in2_test = Object.create(null);
+ let SetOfint = () => (SetOfint = dart.constFn(core.Set$(core.int)))();
+ let JSArrayOfint = () => (JSArrayOfint = dart.constFn(_interceptors.JSArray$(core.int)))();
+ let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
+ dart.defineLazy(for_in2_test, {
+ get set() {
+ return SetOfint().from(JSArrayOfint().of([1, 2]));
+ },
+ set set(_) {}
+ });
+ for_in2_test.x = null;
+ for_in2_test.A = class A extends core.Object {
+ new() {
+ this.field = null;
+ }
+ test() {
+ let count = 0;
+ for (/* Unimplemented unknown name */field of for_in2_test.set) {
+ count = dart.notNull(count) + dart.notNull(core.int._check(this.field));
+ }
+ expect$.Expect.equals(3, count);
+ count = 0;
+ for (/* Unimplemented unknown name */x of for_in2_test.set) {
+ count = dart.notNull(count) + dart.notNull(core.int._check(for_in2_test.x));
+ }
+ expect$.Expect.equals(3, count);
+ }
+ };
+ dart.setSignature(for_in2_test.A, {
+ methods: () => ({test: dart.definiteFunctionType(dart.dynamic, [])})
+ });
+ for_in2_test.main = function() {
+ new for_in2_test.A().test();
+ };
+ dart.fn(for_in2_test.main, VoidTovoid());
+ // Exports:
+ exports.for_in2_test = for_in2_test;
+});
« no previous file with comments | « test/codegen/expect/language/for2_test.js ('k') | test/codegen/expect/language/for_in_side_effects_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698