summaryrefslogtreecommitdiffhomepage
path: root/mixlib
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
commit4c8a805561b11dfde31e7d5c43de330876612cdd (patch)
tree99c14558af8a47816856f609ace2a8cf912ef82b /mixlib
parent2683bd5ebc746b7a59dc2035103e6ad712c68382 (diff)
downloadmdk-4c8a805561b11dfde31e7d5c43de330876612cdd.tar.gz
mdk-4c8a805561b11dfde31e7d5c43de330876612cdd.tar.bz2
(Module): test char to byte conversions.
Diffstat (limited to 'mixlib')
-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");
}