Last active
March 27, 2021 17:25
-
-
Save mitchcurtis/d67cf9736597e99412081a0095296275 to your computer and use it in GitHub Desktop.
Qt Quick Auto Test (QML)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QtQuickTest/quicktest.h> | |
QUICK_TEST_MAIN(untitled) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEMPLATE = app | |
TARGET = tst_example | |
CONFIG += warn_on qmltestcase | |
SOURCES += tst_untitled.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.6 | |
import QtTest 1.0 | |
TestCase { | |
name: "Untitled" | |
function test_math() { | |
compare(2 + 2, 4, "2 + 2 = 4") | |
} | |
function test_fail() { | |
compare(2 + 2, 5, "2 + 2 = 5") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment