Sha256: 635467e26a2c85e8f17f368d905f6bc9e41faeec06a479bba7a7a0d13b4b8d4c

Contents?: true

Size: 864 Bytes

Versions: 34

Compression:

Stored size: 864 Bytes

Contents

#include <glib.h>
#include <lsmstr.h>
#include <lsm.h>

static void
str_consolidate_test (void)
{
	char *string;

	string = g_strdup ("   consolidate \n \t   test   \t \r a b c \n ");
	lsm_str_consolidate (string);
	g_assert_cmpstr (string, ==, "consolidate test a b c");
	g_free (string);

	string = g_strdup ("    ");
	lsm_str_consolidate (string);
	g_assert_cmpstr (string, ==, "");
	g_free (string);

	string = g_strdup ("");
	lsm_str_consolidate (string);
	g_assert_cmpstr (string, ==, "");
	g_free (string);

	string = NULL;
	lsm_str_consolidate (string);
	g_assert (string == NULL);
}

int
main (int argc, char *argv[])
{
	int result;

	g_test_init (&argc, &argv, NULL);

	g_test_add_func ("/str/str-consolidate", str_consolidate_test);

#if !GLIB_CHECK_VERSION(2,36,0)
	g_type_init ();
#endif

	result = g_test_run();

	lsm_shutdown ();

	return result;
}

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
mathematical-1.6.14 ext/mathematical/lasem/tests/str.c
mathematical-1.6.13 ext/mathematical/lasem/tests/str.c
mathematical-1.6.12 ext/mathematical/lasem/tests/str.c
mathematical-1.6.11 ext/mathematical/lasem/tests/str.c
mathematical-1.6.10 ext/mathematical/lasem/tests/str.c
mathematical-1.6.9 ext/mathematical/lasem/tests/str.c
mathematical-1.6.8 ext/mathematical/lasem/tests/str.c
mathematical-1.6.7 ext/mathematical/lasem/tests/str.c
mathematical-1.6.6 ext/mathematical/lasem/tests/str.c
mathematical-1.6.5 ext/mathematical/lasem/tests/str.c
mathematical-1.6.4 ext/mathematical/lasem/tests/str.c
mathematical-1.6.3 ext/mathematical/lasem/tests/str.c
mathematical-1.6.2 ext/mathematical/lasem/tests/str.c
mathematical-1.6.1 ext/mathematical/lasem/tests/str.c
mathematical-1.6.0 ext/mathematical/lasem/tests/str.c
mathematical-1.5.12 ext/mathematical/lasem/tests/str.c
mathematical-1.5.0 ext/mathematical/lasem/tests/str.c
mathematical-1.4.2 ext/mathematical/lasem/tests/str.c
mathematical-1.4.1 ext/mathematical/lasem/tests/str.c
mathematical-1.4.0 ext/mathematical/lasem/tests/str.c