Skip to content

Commit 597c239

Browse files
committed
# test fixed.
1 parent b816370 commit 597c239

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/fast_int.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ int main() {
466466
auto const &f = invalid_base_test_1[i];
467467
int result;
468468
auto answer =
469-
fast_float::from_chars(f.data(), f.data() + f.size(), result, -1);
469+
fast_float::from_chars(f.data(), f.data() + f.size(), result, 1);
470470
if (answer.ec != std::errc::invalid_argument) {
471471
std::cerr << "expected error should be 'invalid_argument' for: \"" << f
472472
<< "\"" << std::endl;
@@ -567,7 +567,7 @@ int main() {
567567
auto const &f = int_out_of_range_base_test[i];
568568
int64_t result;
569569
auto answer = fast_float::from_chars(f.data(), f.data() + f.size(), result,
570-
int(2 + (i / 2)));
570+
uint_fast8_t(2 + (i / 2)));
571571
if (answer.ec != std::errc::result_out_of_range) {
572572
std::cerr << "expected error for should be 'result_out_of_range': \"" << f
573573
<< "\"" << std::endl;
@@ -612,7 +612,7 @@ int main() {
612612
"7ORP63SH4DPHI",
613613
"5G24A25TWKWFG",
614614
"3W5E11264SGSG"};
615-
int base_unsigned = 2;
615+
uint_fast8_t base_unsigned = 2;
616616
for (std::size_t i = 0; i < unsigned_out_of_range_base_test.size(); ++i) {
617617
auto const &f = unsigned_out_of_range_base_test[i];
618618
uint64_t result;
@@ -703,7 +703,7 @@ int main() {
703703
auto const &f = int_within_range_base_test[i];
704704
int64_t result;
705705
auto answer = fast_float::from_chars(f.data(), f.data() + f.size(), result,
706-
int(2 + (i / 2)));
706+
uint_fast8_t(2 + (i / 2)));
707707
if (answer.ec != std::errc()) {
708708
std::cerr << "converting " << f
709709
<< " to int failed (most likely out of range)" << std::endl;
@@ -748,7 +748,7 @@ int main() {
748748
"7ORP63SH4DPHH",
749749
"5G24A25TWKWFF",
750750
"3W5E11264SGSF"};
751-
int base_unsigned2 = 2;
751+
uint_fast8_t base_unsigned2 = 2;
752752
for (std::size_t i = 0; i < unsigned_within_range_base_test.size(); ++i) {
753753
auto const &f = unsigned_within_range_base_test[i];
754754
uint64_t result;
@@ -806,7 +806,7 @@ int main() {
806806
auto const &f = int_leading_zeros_test[i];
807807
int result;
808808
auto answer = fast_float::from_chars(f.data(), f.data() + f.size(), result,
809-
int(i + 2));
809+
uint_fast8_t(i + 2));
810810
if (answer.ec != std::errc()) {
811811
std::cerr << "could not convert to int for input: \"" << f << "\""
812812
<< std::endl;

0 commit comments

Comments
 (0)