Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two minor cleanups #593

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,6 @@ test('files-in-git',
args: [meson.current_source_dir()],
suite: ['all'])

# This is a generic pytest invocation. If we end up with more than one
# pytest-compatible test somewhere, we'll conveniently run that one too.
pytest = find_program('pytest-3', required: false)
if pytest.found()
test('pytests', pytest,
args: ['-vv', '--log-level=DEBUG'],
workdir: meson.current_source_dir(),
env: ['LIBWACOM_DATA_DIR=@0@'.format(dir_src_data)])
endif

############### tools ###########################

tools_cflags = ['-DDATABASEPATH="@0@"'.format(dir_src_data)]
Expand Down
4 changes: 2 additions & 2 deletions test/test-tablet-svg-validity.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class_found (gchar **classes, gchar *value)
{
gchar **ptr = classes;
while (*ptr) {
if (strcmp (*ptr++, value) == 0)
if (g_str_equal (*ptr++, value))
return TRUE;
}

Expand Down Expand Up @@ -365,7 +365,7 @@ static void setup_tests(WacomDevice *device)
const char *name;

name = libwacom_get_name(device);
if (strcmp(name, "Generic") == 0)
if (g_str_equal(name, "Generic"))
return;

add_test(device, test_filename);
Expand Down
2 changes: 1 addition & 1 deletion test/test-tablet-validity.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static void setup_tests(WacomDevice *device)
WacomClass cls;

name = libwacom_get_name(device);
if (strcmp(name, "Generic") == 0)
if (g_str_equal(name, "Generic"))
return;

add_test(device, test_class);
Expand Down
3 changes: 2 additions & 1 deletion tools/list-compatible-styli.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <assert.h>
#include <libgen.h>
#include <unistd.h>
#include <glib.h>
#include "libwacom.h"

static void
Expand Down Expand Up @@ -72,7 +73,7 @@ int main(int argc, char **argv)
if (argc > 1) {
printf("Usage: %s [--help] - list compatible styli\n",
basename(argv[0]));
return !!(strcmp(argv[1], "--help"));
return g_str_equal(argv[1], "--help");
}

db = libwacom_database_new_for_path(DATABASEPATH);
Expand Down