summaryrefslogtreecommitdiffstats
path: root/tests/auto/qnearfieldtagtype1
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qnearfieldtagtype1')
-rw-r--r--tests/auto/qnearfieldtagtype1/qnearfieldtagtype1.pro22
-rw-r--r--tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp8
2 files changed, 29 insertions, 1 deletions
diff --git a/tests/auto/qnearfieldtagtype1/qnearfieldtagtype1.pro b/tests/auto/qnearfieldtagtype1/qnearfieldtagtype1.pro
index 63a59333..1b66692f 100644
--- a/tests/auto/qnearfieldtagtype1/qnearfieldtagtype1.pro
+++ b/tests/auto/qnearfieldtagtype1/qnearfieldtagtype1.pro
@@ -4,6 +4,28 @@ CONFIG += testcase
QT = core nfc-private testlib
+INCLUDEPATH += ../../../src/nfc
+DEPENDPATH += ../../../src/nfc
+
+# This test includes source code from QtNfc library. Define the namespace which moc generated code
+# should be in.
+DEFINES += QT_BEGIN_MOC_NAMESPACE=\""namespace QtNfc {"\"
+DEFINES += QT_END_MOC_NAMESPACE=\""}"\"
+
+HEADERS += \
+ qnearfieldmanagervirtualbase_p.h \
+ qnearfieldmanager_emulator_p.h \
+ qnearfieldtarget_emulator_p.h \
+ targetemulator_p.h
+
+SOURCES += \
+ qnearfieldmanagervirtualbase.cpp \
+ qnearfieldmanager_emulator.cpp \
+ qnearfieldtarget_emulator.cpp \
+ targetemulator.cpp
DEFINES += SRCDIR=\\\"$$PWD/../nfcdata\\\"
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+
+# This test crashes
+CONFIG += insignificant_test
diff --git a/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp b/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp
index 28839f19..36a8accf 100644
--- a/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp
+++ b/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp
@@ -484,6 +484,12 @@ void tst_QNearFieldTagType1::ndefMessages()
}
}
-QTEST_MAIN(tst_QNearFieldTagType1);
+QTEST_MAIN(tst_QNearFieldTagType1)
+
+// Unset the moc namespace which is not required for the following include.
+#undef QT_BEGIN_MOC_NAMESPACE
+#define QT_BEGIN_MOC_NAMESPACE
+#undef QT_END_MOC_NAMESPACE
+#define QT_END_MOC_NAMESPACE
#include "tst_qnearfieldtagtype1.moc"