Commit 1283436e authored by Vitaly Lipatov's avatar Vitaly Lipatov

update tests, add Makefile

parent 58207c9b
......@@ -162,6 +162,7 @@ AC_CONFIG_FILES([Makefile
include/Makefile
include/modbus/Makefile
include/IOs/Makefile
tests/Makefile
docs/Makefile
docs/UniSetDox.cfg
docs/UniSetDoxDevel.cfg
......
#include <iostream>
using namespace std;
#include "PassiveTimer.h"
#include "UniSetTypes.h"
PassiveTimer pt(1000);
int main()
{
while(1)
{
cerr << "timer=" << pt.checkTime() << endl;
msleep(500);
}
return 0;
}
......@@ -2,7 +2,7 @@
bool check(const char *t, int nres)
{
int n;
int n = 105;
sscanf(t, "%i", &n);
printf("res=%d\n", n);
if ( n != nres)
......@@ -15,5 +15,9 @@ int main()
check("100",100);
check("0x100",0x100);
check("0XFF",0xff);
check("010",010);
check("-10",-10);
check("-1000",-1000);
check("",0);
// check(NULL,0); // SegFault
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment