2 * Tests to ensure that our type definitions are correct
4 * These depend on -Werror, -Wall being set to catch the build error.
18 sprintf (buffer, "%" G_GSIZE_FORMAT, a);
31 ptr = GINT_TO_POINTER (iv);
32 iv2 = GPOINTER_TO_INT (ptr);
34 return FAILED ("int to pointer and back conversions fail %d != %d", iv, iv2);
37 ptr = GINT_TO_POINTER (iv);
38 iv2 = GPOINTER_TO_INT (ptr);
40 return FAILED ("int to pointer and back conversions fail %d != %d", iv, iv2);
43 ptr = GINT_TO_POINTER (iv);
44 iv2 = GPOINTER_TO_INT (ptr);
46 return FAILED ("int to pointer and back conversions fail %d != %d", iv, iv2);
49 ptr = GINT_TO_POINTER (iv);
50 iv2 = GPOINTER_TO_INT (ptr);
52 return FAILED ("int to pointer and back conversions fail %d != %d", iv, iv2);
55 ptr = GINT_TO_POINTER (iv);
56 iv2 = GPOINTER_TO_INT (ptr);
58 return FAILED ("int to pointer and back conversions fail %d != %d", iv, iv2);
61 ptr = GUINT_TO_POINTER (iv);
62 uv2 = GPOINTER_TO_UINT (ptr);
64 return FAILED ("uint to pointer and back conversions fail %u != %d", iv, iv2);
67 ptr = GUINT_TO_POINTER (iv);
68 uv2 = GPOINTER_TO_UINT (ptr);
70 return FAILED ("uint to pointer and back conversions fail %u != %d", iv, iv2);
73 ptr = GUINT_TO_POINTER (iv);
74 uv2 = GPOINTER_TO_UINT (ptr);
76 return FAILED ("uint to pointer and back conversions fail %u != %d", iv, iv2);
82 static Test size_tests [] = {
83 {"formats", test_formats},
84 {"ptrconv", test_ptrconv},
88 DEFINE_TEST_GROUP_INIT(size_tests_init, size_tests)