Update contrib.
1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #include <liboil/liboil.h>
23 #include <liboil/liboilfunction.h>
28 #define LOG_FILE "c:\\logs\\testsuite_splat_log.txt"
29 #include "std_log_result.h"
30 #define LOG_FILENAME_LINE __FILE__, __LINE__
35 void create_xml(int result)
40 testResultXml("testsuite_splat");
44 void test_splat_u16_ns()
47 uint16_t sp1[SIZE]={10},res[MAX_SIZE];
48 uint16_t check[MAX_SIZE]={10,10,10,10,10,10,10,10,10,10};
50 for(i=0;i<MAX_SIZE;i++)
53 oil_splat_u16_ns(res,sp1,MAX_SIZE);
55 for(i=0;i<MAX_SIZE;i++)
56 if(check[i] == res[i])
58 std_log(LOG_FILENAME_LINE,"oil_splat_u16_ns successful, res[%d]=%d", i,res[i]);
63 std_log(LOG_FILENAME_LINE,"oil_splat_u16_ns unsuccessful, Expected =%d,Obtained =%d",check[i],res[i]);
71 uint32_t sp1[SIZE]={5},res[MAX_SIZE];
72 uint32_t check[MAX_SIZE]={84215045,84215045,1285,0,0,0,0,0,0,0};
74 for(i=0;i<MAX_SIZE;i++)
77 oil_splat_u32(res,1,sp1,MAX_SIZE);
79 for(i=0;i<MAX_SIZE;i++)
80 if(check[i] == res[i])
82 std_log(LOG_FILENAME_LINE,"oil_splat_u32 successful,res[%d]=%d",i,res[i]);
87 std_log(LOG_FILENAME_LINE,"oil_splat_u32 unsuccessful, Expected =%d,Obtained =%d",check[i],res[i]);
93 std_log(LOG_FILENAME_LINE,"Test started testsuite_splat");
96 std_log(LOG_FILENAME_LINE,"oil_splat_u16_ns");
99 std_log(LOG_FILENAME_LINE,"oil_splat_u32");
103 std_log(LOG_FILENAME_LINE,"Test Fail");
105 std_log(LOG_FILENAME_LINE,"Test Successful");