From 97470a7838d8fd76c3555925d9b9b505c623fe70 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 5 Oct 2022 12:16:21 +0200 Subject: [PATCH] tst_QUuid::fromString(): tweak a test to avoid data-tag collision Two of the uuidA test cases had an open-brace for the string and no close; one of them ended with a space (which, apparently, is valid). Since the data-tag was constructed by formatting the string in a fixed-width field, padding with spaces, these two cases coincided. Fortunately the only uuidB test-case had closing as well as opening braces, so we can just switch the test for "trailing space is not an error" to use it, instead. Change-Id: I7068d40145c6b6b3b72777b029282850b1d1ea81 Reviewed-by: Marc Mutz Reviewed-by: Thiago Macieira Reviewed-by: Mate Barany --- tests/auto/corelib/plugin/quuid/tst_quuid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp index c3170dd354..6b1e6003b8 100644 --- a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp +++ b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp @@ -135,7 +135,7 @@ void tst_QUuid::fromString_data() ROW(uuidA, "{fc69b59e-cc34-4436-a43c-ee95d128b8c56"); // too long (not an error!) ROW(invalid, "{fc69b59e-cc34-4436-a43c-ee95d128b8c" ); // premature end (within length limits) ROW(invalid, " fc69b59e-cc34-4436-a43c-ee95d128b8c5}"); // leading space - ROW(uuidA, "{fc69b59e-cc34-4436-a43c-ee95d128b8c5 "); // trailing space (not an error!) + ROW(uuidB, "{1ab6e93a-b1cb-4a87-ba47-ec7e99039a7b "); // trailing space (not an error!) ROW(invalid, "{gc69b59e-cc34-4436-a43c-ee95d128b8c5}"); // non-hex digit in 1st group ROW(invalid, "{fc69b59e-cp34-4436-a43c-ee95d128b8c5}"); // non-hex digit in 2nd group ROW(invalid, "{fc69b59e-cc34-44r6-a43c-ee95d128b8c5}"); // non-hex digit in 3rd group