Update contrib.
1 // Copyright (c) 1997-2009 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 the License "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.
14 // e32test\math\t_realxd.h
15 // T_REALXD.H - Structure definitions for TRealX test
20 #ifndef __REALXTST_H__
21 #define __REALXTST_H__
27 const TUint KExpFlagSignMask = 0xFFFF0301;
29 // Structure definitions
33 SRealX(TUint a, TUint b, TUint c);
34 SRealX(const TRealX& aRealX);
35 SRealX& operator=(const TRealX& aRealX);
36 operator TRealX() const;
37 TBool operator==(const SRealX& aSRealX) const;
44 enum TConversionFrom32Bits
46 EConstructInt=0, EAssignInt=1, ESetInt=2,
47 EConstructUint=3, EAssignUint=4, ESetUint=5,
48 EConstructFloat=6, EAssignFloat=7, ESetFloat=8
51 struct SConvertFrom32BitTest
53 SConvertFrom32BitTest(TInt op, const SRealX& res, TInt r);
54 void Test(TConversionFrom32Bits aConversion) const;
61 enum TConversionFrom64Bits
63 EConstructInt64=0, EAssignInt64=1, ESetInt64=2,
64 EConstructDouble=3, EAssignDouble=4, ESetDouble=5
67 struct SConvertFrom64BitTest
69 SConvertFrom64BitTest(TInt64 op, const SRealX& res, TInt r);
70 void Test(TConversionFrom64Bits aConversion) const;
77 enum TConversionTo32Bits
79 EOperatorInt=0, EOperatorUint=1,
80 EOperatorTReal32=2, EGetTReal32=3
83 struct SConvertTo32BitTest
85 SConvertTo32BitTest(const SRealX& op, TInt res, TInt r);
86 void Test(TConversionTo32Bits aConversion) const;
93 enum TConversionTo64Bits
96 EOperatorTReal64=1, EGetTReal64=2
99 struct SConvertTo64BitTest
101 SConvertTo64BitTest(const SRealX& op, TInt64 res, TInt r);
102 void Test(TConversionTo64Bits aConversion) const;
111 EUnaryPlus=0, EUnaryMinus=1,
112 EPreInc=2, EPreDec=3, EPostInc=4, EPostDec=5
117 SOneOpTest(const SRealX& op, const SRealX& res, TInt r);
118 void Test(TUnaryOperation anOperation) const;
119 TInt DoTest(TUnaryOperation anOperation, TRealX *aResult) const;
126 struct SOneOpTestThreadInfo
128 const SOneOpTest *iTest;
129 TUnaryOperation iOperation;
135 SCompareTest(const SRealX& o1, const SRealX& o2, TInt r);
143 enum TBinaryOperation
145 EAddEq=0, ESubEq=1, EMultEq=2, EDivEq=3, // TInt TRealX::AddEq() etc
146 EAdd=4, ESub=5, EMult=6, EDiv=7, // TInt TRealX::Add() etc
147 EPlusEq=8, EMinusEq=9, EStarEq=10, ESlashEq=11, // += -= *= /=
148 EPlus=12, EMinus=13, EStar=14, ESlash=15 // + - * /
153 STwoOpTest(const SRealX& o1, const SRealX& o2, const SRealX& res, TInt r);
154 void Test(TBinaryOperation anOperation, TBool aSwap=EFalse) const;
155 TInt DoTest(TBinaryOperation anOperation, TRealX *aResult, TBool aSwap) const;
163 struct STwoOpTestThreadInfo
165 const STwoOpTest *iTest;
166 TBinaryOperation iOperation;
171 struct SSpecialValueTest
173 SSpecialValueTest(const SRealX& op, TInt aResults);
183 GLREF_D const TInt NumBinaryOpNaNTests;
184 GLREF_D const STwoOpTest BinaryOpNaNTests[];
186 GLREF_D const TInt NumAdditionTests;
187 GLREF_D const STwoOpTest AdditionTests[];
189 GLREF_D const TInt NumMultiplicationTests;
190 GLREF_D const STwoOpTest MultiplicationTests[];
192 GLREF_D const TInt NumDivisionTests;
193 GLREF_D const STwoOpTest DivisionTests[];
195 GLREF_D const TInt NumComparisonTests;
196 GLREF_D const SCompareTest ComparisonTests[];
198 GLREF_D const TInt NumUnaryPlusTests;
199 GLREF_D const SOneOpTest UnaryPlusTests[];
201 GLREF_D const TInt NumUnaryMinusTests;
202 GLREF_D const SOneOpTest UnaryMinusTests[];
204 GLREF_D const TInt NumIncTests;
205 GLREF_D const SOneOpTest IncTests[];
207 GLREF_D const TInt NumDecTests;
208 GLREF_D const SOneOpTest DecTests[];
210 GLREF_D const TInt NumConvertFromIntTests;
211 GLREF_D const SConvertFrom32BitTest ConvertFromIntTests[];
213 GLREF_D const TInt NumConvertFromUintTests;
214 GLREF_D const SConvertFrom32BitTest ConvertFromUintTests[];
216 GLREF_D const TInt NumConvertFromFloatTests;
217 GLREF_D const SConvertFrom32BitTest ConvertFromFloatTests[];
219 GLREF_D const TInt NumConvertFromInt64Tests;
220 GLREF_D const SConvertFrom64BitTest ConvertFromInt64Tests[];
222 GLREF_D const TInt NumConvertFromDoubleTests;
223 GLREF_D const SConvertFrom64BitTest ConvertFromDoubleTests[];
225 GLREF_D const TInt NumConvertToIntTests;
226 GLREF_D const SConvertTo32BitTest ConvertToIntTests[];
228 GLREF_D const TInt NumConvertToUintTests;
229 GLREF_D const SConvertTo32BitTest ConvertToUintTests[];
231 GLREF_D const TInt NumConvertToInt64Tests;
232 GLREF_D const SConvertTo64BitTest ConvertToInt64Tests[];
234 GLREF_D const TInt NumConvertToFloatTests;
235 GLREF_D const SConvertTo32BitTest ConvertToFloatTests[];
237 GLREF_D const TInt NumConvertToDoubleTests;
238 GLREF_D const SConvertTo64BitTest ConvertToDoubleTests[];
240 GLREF_D const TInt NumSpecialValueTests;
241 GLREF_D const SSpecialValueTest SpecialValueTests[];