holiday-lights/test.cpp

17 lines
339 B
C++

#include <stdio.h>
#include "morse.h"
// gcc -D test_main=main -o test morse.cpp test.cpp && ./test
int test_main(int argc, char *argv[]) {
MorseEncoder enc = MorseEncoder("SOS ck ck \x03");
while (enc.Tick()) {
if (enc.Transmitting) {
printf("#");
} else {
printf(" ");
}
}
printf("\n");
}