1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "SimpleTypeSystem.h"
#include "../test_macros.h"
int main (char ** argc, int argv) {
int retval = 0;
SObject * obj = s_object_new ();
test_case (s_object_get_refcount (obj) == 1, "refcount == 1", retval);
s_object_ref (obj);
test_case (s_object_get_refcount (obj) == 2, "refcount == 2", retval);
s_object_ref (obj);
s_object_unref (obj);
s_object_unref (obj);
test_case (s_object_get_refcount (obj) == 1, "refcount == 1", retval);
s_object_unref (obj);
return 0;
}
|