1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include "to_string.h"
#include "test_macros.h"
#include "SimpleTypeSystem.h"
int test_to_string (void) {
setup_unit();
char * m_str = NULL;
SObject * obj = NULL;
obj = s_object_new ();
m_str = s_object_to_string (obj);
test_case (m_str != NULL, "String is not NULL.");
test_case (strcmp (m_str, "(SObject, References: 1)") == 0, "string has as the correct value.");
s_print ("The string is: \"%s\"\n", m_str);
s_object_unref (obj);
free (m_str);
end_unit();
}
|