| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // VMOptions=--compile_all --error_on_bad_type --error_on_bad_override | 4 // VMOptions=--error_on_bad_type --error_on_bad_override |
| 5 | 5 |
| 6 import 'package:observatory/object_graph.dart'; | 6 import 'package:observatory/object_graph.dart'; |
| 7 import 'package:unittest/unittest.dart'; | 7 import 'package:unittest/unittest.dart'; |
| 8 import 'dart:typed_data'; | 8 import 'dart:typed_data'; |
| 9 | 9 |
| 10 testRoundTrip(final int n) { | 10 testRoundTrip(final int n) { |
| 11 var bytes = []; | 11 var bytes = []; |
| 12 var remaining = n; | 12 var remaining = n; |
| 13 while (remaining > 127) { | 13 while (remaining > 127) { |
| 14 bytes.add(remaining & 127); | 14 bytes.add(remaining & 127); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 testRoundTrip(n); | 46 testRoundTrip(n); |
| 47 n <<= 1; | 47 n <<= 1; |
| 48 } | 48 } |
| 49 | 49 |
| 50 n = 5; | 50 n = 5; |
| 51 while (n < kMaxUint64) { | 51 while (n < kMaxUint64) { |
| 52 testRoundTrip(n); | 52 testRoundTrip(n); |
| 53 n <<= 1; | 53 n <<= 1; |
| 54 } | 54 } |
| 55 } | 55 } |
| OLD | NEW |