summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2004-06-10 20:24:50 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2004-06-10 20:24:50 +0000
commit7c8b9f2999f95934f1f9e3d21ff29f8ea28003df (patch)
tree00b04dbccb9ce09d7ef35702588c7e6b3ff36dbe
parent5744466d813911f45db611830d7235250387a0db (diff)
downloadmdk-7c8b9f2999f95934f1f9e3d21ff29f8ea28003df.tar.gz
mdk-7c8b9f2999f95934f1f9e3d21ff29f8ea28003df.tar.bz2
(Module): test char to byte conversions.
-rw-r--r--mixlib/testsuite/mix_types_t.c8
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");
}