summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2025-09-11 09:32:50 -0400
committerAndrew Opalach <andrew@akon.city> 2025-09-11 09:32:50 -0400
commit98ffb7841e95dfa530bc19fe5946b814d77cdde9 (patch)
tree290d88f5a0fd49fce0d84816376ece9a94a2c6b1
parented6fc176a1ef6afd43eaa198c43eb813c3a81d99 (diff)
downloadlibalabaster-98ffb7841e95dfa530bc19fe5946b814d77cdde9.tar.gz
libalabaster-98ffb7841e95dfa530bc19fe5946b814d77cdde9.tar.bz2
libalabaster-98ffb7841e95dfa530bc19fe5946b814d77cdde9.zip
tests: Fix left over usage of NPOS in str test
Signed-off-by: Andrew Opalach <andrew@akon.city>
-rw-r--r--meson.build2
-rw-r--r--tests/str.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 849aec6..285af45 100644
--- a/meson.build
+++ b/meson.build
@@ -74,7 +74,7 @@ alabaster = declare_dependency(include_directories: alabaster_inc,
dependencies: alabaster_deps, sources: alabaster_src,
compile_args: alabaster_args)
-if get_option('tests').allowed() and not meson.is_subproject()
+if get_option('tests').allowed()
tests_src = [
'tests/main.c',
'tests/lib.c',
diff --git a/tests/str.c b/tests/str.c
index 03284d6..e961ee9 100644
--- a/tests/str.c
+++ b/tests/str.c
@@ -92,10 +92,10 @@ static bool str_test_find_rfind(void)
AL_TEST_EQ(al_str_find(&string0, '\\'), 7, u32);
AL_TEST_EQ(al_str_rfind(&string0, '\\'), 10, u32);
- AL_TEST_EQ(al_str_find(&string0, 'P'), AL_STR_NPOS, u32);
+ AL_TEST_EQ(al_str_find(&string0, 'P'), AL_STR_NO_POS, u32);
AL_TEST_EQ(al_str_find_str(&string0, &al_str_c("wow\\")), 4, u32);
- AL_TEST_EQ(al_str_find_str(&string0, &al_str_c("John\\")), AL_STR_NPOS, u32);
+ AL_TEST_EQ(al_str_find_str(&string0, &al_str_c("John\\")), AL_STR_NO_POS, u32);
AL_TEST_END();
}