build: re-enable namespace-specific tests

This commit is contained in:
2026-05-05 21:17:21 +01:00
parent 4b20f8ca0e
commit c29465a97d
27 changed files with 273 additions and 447 deletions
+5 -2
View File
@@ -1,6 +1,6 @@
#include <fx/core/stream.h>
#include <fx/io/file.h>
#include <fx/io/path.h>
#include <fx/stream.h>
#include <stdio.h>
int main(int argc, const char **argv)
@@ -8,7 +8,10 @@ int main(int argc, const char **argv)
fx_file *dest;
fx_path *path = fx_path_create_from_cstr("data.txt");
fx_result result = fx_file_open(
NULL, path, FX_FILE_WRITE_ONLY | FX_FILE_CREATE, &dest);
NULL,
path,
FX_FILE_WRITE_ONLY | FX_FILE_CREATE,
&dest);
if (fx_result_is_error(result)) {
fx_throw(result);
return -1;
-35
View File
@@ -1,35 +0,0 @@
#include <CuTest.h>
#include <fx/core/stringstream.h>
#include <fx/io/path.h>
#include <stdio.h>
void test_path_1(CuTest *tc)
{
fx_path *path = fx_path_create_from_cstr("C:\\hello\\world\\");
char buf[512];
fx_stringstream *str = fx_stringstream_create_with_buffer(buf, sizeof buf);
fx_object_to_string(path, str);
printf("%s\n", buf);
fx_path *path2 = fx_path_create_from_cstr("path1\\path2\\");
fx_path *path3 = fx_path_create_from_cstr("path3\\path4\\");
const fx_path *paths[] = {path, path2, path3};
fx_path *path4 = fx_path_join(paths, sizeof paths / sizeof paths[0]);
fx_stringstream_reset_with_buffer(str, buf, sizeof buf);
fx_object_to_string(path4, str);
printf("%s\n", buf);
}
CuSuite *get_all_tests(void)
{
CuSuite *suite = CuSuiteNew();
SUITE_ADD_TEST(suite, test_path_1);
return suite;
}