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

Unified Diff: pkg/kernel/test/uint31_pair_map_test.dart

Issue 2780513004: [Kernel] Remove code from the old type propagation. (Closed)
Patch Set: Remove empty status file section Created 3 years, 9 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 | « pkg/kernel/test/uint31_pair_map_bench.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/test/uint31_pair_map_test.dart
diff --git a/pkg/kernel/test/uint31_pair_map_test.dart b/pkg/kernel/test/uint31_pair_map_test.dart
deleted file mode 100644
index 316f97119313834e628fc4ae5a6ad0bc356375bf..0000000000000000000000000000000000000000
--- a/pkg/kernel/test/uint31_pair_map_test.dart
+++ /dev/null
@@ -1,33 +0,0 @@
-import 'dart:math';
-import 'package:kernel/type_propagation/canonicalizer.dart';
-import 'package:test/test.dart';
-
-Random random = new Random(12345);
-
-main() {
- test('Uint31PairMap randomized tests', runTest);
-}
-
-runTest() {
- const int trials = 1000;
- const int insertions = 1000;
- const int uniqueKeys = 900;
- for (int trial = 0; trial < trials; ++trial) {
- int nextValue = 1;
- Map<Point<int>, int> trusted = <Point<int>, int>{};
- Uint31PairMap candidate = new Uint31PairMap();
- for (int i = 0; i < insertions; ++i) {
- int x = random.nextInt(uniqueKeys);
- int y = random.nextInt(uniqueKeys);
- Point key = new Point(x, y);
- int trustedValue = trusted[key];
- int candidateValue = candidate.lookup(x, y);
- expect(candidateValue, equals(trustedValue));
- if (trustedValue == null) {
- int newValue = nextValue++;
- trusted[key] = newValue;
- candidate.put(newValue);
- }
- }
- }
-}
« no previous file with comments | « pkg/kernel/test/uint31_pair_map_bench.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698