diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-06-10 20:24:50 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-06-10 20:24:50 +0000 |
commit | 7c8b9f2999f95934f1f9e3d21ff29f8ea28003df (patch) | |
tree | 00b04dbccb9ce09d7ef35702588c7e6b3ff36dbe /mixlib | |
parent | 5744466d813911f45db611830d7235250387a0db (diff) | |
download | mdk-7c8b9f2999f95934f1f9e3d21ff29f8ea28003df.tar.gz mdk-7c8b9f2999f95934f1f9e3d21ff29f8ea28003df.tar.bz2 |
(Module): test char to byte conversions.
Diffstat (limited to 'mixlib')
-rw-r--r-- | mixlib/testsuite/mix_types_t.c | 8 |
1 files changed, 8 insertions, 0 deletions
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"); } |