Fix testing wxSpinCtrl[Double] unsupported features under wxQt
Backwards ranges are not supported under wxQt and setting empty string in the control automatically displays minVal.
This commit is contained in:
parent
ff4995ec01
commit
7e360dcf1e
3 changed files with 24 additions and 0 deletions
|
|
@ -143,11 +143,13 @@ TEST_CASE_METHOD(SpinCtrlDoubleTestCase,
|
|||
CHECK( m_spin->GetMin() == -10.0 );
|
||||
CHECK( m_spin->GetMax() == 10.0 );
|
||||
|
||||
#ifndef __WXQT__
|
||||
//Test backwards ranges
|
||||
m_spin->SetRange(75.0, 50.0);
|
||||
|
||||
CHECK( m_spin->GetMin() == 75.0 );
|
||||
CHECK( m_spin->GetMax() == 50.0 );
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST_CASE_METHOD(SpinCtrlDoubleTestCase,
|
||||
|
|
@ -182,7 +184,11 @@ TEST_CASE_METHOD(SpinCtrlDoubleTestCase,
|
|||
CHECK( updatedText.GetCount() == 0 );
|
||||
|
||||
m_spin->SetValue("");
|
||||
#ifndef __WXQT__
|
||||
CHECK( m_spin->GetTextValue() == "" );
|
||||
#else
|
||||
CHECK( m_spin->GetTextValue() == "0.00" ); // the control automatically displays minVal
|
||||
#endif
|
||||
CHECK( m_spin->GetValue() == 0 );
|
||||
|
||||
CHECK( updatedSpin.GetCount() == 0 );
|
||||
|
|
|
|||
|
|
@ -253,11 +253,13 @@ TEST_CASE_METHOD(SpinCtrlTestCase2, "SpinCtrl::Range", "[spinctrl]")
|
|||
|
||||
CHECK(m_spin->GetBase() == 10);
|
||||
|
||||
#ifndef __WXQT__
|
||||
//Test backwards ranges
|
||||
m_spin->SetRange(75, 50);
|
||||
|
||||
CHECK(m_spin->GetMin() == 75);
|
||||
CHECK(m_spin->GetMax() == 50);
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST_CASE_METHOD(SpinCtrlTestCase2, "SpinCtrl::Value", "[spinctrl]")
|
||||
|
|
@ -291,7 +293,11 @@ TEST_CASE_METHOD(SpinCtrlTestCase2, "SpinCtrl::Value", "[spinctrl]")
|
|||
CHECK(updatedText.GetCount() == 0);
|
||||
|
||||
m_spin->SetValue("");
|
||||
#ifndef __WXQT__
|
||||
CHECK( m_spin->GetTextValue() == "" );
|
||||
#else
|
||||
CHECK( m_spin->GetTextValue() == "0" ); // the control automatically displays minVal
|
||||
#endif
|
||||
CHECK( m_spin->GetValue() == 0 );
|
||||
|
||||
CHECK(updatedSpin.GetCount() == 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue