From 0f92b7d97cb9a791cad91bf5723cf5e90dcf571e Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sun, 13 Nov 2016 16:16:09 +0530 Subject: [PATCH] tests/4 qt: Test that invalid modules are not found --- test cases/frameworks/4 qt/meson.build | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test cases/frameworks/4 qt/meson.build b/test cases/frameworks/4 qt/meson.build index 3d727a4fb..013f14df1 100644 --- a/test cases/frameworks/4 qt/meson.build +++ b/test cases/frameworks/4 qt/meson.build @@ -6,6 +6,17 @@ foreach qt : ['qt4', 'qt5'] if qt == 'qt5' qt_modules += qt5_modules endif + # Test that invalid modules are indeed not found + fakeqtdep = dependency(qt, modules : ['DefinitelyNotFound'], required : false) + if fakeqtdep.found() + error('Invalid qt dep incorrectly found!') + endif + # Test that partially-invalid modules are indeed not found + fakeqtdep = dependency(qt, modules : ['Core', 'DefinitelyNotFound'], required : false) + if fakeqtdep.found() + error('Invalid qt dep incorrectly found!') + endif + # If qt4 modules are found, test that. qt5 is required. qtdep = dependency(qt, modules : qt_modules, required : qt == 'qt5') if qtdep.found() qtmodule = import(qt)