sorellabs / claire

[Unmaintained: please use jsverify instead] A property-based testing library for clearly specifying code invariants and behaviour.
MIT License
79 stars 4 forks source link

Bytes ought to be integral #21

Closed squaremo closed 11 years ago

squaremo commented 11 years ago

It was something of a surprise that the Byte generator yielded floats.

var C = require('claire');
C.forAll(C.data.Byte).satisfy(
    function(n) { return n | 0 === n; }).asTest()();
robotlolita commented 11 years ago

Whoa, totally missed this. Thanks for noticing :3

squaremo commented 11 years ago

OK that was quicker than I could fork and provide a fix -- nice work!