From 4c8a805561b11dfde31e7d5c43de330876612cdd Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Thu, 10 Jun 2004 20:24:50 +0000 Subject: (Module): test char to byte conversions. --- mixlib/testsuite/mix_types_t.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mixlib/testsuite/mix_types_t.c b/mixlib/testsuite/mix_types_t.c index bd4a2bc..694038e 100644 --- a/mixlib/testsuite/mix_types_t.c +++ b/mixlib/testsuite/mix_types_t.c @@ -171,6 +171,14 @@ test_mix_char_(void) if ( (k+1)%5 == 0 ) g_print("\n"); g_assert( mchar == mix_ascii_to_char(achar) ); } + + g_print("\nchar <-> byte conversions...\n"); + + for (k = 0; k < MIX_CHAR_MAX + 1; ++k) { + mix_byte_t c = mix_byte_new (k); + g_assert (c == mix_byte_to_char (mix_char_to_byte (c))); + } + g_print("\n"); } -- cgit v1.2.3