From ef2b164f1f6b6597b48ea34ef897f6a303499620 Mon Sep 17 00:00:00 2001 From: Matthijs Velsink Date: Sun, 7 Apr 2024 23:01:04 +0200 Subject: [PATCH] gnome: Actually run all mkenums_simple tests and fix numbering Some tests for `gnome.mkenums_simple` were only compiled, but not run. Most bugs will be caught by compilation alone, but it's better to run the generated binary too in case there are runtime issues in the generated code. The naming of all enum tests is now unified as well. --- test cases/frameworks/7 gnome/mkenums/meson.build | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test cases/frameworks/7 gnome/mkenums/meson.build b/test cases/frameworks/7 gnome/mkenums/meson.build index 2886be91a..284231f2f 100644 --- a/test cases/frameworks/7 gnome/mkenums/meson.build +++ b/test cases/frameworks/7 gnome/mkenums/meson.build @@ -121,6 +121,7 @@ test('enum test 3', enumexe3) enums4 = gnome.mkenums_simple('enums4', sources : files('meson-sample.h'), function_prefix : '_') enumexe4 = executable('enumprog4', 'main4.c', enums4, dependencies : gobj) +test('enum test 4', enumexe4) enums5 = gnome.mkenums_simple('enums5', sources : 'meson-sample.h', install_header : true, @@ -135,6 +136,7 @@ main = configure_file( configuration : conf) enumexe5 = executable('enumprog5', main, enums5, dependencies : gobj) +test('enum test 5', enumexe5) # Generate template then use as input to mkenums @@ -161,7 +163,7 @@ main = configure_file( enumexe6 = executable('enumprog6', main, enums_c2, enums_h6, dependencies : gobj) -test('enum test 4', enumexe6) +test('enum test 6', enumexe6) # Test with headers coming from other directories # https://github.com/mesonbuild/meson/pull/10855 @@ -169,6 +171,8 @@ subdir('subdir') enums7 = gnome.mkenums_simple('enums7', sources: ['meson-sample.h', h2, h3]) main = configure_file( input : 'main.c', - output : 'mai7.c', + output : 'main7.c', configuration : {'ENUM_FILE': 'enums7.h'}) -test('enums7 test', executable('enumprog7', main, enums7, dependencies : gobj)) + +enumexe7 = executable('enumprog7', main, enums7, dependencies : gobj) +test('enum test 7', enumexe7)