This commit is contained in:
2025-09-16 12:08:45 +03:00
parent 648e754d32
commit 105b4e79da
21 changed files with 984 additions and 289 deletions

View File

@@ -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);
}
*/