aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2026-05-12 13:34:13 -0400
committerGitHub <noreply@github.com>2026-05-12 13:34:13 -0400
commitd8ee8c27444a56bb98dd8bd67a019a1e9efbcc10 (patch)
tree6ae1275a5f8e5794b917aac95c6cb1ab3f4cb6c5 /tests
parent4649a889a916aa377ebd3ca8f3daa9ac703baa34 (diff)
parent1d91efc28e30c8501428fec8ff6cd7b13dcdfb95 (diff)
downloadstasis-22c7a97286eddf86c3a5619ea19fef3b57dc5cbf.tar.gz
Merge pull request #139 from jhunkeler/bughunt-1002HEAD1.6.1master
Bughunt 0x1002
Diffstat (limited to 'tests')
-rw-r--r--tests/include/testing.h6
-rw-r--r--tests/test_conda.c4
-rw-r--r--tests/test_ini.c2
-rw-r--r--tests/test_template.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/tests/include/testing.h b/tests/include/testing.h
index 728b6a6..d11398c 100644
--- a/tests/include/testing.h
+++ b/tests/include/testing.h
@@ -224,7 +224,7 @@ inline void stasis_testing_teardown_workspace() {
#define STASIS_ASSERT(COND, REASON) do { \
stasis_testing_record_result((struct stasis_test_result_t) { \
.filename = __FILE_NAME__, \
- .funcname = __FUNCTION__, \
+ .funcname = __func__, \
.lineno = __LINE__, \
.status = (COND), \
.msg_assertion = "ASSERT(" #COND ")", \
@@ -234,7 +234,7 @@ inline void stasis_testing_teardown_workspace() {
#define STASIS_ASSERT_FATAL(COND, REASON) do { \
stasis_testing_record_result((struct stasis_test_result_t) { \
.filename = __FILE_NAME__, \
- .funcname = __FUNCTION__, \
+ .funcname = __func__, \
.lineno = __LINE__, \
.status = (COND), \
.msg_assertion = "ASSERT FATAL (" #COND ")", \
@@ -248,7 +248,7 @@ inline void stasis_testing_teardown_workspace() {
#define STASIS_SKIP_IF(COND, REASON) do { \
stasis_testing_record_result((struct stasis_test_result_t) { \
.filename = __FILE_NAME__, \
- .funcname = __FUNCTION__, \
+ .funcname = __func__, \
.lineno = __LINE__, \
.status = true, \
.skip = (COND), \
diff --git a/tests/test_conda.c b/tests/test_conda.c
index f6ee2f8..bbbef3c 100644
--- a/tests/test_conda.c
+++ b/tests/test_conda.c
@@ -110,13 +110,13 @@ void test_conda_setup_headless() {
void test_conda_env_create_from_uri() {
const char *url = "https://ssb.stsci.edu/jhunk/stasis_test/test_conda_env_create_from_uri.yml";
- char *name = strdup(__FUNCTION__);
+ char *name = strdup(__func__);
STASIS_ASSERT(conda_env_create_from_uri(name, (char *) url, "3.11") == 0, "creating an environment from a remote source failed");
free(name);
}
void test_conda_env_create_export_remove() {
- char *name = strdup(__FUNCTION__);
+ char *name = strdup(__func__);
STASIS_ASSERT(conda_env_create(name, "3", "fitsverify") == 0, "unable to create a simple environment");
STASIS_ASSERT(conda_env_export(name, ".", name) == 0, "unable to export an environment");
STASIS_ASSERT(conda_env_remove(name) == 0, "unable to remove an environment");
diff --git a/tests/test_ini.c b/tests/test_ini.c
index af47ddf..3070806 100644
--- a/tests/test_ini.c
+++ b/tests/test_ini.c
@@ -205,7 +205,7 @@ void test_ini_getall() {
STASIS_ASSERT_FATAL(ini != NULL, "failed to open ini file");
const struct INIData *d = NULL;
- for (size_t i = 0; (d = ini_getall(ini, "default")) != NULL; i++) {
+ while ((d = ini_getall(ini, "default")) != NULL) {
STASIS_ASSERT(d->key != NULL, "INIData key should not be NULL");
STASIS_ASSERT(d->value != NULL, "INIData key should not be NULL");
}
diff --git a/tests/test_template.c b/tests/test_template.c
index e8f0c1d..3efb142 100644
--- a/tests/test_template.c
+++ b/tests/test_template.c
@@ -95,7 +95,7 @@ void test_tpl_register_func() {
struct testcase {
const char *key;
int argc;
- void *func;
+ tplfunc *func;
};
struct testcase tc[] = {
{.key = "add", .argc = 2, .func = &adder},