test: update b_stream usage
This commit is contained in:
@@ -7,10 +7,9 @@ void test_path_1(CuTest *tc)
|
||||
{
|
||||
b_path *path = b_path_create_from_cstr("C:\\hello\\world\\");
|
||||
char buf[512];
|
||||
b_stringstream str;
|
||||
b_stringstream_begin(&str, buf, sizeof buf);
|
||||
b_stringstream *str = b_stringstream_create_with_buffer(buf, sizeof buf);
|
||||
|
||||
b_object_to_string(path, (b_stream *)&str);
|
||||
b_object_to_string(path, str);
|
||||
|
||||
printf("%s\n", buf);
|
||||
|
||||
@@ -21,8 +20,8 @@ void test_path_1(CuTest *tc)
|
||||
|
||||
b_path *path4 = b_path_join(paths, sizeof paths / sizeof paths[0]);
|
||||
|
||||
b_stringstream_begin(&str, buf, sizeof buf);
|
||||
b_object_to_string(path4, (b_stream *)&str);
|
||||
b_stringstream_reset_with_buffer(str, buf, sizeof buf);
|
||||
b_object_to_string(path4, str);
|
||||
printf("%s\n", buf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user