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