diff options
author | Joni Poikelin <joni.poikelin@qt.io> | 2022-09-05 13:44:14 +0300 |
---|---|---|
committer | Joni Poikelin <joni.poikelin@qt.io> | 2024-01-11 08:32:47 +0300 |
commit | 9848c8014acbb8e14da5374904a34d529f179cea (patch) | |
tree | 36565cbb7cd300472787e5bdfe862852e4dffb0f /src/qmltest | |
parent | b12d94bbed4a0985c0907020e31f3ea9c3b09cc2 (diff) |
doc: Clarify the use of init_data()
Change-Id: Ie7923365bace8ed3d3c62b3ac1f19a7b2b06ab32
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Mike Trahearn <mtrahearn@topcon.com>
Diffstat (limited to 'src/qmltest')
-rw-r--r-- | src/qmltest/TestCase.qml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qmltest/TestCase.qml b/src/qmltest/TestCase.qml index 4746cf858b..638372a42a 100644 --- a/src/qmltest/TestCase.qml +++ b/src/qmltest/TestCase.qml @@ -66,7 +66,8 @@ import "testlogger.js" as TestLogger Table data can be provided to a test using a function name that ends with "_data". Alternatively, the \c init_data() function can be used - to provide default test data for all test functions in a TestCase type: + to provide default test data for all test functions without a matching + "_data" function in a TestCase type: \code @@ -95,7 +96,7 @@ import "testlogger.js" as TestLogger compare(data.a + data.b, data.answer) } - function test__default_table(data) { + function test_default_table(data) { //data comes from init_data compare(data.a + data.b, data.answer) } |