aboutsummaryrefslogtreecommitdiff
path: root/tests/tst_LengthModel.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tst_LengthModel.qml')
-rw-r--r--tests/tst_LengthModel.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/tst_LengthModel.qml b/tests/tst_LengthModel.qml
index 9f44e9e..51ec705 100644
--- a/tests/tst_LengthModel.qml
+++ b/tests/tst_LengthModel.qml
@@ -49,4 +49,19 @@ TestCase {
var result = model.from(data.from, data.value);
compare(result, data.res);
}
+
+ function test_combined_data() {
+ return [
+ { from: 'kilometer', fromval: 5, to: 'decimeter', toval: 5*1000*10 },
+ { from: 'kilometer', fromval: 1, to: 'foot', toval: 3280.839895 },
+ { from: 'kilometer', fromval: 1, to: 'yard', toval: 1093.613298 },
+ { from: 'mile', fromval: 1, to: 'yard', toval: 1760 }
+ ];
+ }
+
+ function test_combined(data) {
+ var result = model.from(data.from, data.fromval);
+ result = model.to(data.to, result);
+ compare(result, data.toval);
+ }
}