在 Qt 5.9.1 版本中编译时它不起作用..任何人都帮我在 qml 中编译这个 TestCase ..
import QtQuick 2.0
import QtTest 1.1
TestCase{
function test_math() {
compare(2 + 2, 4, "2 + 2 = 4")
}
function test_fail() {
compare(2 + 2, 5, "2 + 2 = 5")
}
}
得到这样的错误:
类型 TestCase 不可用且未安装模块 Qt.test.qtestroot