MCPcopy Create free account
hub / github.com/chromium/crashpad / kTestDataFunc

Function kTestDataFunc

util/stdlib/string_number_conversion_test.cc:41–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 std::is_signed<TIntType>::value &&
40 (sizeof(TIntType) == 4)>::type* = nullptr>
41static constexpr std::array<TestSpecification<TIntType>, 61> kTestDataFunc() {
42 return {{
43 {"", false, 0},
44 {"0", true, 0},
45 {"1", true, 1},
46 {"2147483647", true, std::numeric_limits<TIntType>::max()},
47 {"2147483648", false, 0},
48 {"4294967295", false, 0},
49 {"4294967296", false, 0},
50 {"-1", true, -1},
51 {"-2147483648", true, std::numeric_limits<TIntType>::min()},
52 {"-2147483649", false, 0},
53 {"00", true, 0},
54 {"01", true, 1},
55 {"-01", true, -1},
56 {"+2", true, 2},
57 {"0x10", true, 16},
58 {"-0x10", true, -16},
59 {"+0x20", true, 32},
60 {"0xf", true, 15},
61 {"0xg", false, 0},
62 {"0x7fffffff", true, std::numeric_limits<TIntType>::max()},
63 {"0x7FfFfFfF", true, std::numeric_limits<TIntType>::max()},
64 {"0x80000000", false, 0},
65 {"0xFFFFFFFF", false, 0},
66 {"-0x7fffffff", true, -2147483647},
67 {"-0x80000000", true, std::numeric_limits<TIntType>::min()},
68 {"-0x80000001", false, 0},
69 {"-0xffffffff", false, 0},
70 {"0x100000000", false, 0},
71 {"0xabcdef", true, 11259375},
72 {"010", true, 8},
73 {"-010", true, -8},
74 {"+020", true, 16},
75 {"07", true, 7},
76 {"08", false, 0},
77 {" 0", false, 0},
78 {"0 ", false, 0},
79 {" 0 ", false, 0},
80 {" 1", false, 0},
81 {"1 ", false, 0},
82 {" 1 ", false, 0},
83 {"a2", false, 0},
84 {"2a", false, 0},
85 {"2a2", false, 0},
86 {".0", false, 0},
87 {".1", false, 0},
88 {"-.2", false, 0},
89 {"+.3", false, 0},
90 {"1.23", false, 0},
91 {"-273.15", false, 0},
92 {"+98.6", false, 0},
93 {"1e1", false, 0},
94 {"1E1", false, 0},
95 {"0x123p4", false, 0},
96 {"infinity", false, 0},
97 {"NaN", false, 0},
98 {"-9223372036854775810", false, 0},

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected