Use wxScopedPtr instead of manual delete in wxSpinCtrlDouble test
No real changes.
This commit is contained in:
@@ -224,11 +224,18 @@ TEST_CASE_METHOD(SpinCtrlDoubleTestCase,
|
|||||||
|
|
||||||
static inline unsigned int GetInitialDigits(double inc)
|
static inline unsigned int GetInitialDigits(double inc)
|
||||||
{
|
{
|
||||||
wxSpinCtrlDouble* sc = new wxSpinCtrlDouble(wxTheApp->GetTopWindow(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS,
|
wxScopedPtr<wxSpinCtrlDouble> sc(new wxSpinCtrlDouble
|
||||||
0, 50, 0, inc);
|
(
|
||||||
unsigned int digits = sc->GetDigits();
|
wxTheApp->GetTopWindow(),
|
||||||
delete sc;
|
wxID_ANY,
|
||||||
return digits;
|
wxEmptyString,
|
||||||
|
wxDefaultPosition,
|
||||||
|
wxDefaultSize,
|
||||||
|
wxSP_ARROW_KEYS,
|
||||||
|
0, 50, 0,
|
||||||
|
inc
|
||||||
|
));
|
||||||
|
return sc->GetDigits();
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("SpinCtrlDouble::InitialDigits", "[spinctrldouble][initialdigits]")
|
TEST_CASE("SpinCtrlDouble::InitialDigits", "[spinctrldouble][initialdigits]")
|
||||||
|
Reference in New Issue
Block a user