Commit Graph

9 Commits

Author SHA1 Message Date
Oliver Booth ba6c400a79
Rename UnpackBits to Unpack, PacknBit to Pack(CLR type) 2022-04-28 22:58:58 +01:00
Oliver Booth e08274189a
Add Pack/Unpack bits
Allows a bool list (no more than 64 in length) to be packed to an integer, which can be unpacked again
2022-04-28 09:47:48 +01:00
Oliver Booth 5a88a06551
[ci skip] Move AsArrayValue tests to CoreTests 2022-04-26 11:04:09 +01:00
Oliver Booth f7f3ea71bb
Append "Value" to AsArray/AsEnumerable, to reduce risk of LINQ collision 2022-04-26 10:45:18 +01:00
Oliver Booth c4abef7be6
Move IO related methods to IO namespaces (#7)
Also renames more tests to be more meaningful
2022-04-25 17:09:49 +01:00
Oliver Booth 9a089a9ae2
Declare sliced Fill for IList<T> not T[] 2022-04-25 10:34:17 +01:00
Oliver Booth 30e925cdb0
Move additional methods into child namespaces (#7) 2022-04-24 10:09:56 +01:00
Oliver Booth 68d1ea6f4d
[ci skip] Reduce chance of Shuffle tests failing
A list containing 5 elements has a 1/(5!) (1/120) chance of being shuffled to the same order. This was causing unit tests to fail locally by pure fluke. Tests now generate a list from 1-52, which has a 1/(52!) chance of shuffling to the same order, so the chance is basically 0. If these tests ran once per second, it would take 1.9x10^50 * age of the universe to hit a collision.

This still can happen. Randomness does not guarantee we won't hit the same order. The odds are just so astronomically small that it's not worth considering. And if the CI run fails due to these tests failing, just re-run them anyway and call it a day
2022-04-23 11:25:09 +01:00
Oliver Booth 0fb01726db
Add tests for Enumerable/List 2022-04-21 22:35:06 +01:00