Skip to content

Commit 9117ec4

Browse files
committed
formatting
1 parent c8abf94 commit 9117ec4

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

tests/example_test.cpp

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,25 +78,37 @@ constexpr double constexptest() { return parse("3.1415 input"); }
7878
#endif
7979

8080
bool small() {
81-
double result = -1;
82-
std::string str = "3e-1000";
83-
auto r = fast_float::from_chars(str.data(), str.data() + str.size(), result);
84-
if(r.ec != std::errc::result_out_of_range) { return false; }
85-
if(r.ptr != str.data() + 7) { return false; }
86-
if(result != 0) { return false; }
81+
double result = -1;
82+
std::string str = "3e-1000";
83+
auto r = fast_float::from_chars(str.data(), str.data() + str.size(), result);
84+
if (r.ec != std::errc::result_out_of_range) {
85+
return false;
86+
}
87+
if (r.ptr != str.data() + 7) {
88+
return false;
89+
}
90+
if (result != 0) {
91+
return false;
92+
}
8793
printf("small values go to zero\n");
88-
return true;
94+
return true;
8995
}
9096

9197
bool large() {
92-
double result = -1;
93-
std::string str = "3e1000";
94-
auto r = fast_float::from_chars(str.data(), str.data() + str.size(), result);
95-
if(r.ec != std::errc::result_out_of_range) { return false; }
96-
if(r.ptr != str.data() + 6) { return false; }
97-
if(result != std::numeric_limits<double>::infinity()) { return false; }
98+
double result = -1;
99+
std::string str = "3e1000";
100+
auto r = fast_float::from_chars(str.data(), str.data() + str.size(), result);
101+
if (r.ec != std::errc::result_out_of_range) {
102+
return false;
103+
}
104+
if (r.ptr != str.data() + 6) {
105+
return false;
106+
}
107+
if (result != std::numeric_limits<double>::infinity()) {
108+
return false;
109+
}
98110
printf("large values go to infinity\n");
99-
return true;
111+
return true;
100112
}
101113

102114
int main() {

0 commit comments

Comments
 (0)