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

Unified Diff: runtime/observatory/tests/service/address_mapper_test.dart

Issue 1219103002: Deal with Javascript integer limitations in heap snapshot processing to handle 64-bit target VMs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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: runtime/observatory/tests/service/address_mapper_test.dart
diff --git a/runtime/observatory/tests/service/address_mapper_test.dart b/runtime/observatory/tests/service/address_mapper_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..b0534932a072301e73fcd53d9566cfd46c499d6d
--- /dev/null
+++ b/runtime/observatory/tests/service/address_mapper_test.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+
+import 'package:observatory/object_graph.dart';
+import 'package:expect/expect.dart';
+
+main() {
+ var map = new AddressMapper(42);
+
+ Expect.equals(null, map.get(1, 2, 3));
+ Expect.equals(4, map.put(1, 2, 3, 4));
+ Expect.equals(4, map.get(1, 2, 3));
+
+ Expect.equals(null, map.get(2, 3, 1));
+ Expect.equals(null, map.get(3, 1, 2));
+
+ Expect.throws(() => map.put(1, 2, 3, 44),
+ (e) => true,
+ "Overwrite key");
+
+ Expect.throws(() => map.put(5, 6, 7, 0),
+ (e) => true,
+ "Invalid value");
+
+ Expect.throws(() => map.put("5", 6, 7, 0),
+ (e) => true,
+ "Invalid key");
+}
« no previous file with comments | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/observatory/tests/service/read_stream_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698