blob: 0d539173b74ef32caff8b7e0388774fc8f5c51d2 [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 Int64.fromInts(hi, lo);
}
expect64(int lo, [int hi]) {
final Int64 expected = make64(lo, hi);
return predicate((Int64 actual) => actual == expected);
}