First public contribution.
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
23 #include <liboil/liboil.h>
24 #include <liboil/liboilfunction.h>
27 #include <liboil/globals.h>
29 #define LOG_FILE "c:\\logs\\testsuite_copy_log.txt"
30 #include "std_log_result.h"
31 #define LOG_FILENAME_LINE __FILE__, __LINE__
33 void create_xml(int result)
38 testResultXml("testsuite_copy");
55 oil_copy_u8 (dest + 8, src + 0, 64);
59 assert_failed = (dest[i] == 0) ? assert_failed : 1;
61 assert_failed = (dest[i] == (i-8)) ? assert_failed : 1;
62 std_log(LOG_FILENAME_LINE,"%d\n",dest[i]);
66 int main (int argc, char *argv[])
68 OilFunctionClass *klass;
69 OilFunctionImpl *impl;
71 std_log(LOG_FILENAME_LINE,"Test started testsuite_copy");
74 klass = (OilFunctionClass *)oil_class_get ("copy_u8");
75 oil_class_optimize(klass);
77 oil_class_choose_by_name (klass, "copy_u8_altivec");
78 impl = klass->chosen_impl;
79 if (oil_impl_is_runnable (impl)) {
80 std_log(LOG_FILENAME_LINE,"chosen=%p\n", impl);
81 impl = klass->reference_impl;
82 std_log(LOG_FILENAME_LINE,"ref=%p\n", impl);
87 std_log(LOG_FILENAME_LINE,"Test Fail");
89 std_log(LOG_FILENAME_LINE,"Test Successful");