Test zero exponents with and without signs.

This commit is contained in:
Walt Ogburn 2004-10-18 22:35:18 +00:00 committed by Alexandre Julliard
parent f56618a281
commit ea1b58b560
1 changed files with 14 additions and 0 deletions

View File

@ -972,6 +972,20 @@ static void test_VarParseNumFromStr(void)
EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,5,0,1);
EXPECT2(1,FAILDIG);
/* The same for zero exponents */
CONVERT("1e0", NUMPRS_EXPONENT);
EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,3,0,0);
EXPECT2(1,FAILDIG);
/* Sign on a zero exponent doesn't matter */
CONVERT("1e+0", NUMPRS_EXPONENT);
EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,4,0,0);
EXPECT2(1,FAILDIG);
CONVERT("1e-0", NUMPRS_EXPONENT);
EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,4,0,0);
EXPECT2(1,FAILDIG);
/* Doesn't consume a real number exponent */
CONVERT("1e1.", NUMPRS_EXPONENT);
EXPECT(1,NUMPRS_EXPONENT,NUMPRS_EXPONENT,3,0,1);