New Meta commit
This commit is contained in:
parent
fccf66fba2
commit
2b99f2f5ea
183 changed files with 13333 additions and 14421 deletions
23
test/bitwriter.cpp
Normal file
23
test/bitwriter.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include "../lib/bitstream.cpp"
|
||||
#include <cassert>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char **argv){
|
||||
Utils::bitWriter bw;
|
||||
bw.append(1, 3);
|
||||
bw.append(1, 3);
|
||||
bw.append(1, 3);
|
||||
bw.append(1, 3);
|
||||
bw.append(1, 3);
|
||||
bw.append(1, 3);
|
||||
bw.append(1, 3);
|
||||
bw.append(1, 3);
|
||||
std::string res = bw.str();
|
||||
|
||||
assert(res.size() == 3);
|
||||
assert(res[0] == 0x24);
|
||||
assert(res[1] == 0x92);
|
||||
assert(res[2] == 0x49);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue