MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / testSpinBox_

Method testSpinBox_

src/tests/class_tests/openms_gui/source/GUI/TSGDialog_test.cpp:26–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25template<typename T>
26void TestTSGDialog::testSpinBox_(T* box, string str_value)
27{
28 if (box == nullptr) return;
29
30 double value = stod(str_value);
31
32 // skip illegal input
33 if (!(value >= box->minimum() && value <= box->maximum())) return;
34
35 box->clear();
36
37 // simulate keyboard input
38 QTest::keyClicks(box, QString::fromStdString(str_value));
39 QTest::qWait(DELAY);
40
41 // verify change
42 QVERIFY(value == double(box->value())); // double cast needed because of template
43}
44
45void TestTSGDialog::testIsotopeModel_(bool skip_none)
46{

Callers

nothing calls this directly

Calls 2

clearMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected