tests: c23 allows you to inline stack allocated arrays in struct decls

This commit is contained in:
2026-02-05 05:10:19 +00:00
parent 16be3392b0
commit d88d7f7f23
4 changed files with 27 additions and 31 deletions

View File

@@ -77,16 +77,15 @@ void cons_test(void)
TEST_PASSED();
}
const test_fn TESTS_LISP_API[] = {
MAKE_TEST_FN(int_test),
MAKE_TEST_FN(sym_test),
MAKE_TEST_FN(cons_test),
};
const test_suite_t LISP_API_SUITE = {
.name = "Lisp API Tests",
.tests = TESTS_LISP_API,
.size = ARRSIZE(TESTS_LISP_API),
.name = "Lisp API Tests",
.tests =
(test_fn[]){
MAKE_TEST_FN(int_test),
MAKE_TEST_FN(sym_test),
MAKE_TEST_FN(cons_test),
},
.size = 3,
};
/* Copyright (C) 2026 Aryadev Chavali

View File

@@ -28,14 +28,13 @@ void sv_copy_test(void)
}
}
const test_fn TESTS_SV[] = {
MAKE_TEST_FN(sv_copy_test),
};
const test_suite_t SV_SUITE = {
.name = "String View Tests",
.tests = TESTS_SV,
.size = ARRSIZE(TESTS_SV),
.name = "String View Tests",
.tests =
(test_fn[]){
MAKE_TEST_FN(sv_copy_test),
},
.size = 1,
};
/* Copyright (C) 2026 Aryadev Chavali

View File

@@ -22,14 +22,13 @@ void symtable_test(void)
TEST_PASSED();
}
const test_fn TESTS_SYMTABLE[] = {
MAKE_TEST_FN(symtable_test),
};
const test_suite_t SYMTABLE_SUITE = {
.name = "Symbol Table Tests",
.tests = TESTS_SYMTABLE,
.size = ARRSIZE(TESTS_SYMTABLE),
.name = "Symbol Table Tests",
.tests =
(test_fn[]){
MAKE_TEST_FN(symtable_test),
},
.size = 1,
};
/* Copyright (C) 2026 Aryadev Chavali

View File

@@ -69,15 +69,14 @@ void vec_test_substr(void)
TEST_PASSED();
}
const test_fn TESTS_VEC[] = {
MAKE_TEST_FN(vec_test_concat),
MAKE_TEST_FN(vec_test_substr),
};
const test_suite_t VEC_SUITE = {
.name = "Vector Tests",
.tests = TESTS_VEC,
.size = ARRSIZE(TESTS_VEC),
.name = "Vector Tests",
.tests =
(test_fn[]){
MAKE_TEST_FN(vec_test_concat),
MAKE_TEST_FN(vec_test_substr),
},
.size = 2,
};
/* Copyright (C) 2026 Aryadev Chavali