| Index: test/test_util.dart
|
| diff --git a/test/test_util.dart b/test/test_util.dart
|
| index a708e613aac707828007b214b190738745e9c8cc..6f6c391da36b530293eca3be37707c63f8bd84d4 100644
|
| --- a/test/test_util.dart
|
| +++ b/test/test_util.dart
|
| @@ -6,6 +6,7 @@ library test_util;
|
|
|
| import 'dart:typed_data';
|
|
|
| +import 'package:fixnum/fixnum.dart';
|
| import 'package:protobuf/protobuf.dart';
|
| import 'package:unittest/unittest.dart';
|
|
|
| @@ -13,20 +14,14 @@ import '../out/protos/google/protobuf/unittest_import.pb.dart';
|
| import '../out/protos/google/protobuf/unittest.pb.dart';
|
|
|
|
|
| -make64(lo, [hi = null]) {
|
| +Int64 make64(lo, [hi = null]) {
|
| if (hi == null) hi = lo < 0 ? -1 : 0;
|
| - return new ByteData(8)
|
| - ..setUint32(0, lo, Endianness.LITTLE_ENDIAN)
|
| - ..setUint32(4, hi, Endianness.LITTLE_ENDIAN);
|
| + return new Int64.fromInts(hi, lo);
|
| }
|
|
|
| expect64(lo, [hi = null]) {
|
| - final expected = make64(lo, hi);
|
| - return predicate((actual) {
|
| - get(data, offset) => data.getUint32(offset, Endianness.LITTLE_ENDIAN);
|
| - return get(actual, 0) == get(expected, 0) &&
|
| - get(actual, 4) == get(expected, 4);
|
| - });
|
| + final Int64 expected = make64(lo, hi);
|
| + return predicate((Int64 actual) => actual == expected);
|
| }
|
|
|
| void assertAllExtensionsSet(TestAllExtensions message) {
|
|
|