1
/*******************************************************************************
2
**3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
3
** 10 20 30 40 50 60 70 80
12
** Mirco "MacSlow" Mueller <mirco.mueller@canonical.com>
13
** David Barth <david.barth@canonical.com>
15
** copyright (C) Canonical, oct. 2008
17
*******************************************************************************/
26
Defaults* defaults = NULL;
28
defaults = defaults_new ();
29
g_assert (defaults != NULL);
30
defaults_del (defaults);
36
Defaults* defaults = NULL;
38
defaults = defaults_new ();
39
defaults_del (defaults);
40
/*g_assert (defaults == NULL);*/
44
test_defaults_initialized ()
46
Defaults* defaults = NULL;
48
defaults = defaults_new ();
49
g_assert_cmpint (defaults_initialized (defaults), ==, TRUE);
50
defaults_del (defaults);
54
test_defaults_get_desktop_width ()
56
Defaults* defaults = NULL;
58
defaults = defaults_new ();
59
g_assert_cmpint (defaults_get_desktop_width (defaults), <=, 4096);
60
g_assert_cmpint (defaults_get_desktop_width (defaults), ==, 800);
61
g_assert_cmpint (defaults_get_desktop_width (defaults), >=, 640);
62
defaults_del (defaults);
66
test_defaults_get_desktop_height ()
68
Defaults* defaults = NULL;
70
defaults = defaults_new ();
71
g_assert_cmpint (defaults_get_desktop_height (defaults), <=, 4096);
72
g_assert_cmpint (defaults_get_desktop_height (defaults), ==, 600);
73
g_assert_cmpint (defaults_get_desktop_height (defaults), >=, 600);
74
defaults_del (defaults);
78
test_defaults_get_bubble_width ()
80
Defaults* defaults = NULL;
82
defaults = defaults_new ();
83
g_assert_cmpint (defaults_get_bubble_width (defaults), <=, 1024);
84
g_assert_cmpint (defaults_get_bubble_width (defaults), ==, 300);
85
g_assert_cmpint (defaults_get_bubble_width (defaults), >=, 200);
86
defaults_del (defaults);
90
test_defaults_get_bubble_height ()
92
Defaults* defaults = NULL;
94
defaults = defaults_new ();
95
g_assert_cmpint (defaults_get_bubble_height (defaults), <=, 300);
96
g_assert_cmpint (defaults_get_bubble_height (defaults), ==, 100);
97
g_assert_cmpint (defaults_get_bubble_height (defaults), >=, 50);
98
defaults_del (defaults);
102
test_defaults_get_bubble_opacity ()
104
Defaults* defaults = NULL;
106
defaults = defaults_new ();
107
g_assert_cmpfloat (defaults_get_bubble_opacity (defaults), <=, 1.0f);
108
g_assert_cmpfloat (defaults_get_bubble_opacity (defaults), ==, 0.75f);
109
g_assert_cmpfloat (defaults_get_bubble_opacity (defaults), >=, 0.1f);
110
defaults_del (defaults);
114
test_defaults_get_bubble_color ()
116
Defaults* defaults = NULL;
119
defaults = defaults_new ();
120
defaults_get_bubble_color (defaults, &color[0], &color[1], &color[2]);
121
g_assert_cmpfloat (color[0], <=, 1.0f);
122
g_assert_cmpfloat (color[0], ==, 0.1f);
123
g_assert_cmpfloat (color[0], >=, 0.0f);
124
g_assert_cmpfloat (color[1], <=, 1.0f);
125
g_assert_cmpfloat (color[1], ==, 0.1f);
126
g_assert_cmpfloat (color[1], >=, 0.0f);
127
g_assert_cmpfloat (color[2], <=, 1.0f);
128
g_assert_cmpfloat (color[2], ==, 0.1f);
129
g_assert_cmpfloat (color[2], >=, 0.0f);
130
defaults_del (defaults);
134
test_defaults_get_font_dpi ()
136
Defaults* defaults = NULL;
138
defaults = defaults_new ();
139
g_assert_cmpfloat (defaults_get_font_dpi (defaults), <=, 300.0f);
140
g_assert_cmpfloat (defaults_get_font_dpi (defaults), ==, 72.0f);
141
g_assert_cmpfloat (defaults_get_font_dpi (defaults), >=, 72.0f);
142
defaults_del (defaults);
146
test_defaults_get_font_size ()
148
Defaults* defaults = NULL;
150
defaults = defaults_new ();
151
g_assert_cmpfloat (defaults_get_font_size (defaults), <=, 144.0f);
152
g_assert_cmpfloat (defaults_get_font_size (defaults), ==, 10.0f);
153
g_assert_cmpfloat (defaults_get_font_size (defaults), >=, 5.0f);
154
defaults_del (defaults);
158
test_defaults_get_font_face ()
160
Defaults* defaults = NULL;
163
defaults = defaults_new ();
164
face = defaults_get_font_face (defaults);
165
g_assert (face != NULL);
166
g_assert_cmpstr (face, ==, "DejaVu Sans");
167
defaults_del (defaults);