Files
fluxengine/tests/bitaccumulator.cc
dg 466c3c34e5 Replace the Error() object with an error() function which takes fmt
formatspecs, making for much cleaner code. Reformatted everything.

This actually happened in multiple steps but then I corrupted my local
repository and I had to recover from the working tree.
2023-05-09 20:59:44 +00:00

18 lines
264 B
C++

#include "globals.h"
#include "bytes.h"
#include <assert.h>
int main(int argc, const char* argv[])
{
Bytes bytes;
ByteWriter bw(bytes);
BitWriter bitw(bw);
bitw.push(0x1e, 5);
bitw.flush();
assert(bytes == Bytes{0x1e});
return 0;
}