Re-checkin.

This commit is contained in:
Darin Adler 2001-08-03 19:27:35 +00:00
parent 669974f6d7
commit 44e7362702

View File

@ -24,7 +24,6 @@
* GLib at ftp://ftp.gtk.org/pub/gtk/.
*/
#undef G_DISABLE_ASSERT
#undef G_LOG_DOMAIN
#include <stdio.h>
@ -48,12 +47,6 @@ else \
} G_STMT_END
#define GLIB_TEST_STRING "el dorado "
#define GLIB_TEST_STRING_5 "el do"
typedef struct {
guint age;
gchar name[40];
} GlibTestInfo;
static gboolean
strv_check (gchar **strv, ...)
@ -107,21 +100,21 @@ main (int argc,
TEST (NULL, g_ascii_strcasecmp ("B", "a") > 0);
TEST (NULL, g_ascii_strcasecmp ("B", "A") > 0);
g_assert(g_strdup(NULL) == NULL);
TEST (NULL, g_strdup (NULL) == NULL);
string = g_strdup (GLIB_TEST_STRING);
g_assert(string != NULL);
g_assert(strcmp(string, GLIB_TEST_STRING) == 0);
TEST (NULL, string != NULL);
TEST (NULL, strcmp (string, GLIB_TEST_STRING) == 0);
g_free(string);
string = g_strconcat (GLIB_TEST_STRING, NULL);
g_assert(string != NULL);
g_assert(strcmp(string, GLIB_TEST_STRING) == 0);
TEST (NULL, string != NULL);
TEST (NULL, strcmp (string, GLIB_TEST_STRING) == 0);
g_free(string);
string = g_strconcat (GLIB_TEST_STRING, GLIB_TEST_STRING,
GLIB_TEST_STRING, NULL);
g_assert(string != NULL);
g_assert(strcmp(string, GLIB_TEST_STRING GLIB_TEST_STRING
TEST (NULL, string != NULL);
TEST (NULL, strcmp (string, GLIB_TEST_STRING GLIB_TEST_STRING
GLIB_TEST_STRING) == 0);
g_free(string);
@ -133,8 +126,7 @@ main (int argc,
TEST (NULL, strcmp
(g_strcompress ("abc\\\\\\\"\\b\\f\\n\\r\\t\\003\\177\\234\\313\\12345z"),
"abc\\\"\b\f\n\r\t\003\177\234\313\12345z") == 0);
TEST (NULL, strcmp(g_strescape("abc\\\"\b\f\n\r\t\003\177\234\313",
NULL),
TEST (NULL, strcmp (g_strescape("abc\\\"\b\f\n\r\t\003\177\234\313", NULL),
"abc\\\\\\\"\\b\\f\\n\\r\\t\\003\\177\\234\\313") == 0);
TEST (NULL, strcmp(g_strescape("abc\\\"\b\f\n\r\t\003\177\234\313",
"\b\f\001\002\003\004"),