delete a bunch of dead code.

Sun Mar 13 22:01:17 2005  Manish Singh  <yosh@gimp.org>

        * tests/array-test.c: delete a bunch of dead code.
This commit is contained in:
Manish Singh 2005-03-14 06:01:51 +00:00 committed by Manish Singh
parent dc232b4900
commit a145c9ed09
5 changed files with 19 additions and 27 deletions

View File

@ -1,3 +1,7 @@
Sun Mar 13 22:01:17 2005 Manish Singh <yosh@gimp.org>
* tests/array-test.c: delete a bunch of dead code.
Sun Mar 13 21:28:47 2005 Manish Singh <yosh@gimp.org>
* glib/gdataset.c: remove spurious IA prefix from g_quark_try_string.

View File

@ -1,3 +1,7 @@
Sun Mar 13 22:01:17 2005 Manish Singh <yosh@gimp.org>
* tests/array-test.c: delete a bunch of dead code.
Sun Mar 13 21:28:47 2005 Manish Singh <yosh@gimp.org>
* glib/gdataset.c: remove spurious IA prefix from g_quark_try_string.

View File

@ -1,3 +1,7 @@
Sun Mar 13 22:01:17 2005 Manish Singh <yosh@gimp.org>
* tests/array-test.c: delete a bunch of dead code.
Sun Mar 13 21:28:47 2005 Manish Singh <yosh@gimp.org>
* glib/gdataset.c: remove spurious IA prefix from g_quark_try_string.

View File

@ -1,3 +1,7 @@
Sun Mar 13 22:01:17 2005 Manish Singh <yosh@gimp.org>
* tests/array-test.c: delete a bunch of dead code.
Sun Mar 13 21:28:47 2005 Manish Singh <yosh@gimp.org>
* glib/gdataset.c: remove spurious IA prefix from g_quark_try_string.

View File

@ -31,32 +31,6 @@
#include <string.h>
#include "glib.h"
int array[10000];
gboolean failed = FALSE;
#define TEST(m,cond) G_STMT_START { failed = !(cond); \
if (failed) \
{ if (!m) \
g_print ("\n(%s:%d) failed for: %s\n", __FILE__, __LINE__, ( # cond )); \
else \
g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \
} \
else \
g_print ("."); fflush (stdout); \
} G_STMT_END
#define C2P(c) ((gpointer) ((long) (c)))
#define P2C(p) ((gchar) ((long) (p)))
#define GLIB_TEST_STRING "el dorado "
#define GLIB_TEST_STRING_5 "el do"
typedef struct {
guint age;
gchar name[40];
} GlibTestInfo;
static void
sum_up (gpointer data,
gpointer user_data)
@ -102,7 +76,9 @@ main (int argc,
for (i = 0; i < 10000; i++)
if (g_ptr_array_index (gparray, i) != GINT_TO_POINTER (i))
g_print ("array fails: %p ( %p )\n", g_ptr_array_index (gparray, i), GINT_TO_POINTER (i));
g_print ("array fails: %p ( %p )\n",
g_ptr_array_index (gparray, i),
GINT_TO_POINTER (i));
g_ptr_array_foreach (gparray, sum_up, &sum);
g_assert (sum == 49995000);