#include #include #include #include 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; }