"NaN": function(test) { test.strictEqual(Long.fromNumber(NaN), Long.ZERO); test.strictEqual(Long.fromNumber(+Infinity), Long.ZERO); test.strictEqual(Long.fromNumber(-Infinity), Long.ZERO); test.strictEqual(Long.fromString(NaN+""), Long.ZERO); test.strictEqual(Long.fromString(+Infinity+""), Long.ZERO); test.strictEqual(Long.fromString(-Infinity+""), Long.ZERO); test.done(); }
"toString": function(test) { var longVal = Long.fromBits(0xFFFFFFFF, 0xFFFFFFFF, true); // #10 test.equal(longVal.toString(16), "ffffffffffffffff"); test.equal(longVal.toString(10), "18446744073709551615"); test.equal(longVal.toString(8), "1777777777777777777777"); // #7, obviously wrong in goog.math.Long test.equal(Long.fromString("zzzzzz", 36).toString(36), "zzzzzz"); test.equal(Long.fromString("-zzzzzz", 36).toString(36), "-zzzzzz"); test.done(); },
"msb_unsigned": function(test) { var longVal = Long.UONE.shiftLeft(63); test.ok(longVal.notEquals(Long.MIN_VALUE)); test.equal(longVal.toString(), "9223372036854775808"); test.equal(Long.fromString("9223372036854775808", true).toString(), "9223372036854775808"); test.done(); }
it("can get a tag from a repo via the tag's OID object", function() { var oid = Oid.fromString(tagOid); return this.repo.getTag(oid) .then(function(tag) { testTag(tag); }); });