Files
fluxengine/tests/fmmfm.cc
David Given 94fb10eb02 Behemoth change to rework everything to use Bytes rather than vectors of
uint8_t. The tests pass, but of course, nothing decodes any more.
2019-03-05 00:10:20 +01:00

42 lines
827 B
C++

#include "globals.h"
#include "decoders.h"
#include <assert.h>
int main(int argc, const char* argv[])
{
assert(decodeFmMfm(
std::vector<bool>{
true, false,
true, false,
true, false,
true, false,
true, false,
true, false,
true, false,
true, false
}
) == Bytes{ 0x00 });
assert(decodeFmMfm(
std::vector<bool>{
true, true,
true, false,
true, false,
true, false,
true, false,
true, false,
true, false,
true, true
}
) == Bytes{ 0x81 });
assert(decodeFmMfm(
std::vector<bool>{
true, true,
true, false,
}
) == Bytes{ 0x80 });
return 0;
}