diff options
author | David Schleef <ds@schleef.org> | 2005-08-15 23:26:04 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2005-08-15 23:26:04 +0000 |
commit | d0e03fd5e89c258ab1be3b4e1ec6013fd2bd1398 (patch) | |
tree | 558f01f766c72bcb14454f5a0638469954c3406e /testsuite | |
parent | ec572e49fb3423767ab7d562c5ef0aa2ad4ff38b (diff) | |
download | liboil-d0e03fd5e89c258ab1be3b4e1ec6013fd2bd1398.tar.gz |
* testsuite/abs.c: (test), (main): remove glib usage in testsuite
* testsuite/copy.c: (test), (main):
* testsuite/md5.c: (test), (main):
* testsuite/md5_profile.c: (test), (main):
* testsuite/trans.c: (test), (main):
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/abs.c | 23 | ||||
-rw-r--r-- | testsuite/copy.c | 8 | ||||
-rw-r--r-- | testsuite/md5.c | 26 | ||||
-rw-r--r-- | testsuite/md5_profile.c | 30 | ||||
-rw-r--r-- | testsuite/trans.c | 16 |
5 files changed, 52 insertions, 51 deletions
diff --git a/testsuite/abs.c b/testsuite/abs.c index fcc9d1d..fe1306a 100644 --- a/testsuite/abs.c +++ b/testsuite/abs.c @@ -28,7 +28,8 @@ #include <liboil/liboil.h> #include <liboil/liboilfunction.h> -#include <glib.h> +#include <stdio.h> +#include <stdlib.h> void test(void) { @@ -36,8 +37,8 @@ void test(void) float *src; float *dest; - src = g_malloc(100*sizeof(float)); - dest = g_malloc(100*sizeof(float)); + src = malloc(100*sizeof(float)); + dest = malloc(100*sizeof(float)); for(i=0;i<100;i++){ src[i] = (i-50)*100; @@ -46,7 +47,7 @@ void test(void) oil_abs_f32_f32 (dest, 4, src, 4, 100); for (i=0; i<100; i++) { - g_print("%d %g %g\n", i, src[i], dest[i]); + printf("%d %g %g\n", i, src[i], dest[i]); } } @@ -60,18 +61,18 @@ int main (int argc, char *argv[]) klass = oil_class_get ("abs_f32_f32"); oil_class_optimize(klass); - g_print("class=%s\n", klass->name); + printf("class=%s\n", klass->name); for (impl = klass->first_impl; impl; impl=impl->next) { - g_print("impl=%p\n", impl); - g_print(" func=%p\n", impl->func); - g_print(" name=%s\n", impl->name); - g_print(" flags=%08x\n", impl->flags); + printf("impl=%p\n", impl); + printf(" func=%p\n", impl->func); + printf(" name=%s\n", impl->name); + printf(" flags=%08x\n", impl->flags); } impl = klass->chosen_impl; - g_print("chosen=%p\n", impl); + printf("chosen=%p\n", impl); impl = klass->reference_impl; - g_print("ref=%p\n", impl); + printf("ref=%p\n", impl); test(); diff --git a/testsuite/copy.c b/testsuite/copy.c index a8b0a1e..a96a4c9 100644 --- a/testsuite/copy.c +++ b/testsuite/copy.c @@ -5,7 +5,7 @@ #include <liboil/liboil.h> #include <liboil/liboilfunction.h> -#include <glib.h> +#include <stdio.h> #include <string.h> uint8_t dest[200]; @@ -24,7 +24,7 @@ void test(void) oil_copy_u8 (dest + 8, src + 0, 64); for(i=0;i<100;i++){ - g_print("%d\n",dest[i]); + printf("%d\n",dest[i]); } } @@ -41,9 +41,9 @@ int main (int argc, char *argv[]) oil_class_choose_by_name (klass, "copy_u8_altivec"); impl = klass->chosen_impl; if (oil_impl_is_runnable (impl)) { - g_print("chosen=%p\n", impl); + printf("chosen=%p\n", impl); impl = klass->reference_impl; - g_print("ref=%p\n", impl); + printf("ref=%p\n", impl); test(); } diff --git a/testsuite/md5.c b/testsuite/md5.c index 42b01f6..152f432 100644 --- a/testsuite/md5.c +++ b/testsuite/md5.c @@ -32,7 +32,7 @@ #include <liboil/liboil.h> #include <liboil/liboilfunction.h> -#include <glib.h> +#include <stdio.h> #include <string.h> char *message = "liboil md5 test\n"; @@ -65,7 +65,7 @@ void test(void) oil_md5 (state, src); - g_print("%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", + printf("%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", state[0]&0xff, (state[0]>>8)&0xff, (state[0]>>16)&0xff, (state[0]>>24)&0xff, state[1]&0xff, (state[1]>>8)&0xff, (state[1]>>16)&0xff, @@ -86,33 +86,33 @@ int main (int argc, char *argv[]) klass = oil_class_get ("md5"); oil_class_optimize(klass); - g_print("class=%s\n", klass->name); + printf("class=%s\n", klass->name); for (impl = klass->first_impl; impl; impl=impl->next) { - g_print("impl=%p\n", impl); - g_print(" func=%p\n", impl->func); - g_print(" name=%s\n", impl->name); - g_print(" flags=%08x\n", impl->flags); + printf("impl=%p\n", impl); + printf(" func=%p\n", impl->func); + printf(" name=%s\n", impl->name); + printf(" flags=%08x\n", impl->flags); } oil_class_choose_by_name (klass, "md5_c"); impl = klass->chosen_impl; - g_print("chosen=%p\n", impl); + printf("chosen=%p\n", impl); impl = klass->reference_impl; - g_print("ref=%p\n", impl); + printf("ref=%p\n", impl); test(); oil_class_choose_by_name (klass, "md5_asm1"); impl = klass->chosen_impl; - g_print("chosen=%p\n", impl); + printf("chosen=%p\n", impl); impl = klass->reference_impl; - g_print("ref=%p\n", impl); + printf("ref=%p\n", impl); test(); oil_class_choose_by_name (klass, "md5_asm2"); impl = klass->chosen_impl; - g_print("chosen=%p\n", impl); + printf("chosen=%p\n", impl); impl = klass->reference_impl; - g_print("ref=%p\n", impl); + printf("ref=%p\n", impl); test(); return 0; diff --git a/testsuite/md5_profile.c b/testsuite/md5_profile.c index 7de6f22..d30027f 100644 --- a/testsuite/md5_profile.c +++ b/testsuite/md5_profile.c @@ -33,7 +33,7 @@ #include <liboil/liboil.h> #include <liboil/liboilfunction.h> #include <liboil/liboilprofile.h> -#include <glib.h> +#include <stdio.h> #include <string.h> #include <stdio.h> @@ -90,7 +90,7 @@ void test(void) } //oil_profile_print(&prof); - g_print("%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", + printf("%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", state[0]&0xff, (state[0]>>8)&0xff, (state[0]>>16)&0xff, (state[0]>>24)&0xff, state[1]&0xff, (state[1]>>8)&0xff, (state[1]>>16)&0xff, @@ -111,40 +111,40 @@ int main (int argc, char *argv[]) klass = oil_class_get ("md5"); oil_class_optimize(klass); - g_print("class=%s\n", klass->name); + printf("class=%s\n", klass->name); for (impl = klass->first_impl; impl; impl=impl->next) { - g_print("impl=%p\n", impl); - g_print(" func=%p\n", impl->func); - g_print(" name=%s\n", impl->name); - g_print(" flags=%08x\n", impl->flags); + printf("impl=%p\n", impl); + printf(" func=%p\n", impl->func); + printf(" name=%s\n", impl->name); + printf(" flags=%08x\n", impl->flags); } oil_class_choose_by_name (klass, "md5_c"); impl = klass->chosen_impl; - g_print("chosen=%p\n", impl); + printf("chosen=%p\n", impl); impl = klass->reference_impl; - g_print("ref=%p\n", impl); + printf("ref=%p\n", impl); test(); oil_class_choose_by_name (klass, "md5_asm1"); impl = klass->chosen_impl; - g_print("chosen=%p\n", impl); + printf("chosen=%p\n", impl); impl = klass->reference_impl; - g_print("ref=%p\n", impl); + printf("ref=%p\n", impl); test(); oil_class_choose_by_name (klass, "md5_asm2"); impl = klass->chosen_impl; - g_print("chosen=%p\n", impl); + printf("chosen=%p\n", impl); impl = klass->reference_impl; - g_print("ref=%p\n", impl); + printf("ref=%p\n", impl); test(); oil_class_choose_by_name (klass, "md5_asm3"); impl = klass->chosen_impl; - g_print("chosen=%p\n", impl); + printf("chosen=%p\n", impl); impl = klass->reference_impl; - g_print("ref=%p\n", impl); + printf("ref=%p\n", impl); test(); return 0; diff --git a/testsuite/trans.c b/testsuite/trans.c index 209c0b1..1906658 100644 --- a/testsuite/trans.c +++ b/testsuite/trans.c @@ -32,7 +32,7 @@ #include <liboil/liboil.h> #include <liboil/liboilfunction.h> -#include <glib.h> +#include <stdio.h> #include <string.h> #include <math.h> @@ -58,16 +58,16 @@ void test(void) for(i=0;i<8;i++){ for(j=0;j<8;j++){ - g_print("%4d ",src1[i*10+j]); + printf("%4d ",src1[i*10+j]); } - g_print("\n"); + printf("\n"); } - g_print("\n"); + printf("\n"); for(i=0;i<8;i++){ for(j=0;j<8;j++){ - g_print("%4d ",dest[i*10+j]); + printf("%4d ",dest[i*10+j]); } - g_print("\n"); + printf("\n"); } } @@ -84,9 +84,9 @@ int main (int argc, char *argv[]) /* FIXME this doesn't check for CPU validity */ oil_class_choose_by_name (klass, "fdct8x8s_s16_mmx"); impl = klass->chosen_impl; - g_print("chosen=%p\n", impl); + printf("chosen=%p\n", impl); impl = klass->reference_impl; - g_print("ref=%p\n", impl); + printf("ref=%p\n", impl); test(); #endif |