webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Macros | Typedefs | Functions
number_test.cpp File Reference
#include "PreprocessorTest.h"
#include "compiler/preprocessor/Token.h"

Classes

class  InvalidNumberTest
 
class  IntegerTest
 
class  FloatTest
 
class  FloatScientificTest
 
class  FloatFractionTest
 

Macros

#define CLOSED_RANGE(x, y)   testing::Range(x, static_cast<char>((y) + 1))
 

Typedefs

typedef std::tr1::tuple< const char *, char > IntegerParams
 
typedef std::tr1::tuple< char, char, const char *, char > FloatScientificParams
 
typedef std::tr1::tuple< char, char > FloatFractionParams
 

Functions

 TEST_P (InvalidNumberTest, InvalidNumberIdentified)
 
 INSTANTIATE_TEST_CASE_P (InvalidIntegers, InvalidNumberTest, testing::Values("1a", "08", "0xG"))
 
 INSTANTIATE_TEST_CASE_P (InvalidFloats, InvalidNumberTest, testing::Values("1eg", "0.a", "0.1.2", ".0a", ".0.1"))
 
 TEST_P (IntegerTest, Identified)
 
 INSTANTIATE_TEST_CASE_P (DecimalInteger, IntegerTest, testing::Combine(testing::Values(""), CLOSED_RANGE('0', '9')))
 
 INSTANTIATE_TEST_CASE_P (OctalInteger, IntegerTest, testing::Combine(testing::Values("0"), CLOSED_RANGE('0', '7')))
 
 INSTANTIATE_TEST_CASE_P (HexadecimalInteger_0_9, IntegerTest, testing::Combine(testing::Values("0x", "0X"), CLOSED_RANGE('0', '9')))
 
 INSTANTIATE_TEST_CASE_P (HexadecimalInteger_a_f, IntegerTest, testing::Combine(testing::Values("0x", "0X"), CLOSED_RANGE('a', 'f')))
 
 INSTANTIATE_TEST_CASE_P (HexadecimalInteger_A_F, IntegerTest, testing::Combine(testing::Values("0x", "0X"), CLOSED_RANGE('A', 'F')))
 
 TEST_P (FloatScientificTest, FloatIdentified)
 
 INSTANTIATE_TEST_CASE_P (FloatScientific, FloatScientificTest, testing::Combine(CLOSED_RANGE('0', '9'), testing::Values('e', 'E'), testing::Values("", "+", "-"), CLOSED_RANGE('0', '9')))
 
 TEST_P (FloatFractionTest, FloatIdentified)
 
 INSTANTIATE_TEST_CASE_P (FloatFraction_X_X, FloatFractionTest, testing::Combine(CLOSED_RANGE('0', '9'), CLOSED_RANGE('0', '9')))
 
 INSTANTIATE_TEST_CASE_P (FloatFraction_0_X, FloatFractionTest, testing::Combine(testing::Values('\0'), CLOSED_RANGE('0', '9')))
 
 INSTANTIATE_TEST_CASE_P (FloatFraction_X_0, FloatFractionTest, testing::Combine(CLOSED_RANGE('0', '9'), testing::Values('\0')))
 
 TEST_F (FloatTest, FractionScientific)
 

Macro Definition Documentation

◆ CLOSED_RANGE

#define CLOSED_RANGE (   x,
  y 
)    testing::Range(x, static_cast<char>((y) + 1))

Typedef Documentation

◆ FloatFractionParams

◆ FloatScientificParams

typedef std::tr1::tuple<char, char, const char*, char> FloatScientificParams

◆ IntegerParams

Function Documentation

◆ INSTANTIATE_TEST_CASE_P() [1/11]

INSTANTIATE_TEST_CASE_P ( InvalidIntegers  ,
InvalidNumberTest  ,
testing::Values("1a", "08", "0xG")   
)

◆ INSTANTIATE_TEST_CASE_P() [2/11]

INSTANTIATE_TEST_CASE_P ( InvalidFloats  ,
InvalidNumberTest  ,
testing::Values("1eg", "0.a", "0.1.2", ".0a", ".0.1")   
)

◆ INSTANTIATE_TEST_CASE_P() [3/11]

INSTANTIATE_TEST_CASE_P ( DecimalInteger  ,
IntegerTest  ,
testing::Combine(testing::Values(""), CLOSED_RANGE( '0', '9'))   
)

◆ INSTANTIATE_TEST_CASE_P() [4/11]

INSTANTIATE_TEST_CASE_P ( OctalInteger  ,
IntegerTest  ,
testing::Combine(testing::Values("0"), CLOSED_RANGE( '0', '7'))   
)

◆ INSTANTIATE_TEST_CASE_P() [5/11]

INSTANTIATE_TEST_CASE_P ( HexadecimalInteger_0_9  ,
IntegerTest  ,
testing::Combine(testing::Values("0x", "0X"), CLOSED_RANGE( '0', '9'))   
)

◆ INSTANTIATE_TEST_CASE_P() [6/11]

INSTANTIATE_TEST_CASE_P ( HexadecimalInteger_a_f  ,
IntegerTest  ,
testing::Combine(testing::Values("0x", "0X"), CLOSED_RANGE( 'a', 'f'))   
)

◆ INSTANTIATE_TEST_CASE_P() [7/11]

INSTANTIATE_TEST_CASE_P ( HexadecimalInteger_A_F  ,
IntegerTest  ,
testing::Combine(testing::Values("0x", "0X"), CLOSED_RANGE( 'A', 'F'))   
)

◆ INSTANTIATE_TEST_CASE_P() [8/11]

INSTANTIATE_TEST_CASE_P ( FloatScientific  ,
FloatScientificTest  ,
testing::Combine(CLOSED_RANGE( '0', '9'), testing::Values( 'e', 'E'), testing::Values("", "+", "-"), CLOSED_RANGE( '0', '9'))   
)

◆ INSTANTIATE_TEST_CASE_P() [9/11]

INSTANTIATE_TEST_CASE_P ( FloatFraction_X_X  ,
FloatFractionTest  ,
testing::Combine(CLOSED_RANGE( '0', '9'), CLOSED_RANGE( '0', '9'))   
)

◆ INSTANTIATE_TEST_CASE_P() [10/11]

INSTANTIATE_TEST_CASE_P ( FloatFraction_0_X  ,
FloatFractionTest  ,
testing::Combine(testing::Values('\0'), CLOSED_RANGE( '0', '9'))   
)

◆ INSTANTIATE_TEST_CASE_P() [11/11]

INSTANTIATE_TEST_CASE_P ( FloatFraction_X_0  ,
FloatFractionTest  ,
testing::Combine(CLOSED_RANGE( '0', '9'), testing::Values('\0'))   
)

◆ TEST_F()

TEST_F ( FloatTest  ,
FractionScientific   
)

◆ TEST_P() [1/4]

TEST_P ( InvalidNumberTest  ,
InvalidNumberIdentified   
)

◆ TEST_P() [2/4]

TEST_P ( IntegerTest  ,
Identified   
)

◆ TEST_P() [3/4]

TEST_P ( FloatScientificTest  ,
FloatIdentified   
)

◆ TEST_P() [4/4]

TEST_P ( FloatFractionTest  ,
FloatIdentified   
)