summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-10-04 19:07:04 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2022-10-11 11:21:38 +0200
commit11997578ac9c56b55e8550db4295b8916b124916 (patch)
tree01e713d1a52187df098717204fe694abb3b63cf8
parent3f43ddbd10ed8fc0a55d3d42156c4afa07325175 (diff)
Provide optTitle for a NumberDoubleTestData testcase that needs it
The test-case for 0.0001 with precision 0 has the same expected text as that for 0.0 with the same precision; which lead to QBA's test of it getting a duplicated data tag. Add an optTitle for the one that isn't precise to deduplicate. Change-Id: I03600e2af43f6d11b53e05e8027924c92ed4db89 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
-rw-r--r--tests/auto/corelib/text/shared/test_number_shared.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/corelib/text/shared/test_number_shared.h b/tests/auto/corelib/text/shared/test_number_shared.h
index 0c5a5f3042..b4a8140e45 100644
--- a/tests/auto/corelib/text/shared/test_number_shared.h
+++ b/tests/auto/corelib/text/shared/test_number_shared.h
@@ -12,6 +12,7 @@ struct NumberDoubleTestData
int p;
QLatin1String expected;
QLatin1String optTitle = {}; // optional
+ // Tests with same (f, p, expected) should use optTitle to avoid duplicate data tags.
};
template<typename Fun>
@@ -23,7 +24,7 @@ inline void add_number_double_shared_data(Fun addTestRowFunction)
{ 0.0, 'f', 0, QLatin1String("0") },
{ 0.0, 'e', 0, QLatin1String("0e+00") },
{ 0.0, 'e', 1, QLatin1String("0.0e+00") },
- { 0.0001, 'f', 0, QLatin1String("0") },
+ { 0.0001, 'f', 0, QLatin1String("0"), QLatin1String("0(.0001)") },
{ 0.1234, 'f', 5, QLatin1String("0.12340") },
{ -0.1234, 'f', 5, QLatin1String("-0.12340") },
{ 0.0000000314, 'f', 12, QLatin1String("0.000000031400") },