Move dataurisrc element from -bad
[platform/upstream/gstreamer.git] / docs / random / omega / testing / gstobject.txt
1 Subject: GstObject
2
3 Areas to test
4 =============
5
6 Creation
7 Refcounting
8 Destruction
9 Flags
10 Locking
11 Parentage
12 Path string
13
14
15 Tests
16 =====
17
18 Creation
19 --------
20 Create an object
21         Does it return !NULL
22         GST_IS_OBJECT() ?
23
24 Refcounting
25 -----------
26 Create new object
27         object->refcount == 1, GTK_OBJECT_FLOATING(object) == TRUE
28 Increment refcount
29         object->refcount == 2
30 Sink object
31         object->refcount == 1, GTK_OBJECT_FLOATING(object) == FALSE
32 Increment refcount
33         object->refcount == 2
34 Decrement refcount
35         object->refcount == 1
36
37 Destruction
38 -----------
39 ???
40
41 Flags (start with new object)
42 -----
43 Create new object
44         Verify that all flags are unset
45 Set a flag
46         Verify it's set
47 Unset a flag
48         Verify it's not set
49
50 Locking (start with new object)
51 -------
52 Lock an object
53         Try to lock, get false
54
55 Parentage (start with new object, check refcount == 1)
56 ---------
57 gst_object_set_parent: (start with new parent object)
58         Pass NULL...
59         Pass !NULL, but not Object...
60         Pass NULL parent...
61         Pass !NULL parent, but not Object...
62         Pass valid Object, and parent == object
63                 object->refcount == 1
64                 GTK_OBJECT_FLOATING(object) == TRUE
65                 object->parent == NULL
66         Pass valid Object
67                 object->refcount == 1
68                 GTK_OBJECT_FLOATING(object) == FALSE
69                 object->parent == parent
70                 The "parent_set" signal should fire with the object and parent as args
71         Pass Object with parent already set
72                 object->parent should not equal new parent
73                 object->refcount == 1
74 gst_object_get_parent:
75         Pass NULL...
76         Pass !NULL, not Object...
77         Pass valid object with no parent
78                 Get NULL
79         Pass valid object with parent
80                 Get parent pointer
81 gst_object_unparent:
82         Pass NULL, with no parent
83                 no effect
84         Pass !NULL, not Object, NULL parent
85                 pointer not mangled
86         Pass valid object, with no parent
87                 object->parent == NULL
88                 object->refcount = 1
89         Pass NULL, with valid parent
90                 no effect
91         Pass !NULL, not Object, with valid object as parent
92                 pointer not mangled
93         Pass valid object, with valid parent
94                 object->parent == NULL
95                 object->refcount == 0