10 //GValue value3 = { 0 };
13 g_value_init (&value1, G_TYPE_INT);
14 g_value_set_int (&value1, 10);
15 g_value_init (&value2, G_TYPE_INT);
16 g_value_set_int (&value2, 20);
17 g_assert (gst_value_compare (&value1, &value2) == GST_VALUE_LESS_THAN);
18 g_assert (gst_value_compare (&value2, &value1) == GST_VALUE_GREATER_THAN);
19 g_assert (gst_value_compare (&value1, &value1) == GST_VALUE_EQUAL);
20 g_value_unset (&value1);
21 g_value_unset (&value2);
23 g_value_init (&value1, G_TYPE_DOUBLE);
24 g_value_set_double (&value1, 10);
25 g_value_init (&value2, G_TYPE_DOUBLE);
26 g_value_set_double (&value2, 20);
27 g_assert (gst_value_compare (&value1, &value2) == GST_VALUE_LESS_THAN);
28 g_assert (gst_value_compare (&value2, &value1) == GST_VALUE_GREATER_THAN);
29 g_assert (gst_value_compare (&value1, &value1) == GST_VALUE_EQUAL);
30 g_value_unset (&value1);
31 g_value_unset (&value2);
33 g_value_init (&value1, G_TYPE_STRING);
34 g_value_set_string (&value1, "a");
35 g_value_init (&value2, G_TYPE_STRING);
36 g_value_set_string (&value2, "b");
37 g_assert (gst_value_compare (&value1, &value2) == GST_VALUE_LESS_THAN);
38 g_assert (gst_value_compare (&value2, &value1) == GST_VALUE_GREATER_THAN);
39 g_assert (gst_value_compare (&value1, &value1) == GST_VALUE_EQUAL);
40 g_value_unset (&value1);
41 g_value_unset (&value2);
43 g_value_init (&value1, GST_TYPE_FOURCC);
44 gst_value_set_fourcc (&value1, GST_MAKE_FOURCC ('a', 'b', 'c', 'd'));
45 g_value_init (&value2, GST_TYPE_FOURCC);
46 gst_value_set_fourcc (&value2, GST_MAKE_FOURCC ('1', '2', '3', '4'));
47 g_assert (gst_value_compare (&value1, &value2) == GST_VALUE_UNORDERED);
48 g_assert (gst_value_compare (&value1, &value1) == GST_VALUE_EQUAL);
49 g_value_unset (&value1);
50 g_value_unset (&value2);
55 main (int argc, char *argv[])
58 gst_init (&argc, &argv);