diff -r bf6a71c50e42 -r 09fa7c3c5079 genericopenlibs/liboil/tsrc/testsuite/math/src/math.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/genericopenlibs/liboil/tsrc/testsuite/math/src/math.c Thu Sep 02 22:16:05 2010 +0300 @@ -0,0 +1,746 @@ +// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +//Description: +// + + + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include + +#define LOG_FILE "c:\\logs\\testsuite_math_log.txt" +#include "std_log_result.h" +#include "utils.h" +#define LOG_FILENAME_LINE __FILE__, __LINE__ +#define MAX_SIZE 10 +#define MAX_SIZE1 8 +#define MAX_DSIZE 5 + +int16_t arr1[MAX_SIZE], arr2[MAX_SIZE], res1[MAX_SIZE]; +uint8_t uarr1[MAX_SIZE],uarr2[MAX_SIZE1],uarr3[MAX_SIZE1], ures1[MAX_SIZE1]; +float farr1[MAX_SIZE1], farr2[MAX_SIZE1],fres1[MAX_SIZE1]; +double darr1[MAX_DSIZE], darr2[MAX_DSIZE],dres1[MAX_DSIZE]; + +void create_xml(int result) +{ + if(result) + assert_failed = 1; + + testResultXml("testsuite_math"); + close_log_file(); +} + +void test_add_s16() + { + int i; + int16_t check[MAX_SIZE]={8,13,18,23,28,33,38,43,48,53}; + for(i=0;i