blob: 98fc64bcc43f1de075a81a4315c0b00c1fb9ac98 [file] [log] [blame]
// Copyright(c) 2013, 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.
library test_util;
import 'package:fixnum/fixnum.dart';
import 'package:test/test.dart';
Int64 make64(int lo, [int hi]) {
if (hi == null) hi = lo < 0 ? -1 : 0;
return new Int64.fromInts(hi, lo);
}
expect64(int lo, [int hi]) {
final Int64 expected = make64(lo, hi);
return predicate((Int64 actual) => actual == expected);
}