Skip to content

Commit

Permalink
tests: avoid accidentally enabled tests
Browse files Browse the repository at this point in the history
also fixed a few include errors
  • Loading branch information
mochaaP committed Apr 21, 2024
1 parent ced87c5 commit a92080b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion test/meson.build
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
error('Tests are not supported yet.')

subdir('test-common')
subdir('mock-server')
subdir('integration-test-common')
Expand All @@ -12,7 +14,7 @@ foreach integration_test : integration_tests
exe = executable(
integration_test,
integration_test_srcs,
dependencies: [gtk, wayland_client, gtk_layer_shell, integration_test_common])
dependencies: [gtk, wayland_client, gtk_session_lock, integration_test_common])
expect_fail = integration_test.endswith('expect-fail')
test(
integration_test,
Expand Down
2 changes: 1 addition & 1 deletion test/unit-tests/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
test_get_version = executable(
'test-get-version',
files('test-get-version.c'),
dependencies: [gtk, gtk_layer_shell, test_common])
dependencies: [gtk, gtk_session_lock, test_common])

test('test-get-version', test_get_version, args: [meson.project_version()])
14 changes: 7 additions & 7 deletions test/unit-tests/test-get-version.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#include "gtk-layer-shell.h"
#include "gtk-session-lock.h"
#include "test-common.h"

int main(int argc, char** argv)
{
ASSERT_EQ(argc, 2, "%d");

char version_provided_by_gtk_layer_shell[1024];
char version_provided_by_gtk_session_lock[1024];
sprintf(
version_provided_by_gtk_layer_shell,
version_provided_by_gtk_session_lock,
"%d.%d.%d",
gtk_layer_get_major_version(),
gtk_layer_get_minor_version(),
gtk_layer_get_micro_version());
gtk_session_lock_get_major_version(),
gtk_session_lock_get_minor_version(),
gtk_session_lock_get_micro_version());

ASSERT_STR_EQ(version_provided_by_gtk_layer_shell, argv[1]);
ASSERT_STR_EQ(version_provided_by_gtk_session_lock, argv[1]);

return 0;
}

0 comments on commit a92080b

Please sign in to comment.