testing v2
This commit is contained in:
20
testinfo.cpp
20
testinfo.cpp
@@ -3,6 +3,9 @@
|
||||
#include "WDMTMKv2.cpp"
|
||||
#include <windows.h>
|
||||
|
||||
HANDLE hEvent;
|
||||
TTmkEventData tmkEvD;
|
||||
|
||||
void testInfo::init()
|
||||
{
|
||||
if (isFailed)
|
||||
@@ -23,6 +26,14 @@ void testInfo::cleanupTestCase()
|
||||
{
|
||||
qDebug() << "TmkClose()";
|
||||
TmkClose();
|
||||
if (hEvent)
|
||||
CloseHandle(hEvent);
|
||||
}
|
||||
|
||||
void testInfo::testcreateevent()
|
||||
{
|
||||
hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
QVERIFY(hEvent);
|
||||
}
|
||||
|
||||
void testInfo::testTmkOpen()
|
||||
@@ -40,7 +51,7 @@ void testInfo::testtmkgetmaxn()
|
||||
|
||||
void testInfo::testmrtgetmaxn()
|
||||
{
|
||||
QCOMPARE(tmkgetmaxn(), (int)(0));
|
||||
QCOMPARE(mrtgetmaxn(), (int)(0));
|
||||
}
|
||||
|
||||
void testInfo::testtmkconfig()
|
||||
@@ -265,11 +276,7 @@ void testInfo::testrtputgetblk()
|
||||
|
||||
void testInfo::testgetInt()
|
||||
{
|
||||
HANDLE hEvent;
|
||||
TTmkEventData tmkEvD;
|
||||
|
||||
hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
QVERIFY(hEvent);
|
||||
bcreset();
|
||||
tmkdefevent(hEvent, TRUE);
|
||||
tmkgetevd(&tmkEvD);
|
||||
QCOMPARE(tmkEvD.nInt, (int)(0));
|
||||
@@ -297,7 +304,6 @@ void testInfo::testgetInt()
|
||||
QCOMPARE(tmkEvD.nInt, (int)(1));
|
||||
|
||||
tmkdefevent(0,TRUE);
|
||||
CloseHandle(hEvent);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user