Closed g964 closed 4 years ago
Haxe 4.0 seems to have Int64 too. https://api.haxe.org/v/4.0.0/haxe/Int64.html
Not sure why I get Type not found : Int64
:/
You need to import haxe.Int64
.
import utest.Assert;
import haxe.Int64;
import Solution;
class SolutionTest extends utest.Test {
function testExample() {
var expected = Int64.fromFloat(5317636) * Int64.fromFloat(2306);
Assert.same(expected, Example.multiply(Int64.fromFloat(5317636), Int64.fromFloat(2306)));
Assert.equals("12262468616", Int64.toStr(expected));
}
}
I had gotten Type not found : Int64
too. Ok for "import haxe.Int64", I will try. Thanks!
CW Haxe has no Int64:
5317636 * 2306
gives -622433272 instead of12262468616
. It seems Haxe 4.1.2 has them.