• Home
  • Raw
  • Download

Lines Matching refs:StringToDouble

40   CHECK_EQ(0.0, StringToDouble(&uc, "0x0", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));  in TEST()
41 CHECK_EQ(0.0, StringToDouble(&uc, "0X0", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
42 CHECK_EQ(1.0, StringToDouble(&uc, "0x1", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
43 CHECK_EQ(16.0, StringToDouble(&uc, "0x10", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
44 CHECK_EQ(255.0, StringToDouble(&uc, "0xff", in TEST()
46 CHECK_EQ(175.0, StringToDouble(&uc, "0xAF", in TEST()
49 CHECK_EQ(0.0, StringToDouble(&uc, "0x0", ALLOW_HEX)); in TEST()
50 CHECK_EQ(0.0, StringToDouble(&uc, "0X0", ALLOW_HEX)); in TEST()
51 CHECK_EQ(1.0, StringToDouble(&uc, "0x1", ALLOW_HEX)); in TEST()
52 CHECK_EQ(16.0, StringToDouble(&uc, "0x10", ALLOW_HEX)); in TEST()
53 CHECK_EQ(255.0, StringToDouble(&uc, "0xff", ALLOW_HEX)); in TEST()
54 CHECK_EQ(175.0, StringToDouble(&uc, "0xAF", ALLOW_HEX)); in TEST()
60 CHECK_EQ(0.0, StringToDouble(&uc, "0o0", ALLOW_OCTAL | ALLOW_IMPLICIT_OCTAL)); in TEST()
61 CHECK_EQ(0.0, StringToDouble(&uc, "0O0", ALLOW_OCTAL | ALLOW_IMPLICIT_OCTAL)); in TEST()
62 CHECK_EQ(1.0, StringToDouble(&uc, "0o1", ALLOW_OCTAL | ALLOW_IMPLICIT_OCTAL)); in TEST()
63 CHECK_EQ(7.0, StringToDouble(&uc, "0o7", ALLOW_OCTAL | ALLOW_IMPLICIT_OCTAL)); in TEST()
64 CHECK_EQ(8.0, StringToDouble(&uc, "0o10", in TEST()
66 CHECK_EQ(63.0, StringToDouble(&uc, "0o77", in TEST()
69 CHECK_EQ(0.0, StringToDouble(&uc, "0o0", ALLOW_OCTAL)); in TEST()
70 CHECK_EQ(0.0, StringToDouble(&uc, "0O0", ALLOW_OCTAL)); in TEST()
71 CHECK_EQ(1.0, StringToDouble(&uc, "0o1", ALLOW_OCTAL)); in TEST()
72 CHECK_EQ(7.0, StringToDouble(&uc, "0o7", ALLOW_OCTAL)); in TEST()
73 CHECK_EQ(8.0, StringToDouble(&uc, "0o10", ALLOW_OCTAL)); in TEST()
74 CHECK_EQ(63.0, StringToDouble(&uc, "0o77", ALLOW_OCTAL)); in TEST()
80 CHECK_EQ(0.0, StringToDouble(&uc, "0", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
81 CHECK_EQ(0.0, StringToDouble(&uc, "00", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
82 CHECK_EQ(1.0, StringToDouble(&uc, "01", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
83 CHECK_EQ(7.0, StringToDouble(&uc, "07", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
84 CHECK_EQ(8.0, StringToDouble(&uc, "010", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
85 CHECK_EQ(63.0, StringToDouble(&uc, "077", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
87 CHECK_EQ(0.0, StringToDouble(&uc, "0", ALLOW_HEX)); in TEST()
88 CHECK_EQ(0.0, StringToDouble(&uc, "00", ALLOW_HEX)); in TEST()
89 CHECK_EQ(1.0, StringToDouble(&uc, "01", ALLOW_HEX)); in TEST()
90 CHECK_EQ(7.0, StringToDouble(&uc, "07", ALLOW_HEX)); in TEST()
91 CHECK_EQ(10.0, StringToDouble(&uc, "010", ALLOW_HEX)); in TEST()
92 CHECK_EQ(77.0, StringToDouble(&uc, "077", ALLOW_HEX)); in TEST()
95 CHECK_EQ(x * x * x * x * x, StringToDouble(&uc, "01" "0000000000" "0000000000" in TEST()
102 CHECK_EQ(0.0, StringToDouble(&uc, "0b0", in TEST()
104 CHECK_EQ(0.0, StringToDouble(&uc, "0B0", in TEST()
106 CHECK_EQ(1.0, StringToDouble(&uc, "0b1", in TEST()
108 CHECK_EQ(2.0, StringToDouble(&uc, "0b10", in TEST()
110 CHECK_EQ(3.0, StringToDouble(&uc, "0b11", in TEST()
113 CHECK_EQ(0.0, StringToDouble(&uc, "0b0", ALLOW_BINARY)); in TEST()
114 CHECK_EQ(0.0, StringToDouble(&uc, "0B0", ALLOW_BINARY)); in TEST()
115 CHECK_EQ(1.0, StringToDouble(&uc, "0b1", ALLOW_BINARY)); in TEST()
116 CHECK_EQ(2.0, StringToDouble(&uc, "0b10", ALLOW_BINARY)); in TEST()
117 CHECK_EQ(3.0, StringToDouble(&uc, "0b11", ALLOW_BINARY)); in TEST()
123 CHECK_EQ(8.0, StringToDouble(&uc, "08", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
124 CHECK_EQ(81.0, StringToDouble(&uc, "081", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
125 CHECK_EQ(78.0, StringToDouble(&uc, "078", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
127 CHECK(std::isnan(StringToDouble(&uc, "07.7", in TEST()
129 CHECK(std::isnan(StringToDouble(&uc, "07.8", in TEST()
131 CHECK(std::isnan(StringToDouble(&uc, "07e8", in TEST()
133 CHECK(std::isnan(StringToDouble(&uc, "07e7", in TEST()
136 CHECK_EQ(8.7, StringToDouble(&uc, "08.7", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
137 CHECK_EQ(8e7, StringToDouble(&uc, "08e7", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
139 CHECK_EQ(0.001, StringToDouble(&uc, "0.001", in TEST()
141 CHECK_EQ(0.713, StringToDouble(&uc, "0.713", in TEST()
144 CHECK_EQ(8.0, StringToDouble(&uc, "08", ALLOW_HEX)); in TEST()
145 CHECK_EQ(81.0, StringToDouble(&uc, "081", ALLOW_HEX)); in TEST()
146 CHECK_EQ(78.0, StringToDouble(&uc, "078", ALLOW_HEX)); in TEST()
148 CHECK_EQ(7.7, StringToDouble(&uc, "07.7", ALLOW_HEX)); in TEST()
149 CHECK_EQ(7.8, StringToDouble(&uc, "07.8", ALLOW_HEX)); in TEST()
150 CHECK_EQ(7e8, StringToDouble(&uc, "07e8", ALLOW_HEX)); in TEST()
151 CHECK_EQ(7e7, StringToDouble(&uc, "07e7", ALLOW_HEX)); in TEST()
153 CHECK_EQ(8.7, StringToDouble(&uc, "08.7", ALLOW_HEX)); in TEST()
154 CHECK_EQ(8e7, StringToDouble(&uc, "08e7", ALLOW_HEX)); in TEST()
156 CHECK_EQ(0.001, StringToDouble(&uc, "0.001", ALLOW_HEX)); in TEST()
157 CHECK_EQ(0.713, StringToDouble(&uc, "0.713", ALLOW_HEX)); in TEST()
163 CHECK_EQ(8.0, StringToDouble(&uc, "8q", ALLOW_TRAILING_JUNK)); in TEST()
164 CHECK_EQ(63.0, StringToDouble(&uc, "077qqq", in TEST()
166 CHECK_EQ(10.0, StringToDouble(&uc, "10e", in TEST()
168 CHECK_EQ(10.0, StringToDouble(&uc, "10e-", in TEST()
175 CHECK(std::isnan(StringToDouble(&uc, " ", NO_FLAGS, OS::nan_value()))); in TEST()
176 CHECK(std::isnan(StringToDouble(&uc, "", NO_FLAGS, OS::nan_value()))); in TEST()
177 CHECK(std::isnan(StringToDouble(&uc, " ", NO_FLAGS, OS::nan_value()))); in TEST()
178 CHECK_EQ(0.0, StringToDouble(&uc, "", NO_FLAGS)); in TEST()
179 CHECK_EQ(0.0, StringToDouble(&uc, " ", NO_FLAGS)); in TEST()
185 CHECK_EQ(0.0, StringToDouble(&uc, "0.0", NO_FLAGS)); in TEST()
186 CHECK_EQ(0.0, StringToDouble(&uc, "0", NO_FLAGS)); in TEST()
187 CHECK_EQ(0.0, StringToDouble(&uc, "00", NO_FLAGS)); in TEST()
188 CHECK_EQ(0.0, StringToDouble(&uc, "000", NO_FLAGS)); in TEST()
189 CHECK_EQ(1.0, StringToDouble(&uc, "1", NO_FLAGS)); in TEST()
190 CHECK_EQ(-1.0, StringToDouble(&uc, "-1", NO_FLAGS)); in TEST()
191 CHECK_EQ(-1.0, StringToDouble(&uc, " -1 ", NO_FLAGS)); in TEST()
192 CHECK_EQ(1.0, StringToDouble(&uc, " +1 ", NO_FLAGS)); in TEST()
193 CHECK(std::isnan(StringToDouble(&uc, " - 1 ", NO_FLAGS))); in TEST()
194 CHECK(std::isnan(StringToDouble(&uc, " + 1 ", NO_FLAGS))); in TEST()
196 CHECK_EQ(0.0, StringToDouble(&uc, "0e0", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
197 CHECK_EQ(0.0, StringToDouble(&uc, "0e1", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
198 CHECK_EQ(0.0, StringToDouble(&uc, "0e-1", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
199 CHECK_EQ(0.0, StringToDouble(&uc, "0e-100000", in TEST()
201 CHECK_EQ(0.0, StringToDouble(&uc, "0e+100000", in TEST()
203 CHECK_EQ(0.0, StringToDouble(&uc, "0.", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL)); in TEST()
209 CHECK_EQ(1e10, StringToDouble(&uc, "1" "0000000000", NO_FLAGS)); in TEST()
210 CHECK_EQ(1e20, StringToDouble(&uc, "1" "0000000000" "0000000000", NO_FLAGS)); in TEST()
212 CHECK_EQ(1e60, StringToDouble(&uc, "1" "0000000000" "0000000000" "0000000000" in TEST()
215 CHECK_EQ(1e-2, StringToDouble(&uc, "." "0" "1", NO_FLAGS)); in TEST()
216 CHECK_EQ(1e-11, StringToDouble(&uc, "." "0000000000" "1", NO_FLAGS)); in TEST()
217 CHECK_EQ(1e-21, StringToDouble(&uc, "." "0000000000" "0000000000" "1", in TEST()
220 CHECK_EQ(1e-61, StringToDouble(&uc, "." "0000000000" "0000000000" "0000000000" in TEST()
227 StringToDouble(&uc, "24414062505131250.0", NO_FLAGS)); in TEST()
231 StringToDouble(&uc, "24414062505131250.000000001", NO_FLAGS)); in TEST()
252 CHECK_EQ(4.4501477170144017780491e-308, StringToDouble(&uc, num, NO_FLAGS)); in TEST()
257 CHECK_EQ(4.4501477170144022721148e-308, StringToDouble(&uc, num, NO_FLAGS)); in TEST()
279 CHECK_EQ(4.4501477170144017780491e-308, StringToDouble(&uc, num, NO_FLAGS)); in TEST()
284 CHECK_EQ(4.4501477170144022721148e-308, StringToDouble(&uc, num, NO_FLAGS)); in TEST()
292 CHECK_EQ(1.59999999999999997765e+308, StringToDouble(&uc, num, NO_FLAGS)); in TEST()
298 CHECK_EQ(1e1, StringToDouble(&uc, "1e1", NO_FLAGS)); in TEST()
299 CHECK_EQ(1e1, StringToDouble(&uc, "1e+1", NO_FLAGS)); in TEST()
300 CHECK_EQ(1e-1, StringToDouble(&uc, "1e-1", NO_FLAGS)); in TEST()
301 CHECK_EQ(1e100, StringToDouble(&uc, "1e+100", NO_FLAGS)); in TEST()
302 CHECK_EQ(1e-100, StringToDouble(&uc, "1e-100", NO_FLAGS)); in TEST()
303 CHECK_EQ(1e-106, StringToDouble(&uc, ".000001e-100", NO_FLAGS)); in TEST()