aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_atom.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_atom.c')
-rw-r--r--test/test_atom.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/test/test_atom.c b/test/test_atom.c
index 5771694..beac05c 100644
--- a/test/test_atom.c
+++ b/test/test_atom.c
@@ -1,18 +1,5 @@
-/*
- Copyright 2012-2015 David Robillard <d@drobilla.net>
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
+// Copyright 2012-2015 David Robillard <d@drobilla.net>
+// SPDX-License-Identifier: ISC
#include "atom_test_utils.c"
@@ -115,7 +102,7 @@ main(void)
LV2_Atom_String* path = (LV2_Atom_String*)lv2_atom_forge_deref(
&forge, lv2_atom_forge_uri(&forge, pstr, pstr_len));
char* pbody = (char*)LV2_ATOM_BODY(path);
- if (strcmp(pbody, pstr)) {
+ if (!!strcmp(pbody, pstr)) {
return test_fail("%s != \"%s\"\n", pbody, pstr);
}
@@ -126,7 +113,7 @@ main(void)
LV2_Atom_String* uri = (LV2_Atom_String*)lv2_atom_forge_deref(
&forge, lv2_atom_forge_uri(&forge, ustr, ustr_len));
char* ubody = (char*)LV2_ATOM_BODY(uri);
- if (strcmp(ubody, ustr)) {
+ if (!!strcmp(ubody, ustr)) {
return test_fail("%s != \"%s\"\n", ubody, ustr);
}
@@ -144,7 +131,7 @@ main(void)
LV2_Atom_String* string = (LV2_Atom_String*)lv2_atom_forge_deref(
&forge, lv2_atom_forge_string(&forge, "hello", strlen("hello")));
char* sbody = (char*)LV2_ATOM_BODY(string);
- if (strcmp(sbody, "hello")) {
+ if (!!strcmp(sbody, "hello")) {
return test_fail("%s != \"hello\"\n", sbody);
}
@@ -158,7 +145,7 @@ main(void)
0,
urid_map(NULL, "http://lexvo.org/id/term/fr")));
char* lbody = (char*)LV2_ATOM_CONTENTS(LV2_Atom_Literal, literal);
- if (strcmp(lbody, "bonjour")) {
+ if (!!strcmp(lbody, "bonjour")) {
return test_fail("%s != \"bonjour\"\n", lbody);
}
@@ -200,7 +187,7 @@ main(void)
&forge,
lv2_atom_forge_vector(&forge, sizeof(int32_t), forge.Int, 4, elems));
void* vec_body = LV2_ATOM_CONTENTS(LV2_Atom_Vector, vector);
- if (memcmp(elems, vec_body, sizeof(elems))) {
+ if (!!memcmp(elems, vec_body, sizeof(elems))) {
return test_fail("Corrupt vector\n");
}