This PR sets up the new integrated test/bench suite. It then migrates all benchmarks and some related tests to the new suite. There's also some documentation and some linting. For now, a lot of the old tests are left alone so this PR doesn't become even larger than it already is. Eventually, all tests should be migrated to the new suite though so there isn't a confusing mix of two systems.
23 lines
547 B
Text
23 lines
547 B
Text
|
|
def tst : IO Unit :=
|
|
do
|
|
let bs := [1, 2, 3].toByteArray;
|
|
IO.println bs;
|
|
let bs := bs.push 4;
|
|
let bs := bs.set! 1 20;
|
|
IO.println bs;
|
|
let bs₁ := bs.set! 2 30;
|
|
IO.println bs₁;
|
|
IO.println bs;
|
|
IO.println bs.size;
|
|
IO.println (bs ++ bs);
|
|
IO.println (bs.extract 1 3);
|
|
pure ()
|
|
|
|
#eval tst
|
|
|
|
#eval "abcd".hash
|
|
#eval [97, 98, 99, 100].toByteArray.hash
|
|
|
|
#eval [0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88].toByteArray.toUInt64LE! == 0x8877665544332211
|
|
#eval [0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88].toByteArray.toUInt64BE! == 0x1122334455667788
|