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

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

Issue 94873002: Fix ContainerTypeMask== and ContainerTypeMask.hashCode. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 | « sdk/lib/_internal/compiler/implementation/util/util.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
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.
4
5 // Regression test for dart2js that used to have a bogus
6 // implementation of var.== and
7 // var.hashCode.
8
9 import 'package:expect/expect.dart';
10 import "package:async_helper/async_helper.dart";
11 import 'memory_compiler.dart';
12
13 const MEMORY_SOURCE_FILES = const {
14 'main.dart': '''
15
16 import 'dart:typed_data';
17
18 a() => [0];
19 b() => [1, 2];
20 c() => new Uint8List(1);
21 d() => new Uint8List(2);
22
23 main() {
24 print(a); print(b); print(c); print(d);
25 }
26 ''',
27 };
28
29 main() {
30 var compiler = compilerFor(MEMORY_SOURCE_FILES);
31 asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) {
32 var typesInferrer = compiler.typesTask.typesInferrer;
33
34 var element = compiler.mainApp.find('a');
35 var mask1 = typesInferrer.getReturnTypeOfElement(element);
36
37 element = compiler.mainApp.find('b');
38 var mask2 = typesInferrer.getReturnTypeOfElement(element);
39
40 element = compiler.mainApp.find('c');
41 var mask3 = typesInferrer.getReturnTypeOfElement(element);
42
43 element = compiler.mainApp.find('d');
44 var mask4 = typesInferrer.getReturnTypeOfElement(element);
45
46 Expect.notEquals(mask1.union(mask2, compiler),
47 mask3.union(mask4, compiler));
48 }));
49 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/util/util.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698