mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 04:55:20 +01:00
Add big float extraction test
This commit is contained in:
parent
b7e5dd28b8
commit
848689451c
@ -63,6 +63,11 @@ TEST_CASE("extract test functions for numbers with invalid inputs") {
|
||||
// random input for float
|
||||
CHECK_INVALID_CONVERSION("xxx1", float);
|
||||
|
||||
// number too big
|
||||
CHECK_INVALID_CONVERSION((std::string{20, '1'} + "." +
|
||||
std::string{20, '2'}),
|
||||
double);
|
||||
|
||||
// random input for int
|
||||
CHECK_INVALID_CONVERSION("xxx1", int);
|
||||
|
||||
|
@ -9,11 +9,11 @@ TEST_CASE(
|
||||
CHECK_FLOATING_CONVERSION(123.456, float);
|
||||
CHECK_FLOATING_CONVERSION(123.456, double);
|
||||
|
||||
CHECK_FLOATING_CONVERSION(69, float);
|
||||
CHECK_FLOATING_CONVERSION(69, double);
|
||||
CHECK_FLOATING_CONVERSION(59, float);
|
||||
CHECK_FLOATING_CONVERSION(59, double);
|
||||
|
||||
CHECK_FLOATING_CONVERSION(420., float);
|
||||
CHECK_FLOATING_CONVERSION(420., double);
|
||||
CHECK_FLOATING_CONVERSION(4210., float);
|
||||
CHECK_FLOATING_CONVERSION(4210., double);
|
||||
|
||||
CHECK_FLOATING_CONVERSION(0.123, float);
|
||||
CHECK_FLOATING_CONVERSION(0.123, double);
|
||||
@ -29,6 +29,11 @@ TEST_CASE("extract test functions for numbers with invalid inputs without fast "
|
||||
|
||||
// random input for float
|
||||
CHECK_INVALID_CONVERSION("xxx1", float);
|
||||
|
||||
// number too big
|
||||
CHECK_INVALID_CONVERSION((std::string{20, '1'} + "." +
|
||||
std::string{20, '2'}),
|
||||
double);
|
||||
}
|
||||
|
||||
TEST_CASE("extract test functions for std::variant without fast float") {
|
||||
|
Loading…
Reference in New Issue
Block a user