Bug 341655 - ktimecomboboxtest test fails when time is in 12h format
Summary: ktimecomboboxtest test fails when time is in 12h format
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kwidgetsaddons
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Christoph Feck
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-08 14:36 UTC by stupor_scurvy343
Modified: 2020-07-02 21:30 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stupor_scurvy343 2014-12-08 14:36:01 UTC
I've run into this intermittently for some time, but haven't been able to pin it down.

6/10 Testing: ktimecomboboxtest
6/10 Test: ktimecomboboxtest
Command: "/home/michael/dev/kde/frameworks/kwidgetsaddons/autotests/ktimecomboboxtest"
Directory: /home/michael/dev/kde/frameworks/kwidgetsaddons/autotests
"ktimecomboboxtest" start time: Dec 09 01:12 AEDT
Output:
----------------------------------------------------------
********* Start testing of KTimeComboBoxTest *********
Config: Using QtTest library 5.3.2, Qt 5.3.2
PASS   : KTimeComboBoxTest::initTestCase()
PASS   : KTimeComboBoxTest::_q_showIfNotHidden()
FAIL!  : KTimeComboBoxTest::testDefaults() Compared values are not the same
   Actual   (m_combo->time())  : 12:00:00.000
   Expected (QTime(0, 0, 0, 0)): 00:00:00.000
   Loc: [/home/michael/dev/kde/frameworks/kwidgetsaddons/autotests/ktimecomboboxtest.cpp(33)]
PASS   : KTimeComboBoxTest::testValidNull()
FAIL!  : KTimeComboBoxTest::testTimeRange() Compared values are not the same
   Actual   (m_combo->isValid()): 1
   Expected (false)             : 0
   Loc: [/home/michael/dev/kde/frameworks/kwidgetsaddons/autotests/ktimecomboboxtest.cpp(69)]
PASS   : KTimeComboBoxTest::testTimeListInterval()
PASS   : KTimeComboBoxTest::testTimeList()
PASS   : KTimeComboBoxTest::testOptions()
PASS   : KTimeComboBoxTest::testDisplayFormat()
PASS   : KTimeComboBoxTest::cleanupTestCase()
Totals: 8 passed, 2 failed, 0 skipped
********* Finished testing of KTimeComboBoxTest *********
<end of output>
Test time =   0.13 sec
----------------------------------------------------------
Test Failed.
"ktimecomboboxtest" end time: Dec 09 01:12 AEDT
"ktimecomboboxtest" time elapsed: 00:00:00
----------------------------------------------------------
Comment 1 Christoph Feck 2014-12-08 20:01:55 UTC
Probably caused by the locale using 12h format. I couldn't find a note in API docs about default value for time(), but as the autotest suggests, it should always be QTime(0,0,0,0).
Comment 2 stupor_scurvy343 2014-12-09 10:31:38 UTC
I did some more testing and confirm that the test passes when time is in 24h format.
Comment 3 gjditchfield 2020-07-02 21:30:16 UTC
Presumed fixed by https://invent.kde.org/frameworks/kwidgetsaddons/-/merge_requests/3