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

Side by Side Diff: tests/compiler/dart2js/cpa_inference_test.dart

Issue 165143004: Move TypeMask.simplify to a test helper. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import 'dart:async'; 5 import 'dart:async';
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 import '../../../sdk/lib/_internal/compiler/implementation/source_file.dart'; 8 import '../../../sdk/lib/_internal/compiler/implementation/source_file.dart';
9 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'; 9 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart';
10 import '../../../sdk/lib/_internal/compiler/implementation/inferrer/concrete_typ es_inferrer.dart'; 10 import '../../../sdk/lib/_internal/compiler/implementation/inferrer/concrete_typ es_inferrer.dart';
11 11
12 import "parser_helper.dart"; 12 import "parser_helper.dart";
13 import "compiler_helper.dart"; 13 import "compiler_helper.dart";
14 import "type_mask_test_helper.dart";
14 import 'dart:mirrors'; 15 import 'dart:mirrors';
15 16
16 /** 17 /**
17 * Finds the node corresponding to the last occurence of the substring 18 * Finds the node corresponding to the last occurence of the substring
18 * [: identifier; :] in the program represented by the visited AST. 19 * [: identifier; :] in the program represented by the visited AST.
19 */ 20 */
20 class VariableFinderVisitor extends Visitor { 21 class VariableFinderVisitor extends Visitor {
21 final String identifier; 22 final String identifier;
22 Node result; 23 Node result;
23 24
(...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 } 1565 }
1565 1566
1566 Expect.equals(convert(singleton(a).union(singleton(b))), 1567 Expect.equals(convert(singleton(a).union(singleton(b))),
1567 new TypeMask.nonNullSubclass(a)); 1568 new TypeMask.nonNullSubclass(a));
1568 1569
1569 Expect.equals( 1570 Expect.equals(
1570 convert(singleton(a).union(singleton(b)).union(nullSingleton)), 1571 convert(singleton(a).union(singleton(b)).union(nullSingleton)),
1571 new TypeMask.subclass(a)); 1572 new TypeMask.subclass(a));
1572 1573
1573 Expect.equals( 1574 Expect.equals(
1574 convert(singleton(b).union(singleton(d))).simplify(result.compiler), 1575 simplify(convert(singleton(b).union(singleton(d))), result.compiler),
1575 new TypeMask.nonNullSubtype(a)); 1576 new TypeMask.nonNullSubtype(a));
1576 }); 1577 });
1577 } 1578 }
1578 1579
1579 testSelectors() { 1580 testSelectors() {
1580 final String source = r""" 1581 final String source = r"""
1581 // ABC <--- A 1582 // ABC <--- A
1582 // `- BC <--- B 1583 // `- BC <--- B
1583 // `- C 1584 // `- C
1584 1585
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 testClosures10, 2098 testClosures10,
2098 testClosures11, 2099 testClosures11,
2099 testClosures12, 2100 testClosures12,
2100 testRefinement, 2101 testRefinement,
2101 testDefaultArguments, 2102 testDefaultArguments,
2102 testSuperConstructorCall, 2103 testSuperConstructorCall,
2103 testSuperConstructorCall2, 2104 testSuperConstructorCall2,
2104 testSuperConstructorCall3, 2105 testSuperConstructorCall3,
2105 ], (f) => f())); 2106 ], (f) => f()));
2106 } 2107 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/closure_tracer_test.dart ('k') | tests/compiler/dart2js/field_type_simple_inferer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698