sl@0: // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32test\math\t_float.h sl@0: // Header file for T_FLOAT.CPP sl@0: // sl@0: // sl@0: sl@0: sl@0: #if !defined(__T_FLTCL_H__) sl@0: #define __T_FLTCL_H__ sl@0: sl@0: #if !defined(__E32STD_H__) sl@0: #include sl@0: #endif sl@0: sl@0: #include "t_vals.h" sl@0: sl@0: //Added by AnnW sl@0: const TInt fixedLimitAndTriads=KRealFormatFixed | KGeneralLimit; sl@0: const TInt fixedNoTriads=KRealFormatFixed | KDoNotUseTriads; sl@0: const TInt fixedLimit=fixedNoTriads | KGeneralLimit; sl@0: const TInt fixedSpaceForSign=fixedNoTriads | KExtraSpaceForSign; sl@0: const TInt fixedTriadsAndSign=KRealFormatFixed | KExtraSpaceForSign; sl@0: const TInt fixedLimitAndSpaceForSign=fixedLimit |KExtraSpaceForSign; sl@0: const TInt exponentThreeDigitExp=KRealFormatExponent | KAllowThreeDigitExp; sl@0: const TInt exponentLimit=KRealFormatExponent | KGeneralLimit; sl@0: const TInt exponentLimitAndThreeDigExp=exponentLimit | KAllowThreeDigitExp; sl@0: const TInt generalSpaceForSign=KRealFormatGeneral | KExtraSpaceForSign; sl@0: const TInt generalThreeDigitExp=KRealFormatGeneral | KAllowThreeDigitExp; sl@0: const TInt generalLimit=KRealFormatGeneral | KGeneralLimit; sl@0: const TInt noExponentNoTriads=KRealFormatNoExponent | KDoNotUseTriads; sl@0: const TInt noExponentLimit=noExponentNoTriads | KGeneralLimit; sl@0: const TInt calculatorThreeDigitExp=KRealFormatCalculator | KAllowThreeDigitExp; sl@0: const TInt calculatorLimit=KRealFormatCalculator | KGeneralLimit; sl@0: const TInt calculatorLimitAndThreeDigExp=calculatorLimit | KAllowThreeDigitExp; sl@0: const TInt noExponentCalc=noExponentNoTriads | KExtraSpaceForSign; sl@0: // sl@0: // new - 17/3/97 sl@0: const TInt exponentThreeDigitExpAndSigFigs=KRealFormatExponent | KAllowThreeDigitExp | KUseSigFigs; sl@0: const TInt exponentSigFigs=KRealFormatExponent | KUseSigFigs; sl@0: sl@0: sl@0: // classes used by T_FLOAT.CPP sl@0: sl@0: class ROUND_TEST sl@0: { sl@0: public: sl@0: TReal num; // input number sl@0: TInt plcs; // number of places to be rounded sl@0: TReal res; // expected result sl@0: }; sl@0: sl@0: class RtoB_TEST sl@0: { sl@0: public: sl@0: RtoB_TEST(); sl@0: RtoB_TEST(TReal aNum,TInt aType,TInt aWidth,TInt aDecimals,TChar aPoint,TChar aTriad,TInt aTrilen,const TText* aRes); sl@0: TReal num; // input number sl@0: TRealFormat format; // format sl@0: const TText* res; // expected result sl@0: }; sl@0: sl@0: class ERR_TEST sl@0: { sl@0: public: sl@0: ERR_TEST(TReal aNum,TInt aType,TInt aWidth,TInt aDecimals,TChar aPoint,TChar aTriad, TInt aTrilen,const TText* aRes=_S(""),TInt aErr=KErrGeneral); sl@0: RtoB_TEST rtob; sl@0: TInt err; sl@0: }; sl@0: sl@0: class DtoR_TEST64 sl@0: { sl@0: public: sl@0: DtoR_TEST64(const TDesC& aDes,const TReal aRes) : iLex(aDes),iRes(aRes) {} sl@0: TLex iLex ; // input string sl@0: TReal iRes; // expected result sl@0: }; sl@0: sl@0: class DtoR_TEST32 sl@0: { sl@0: public: sl@0: DtoR_TEST32(const TDesC& aDes,const TReal32 aRes) : iLex(aDes),iRes(aRes) {} sl@0: TLex iLex ; // input string sl@0: TReal32 iRes; // expected result sl@0: }; sl@0: sl@0: class DtoR_ERR_TEST sl@0: { sl@0: public: sl@0: DtoR_ERR_TEST(const TDesC& aDes,const TInt aErr) : iLex(aDes),iErr(aErr) {} sl@0: TLex iLex; sl@0: TInt iErr; sl@0: }; sl@0: sl@0: class CALC_TEST sl@0: { sl@0: public: sl@0: CALC_TEST(const TDesC& aDes,TInt aType,TInt aWidth,TInt aDecimals,TChar aPoint,TChar aTriad,TInt aTrilen,const TText* aRes); sl@0: TLex iLex; sl@0: TRealFormat iFormat; sl@0: const TText* iRes; sl@0: }; sl@0: sl@0: #endif