Commit c54b99e5 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

enhance menubar generator test

parent 3c76ec10
......@@ -58,6 +58,7 @@ add_executable(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME} dtkWidgets)
target_link_libraries(${PROJECT_NAME} dtkCore)
target_link_libraries(${PROJECT_NAME} dtkThemes)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Test)
......
......@@ -17,8 +17,9 @@
#include <dtkWidgetsTest>
#include <dtkWidgets/dtkWidgets>
#include <dtkThemes>
#include <dtkWidgets/dtkWidgets>
#include <dtkWidgets/dtkWidgetsParameterMenuBarGenerator>
// ///////////////////////////////////////////////////////////////////
......@@ -36,20 +37,11 @@ class dtkWidgetsParameterMenuBarGeneratorTestCasePrivate
dtkWidgetsParameterMenuBarGeneratorTestCase::dtkWidgetsParameterMenuBarGeneratorTestCase(void) : d(new dtkWidgetsParameterMenuBarGeneratorTestCasePrivate)
{
qRegisterMetaTypeStreamOperators<dtk::d_bool>("dtk::d_bool");
qRegisterMetaTypeStreamOperators<dtk::d_real>("dtk::d_real");
qRegisterMetaTypeStreamOperators<dtk::d_int>("dtk::d_int");
qRegisterMetaTypeStreamOperators<dtk::d_string>("dtk::d_string");
qRegisterMetaType<dtk::d_real *>();
qRegisterMetaType<dtk::d_bool *>();
qRegisterMetaType<dtk::d_int *>();
qRegisterMetaType<dtk::d_string *>();
dtk::core::registerParameters();
dtk::widgets::setVerboseLoading(true);
dtk::widgets::initialize("");
dtkThemesEngine::instance()->apply();
}
dtkWidgetsParameterMenuBarGeneratorTestCase::~dtkWidgetsParameterMenuBarGeneratorTestCase(void)
......@@ -75,7 +67,12 @@ void dtkWidgetsParameterMenuBarGeneratorTestCase::testBasic(void)
dtkWidgetsParameterMenuBarGenerator menu_bar_generator(nature_file_path, definition_file_path);
dtkCoreParameters params = menu_bar_generator.parameters();
QCOMPARE(params.count() , 79);
QCOMPARE(params.count() , 78);
dtkWidgetsMenuBar bar;
menu_bar_generator.populate(&bar);
auto menus = bar.menus();
QCOMPARE(menus.count() , 4);
}
......
......@@ -54,13 +54,6 @@
"decimals": "6",
"type": "dtk::d_real"
},
"timestep": {
"label": "Temporal timestep",
"doc": "Controls the temporal step of Virtual Retina.",
"value": "1",
"min": "0",
"max": "1000"
},
"save_restore": {
"label": "Save/Restore parameters",
"doc": "Stores the parameters of the cells so they are restored when the application is opened again",
......@@ -686,4 +679,4 @@
"type": "dtk::d_real"
}
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment