kerneltest/e32test/math/t_float2.cpp
author John Imhofe <john.imhofe@nokia.com>
Mon, 21 Dec 2009 16:14:42 +0000
changeset 15 4122176ea935
parent 0 a41df078684a
permissions -rw-r--r--
Revision: 200948 + Removing redundant base integration tests and fixing build errors Kit: 200948
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     1
// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     2
// All rights reserved.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     3
// This component and the accompanying materials are made available
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     4
// under the terms of the License "Eclipse Public License v1.0"
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     5
// which accompanies this distribution, and is available
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     7
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     8
// Initial Contributors:
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    10
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    11
// Contributors:
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    12
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    13
// Description:
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    14
// e32test\math\t_float2.cpp
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    15
// File for T_FLOAT.CPP containing data for test2, test3 and test4
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    16
// T_FLOAT.CPP split into header files because there seems to be too much static
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    17
// data for GCC compiler
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    18
// 
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    19
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    20
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    21
#include "t_float.h"
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    22
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    23
GLDEF_D ROUND_TEST testround[]=
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    24
{
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    25
{30,0,30},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    26
{1.47934,2,1.48},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    27
{-72.86345,3,-72.863},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    28
{-734.9999,0,-735.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    29
{4855.9974,1,4856.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    30
{232478.35,-1,232480.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    31
{1.0,2,1.00},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    32
{.0006,3,0.001},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    33
{0.00000012,-1,0.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    34
{4923.45,-1,4920.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    35
{0,4,0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    36
{0,0,0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    37
{7493650136.435,-5,7493700000.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    38
{-34.566732,7,-34.566732},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    39
{-36842.6570524,-2,-36800.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    40
{9,2,9.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    41
{.0000003,7,.0000003,},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    42
{.0000003,6,0.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    43
{476253405.342,-12,0.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    44
{.00000000000657,-3,0.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    45
{0.1,0,0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    46
{9.9,0,10.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    47
{.0000008,6,.000001},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    48
{18.0,0,18.0},  
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    49
{9.1,0,9.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    50
{9.5,0,10.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    51
{9.9,0,10.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    52
{0.9,0,1.0},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    53
{0.9,1, 0.9},
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    54
{0.99,1,1.0}
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    55
};
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    56
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    57
GLDEF_D TUint size_testround=sizeof(testround);
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    58
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    59
//Added by AnnW
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    60
GLDEF_D RtoB_TEST testcalc[]=
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    61
	{
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    62
	RtoB_TEST(-1.234E+19,KRealFormatCalculator,20,12,'.',',',0,_S("-1.234E+19")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    63
	// NO EXPONENT FORMAT - no triads because triad length==0 
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    64
    RtoB_TEST(0,KRealFormatNoExponent,7,5,'.','0',0,_S("0")),			
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    65
    RtoB_TEST(0,KRealFormatNoExponent,1,1,'.','0',0,_S("0")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    66
	RtoB_TEST(0.00,KRealFormatNoExponent,7,4,'.','0',0,_S("0")),					
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    67
    RtoB_TEST(3.000,KRealFormatNoExponent,7,5,'.','0',0,_S("3")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    68
    RtoB_TEST(12.9999,KRealFormatNoExponent,6,4,'.','0',0,_S("13")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    69
    RtoB_TEST(12.9999,KRealFormatNoExponent,4,4,'.','0',0,_S("13")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    70
    RtoB_TEST(123456.0,KRealFormatNoExponent,6,6,'.','0',0,_S("123456")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    71
	RtoB_TEST(123456.0,KRealFormatNoExponent,9,6,'.','0',0,_S("123456")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    72
    RtoB_TEST(123456.0,KRealFormatNoExponent,10,8,'.',',',0,_S("123456")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    73
	RtoB_TEST(123456.0000,KRealFormatNoExponent,16,8,'.',',',0,_S("123456")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    74
	RtoB_TEST(123456.789,KRealFormatNoExponent,10,8,'.','0',0,_S("123456.79")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    75
	RtoB_TEST(123456.789,KRealFormatNoExponent,11,9,'.',',',0,_S("123456.789")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    76
	RtoB_TEST(123456.78900,KRealFormatNoExponent,13,11,'.',',',0,_S("123456.789")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    77
	RtoB_TEST(1234567890123.00,KRealFormatNoExponent,18,16,'.',',',0,_S("1234567890123")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    78
	RtoB_TEST(1234567890123.00,KRealFormatNoExponent,13,13,'.',',',0,_S("1234567890123")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    79
    RtoB_TEST(1234567890123.,KRealFormatNoExponent,20,16,'.','0',0,_S("1234567890123")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    80
	RtoB_TEST(.0453,KRealFormatNoExponent,12,10,'.','0',0,_S("0.0453")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    81
    RtoB_TEST(.0453,KRealFormatNoExponent,12,1,'.','0',0,_S("0.05")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    82
    RtoB_TEST(.00000876,KRealFormatNoExponent,12,10,'.','0',0,_S("0.00000876")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    83
    RtoB_TEST(.00000876,KRealFormatNoExponent,12,8,'.','0',0,_S("0.00000876")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    84
    RtoB_TEST(.00000876,KRealFormatNoExponent,9,7,'.','0',0,_S("0.0000088")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    85
    RtoB_TEST(.00000876,KRealFormatNoExponent,8,6,'.','0',0,_S("0.000009")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    86
    RtoB_TEST(.123,KRealFormatNoExponent,7,5,'.','0',0,_S("0.123")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    87
	RtoB_TEST(.1230000,KRealFormatNoExponent,7,5,'.','0',0,_S("0.123")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    88
	RtoB_TEST(.1230,KRealFormatNoExponent,7,5,'.','0',0,_S("0.123")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    89
	RtoB_TEST(.1230,KRealFormatNoExponent,5,4,'.','0',0,_S("0.123")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    90
    RtoB_TEST(.1235,KRealFormatNoExponent,6,4,'.','0',0,_S("0.1235")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    91
	RtoB_TEST(10000.00,KRealFormatNoExponent,10,7,'.',',',0,_S("10000")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    92
    RtoB_TEST(1.0E4,KRealFormatNoExponent,10,7,'.',',',0,_S("10000")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    93
	RtoB_TEST(1234.9876,KRealFormatNoExponent,8,8,'.',',',0,_S("1234.988")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    94
	RtoB_TEST(-1234.9876,KRealFormatNoExponent,9,8,'.',',',0,_S("-1234.988")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    95
	RtoB_TEST(1234.9876E-8,KRealFormatNoExponent,8,8,'.',',',0,_S("0.000012")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    96
	RtoB_TEST(-1234.9876E-8,KRealFormatNoExponent,8,7,'.',',',0,_S("-0.00001")),    
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    97
	//					  - no triads because flag set
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    98
	RtoB_TEST(0,noExponentNoTriads,7,5,'.','0',3,_S("0")),								
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    99
    RtoB_TEST(3.000,noExponentNoTriads,7,5,'.','0',3,_S("3")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   100
	RtoB_TEST(3.000,noExponentNoTriads,1,1,'.','0',3,_S("3")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   101
    RtoB_TEST(12.9999,noExponentNoTriads,6,4,'.','0',3,_S("13")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   102
    RtoB_TEST(123456.0,noExponentNoTriads,9,6,'.','0',0,_S("123456")),  // flag set and length==0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   103
    RtoB_TEST(123456.0,noExponentNoTriads,10,8,'.',',',3,_S("123456")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   104
	RtoB_TEST(123456.0000,noExponentNoTriads,16,8,'.',',',3,_S("123456")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   105
	RtoB_TEST(123456.789,noExponentNoTriads,10,8,'.','0',0,_S("123456.79")),  // flag set and length==0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   106
	RtoB_TEST(123456.789,noExponentNoTriads,9,8,'.','0',0,_S("123456.79")),  // flag set and length==0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   107
	RtoB_TEST(123456.789,noExponentNoTriads,11,9,'.',',',3,_S("123456.789")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   108
	RtoB_TEST(123456.78900,noExponentNoTriads,13,11,'.',',',0,_S("123456.789")),  // flag set and length==0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   109
	RtoB_TEST(1234567890123.00,noExponentNoTriads,18,16,'.',',',3,_S("1234567890123")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   110
    RtoB_TEST(1234567890123.,noExponentNoTriads,20,16,'.','0',0,_S("1234567890123")),  // flag set and length==0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   111
	RtoB_TEST(.0453,noExponentNoTriads,12,10,'.','0',3,_S("0.0453")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   112
    RtoB_TEST(.0453,noExponentNoTriads,6,5,'.','0',3,_S("0.0453")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   113
	RtoB_TEST(.0453,noExponentNoTriads,5,3,'.','0',3,_S("0.045")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   114
    RtoB_TEST(.00000876,noExponentNoTriads,12,10,'.','0',3,_S("0.00000876")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   115
	// 					  - UK triad separators
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   116
	RtoB_TEST(0.0,KRealFormatNoExponent,9,6,'.',',',3,_S("0")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   117
    RtoB_TEST(.00568,KRealFormatNoExponent,9,3,'.',',',3,_S("0.00568")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   118
    RtoB_TEST(12345.0,KRealFormatNoExponent,9,6,'.',',',3,_S("12,345")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   119
    RtoB_TEST(12345.669,KRealFormatNoExponent,10,7,'.',',',3,_S("12,345.67")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   120
    RtoB_TEST(100000.0,KRealFormatNoExponent,10,8,'.',',',3,_S("100,000")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   121
    RtoB_TEST(99999.999,KRealFormatNoExponent,10,7,'.',',',3,_S("100,000")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   122
    RtoB_TEST(1234567890.675,KRealFormatNoExponent,17,12,'.',',',3,_S("1,234,567,890.68")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   123
    RtoB_TEST(1234567890.675,KRealFormatNoExponent,16,12,'.',',',3,_S("1,234,567,890.68")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   124
	RtoB_TEST(1.0E3,KRealFormatNoExponent,10,7,'.',',',3,_S("1,000")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   125
	RtoB_TEST(12345.669,KRealFormatNoExponent,8,7,'.',',',3,_S("12,345.7")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   126
	// 					  - French Triad separators
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   127
	RtoB_TEST(0.0,KRealFormatNoExponent,10,7,',',' ',4,_S("0")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   128
    RtoB_TEST(.00568,KRealFormatNoExponent,10,3,',',' ',4,_S("0,00568")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   129
    RtoB_TEST(1.0E3,KRealFormatNoExponent,10,7,',',' ',4,_S("1000")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   130
    RtoB_TEST(1234.0,KRealFormatNoExponent,10,7,',',' ',4,_S("1234")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   131
    RtoB_TEST(12345.0,KRealFormatNoExponent,9,6,',',' ',4,_S("12 345")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   132
    RtoB_TEST(12345.669,KRealFormatNoExponent,9,7,',',' ',4,_S("12 345,67")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   133
    RtoB_TEST(100000.0,KRealFormatNoExponent,10,8,',',' ',4,_S("100 000")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   134
	RtoB_TEST(100000.0,KRealFormatNoExponent,7,6,',',' ',4,_S("100 000")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   135
    RtoB_TEST(99999.999,KRealFormatNoExponent,10,7,',',' ',4,_S("100 000")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   136
    RtoB_TEST(1234567890.675,KRealFormatNoExponent,16,12,',',' ',4,_S("1 234 567 890,68")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   137
	// '.' as triad separator, and ',' as decimal point
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   138
    RtoB_TEST(1234.0,KRealFormatNoExponent,10,8,',','.',3,_S("1.234")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   139
	RtoB_TEST(0.0,KRealFormatNoExponent,10,8,',','.',3,_S("0")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   140
    RtoB_TEST(.00568,KRealFormatNoExponent,10,3,',','.',3,_S("0,00568")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   141
    RtoB_TEST(1.0E3,KRealFormatNoExponent,10,6,',','.',3,_S("1.000")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   142
    RtoB_TEST(12345.669,KRealFormatNoExponent,10,7,',','.',3,_S("12.345,67")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   143
	RtoB_TEST(12345.669,KRealFormatNoExponent,9,7,',','.',3,_S("12.345,67")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   144
    RtoB_TEST(12345.67,KRealFormatNoExponent,9,7,',','.',4,_S("12.345,67")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   145
    RtoB_TEST(1234567890.675,KRealFormatNoExponent,16,12,',','.',3,_S("1.234.567.890,68")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   146
	// Limited
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   147
	RtoB_TEST(1.23456789012501,noExponentLimit,32,15,'.',',',3,_S("1.23456789013")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   148
    RtoB_TEST(1.2345678901249,noExponentLimit,32,15,'.',',',3,_S("1.23456789012")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   149
    RtoB_TEST(1.99999999996,noExponentLimit,32,15,'.',',',3,_S("1.99999999996")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   150
    RtoB_TEST(1.999999999996,noExponentLimit,32,15,'.',',',3,_S("2")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   151
    RtoB_TEST(1.9999999999996,noExponentLimit,32,15,'.',',',3,_S("2")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   152
    RtoB_TEST(1.99999999999996,noExponentLimit,32,15,'.',',',3,_S("2")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   153
	// Calc setting - no triads and space for sign, width=14, dp=12
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   154
	RtoB_TEST(1.234567890123,noExponentCalc,14,12,'.',',',3,_S("1.23456789012")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   155
    RtoB_TEST(1.234567890129,noExponentCalc,14,12,'.',',',3,_S("1.23456789013")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   156
	RtoB_TEST(-1.234567890123,noExponentCalc,14,12,'.',',',3,_S("-1.23456789012")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   157
    RtoB_TEST(-1.234567890129,noExponentCalc,14,12,'.',',',3,_S("-1.23456789013")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   158
	RtoB_TEST(123456789012.00,noExponentCalc,14,12,'.',',',0,_S("123456789012")),    
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   159
	RtoB_TEST(999999999999.00,noExponentCalc,14,12,'.',',',0,_S("999999999999")),    
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   160
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   161
	// CALCULATOR format
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   162
	// No Exponent format 
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   163
    RtoB_TEST(1.234E-8,KRealFormatCalculator,20,12,'.',',',0,_S("0.00000001234")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   164
	RtoB_TEST(1.234E-7,KRealFormatCalculator,20,12,'.',',',0,_S("0.0000001234")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   165
	RtoB_TEST(1.234E-6,KRealFormatCalculator,20,12,'.',',',0,_S("0.000001234")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   166
	RtoB_TEST(1.234E-3,KRealFormatCalculator,20,12,'.',',',0,_S("0.001234")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   167
	RtoB_TEST(1.234E-2,KRealFormatCalculator,20,12,'.',',',0,_S("0.01234")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   168
	RtoB_TEST(1E-11,KRealFormatCalculator,20,12,'.',',',0,_S("0.00000000001")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   169
	RtoB_TEST(1.2E-10,KRealFormatCalculator,20,12,'.',',',0,_S("0.00000000012")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   170
	RtoB_TEST(1.23E-9,KRealFormatCalculator,20,12,'.',',',0,_S("0.00000000123")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   171
	RtoB_TEST(1.234E-8,KRealFormatCalculator,20,12,'.',',',0,_S("0.00000001234")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   172
	RtoB_TEST(1.2345E-7,KRealFormatCalculator,20,12,'.',',',0,_S("0.00000012345")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   173
	RtoB_TEST(1.23456E-6,KRealFormatCalculator,20,12,'.',',',0,_S("0.00000123456")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   174
	RtoB_TEST(1.234567E-5,KRealFormatCalculator,20,12,'.',',',0,_S("0.00001234567")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   175
	RtoB_TEST(1.2345678E-4,KRealFormatCalculator,20,12,'.',',',0,_S("0.00012345678")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   176
	RtoB_TEST(1.23456789E-3,KRealFormatCalculator,20,12,'.',',',0,_S("0.00123456789")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   177
	RtoB_TEST(1.234567891E-2,KRealFormatCalculator,20,12,'.',',',0,_S("0.01234567891")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   178
	RtoB_TEST(1.2345678912E-1,KRealFormatCalculator,20,12,'.',',',0,_S("0.12345678912")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   179
	RtoB_TEST(1.23456789123E0,KRealFormatCalculator,20,12,'.',',',0,_S("1.23456789123")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   180
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   181
	RtoB_TEST(0.000,KRealFormatCalculator,10,4,'.','0',0,_S("0")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   182
    RtoB_TEST(98.000,KRealFormatCalculator,10,4,'.','0',0,_S("98")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   183
    RtoB_TEST(12345.6700009,KRealFormatCalculator,17,11,'.','0',3,_S("12345.670001")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   184
    RtoB_TEST(1.E2,KRealFormatCalculator,10,4,'.','0',0,_S("100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   185
    RtoB_TEST(1234.0,KRealFormatCalculator,10,4,'.','0',3,_S("1234")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   186
    RtoB_TEST(1.2345,KRealFormatCalculator,10,3,'.','0',0,_S("1.23")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   187
    RtoB_TEST(1.235,KRealFormatCalculator,9,3,'.','0',0,_S("1.24")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   188
    RtoB_TEST(98765.0,KRealFormatCalculator,13,6,'.','0',0,_S("98765")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   189
    RtoB_TEST(100000000.0,KRealFormatCalculator,15,9,'.','0',0,_S("100000000")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   190
    RtoB_TEST(123.098785E00,KRealFormatCalculator,15,9,'.','0',0,_S("123.098785")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   191
	RtoB_TEST(-123.098785E00,KRealFormatCalculator,15,8,'.','0',0,_S("-123.09879")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   192
    RtoB_TEST(1234.9876E-4,KRealFormatCalculator,15,9,'.','0',0,_S("0.12349876")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   193
    RtoB_TEST(1234.9876E-5,KRealFormatCalculator,16,10,'.','0',0,_S("0.012349876")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   194
 	RtoB_TEST(0.0099,KRealFormatCalculator,11,5,'.','0',0,_S("0.0099")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   195
	RtoB_TEST(0.099,KRealFormatCalculator,10,4,'.','0',0,_S("0.099")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   196
	RtoB_TEST(0.001209,KRealFormatCalculator,15,7,'.','0',0,_S("0.001209")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   197
	RtoB_TEST(0.00100987,KRealFormatCalculator,15,9,'.','0',0,_S("0.00100987")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   198
	RtoB_TEST(0.678,KRealFormatCalculator,10,4,'.','0',0,_S("0.678")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   199
    RtoB_TEST(99999.0,KRealFormatCalculator,12,6,'.','0',0,_S("99999")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   200
	RtoB_TEST(12345678901234567890.0,KRealFormatCalculator,20,12,'.','0',0,_S("1.23456789012E+19")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   201
    RtoB_TEST(1234567890123.0,KRealFormatCalculator,13,7,'.','0',0,_S("1.234568E+12")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   202
	// Initially the format type is exponent, but after rounding it is changed to fixed
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   203
    RtoB_TEST(0.00099999,KRealFormatCalculator,10,4,'.','0',0,_S("0.001")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   204
    // Exponent format, two digit exponent only 
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   205
	RtoB_TEST(1.23412341234E-11,KRealFormatCalculator,20,12,'.',',',0,_S("1.23412341234E-11")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   206
	RtoB_TEST(1.23412341234E-8,KRealFormatCalculator,20,12,'.',',',0,_S("1.23412341234E-08")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   207
	RtoB_TEST(1.23412341234E-7,KRealFormatCalculator,20,12,'.',',',0,_S("1.23412341234E-07")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   208
	RtoB_TEST(1.23412341234E-6,KRealFormatCalculator,20,12,'.',',',0,_S("1.23412341234E-06")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   209
	RtoB_TEST(1.23412341234E-3,KRealFormatCalculator,20,12,'.',',',0,_S("1.23412341234E-03")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   210
	RtoB_TEST(1.23412341234E-2,KRealFormatCalculator,20,12,'.',',',0,_S("1.23412341234E-02")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   211
	RtoB_TEST(1.23412341234123E-7,KRealFormatCalculator,20,12,'.',',',0,_S("1.23412341234E-07")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   212
	RtoB_TEST(1.234E-11,KRealFormatCalculator,20,12,'.',',',0,_S("1.234E-11")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   213
	RtoB_TEST(1.234E-9,KRealFormatCalculator,20,12,'.',',',0,_S("1.234E-09")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   214
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   215
	RtoB_TEST(10000000.0,KRealFormatCalculator,13,7,'.','0',0,_S("1E+07")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   216
	RtoB_TEST(0.001209,KRealFormatCalculator,11,5,'.','0',0,_S("1.209E-03")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   217
	RtoB_TEST(0.00100987,KRealFormatCalculator,12,6,'.','0',0,_S("1.00987E-03")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   218
	RtoB_TEST(0.00099999109,KRealFormatCalculator,13,7,'.','0',0,_S("9.999911E-04")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   219
	RtoB_TEST(0.0000678,KRealFormatCalculator,9,3,'.','0',0,_S("6.78E-05")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   220
    RtoB_TEST(1234567.8765E12,KRealFormatCalculator,11,5,'.','0',0,_S("1.2346E+18")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   221
    RtoB_TEST(123.098785E56,KRealFormatCalculator,13,7,'.','0',0,_S("1.230988E+58")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   222
    RtoB_TEST(0.0000001234,KRealFormatCalculator,10,4,'.','0',0,_S("1.234E-07")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   223
    RtoB_TEST(.99999999E99,KRealFormatCalculator,12,6,'.','0',0,_S("1E+99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   224
    RtoB_TEST(1.0E99,KRealFormatCalculator,12,6,'.','0',0,_S("1E+99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   225
    RtoB_TEST(.00000000001,KRealFormatCalculator,12,6,'.','0',0,_S("1E-11")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   226
    RtoB_TEST(5384795.26E-52,KRealFormatCalculator,13,7,'.','0',0,_S("5.384795E-46")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   227
    RtoB_TEST(123.098785E-87,KRealFormatCalculator,13,7,'.','0',0,_S("1.230988E-85")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   228
    RtoB_TEST(.99999999E-99,KRealFormatCalculator,12,6,'.','0',0,_S("1E-99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   229
    RtoB_TEST(1.0E-99,KRealFormatCalculator,12,6,'.','0',0,_S("1E-99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   230
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   231
	RtoB_TEST(1E-12,KRealFormatCalculator,20,12,'.',',',0,_S("1E-12")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   232
	RtoB_TEST(1.2E-11,KRealFormatCalculator,20,12,'.',',',0,_S("1.2E-11")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   233
	RtoB_TEST(1.23E-10,KRealFormatCalculator,20,12,'.',',',0,_S("1.23E-10")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   234
	RtoB_TEST(1.234E-9,KRealFormatCalculator,20,12,'.',',',0,_S("1.234E-09")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   235
	RtoB_TEST(1.2345E-8,KRealFormatCalculator,20,12,'.',',',0,_S("1.2345E-08")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   236
	RtoB_TEST(1.23456E-7,KRealFormatCalculator,20,12,'.',',',0,_S("1.23456E-07")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   237
	RtoB_TEST(1.234567E-6,KRealFormatCalculator,20,12,'.',',',0,_S("1.234567E-06")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   238
	RtoB_TEST(1.2345678E-5,KRealFormatCalculator,20,12,'.',',',0,_S("1.2345678E-05")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   239
	RtoB_TEST(1.23456789E-4,KRealFormatCalculator,20,12,'.',',',0,_S("1.23456789E-04")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   240
	RtoB_TEST(1.234567891E-3,KRealFormatCalculator,20,12,'.',',',0,_S("1.234567891E-03")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   241
	RtoB_TEST(1.2345678912E-2,KRealFormatCalculator,20,12,'.',',',0,_S("1.2345678912E-02")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   242
	RtoB_TEST(1.23456789123E-1,KRealFormatCalculator,20,12,'.',',',0,_S("1.23456789123E-01")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   243
	RtoB_TEST(1.234567891234,KRealFormatCalculator,20,12,'.',',',0,_S("1.23456789123")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   244
	// Exponent format, three-digit exponents allowed
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   245
    RtoB_TEST(9999999.0,calculatorThreeDigitExp,11,4,'.','0',0,_S("1E+07")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   246
    RtoB_TEST(1234567890123.0,calculatorThreeDigitExp,20,13,'.','0',0,_S("1234567890123")),	// Leave room for three-digit exponent, so can have fixed numbers one digit longer 
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   247
    RtoB_TEST(1234567.8765E12,calculatorThreeDigitExp,13,6,'.','0',0,_S("1.23457E+18")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   248
    RtoB_TEST(123.098785E56,calculatorThreeDigitExp,14,7,'.','0',0,_S("1.230988E+58")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   249
    RtoB_TEST(.99999999E99,calculatorThreeDigitExp,13,6,'.','0',0,_S("1E+99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   250
    RtoB_TEST(1.0E99,calculatorThreeDigitExp,13,6,'.','0',0,_S("1E+99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   251
    RtoB_TEST(.000000000001,calculatorThreeDigitExp,13,6,'.','0',0,_S("1E-12")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   252
    RtoB_TEST(5384795.26E-52,calculatorThreeDigitExp,14,7,'.','0',0,_S("5.384795E-46")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   253
    RtoB_TEST(.99999999E-99,calculatorThreeDigitExp,13,6,'.','0',0,_S("1E-99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   254
    RtoB_TEST(1.0E-99,calculatorThreeDigitExp,13,6,'.','0',0,_S("1E-99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   255
	RtoB_TEST(1234.9876E-103,calculatorThreeDigitExp,13,6,'.','0',0,_S("1.23499E-100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   256
    RtoB_TEST(1234.9876E-107,calculatorThreeDigitExp,15,8,'.','0',0,_S("1.2349876E-104")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   257
    RtoB_TEST(1234.9876E-109,calculatorThreeDigitExp,15,8,'.','0',0,_S("1.2349876E-106")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   258
    RtoB_TEST(1234.9876E-110,calculatorThreeDigitExp,16,9,'.','0',0,_S("1.2349876E-107")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   259
    RtoB_TEST(1234.9876E-200,calculatorThreeDigitExp,17,10,'.','0',0,_S("1.2349876E-197")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   260
    RtoB_TEST(1234.9876E-300,calculatorThreeDigitExp,17,10,'.','0',0,_S("1.2349876E-297")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   261
    RtoB_TEST(1234.9876E97,calculatorThreeDigitExp,13,6,'.','0',0,_S("1.23499E+100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   262
    RtoB_TEST(1234.9876E100,calculatorThreeDigitExp,15,8,'.','0',0,_S("1.2349876E+103")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   263
    RtoB_TEST(1234.9876E103,calculatorThreeDigitExp,15,8,'.','0',0,_S("1.2349876E+106")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   264
    RtoB_TEST(1234.9876E200,calculatorThreeDigitExp,16,9,'.','0',0,_S("1.2349876E+203")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   265
    RtoB_TEST(1234.9876E300,calculatorThreeDigitExp,17,10,'.','0',0,_S("1.2349876E+303")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   266
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   267
	RtoB_TEST(1.2E+100,calculatorThreeDigitExp,8,1,'.','0',0,_S("1E+100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   268
    RtoB_TEST(1.2E-100,calculatorThreeDigitExp,8,1,'.','0',0,_S("1E-100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   269
    RtoB_TEST(-1.2E+100,calculatorThreeDigitExp,8,1,'.','0',0,_S("-1E+100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   270
    RtoB_TEST(-1.2E-100,calculatorThreeDigitExp,8,1,'.','0',0,_S("-1E-100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   271
    RtoB_TEST(1.2E+100,calculatorThreeDigitExp,9,2,'.','0',0,_S("1.2E+100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   272
    RtoB_TEST(1.2E-100,calculatorThreeDigitExp,9,2,'.','0',0,_S("1.2E-100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   273
    RtoB_TEST(-1.2E+100,calculatorThreeDigitExp,9,2,'.','0',0,_S("-1.2E+100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   274
    RtoB_TEST(-1.2E-100,calculatorThreeDigitExp,9,2,'.','0',0,_S("-1.2E-100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   275
    RtoB_TEST(1E+100,calculatorThreeDigitExp,9,2,'.','0',0,_S("1E+100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   276
    RtoB_TEST(1E-100,calculatorThreeDigitExp,9,2,'.','0',0,_S("1E-100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   277
    RtoB_TEST(-1E+100,calculatorThreeDigitExp,9,2,'.','0',0,_S("-1E+100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   278
    RtoB_TEST(-1E-100,calculatorThreeDigitExp,9,2,'.','0',0,_S("-1E-100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   279
    RtoB_TEST(1E+100,calculatorThreeDigitExp,8,1,'.','0',0,_S("1E+100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   280
    RtoB_TEST(1E-100,calculatorThreeDigitExp,8,1,'.','0',0,_S("1E-100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   281
    RtoB_TEST(-1E+100,calculatorThreeDigitExp,8,1,'.','0',0,_S("-1E+100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   282
    RtoB_TEST(-1E-100,calculatorThreeDigitExp,8,1,'.','0',0,_S("-1E-100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   283
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   284
	RtoB_TEST(1.4E+308,calculatorThreeDigitExp,8,1,'.','0',0,_S("1E+308")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   285
    RtoB_TEST(2.3E-308,calculatorThreeDigitExp,8,1,'.','0',0,_S("2E-308")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   286
    RtoB_TEST(-1.4E+308,calculatorThreeDigitExp,8,1,'.','0',0,_S("-1E+308")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   287
    RtoB_TEST(-2.3E-308,calculatorThreeDigitExp,8,1,'.','0',0,_S("-2E-308")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   288
    RtoB_TEST(1.7E+308,calculatorThreeDigitExp,9,2,'.','0',0,_S("1.7E+308")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   289
    RtoB_TEST(2.3E-308,calculatorThreeDigitExp,10,3,'.','0',0,_S("2.3E-308")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   290
    RtoB_TEST(-1.7E+308,calculatorThreeDigitExp,10,3,'.','0',0,_S("-1.7E+308")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   291
    RtoB_TEST(-2.3E-308,calculatorThreeDigitExp,9,2,'.','0',0,_S("-2.3E-308")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   292
    RtoB_TEST(1.797693E+308,calculatorThreeDigitExp,15,7,'.','0',0,_S("1.797693E+308")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   293
    RtoB_TEST(2.225074E-308,calculatorThreeDigitExp,16,8,'.','0',0,_S("2.225074E-308")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   294
    RtoB_TEST(-1.797693E+308,calculatorThreeDigitExp,16,8,'.','0',0,_S("-1.797693E+308")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   295
    RtoB_TEST(-2.225074E-308,calculatorThreeDigitExp,16,7,'.','0',0,_S("-2.225074E-308")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   296
	// Limited
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   297
	RtoB_TEST(1.23456789012501E24,calculatorLimit,21,15,'.',',',3,_S("1.23456789013E+24")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   298
    RtoB_TEST(1.2345678901249E+97,calculatorLimit,32,15,'.',',',3,_S("1.23456789012E+97")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   299
    RtoB_TEST(1.99999999996E-19,calculatorLimit,21,15,'.',',',3,_S("1.99999999996E-19")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   300
    RtoB_TEST(1.999999999996E-53,calculatorLimit,32,15,'.',',',3,_S("2E-53")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   301
    RtoB_TEST(1.9999999999996E+46,calculatorLimit,32,15,'.',',',3,_S("2E+46")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   302
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   303
	RtoB_TEST(1.23456789012501,calculatorLimit,32,15,'.',',',3,_S("1.23456789013")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   304
    RtoB_TEST(1.2345678901249,calculatorLimit,32,15,'.',',',3,_S("1.23456789012")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   305
    RtoB_TEST(1.99999999996,calculatorLimit,32,15,'.',',',3,_S("1.99999999996")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   306
    RtoB_TEST(1.999999999996,calculatorLimit,32,15,'.',',',3,_S("2")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   307
    RtoB_TEST(1.9999999999996,calculatorLimit,32,15,'.',',',3,_S("2")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   308
    RtoB_TEST(1.99999999999996,calculatorLimit,32,15,'.',',',3,_S("2")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   309
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   310
	RtoB_TEST(1.23456789012501E24,calculatorLimitAndThreeDigExp,22,15,'.',',',3,_S("1.23456789013E+24")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   311
    RtoB_TEST(1.2345678901249E+197,calculatorLimitAndThreeDigExp,32,15,'.',',',3,_S("1.23456789012E+197")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   312
    RtoB_TEST(1.99999999996E-19,calculatorLimitAndThreeDigExp,22,15,'.',',',3,_S("1.99999999996E-19")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   313
    RtoB_TEST(1.999999999996E-153,calculatorLimitAndThreeDigExp,32,15,'.',',',3,_S("2E-153")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   314
    RtoB_TEST(1.9999999999996E+246,calculatorLimitAndThreeDigExp,32,15,'.',',',3,_S("2E+246")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   315
	RtoB_TEST(1.99999999999996E-302,calculatorLimitAndThreeDigExp,32,15,'.',',',3,_S("2E-302")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   316
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   317
	// new - exponent with significant figures
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   318
	RtoB_TEST(10000000.0,exponentSigFigs,13,7,'.','0',0,_S("1E+07")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   319
    RtoB_TEST(9999999.0,exponentSigFigs,12,6,'.','0',0,_S("1E+07")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   320
    RtoB_TEST(1234567890123.0,exponentSigFigs,13,7,'.','0',0,_S("1.234568E+12")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   321
    RtoB_TEST(1234567.8765E12,exponentSigFigs,11,5,'.','0',0,_S("1.2346E+18")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   322
    RtoB_TEST(123.098785E56,exponentSigFigs,13,7,'.','0',0,_S("1.230988E+58")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   323
    RtoB_TEST(0.0000678,exponentSigFigs,9,3,'.','0',0,_S("6.78E-05")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   324
    RtoB_TEST(0.0000001234,exponentSigFigs,10,4,'.','0',0,_S("1.234E-07")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   325
    RtoB_TEST(.99999999E99,exponentSigFigs,12,6,'.','0',0,_S("1E+99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   326
    RtoB_TEST(1.0E99,exponentSigFigs,12,6,'.','0',0,_S("1E+99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   327
    RtoB_TEST(.0000000001,exponentSigFigs,12,6,'.','0',0,_S("1E-10")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   328
    RtoB_TEST(5384795.26E-52,exponentSigFigs,13,7,'.','0',0,_S("5.384795E-46")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   329
    RtoB_TEST(123.098785E-87,exponentSigFigs,13,7,'.','0',0,_S("1.230988E-85")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   330
    RtoB_TEST(.99999999E-99,exponentSigFigs,12,6,'.','0',0,_S("1E-99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   331
    RtoB_TEST(1.0E-99,exponentSigFigs,12,6,'.','0',0,_S("1E-99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   332
	// three-digit exponents allowed
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   333
    RtoB_TEST(9999999.0,exponentThreeDigitExpAndSigFigs,11,4,'.','0',0,_S("1E+07")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   334
    RtoB_TEST(1234567.8765E12,exponentThreeDigitExpAndSigFigs,13,6,'.','0',0,_S("1.23457E+18")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   335
    RtoB_TEST(123.098785E56,exponentThreeDigitExpAndSigFigs,14,7,'.','0',0,_S("1.230988E+58")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   336
    RtoB_TEST(.99999999E99,exponentThreeDigitExpAndSigFigs,13,6,'.','0',0,_S("1E+99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   337
    RtoB_TEST(1.0E99,exponentThreeDigitExpAndSigFigs,13,6,'.','0',0,_S("1E+99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   338
    RtoB_TEST(.0000000001,exponentThreeDigitExpAndSigFigs,13,6,'.','0',0,_S("1E-10")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   339
    RtoB_TEST(5384795.26E-52,exponentThreeDigitExpAndSigFigs,14,7,'.','0',0,_S("5.384795E-46")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   340
    RtoB_TEST(.99999999E-99,exponentThreeDigitExpAndSigFigs,13,6,'.','0',0,_S("1E-99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   341
    RtoB_TEST(1.0E-99,exponentThreeDigitExpAndSigFigs,13,6,'.','0',0,_S("1E-99")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   342
	RtoB_TEST(1234.9876E-103,exponentThreeDigitExpAndSigFigs,13,6,'.','0',0,_S("1.23499E-100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   343
    RtoB_TEST(1234.9876E-107,exponentThreeDigitExpAndSigFigs,15,8,'.','0',0,_S("1.2349876E-104")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   344
    RtoB_TEST(1234.9876E-109,exponentThreeDigitExpAndSigFigs,15,8,'.','0',0,_S("1.2349876E-106")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   345
    RtoB_TEST(1234.9876E-110,exponentThreeDigitExpAndSigFigs,16,9,'.','0',0,_S("1.2349876E-107")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   346
    RtoB_TEST(1234.9876E-200,exponentThreeDigitExpAndSigFigs,17,10,'.','0',0,_S("1.2349876E-197")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   347
    RtoB_TEST(1234.9876E-300,exponentThreeDigitExpAndSigFigs,17,10,'.','0',0,_S("1.2349876E-297")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   348
    RtoB_TEST(1234.9876E97,exponentThreeDigitExpAndSigFigs,13,6,'.','0',0,_S("1.23499E+100")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   349
    RtoB_TEST(1234.9876E100,exponentThreeDigitExpAndSigFigs,15,8,'.','0',0,_S("1.2349876E+103")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   350
    RtoB_TEST(1234.9876E103,exponentThreeDigitExpAndSigFigs,15,8,'.','0',0,_S("1.2349876E+106")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   351
    RtoB_TEST(1234.9876E200,exponentThreeDigitExpAndSigFigs,16,9,'.','0',0,_S("1.2349876E+203")),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   352
    RtoB_TEST(1234.9876E300,exponentThreeDigitExpAndSigFigs,17,10,'.','0',0,_S("1.2349876E+303"))
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   353
	};
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   354
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   355
GLDEF_D TUint size_testcalc=sizeof(testcalc);
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   356
	
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   357
GLDEF_D ERR_TEST testerr[]=
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   358
    {
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   359
    // FIXED - special values
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   360
	ERR_TEST(KPosInfTReal64,fixedNoTriads,32,4,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   361
	ERR_TEST(KNegInfTReal64,fixedNoTriads,32,4,'.','0',0,_S("-Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   362
	ERR_TEST(KNaNTReal64,fixedNoTriads,32,4,'.','0',0,_S("NaN"),KErrArgument),	
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   363
	ERR_TEST(K1EMinus324Real64,fixedNoTriads,32,4,'.','0',0,_S("0.0000"),6),	
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   364
	//       - no space for sign and no triads - does not fit 
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   365
	ERR_TEST(1234.9876E95,fixedNoTriads,12,0,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   366
	ERR_TEST(-1234.9876E95,fixedNoTriads,12,0,'.','0',0,_S("-Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   367
	ERR_TEST(1234.9876,fixedNoTriads,8,4,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   368
	ERR_TEST(1234.9876E-8,fixedNoTriads,3,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   369
	ERR_TEST(1234.9876E-8,fixedNoTriads,8,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   370
	//		 - no space for sign and triads - does not fit
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   371
	ERR_TEST(1234.9876E-8,KRealFormatFixed,10,10,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   372
	ERR_TEST(1234.9876E-107,KRealFormatFixed,12,11,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   373
    ERR_TEST(1234.9876E-109,KRealFormatFixed,12,11,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   374
    ERR_TEST(1234.9876E-110,KRealFormatFixed,12,11,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   375
    ERR_TEST(1234.9876E-200,KRealFormatFixed,12,11,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   376
    ERR_TEST(1234.9876E-300,KRealFormatFixed,12,11,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   377
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   378
	ERR_TEST(1234.9876E4,KRealFormatFixed,8,0,'.',',',3,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   379
	ERR_TEST(1234.9876E4,KRealFormatFixed,9,0,'.',',',3,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   380
	ERR_TEST(1234.9876E95,KRealFormatFixed,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   381
	ERR_TEST(1234.9876E96,KRealFormatFixed,12,6,'.','0',0,_S("Inf"),KErrOverflow),		
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   382
    ERR_TEST(1234.9876E97,KRealFormatFixed,12,6,'.','0',0,_S("Inf"),KErrOverflow),	
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   383
    ERR_TEST(1234.9876E100,KRealFormatFixed,12,6,'.','0',0,_S("Inf"),KErrOverflow),	
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   384
    ERR_TEST(1234.9876E103,KRealFormatFixed,12,6,'.','0',0,_S("Inf"),KErrOverflow),	
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   385
    ERR_TEST(1234.9876E200,KRealFormatFixed,12,6,'.','0',0,_S("Inf"),KErrOverflow),	
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   386
    ERR_TEST(1234.9876E300,KRealFormatFixed,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   387
	//		 - space for sign and no triads - does not fit
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   388
	ERR_TEST(1234.9876,fixedSpaceForSign,9,4,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   389
	ERR_TEST(1234.9876E-8,fixedSpaceForSign,11,9,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   390
	//		 - space for sign and triads - does not fit
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   391
	ERR_TEST(1234.9876E4,fixedTriadsAndSign,9,0,'.',',',3,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   392
	ERR_TEST(1234.9876E4,fixedTriadsAndSign,10,0,'.',',',3,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   393
	//		 - no error, returns length
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   394
	ERR_TEST(1234.9876,fixedNoTriads,9,4,'.','0',0,_S("1234.9876"),9),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   395
    ERR_TEST(1234.9876E4,KRealFormatFixed,11,0,'.',',',3,_S("12,349,876"),10),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   396
	ERR_TEST(1234.9876,fixedSpaceForSign,10,4,'.','0',0,_S("1234.9876"),9),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   397
	ERR_TEST(-1234.9876,fixedSpaceForSign,10,4,'.','0',0,_S("-1234.9876"),10),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   398
    ERR_TEST(1234.9876E4,fixedTriadsAndSign,12,0,'.',',',3,_S("12,349,876"),10),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   399
	ERR_TEST(1234.9876E-101,KRealFormatFixed,12,6,'.','0',0,_S("0.000000"),8),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   400
    ERR_TEST(1234.9876E-102,KRealFormatFixed,12,6,'.','0',0,_S("0.000000"),8),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   401
    ERR_TEST(1234.9876E-103,KRealFormatFixed,12,6,'.','0',0,_S("0.000000"),8),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   402
	
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   403
	// EXPONENT - special values
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   404
	ERR_TEST(KPosInfTReal64,KRealFormatExponent,32,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   405
	ERR_TEST(KNegInfTReal64,KRealFormatExponent,32,6,'.','0',0,_S("-Inf"),KErrOverflow),  
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   406
	ERR_TEST(KNaNTReal64,KRealFormatExponent,32,6,'.','0',0,_S("NaN"),KErrArgument),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   407
 	ERR_TEST(K5EMinus324Real64,exponentThreeDigitExp,32,6,'.',',',0,_S("4.940656E-324"),13),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   408
 	ERR_TEST(K1EMinus324Real64,KRealFormatExponent,32,6,'.','0',0,_S("0.000000E+00"),12),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   409
	//			- only two digits allowed - underflow
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   410
	ERR_TEST(1234.9876E-103,KRealFormatExponent,12,6,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   411
    ERR_TEST(1234.9876E-110,KRealFormatExponent,12,6,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   412
    ERR_TEST(1234.9876E-200,KRealFormatExponent,12,6,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   413
    ERR_TEST(1234.9876E-300,KRealFormatExponent,12,6,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   414
    //									  - overflow
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   415
	ERR_TEST(1234.9876E97,KRealFormatExponent,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   416
	ERR_TEST(-1234.9876E97,KRealFormatExponent,12,6,'.','0',0,_S("-Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   417
    ERR_TEST(1234.9876E100,KRealFormatExponent,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   418
    ERR_TEST(1234.9876E200,KRealFormatExponent,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   419
    ERR_TEST(1234.9876E300,KRealFormatExponent,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   420
	//									  - does not fit
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   421
	ERR_TEST(1234.9876E24,KRealFormatExponent,12,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   422
    ERR_TEST(1234.9876E95,KRealFormatExponent,6,3,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   423
    ERR_TEST(1234.9876E-76,KRealFormatExponent,8,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   424
    ERR_TEST(1234.9876E-98,KRealFormatExponent,9,4,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   425
	// 			- three digits allowed - does not fit
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   426
	ERR_TEST(1234.9876E240,exponentThreeDigitExp,13,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   427
    ERR_TEST(1234.9876E98,exponentThreeDigitExp,6,1,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   428
    ERR_TEST(1234.9876E-160,exponentThreeDigitExp,9,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   429
    ERR_TEST(1234.9876E-98,exponentThreeDigitExp,9,4,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   430
	// 			- two digit exponent - no error, returns length
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   431
	ERR_TEST(1234.9876E95,KRealFormatExponent,12,6,'.','0',0,_S("1.234988E+98"),12),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   432
    ERR_TEST(1234.9876E96,KRealFormatExponent,12,6,'.','0',0,_S("1.234988E+99"),12),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   433
	ERR_TEST(1234.9876E-101,KRealFormatExponent,12,6,'.','0',0,_S("1.234988E-98"),12),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   434
    ERR_TEST(1234.9876E-102,KRealFormatExponent,12,6,'.','0',0,_S("1.234988E-99"),12),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   435
	//			- three-digit exponent - no error, returns length
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   436
    ERR_TEST(1234.9876E125,exponentThreeDigitExp,13,6,'.','0',0,_S("1.234988E+128"),13),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   437
    ERR_TEST(1234.9876E126,exponentThreeDigitExp,13,6,'.','0',0,_S("1.234988E+129"),13),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   438
	ERR_TEST(1234.9876E-139,exponentThreeDigitExp,13,6,'.','0',0,_S("1.234988E-136"),13),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   439
    ERR_TEST(1234.9876E-142,exponentThreeDigitExp,13,6,'.','0',0,_S("1.234988E-139"),13),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   440
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   441
	// GENERAL - only two-digit exponents allowed - underflow
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   442
	ERR_TEST(1234.9876E-103,KRealFormatGeneral,12,6,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   443
    ERR_TEST(1234.9876E-107,KRealFormatGeneral,12,6,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   444
    ERR_TEST(1234.9876E-200,KRealFormatGeneral,12,6,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   445
    ERR_TEST(1234.9876E-300,KRealFormatGeneral,12,6,'.','0',0,_S("0"),KErrUnderflow),    
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   446
	// 											  - overflow
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   447
	ERR_TEST(1234.9876E97,KRealFormatGeneral,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   448
    ERR_TEST(1234.9876E100,KRealFormatGeneral,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   449
    ERR_TEST(1234.9876E200,KRealFormatGeneral,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   450
    ERR_TEST(1234.9876E300,KRealFormatGeneral,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   451
	// 		   - space for sign needed
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   452
	ERR_TEST(1,generalSpaceForSign,1,0,'.',',',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   453
    //		   - no errors, returns length
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   454
	ERR_TEST(1234.9876E-101,KRealFormatGeneral,12,6,'.','0',0,_S("1.234988E-98"),12),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   455
    ERR_TEST(1234.9876E-104,generalThreeDigitExp,13,6,'.','0',0,_S("1.234988E-101"),13),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   456
    ERR_TEST(1234.9876E95,KRealFormatGeneral,12,6,'.','0',0,_S("1.234988E+98"),12),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   457
    ERR_TEST(1234.9876E99,generalThreeDigitExp,13,6,'.','0',0,_S("1.234988E+102"),13),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   458
	ERR_TEST(1234.9876,generalSpaceForSign,10,4,'.','0',0,_S("1234.9876"),9),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   459
	ERR_TEST(-1234.9876,generalSpaceForSign,10,4,'.','0',0,_S("-1234.9876"),10),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   460
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   461
	// NO EXPONENT - not enough space
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   462
	ERR_TEST(1234.9876E95,KRealFormatNoExponent,12,10,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   463
	ERR_TEST(1234.9876E103,KRealFormatNoExponent,12,10,'.','0',0,_S("Inf"),KErrOverflow),	
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   464
    ERR_TEST(1234.9876E200,KRealFormatNoExponent,12,10,'.','0',0,_S("Inf"),KErrOverflow),	
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   465
    ERR_TEST(1234.9876E300,KRealFormatNoExponent,12,10,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   466
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   467
	ERR_TEST(1234.9876E-101,KRealFormatNoExponent,12,10,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   468
    ERR_TEST(1234.9876E-104,KRealFormatNoExponent,13,11,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   469
	ERR_TEST(1234.9876E-107,KRealFormatNoExponent,12,10,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   470
    ERR_TEST(1234.9876E-109,KRealFormatNoExponent,12,10,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   471
    ERR_TEST(1234.9876E-110,KRealFormatNoExponent,12,10,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   472
    ERR_TEST(1234.9876E-200,KRealFormatNoExponent,12,10,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   473
    ERR_TEST(1234.9876E-300,KRealFormatNoExponent,12,10,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   474
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   475
    ERR_TEST(.00568,KRealFormatNoExponent,3,3,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   476
    ERR_TEST(12345.0,KRealFormatNoExponent,5,5,'.',',',3,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   477
    ERR_TEST(100000.0,KRealFormatNoExponent,6,6,'.',',',3,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   478
	ERR_TEST(100000.0,KRealFormatNoExponent,6,5,'.',',',3,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   479
    ERR_TEST(99999.999,KRealFormatNoExponent,6,6,'.',',',3,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   480
    ERR_TEST(1234567890.675,KRealFormatNoExponent,12,12,'.',',',3,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   481
    ERR_TEST(1234567890.675,KRealFormatNoExponent,12,9,'.',',',3,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   482
	ERR_TEST(1.0E3,KRealFormatNoExponent,4,4,'.',',',3,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   483
	ERR_TEST(1234567890120.00,noExponentCalc,14,12,'.',',',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   484
	ERR_TEST(999999999999.90,noExponentCalc,14,12,'.',',',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   485
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   486
	ERR_TEST(1234.9876,KRealFormatNoExponent,9,8,'.','0',0,_S("1234.9876"),9),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   487
	ERR_TEST(1234.9876,KRealFormatNoExponent,12,12,'.','0',0,_S("1234.9876"),9),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   488
	ERR_TEST(-1234.9876,KRealFormatNoExponent,10,10,'.','0',0,_S("-1234.9876"),10),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   489
	ERR_TEST(-1234.9876,KRealFormatNoExponent,12,11,'.','0',0,_S("-1234.9876"),10),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   490
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   491
	//CALCULATOR - only two-digit exponents allowed - underflow
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   492
	ERR_TEST(1234.9876E-103,KRealFormatCalculator,12,6,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   493
    ERR_TEST(1234.9876E-107,KRealFormatCalculator,12,6,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   494
    ERR_TEST(1234.9876E-200,KRealFormatCalculator,12,6,'.','0',0,_S("0"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   495
    ERR_TEST(1234.9876E-300,KRealFormatCalculator,12,6,'.','0',0,_S("0"),KErrUnderflow),    
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   496
	//  											- overflow
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   497
	ERR_TEST(1234.9876E97,KRealFormatCalculator,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   498
    ERR_TEST(1234.9876E100,KRealFormatCalculator,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   499
    ERR_TEST(1234.9876E200,KRealFormatCalculator,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   500
    ERR_TEST(1234.9876E300,KRealFormatCalculator,12,6,'.','0',0,_S("Inf"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   501
	//									            - does not fit
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   502
	ERR_TEST(1234.9876E24,KRealFormatCalculator,12,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   503
    ERR_TEST(1234.9876E95,KRealFormatCalculator,6,2,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   504
    ERR_TEST(1234.9876E-76,KRealFormatCalculator,9,6,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   505
    ERR_TEST(1234.9876E-98,KRealFormatCalculator,6,4,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   506
	ERR_TEST(-1234.9876E24,KRealFormatCalculator,9,8,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   507
    ERR_TEST(-1234.9876E95,KRealFormatCalculator,4,2,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   508
    ERR_TEST(-1234.9876E-76,KRealFormatCalculator,10,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   509
    ERR_TEST(-1234.9876E-98,KRealFormatCalculator,9,4,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   510
	// 			- three digits allowed - does not fit
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   511
	ERR_TEST(1234.9876E240,calculatorThreeDigitExp,13,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   512
    ERR_TEST(1234.9876E98,calculatorThreeDigitExp,6,1,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   513
    ERR_TEST(1234.9876E-160,calculatorThreeDigitExp,9,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   514
    ERR_TEST(1234.9876E-98,calculatorThreeDigitExp,10,6,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   515
	ERR_TEST(-1234.9876E240,calculatorThreeDigitExp,11,8,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   516
    ERR_TEST(-1234.9876E98,calculatorThreeDigitExp,7,1,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   517
    ERR_TEST(-1234.9876E-160,calculatorThreeDigitExp,10,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   518
    ERR_TEST(-1234.9876E-98,calculatorThreeDigitExp,11,6,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   519
	//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   520
    ERR_TEST(1234.9876E24,calculatorThreeDigitExp,13,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   521
    ERR_TEST(1234.9876E95,calculatorThreeDigitExp,9,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   522
    ERR_TEST(1234.9876E-76,calculatorThreeDigitExp,12,6,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   523
    ERR_TEST(1234.9876E-98,calculatorThreeDigitExp,6,4,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   524
	ERR_TEST(-1234.9876E24,calculatorThreeDigitExp,9,8,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   525
    ERR_TEST(-1234.9876E95,calculatorThreeDigitExp,8,2,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   526
    ERR_TEST(-1234.9876E-76,calculatorThreeDigitExp,10,7,'.','0',0),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   527
    ERR_TEST(-1234.9876E-98,calculatorThreeDigitExp,10,4,'.','0',0)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   528
	};
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   529
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   530
GLDEF_D TUint size_testerr=sizeof(testerr);
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   531
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   532
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   533
GLDEF_D DtoR_ERR_TEST testerr2[]=
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   534
	{
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   535
	DtoR_ERR_TEST(KNullDesC,KErrGeneral),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   536
	DtoR_ERR_TEST(_L("E-20"),KErrGeneral), 
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   537
	DtoR_ERR_TEST(_L("1.#INF"),KErrNone),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   538
	DtoR_ERR_TEST(_L("1.#NAN"),KErrNone),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   539
	DtoR_ERR_TEST(_L("c.fgh"),KErrGeneral),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   540
	DtoR_ERR_TEST(_L("xyz"),KErrGeneral),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   541
	DtoR_ERR_TEST(_L("1.0E"),KErrNone),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   542
	DtoR_ERR_TEST(_L("1.0E2147483648"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   543
	DtoR_ERR_TEST(_L("1.234567801234567890E+308"),KErrNone),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   544
	DtoR_ERR_TEST(_L("3.456789012345678901E-308"),KErrNone),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   545
	DtoR_ERR_TEST(_L("1.797693134862316E+308"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   546
	DtoR_ERR_TEST(_L("2.225073858507201E-308"),KErrNone),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   547
	DtoR_ERR_TEST(_L("3.0E+308"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   548
	DtoR_ERR_TEST(_L("1.0E-308"),KErrNone),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   549
	DtoR_ERR_TEST(_L("3.0E310"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   550
	DtoR_ERR_TEST(_L("3.0E-310"),KErrNone),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   551
	DtoR_ERR_TEST(_L("1.0E-325"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   552
	DtoR_ERR_TEST(_L("2.0E-400"),KErrUnderflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   553
	DtoR_ERR_TEST(_L("2.0E+400"),KErrOverflow),
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   554
	};
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   555
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   556
GLDEF_D TUint size_testerr2=sizeof(testerr2);
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
   557