author | bdonegan |
Tue, 21 Sep 2010 10:35:24 +0100 | |
changeset 15 | e37098e40f6a |
parent 2 | 0cb2248d0edc |
permissions | -rw-r--r-- |
2
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
1 |
/* GLIB - Library of useful routines for C programming |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
2 |
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
3 |
* |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
4 |
* This library is free software; you can redistribute it and/or |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
5 |
* modify it under the terms of the GNU Lesser General Public |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
6 |
* License as published by the Free Software Foundation; either |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
7 |
* version 2 of the License, or (at your option) any later version. |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
8 |
* |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
9 |
* This library is distributed in the hope that it will be useful, |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
12 |
* Lesser General Public License for more details. |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
13 |
* |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU Lesser General Public |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
15 |
* License along with this library; if not, write to the |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
16 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
17 |
* Boston, MA 02111-1307, USA. |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
18 |
*/ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
19 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
20 |
/* |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
21 |
* Modified by the GLib Team and others 1997-2000. See the AUTHORS |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
22 |
* file for a list of people on the GLib Team. See the ChangeLog |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
23 |
* files for a list of changes. These files are distributed with |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
24 |
* GLib at ftp://ftp.gtk.org/pub/gtk/. |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
25 |
*/ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
26 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
27 |
#undef G_DISABLE_ASSERT |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
28 |
#undef G_LOG_DOMAIN |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
29 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
30 |
#ifdef HAVE_CONFIG_H |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
31 |
#include <config.h> |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
32 |
#endif |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
33 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
34 |
#include <stdio.h> |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
35 |
#include <string.h> |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
36 |
#include <stdlib.h> |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
37 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
38 |
#ifdef HAVE_UNISTD_H |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
39 |
#include <unistd.h> |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
40 |
#endif |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
41 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
42 |
#include "glib.h" |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
43 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
44 |
#ifdef SYMBIAN |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
45 |
#include "mrt2_glib2_test.h" |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
46 |
#endif /*SYMBIAN*/ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
47 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
48 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
49 |
int array[10000]; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
50 |
gboolean failed = FALSE; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
51 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
52 |
#define TEST(m,cond) G_STMT_START { failed = !(cond); \ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
53 |
if (failed) \ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
54 |
{ assert_failed = TRUE; \ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
55 |
if (!m) \ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
56 |
g_print ("\n(%s:%d) failed for: %s\n", __FILE__, __LINE__, ( # cond )); \ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
57 |
else \ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
58 |
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
59 |
exit(1); \ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
60 |
} \ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
61 |
} G_STMT_END |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
62 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
63 |
#define C2P(c) ((gpointer) ((long) (c))) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
64 |
#define P2C(p) ((gchar) ((long) (p))) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
65 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
66 |
#define GLIB_TEST_STRING "el dorado " |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
67 |
#define GLIB_TEST_STRING_5 "el do" |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
68 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
69 |
typedef struct { |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
70 |
guint age; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
71 |
gchar name[40]; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
72 |
} GlibTestInfo; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
73 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
74 |
static gboolean |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
75 |
node_build_string (GNode *node, |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
76 |
gpointer data) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
77 |
{ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
78 |
gchar **p = data; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
79 |
gchar *string; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
80 |
gchar c[2] = "_"; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
81 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
82 |
c[0] = P2C (node->data); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
83 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
84 |
string = g_strconcat (*p ? *p : "", c, NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
85 |
g_free (*p); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
86 |
*p = string; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
87 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
88 |
return FALSE; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
89 |
} |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
90 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
91 |
static void |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
92 |
g_node_test (void) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
93 |
{ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
94 |
GNode *root; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
95 |
GNode *node; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
96 |
GNode *node_B; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
97 |
GNode *node_D; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
98 |
GNode *node_F; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
99 |
GNode *node_G; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
100 |
GNode *node_J; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
101 |
guint i; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
102 |
gchar *tstring; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
103 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
104 |
failed = FALSE; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
105 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
106 |
root = g_node_new (C2P ('A')); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
107 |
TEST (NULL, g_node_depth (root) == 1 && g_node_max_height (root) == 1); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
108 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
109 |
node_B = g_node_new (C2P ('B')); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
110 |
g_node_append (root, node_B); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
111 |
TEST (NULL, root->children == node_B); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
112 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
113 |
g_node_append_data (node_B, C2P ('E')); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
114 |
g_node_prepend_data (node_B, C2P ('C')); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
115 |
node_D = g_node_new (C2P ('D')); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
116 |
g_node_insert (node_B, 1, node_D); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
117 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
118 |
node_F = g_node_new (C2P ('F')); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
119 |
g_node_append (root, node_F); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
120 |
TEST (NULL, root->children->next == node_F); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
121 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
122 |
node_G = g_node_new (C2P ('G')); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
123 |
g_node_append (node_F, node_G); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
124 |
node_J = g_node_new (C2P ('J')); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
125 |
g_node_prepend (node_G, node_J); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
126 |
g_node_insert (node_G, 42, g_node_new (C2P ('K'))); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
127 |
g_node_insert_data (node_G, 0, C2P ('H')); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
128 |
g_node_insert (node_G, 1, g_node_new (C2P ('I'))); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
129 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
130 |
TEST (NULL, g_node_depth (root) == 1); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
131 |
TEST (NULL, g_node_max_height (root) == 4); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
132 |
TEST (NULL, g_node_depth (node_G->children->next) == 4); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
133 |
TEST (NULL, g_node_n_nodes (root, G_TRAVERSE_LEAFS) == 7); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
134 |
TEST (NULL, g_node_n_nodes (root, G_TRAVERSE_NON_LEAFS) == 4); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
135 |
TEST (NULL, g_node_n_nodes (root, G_TRAVERSE_ALL) == 11); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
136 |
TEST (NULL, g_node_max_height (node_F) == 3); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
137 |
TEST (NULL, g_node_n_children (node_G) == 4); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
138 |
TEST (NULL, g_node_find_child (root, G_TRAVERSE_ALL, C2P ('F')) == node_F); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
139 |
TEST (NULL, g_node_find (root, G_LEVEL_ORDER, G_TRAVERSE_NON_LEAFS, C2P ('I')) == NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
140 |
TEST (NULL, g_node_find (root, G_IN_ORDER, G_TRAVERSE_LEAFS, C2P ('J')) == node_J); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
141 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
142 |
for (i = 0; i < g_node_n_children (node_B); i++) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
143 |
{ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
144 |
node = g_node_nth_child (node_B, i); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
145 |
TEST (NULL, P2C (node->data) == ('C' + i)); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
146 |
} |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
147 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
148 |
for (i = 0; i < g_node_n_children (node_G); i++) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
149 |
TEST (NULL, g_node_child_position (node_G, g_node_nth_child (node_G, i)) == i); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
150 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
151 |
/* we have built: A |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
152 |
* / \ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
153 |
* B F |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
154 |
* / | \ \ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
155 |
* C D E G |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
156 |
* / /\ \ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
157 |
* H I J K |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
158 |
* |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
159 |
* for in-order traversal, 'G' is considered to be the "left" |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
160 |
* child of 'F', which will cause 'F' to be the last node visited. |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
161 |
*/ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
162 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
163 |
tstring = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
164 |
g_node_traverse (root, G_PRE_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
165 |
TEST (tstring, strcmp (tstring, "ABCDEFGHIJK") == 0); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
166 |
g_free (tstring); tstring = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
167 |
g_node_traverse (root, G_POST_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
168 |
TEST (tstring, strcmp (tstring, "CDEBHIJKGFA") == 0); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
169 |
g_free (tstring); tstring = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
170 |
g_node_traverse (root, G_IN_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
171 |
TEST (tstring, strcmp (tstring, "CBDEAHGIJKF") == 0); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
172 |
g_free (tstring); tstring = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
173 |
g_node_traverse (root, G_LEVEL_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
174 |
TEST (tstring, strcmp (tstring, "ABFCDEGHIJK") == 0); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
175 |
g_free (tstring); tstring = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
176 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
177 |
g_node_traverse (root, G_LEVEL_ORDER, G_TRAVERSE_LEAFS, -1, node_build_string, &tstring); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
178 |
TEST (tstring, strcmp (tstring, "CDEHIJK") == 0); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
179 |
g_free (tstring); tstring = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
180 |
g_node_traverse (root, G_PRE_ORDER, G_TRAVERSE_NON_LEAFS, -1, node_build_string, &tstring); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
181 |
TEST (tstring, strcmp (tstring, "ABFG") == 0); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
182 |
g_free (tstring); tstring = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
183 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
184 |
g_node_reverse_children (node_B); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
185 |
g_node_reverse_children (node_G); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
186 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
187 |
g_node_traverse (root, G_LEVEL_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
188 |
TEST (tstring, strcmp (tstring, "ABFEDCGKJIH") == 0); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
189 |
g_free (tstring); tstring = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
190 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
191 |
g_node_append (node_D, g_node_new (C2P ('L'))); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
192 |
g_node_append (node_D, g_node_new (C2P ('M'))); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
193 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
194 |
g_node_traverse (root, G_LEVEL_ORDER, G_TRAVERSE_ALL, -1, node_build_string, &tstring); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
195 |
TEST (tstring, strcmp (tstring, "ABFEDCGLMKJIH") == 0); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
196 |
g_free (tstring); tstring = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
197 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
198 |
g_node_destroy (root); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
199 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
200 |
/* allocation tests */ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
201 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
202 |
root = g_node_new (NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
203 |
node = root; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
204 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
205 |
for (i = 0; i < 200; i++) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
206 |
{ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
207 |
g_node_append (node, g_node_new (NULL)); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
208 |
if ((i%5) == 4) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
209 |
node = node->children->next; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
210 |
} |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
211 |
TEST (NULL, g_node_max_height (root) > 40); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
212 |
TEST (NULL, g_node_n_nodes (root, G_TRAVERSE_ALL) == 1 + 200); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
213 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
214 |
g_node_destroy (root); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
215 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
216 |
if (failed) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
217 |
exit(1); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
218 |
} |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
219 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
220 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
221 |
int |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
222 |
main (int argc, |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
223 |
char *argv[]) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
224 |
{ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
225 |
#ifdef SYMBIAN |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
226 |
g_log_set_handler (NULL, G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG, &mrtLogHandler, NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
227 |
g_set_print_handler(mrtPrintHandler); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
228 |
#endif /*SYMBIAN*/ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
229 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
230 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
231 |
g_node_test (); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
232 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
233 |
#ifdef SYMBIAN |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
234 |
testResultXml("node-test"); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
235 |
#endif /* EMULATOR */ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
236 |
return 0; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
237 |
} |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
238 |