v2
This commit is contained in:
39
testinfo.cpp
39
testinfo.cpp
@@ -1,11 +1,13 @@
|
||||
/*#include <QTest>
|
||||
#include "testinfo.h"
|
||||
#include <windows.h>
|
||||
#include "declarations.h"
|
||||
#include <WDMTMKv2.cpp>
|
||||
/*#include "testinfo.h"
|
||||
|
||||
HANDLE hEvent;
|
||||
TTmkEventData tmkEvD;
|
||||
#ifndef MAINWININC
|
||||
#define MAINWININC
|
||||
#include "mainwindow.cpp"
|
||||
#endif
|
||||
|
||||
|
||||
HANDLE hEvent_t;
|
||||
TTmkEventData tmkEvD_t;
|
||||
|
||||
void testInfo::init()
|
||||
{
|
||||
@@ -27,14 +29,14 @@ void testInfo::cleanupTestCase()
|
||||
{
|
||||
qDebug() << "TmkClose()";
|
||||
TmkClose();
|
||||
if (hEvent)
|
||||
CloseHandle(hEvent);
|
||||
if (hEvent_t)
|
||||
CloseHandle(hEvent_t);
|
||||
}
|
||||
|
||||
void testInfo::testcreateevent()
|
||||
{
|
||||
hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
QVERIFY(hEvent);
|
||||
hEvent_t = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
QVERIFY(hEvent_t);
|
||||
}
|
||||
|
||||
void testInfo::testTmkOpen()
|
||||
@@ -278,17 +280,17 @@ void testInfo::testrtputgetblk()
|
||||
void testInfo::testgetInt()
|
||||
{
|
||||
bcreset();
|
||||
tmkdefevent(hEvent, TRUE);
|
||||
tmkgetevd(&tmkEvD);
|
||||
QCOMPARE(tmkEvD.nInt, (int)(0));
|
||||
tmkdefevent(hEvent_t, TRUE);
|
||||
tmkgetevd(&tmkEvD_t);
|
||||
QCOMPARE(tmkEvD_t.nInt, (int)(0));
|
||||
bcdefbase(0);
|
||||
bcputw(0, 0xFFE1);
|
||||
bcstart(0, CTRL_C_BRCST);
|
||||
|
||||
switch (WaitForSingleObject(hEvent, 1000))
|
||||
switch (WaitForSingleObject(hEvent_t, 1000))
|
||||
{
|
||||
case WAIT_OBJECT_0:
|
||||
ResetEvent(hEvent);
|
||||
ResetEvent(hEvent_t);
|
||||
qDebug() << "We got interrupt!";
|
||||
break;
|
||||
|
||||
@@ -301,10 +303,9 @@ void testInfo::testgetInt()
|
||||
break;
|
||||
}
|
||||
|
||||
tmkgetevd(&tmkEvD);
|
||||
QCOMPARE(tmkEvD.nInt, (int)(1));
|
||||
tmkgetevd(&tmkEvD_t);
|
||||
QCOMPARE(tmkEvD_t.nInt, (int)(1));
|
||||
|
||||
tmkdefevent(0,TRUE);
|
||||
}
|
||||
*/
|
||||
|
||||
|
Reference in New Issue
Block a user