summaryrefslogtreecommitdiff
path: root/lib/std/test
AgeCommit message (Collapse)Author
2019-09-09Specify sigfigs (cutoff + Relative mode) for fltXY formattingS. Gilles
2019-09-07Allow padding for fltXY formattingS. Gilles
2019-07-13Oops, mangled something with git9.Ori Bernstein
2019-07-14Fix crash with large shifts in bigint.Ori Bernstein
2019-05-10Allow exact case of mkbigint(2^32)S. Gilles
2019-04-29Print "NaN" and "Inf" for floating-point NaNs and infinites.S. Gilles
2019-02-19Handle (-1) + (1) and (-3) - (-2) with bigintsS. Gilles
2019-02-19Convert bigint tests to use testrS. Gilles
2018-12-26Comment.Ori Bernstein
2018-12-26Implement `std.bygrapheme`.Ori Bernstein
2018-11-16Add some negative tests.Ori Bernstein
2018-11-16Add strfind tests.Ori Bernstein
2018-05-13Add float trapping controls.Ori Bernstein
This both allows us to error earlier when math goes wonky, and allows us to test all our code on 9front.
2018-04-19Subnormalize special-case floats in fltXYassem.S. Gilles
If the exponent is the lowest possible representable, then the returned float will actually be subnormal. In this case, we do not have the implied leading 1, so we need to downshift the significand so that it doesn't get lost. We end up losing the least significant bit of the significand, but that's unavoidable.
2018-04-18Merge remote-tracking branch 'ori/master' into HEADS. Gilles
2018-03-31Fix tests on 9front.Ori Bernstein
The floating point on 9front is strict compared to the environment on other systems. It does not allow for NaN, which makes testing for NaN behavior crashy. We should eventually verify that we generate FPEs on 9front when we generate a nan, but for now, it's simpler just to skip those tests.
2018-03-12Reorder arguments/results of fltXY{explode/assem}S. Gilles
2018-03-12Make fltXYexplode and fltXYassem inverses of each otherS. Gilles
The exponent and significand (mantissa) returned from fltXYexplode are the numerical values, not just the bit patterns. Informally, flt64explode(1.23 x 10^101) would return (false, 123000..., 101), where the significand has precisely 52 bits after the intial `1'.
2018-02-27Test some fltbits functionsS. Gilles
Test the isnan() and the float <-> bits functions, and correct slight error in isnan(). Adjust mantissa offset in flt32assem, but that function appears unused.
2018-02-27Adjust signs of fltbits functionsS. Gilles
The fltXYbits and fltXYfrombits functions now return/take unsigned integers uniformly, allowing easier round-tripping. Unsigned was chosen to emphasize that the value of the result is probably unrelated to the floating-point value. The fltXYexplode and fltXYassem functions now return the mantissa (significand) unsigned, but the exponent signed. This reflects the allowed ranges represented by the encoding.
2018-01-27Remove std.sleqOri Bernstein
We have std.eq. We still export a generic sleq for compatibility, but we don't need it or want it.
2018-01-26Improve our env code, add tests.Ori Bernstein
It was fragile.
2018-01-26Contbuild wants strreplace.Ori Bernstein
2017-12-30Start cleaning up libstd.Ori Bernstein
minor formatting, factoring out iterutil.
2017-12-29Add some tests to lib/std/alloc.myrOri Bernstein
2017-12-26Fix void slice formatting.Ori Bernstein
Also cleans up agglomeration of unused variables.
2017-12-25Make the copy loop byte based.Ori Bernstein
No more pesky UTF8 restrictions in the input string.
2017-12-25Formatting as a state machine.Ori Bernstein
2017-11-28Format bodyless union without trailing space.snocl
Also fix some whitespace.
2017-11-14Fix build to deal with removal of streq function.Ori Bernstein
2017-11-14Rename comparable => equatableOri Bernstein
2017-11-14Fix tests to use new hashable/comparable traits.Ori Bernstein
2017-11-09Allow sleq to read far enough into the array to compare wide typesS. Gilles
2017-11-06Fix use of width uninitialized in graphemestepS. Gilles
This would result in infinite loops in pretty much any caller. Also fix handling of \r, \n, \t, which need to form their own graphemes, but which aren't nicely marked as positive width by cellwidth.
2017-11-05Implement graphemestepS. Gilles
And change 'strstep' to 'charstep' for consistency, now that it has a sibling function.
2017-11-05Make lib/std/test/utf.myr a non-binary fileS. Gilles
2017-10-31Add zalgo text test.Ori Bernstein
2017-10-29Implement graphemewidthS. Gilles
2017-09-10Fix 32 bit float formatting.Ori Bernstein
It works now.
2017-09-09Improve siphash performance and testsLucas Gabriel Vuotto
* Inline rotl * Be specific about which entry failed from the test vector Signed-off-by: Lucas Gabriel Vuotto <lvuotto92@gmail.com>
2017-09-08Replace murmurhash with siphashLucas Gabriel Vuotto
Signed-off-by: Lucas Gabriel Vuotto <lvuotto92@gmail.com>
2017-09-08Add siphash-2-4 implementation and testsLucas Gabriel Vuotto
Signed-off-by: Lucas Gabriel Vuotto <lvuotto92@gmail.com>
2017-09-08Use testr in lib/std/test/hashfuncs.myrLucas Gabriel Vuotto
Signed-off-by: Lucas Gabriel Vuotto <lvuotto92@gmail.com>
2017-07-18Update hashes in tests to match fixed algorithm.Ori Bernstein
2017-07-17Convert from `in` to `:`.Ori Bernstein
The winds of change are a-blowin.
2017-06-07Add address builder function.Ori Bernstein
Nice for building addresses with defaults.
2017-04-23I worried myself, and added a test case.Ori Bernstein
2017-03-20Align big free sizes.Ori Bernstein
This means that our big allocation sizes will always be page aligned. This also adds tests.
2017-03-18We want to remove trailing spaces when tokenizing.Ori Bernstein
Even if we run out of slots, the trailing spaces should be removed.
2017-03-17Don't count trailing elements when hashing bitsets.Ori Bernstein
These don't logically affect the contents, so we shouldn't care what they have.