Skip to content

Commit

Permalink
qt: add DialogModel unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chubinou authored and robUx4 committed Oct 15, 2024
1 parent db6dc2d commit e4c67e4
Show file tree
Hide file tree
Showing 3 changed files with 411 additions and 0 deletions.
20 changes: 20 additions & 0 deletions modules/gui/qt/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,26 @@ test_renderer_manager_model_LDFLAGS = $(QT_QTEST_COMMON_ldflags)
check_PROGRAMS += test_renderer_manager_model
TESTS += test_renderer_manager_model

# test_vlc_dialog_model

test_vlc_dialog_model_SOURCES = \
tests/vlc_stub_modules.cpp \
tests/test_vlc_dialog_model.cpp \
dialogs/dialogs/dialogmodel.cpp

nodist_test_vlc_dialog_model_SOURCES = \
tests/test_vlc_dialog_model.moc \
dialogs/dialogs/dialogmodel.moc.cpp

BUILT_SOURCES += tests/test_vlc_dialog_model.moc
CLEANFILES += tests/test_vlc_dialog_model.moc
test_vlc_dialog_model_CPPFLAGS = $(QT_QTEST_COMMON_cppflags)
test_vlc_dialog_model_CXXFLAGS = $(QT_QTEST_COMMON_cxxflags)
test_vlc_dialog_model_LDADD = $(QT_QTEST_COMMON_ldadd)
test_vlc_dialog_model_LDFLAGS = $(QT_QTEST_COMMON_ldflags)
check_PROGRAMS += test_vlc_dialog_model
TESTS += test_vlc_dialog_model

endif

QML_LOG_COMPILER = $(builddir)/qml_test -input
Expand Down
21 changes: 21 additions & 0 deletions modules/gui/qt/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,28 @@ if qt6_dep.found()
'suite': ['qt'],
'include_directories' : qt_include_dir,
'link_with': [libvlccore, libvlc],
'dependencies': [qt6_dep, qt_extra_deps, qtest_qt6_dep]
}

vlc_tests += {
'name': 'test_qt_dialog_model',
'sources': files(
'tests/vlc_stub_modules.cpp',
'tests/test_vlc_dialog_model.cpp',
'dialogs/dialogs/dialogmodel.hpp',
'dialogs/dialogs/dialogmodel.cpp'
),
'moc_sources': files(
'tests/test_vlc_dialog_model.cpp'
),
'moc_headers': files(
'dialogs/dialogs/dialogmodel.hpp'
),
'suite': ['qt'],
'include_directories' : qt_include_dir,
'link_with': [libvlccore, libvlc],
'dependencies': [qt6_dep, qt_extra_deps, qtest_qt6_dep],
}

endif
endif
Loading

0 comments on commit e4c67e4

Please sign in to comment.