add some tests

This commit is contained in:
Akash Mozumdar 2018-10-18 23:42:53 -04:00
parent 8f60060e37
commit 16666ac699
2 changed files with 15 additions and 0 deletions

View File

@ -10,6 +10,7 @@ set(gui_SRCS
mainwindow.cpp mainwindow.cpp
misc.cpp misc.cpp
extensions.cpp extensions.cpp
tests.cpp
host/host.cc host/host.cc
host/textthread.cc host/textthread.cc
${RESOURCE_FILES} ${RESOURCE_FILES}

14
GUI/tests.cpp Normal file
View File

@ -0,0 +1,14 @@
#include "extensions.h"
#include "misc.h"
static int TESTS = []
{
assert(ParseCode("/HQ-c*C:C*1C@4AA:gdi.dll:GetTextOutA"));
assert(ParseCode("/HB4@0"));
assert(ParseCode("/RS*10@44"));
assert(!ParseCode("HQ@4"));
assert(!ParseCode("/RW@44"));
assert(!ParseCode("/HWG@33"));
return 0;
}();