symport/e32test/math/t_fltcl.cpp
changeset 1 0a7b44b10206
child 2 806186ab5e14
equal deleted inserted replaced
0:c55016431358 1:0a7b44b10206
       
     1 // Copyright (c) 1995-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 "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // e32test\math\t_fltcl.cpp
       
    15 // Class member functions for T_FLOAT.CPP
       
    16 // T_FLOAT.CPP split into header files because there seems to be too much static
       
    17 // data for GCC compiler
       
    18 // 
       
    19 //
       
    20 
       
    21 
       
    22 #include "t_float.h"
       
    23 
       
    24 RtoB_TEST::RtoB_TEST()
       
    25 	{
       
    26 
       
    27 	num=0.0;
       
    28 	format.iType=KRealFormatGeneral;
       
    29 	format.iWidth=KDefaultRealWidth;
       
    30 	format.iPlaces=0;
       
    31 	TLocale locale;
       
    32 	format.iPoint=locale.DecimalSeparator();
       
    33 	format.iTriad=locale.ThousandsSeparator();
       
    34 	format.iTriLen=1;
       
    35 	res=_S("0");
       
    36 	}
       
    37 
       
    38 RtoB_TEST::RtoB_TEST(TReal aNum,TInt aType,TInt aWidth,TInt aDecimals,TChar aPoint,TChar aTriad,TInt aTrilen,const TText* aRes)
       
    39 	{
       
    40 
       
    41 	num=aNum;
       
    42 	format.iType=aType;
       
    43 	format.iWidth=aWidth;
       
    44 	format.iPlaces=aDecimals;
       
    45 	format.iPoint=aPoint;
       
    46 	format.iTriad=aTriad;
       
    47 	format.iTriLen=aTrilen;
       
    48 	res=aRes;
       
    49 	}
       
    50 
       
    51 ERR_TEST::ERR_TEST(TReal aNum,TInt aType,TInt aWidth,TInt aDecimals,TChar aPoint,TChar aTriad, TInt aTrilen,const TText* aRes,TInt aErr)
       
    52 	{
       
    53 
       
    54 	rtob.num=aNum;
       
    55 	rtob.format.iType=aType;
       
    56 	rtob.format.iWidth=aWidth;
       
    57 	rtob.format.iPlaces=aDecimals;
       
    58 	rtob.format.iPoint=aPoint;
       
    59 	rtob.format.iTriad=aTriad;
       
    60 	rtob.format.iTriLen=aTrilen;
       
    61 	rtob.res=aRes;
       
    62 	err=aErr;	
       
    63 	}
       
    64 
       
    65 CALC_TEST::CALC_TEST(const TDesC& aDes,TInt aType,TInt aWidth,TInt aDecimals,TChar aPoint,TChar aTriad,TInt aTrilen,const TText* aRes)
       
    66 	: iLex(aDes)
       
    67 	{
       
    68 	iFormat.iType=aType;
       
    69 	iFormat.iWidth=aWidth;
       
    70 	iFormat.iPlaces=aDecimals;
       
    71 	iFormat.iPoint=aPoint;
       
    72 	iFormat.iTriad=aTriad;
       
    73 	iFormat.iTriLen=aTrilen;
       
    74 	iRes=aRes;
       
    75 	}