glennw updated this revision to Diff 38685.
glennw added a comment.

  Added an autotest to ensure that the line edit mask is updated correctly.
  
  A couple of notes about the test results below:
  
  - I tried to set the current locale in the new test to ensure it reproduces. 
The setLocale() function is not reentrant, which should be fine unless tests 
are run in parallel?
  - There are other tests in this file that fail before my patch, and now pass 
afterwards. I guess they are probably passing in CI due to the CI locale 
setting?
  
  Test results before this patch:
  
    ********* Start testing of KTimeComboBoxTest *********
    Config: Using QtTest library 5.9.5, Qt 5.9.5 (x86_64-little_endian-lp64 
shared (dynamic) release build; by GCC 7.3.0)
    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: [kde/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: [kde/kwidgetsaddons/autotests/ktimecomboboxtest.cpp(69)]
    PASS   : KTimeComboBoxTest::testTimeListInterval()
    PASS   : KTimeComboBoxTest::testTimeList()
    PASS   : KTimeComboBoxTest::testOptions()
    PASS   : KTimeComboBoxTest::testDisplayFormat()
    FAIL!  : KTimeComboBoxTest::testMask() Compared values are not the same
       Actual   (mask.contains(QLatin1String("aa"))): 0
       Expected (true)                              : 1
       Loc: [kde/kwidgetsaddons/autotests/ktimecomboboxtest.cpp(198)]
    PASS   : KTimeComboBoxTest::cleanupTestCase()
    Totals: 8 passed, 3 failed, 0 skipped, 0 blacklisted, 71ms
    ********* Finished testing of KTimeComboBoxTest *********
  
  Test results after:
  
    ********* Start testing of KTimeComboBoxTest *********
    Config: Using QtTest library 5.9.5, Qt 5.9.5 (x86_64-little_endian-lp64 
shared (dynamic) release build; by GCC 7.3.0)
    PASS   : KTimeComboBoxTest::initTestCase()
    PASS   : KTimeComboBoxTest::_q_showIfNotHidden()
    PASS   : KTimeComboBoxTest::testDefaults()
    PASS   : KTimeComboBoxTest::testValidNull()
    PASS   : KTimeComboBoxTest::testTimeRange()
    PASS   : KTimeComboBoxTest::testTimeListInterval()
    PASS   : KTimeComboBoxTest::testTimeList()
    PASS   : KTimeComboBoxTest::testOptions()
    PASS   : KTimeComboBoxTest::testDisplayFormat()
    PASS   : KTimeComboBoxTest::testMask()
    PASS   : KTimeComboBoxTest::cleanupTestCase()
    Totals: 11 passed, 0 failed, 0 skipped, 0 blacklisted, 69ms
    ********* Finished testing of KTimeComboBoxTest *********

REPOSITORY
  R236 KWidgetsAddons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14435?vs=38638&id=38685

REVISION DETAIL
  https://phabricator.kde.org/D14435

AFFECTED FILES
  autotests/ktimecomboboxtest.cpp
  autotests/ktimecomboboxtest.h
  src/ktimecombobox.cpp

To: glennw, cfeck, mlaurent
Cc: ngraham, kde-frameworks-devel, michaelh, bruns

Reply via email to