Upgrade catch to new version
This commit is contained in:
@@ -168,7 +168,7 @@ namespace chaiscript {
|
||||
neg_exponent = false;
|
||||
} else if (c < '0' || c > '9') {
|
||||
return final_value(t, base, exponent, neg_exponent);
|
||||
} else if (decimal_place == 0) {
|
||||
} else if (decimal_place < T(10)) {
|
||||
t *= T(10);
|
||||
t += T(c - '0');
|
||||
} else {
|
||||
|
3223
unittests/catch.hpp
3223
unittests/catch.hpp
File diff suppressed because it is too large
Load Diff
@@ -11,20 +11,9 @@
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Wparentheses"
|
||||
#endif
|
||||
|
||||
#ifdef __llvm__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
|
||||
#pragma clang diagnostic ignored "-Wold-style-cast"
|
||||
#pragma clang diagnostic ignored "-Wexit-time-destructors"
|
||||
#pragma clang diagnostic ignored "-Wfloat-equal"
|
||||
#pragma clang diagnostic ignored "-Wunreachable-code"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define CATCH_CONFIG_MAIN
|
||||
|
||||
@@ -943,7 +932,7 @@ TEST_CASE("Parse floats with non-posix locale")
|
||||
std::cout << "Current locale: " << std::setlocale(LC_ALL, "en_ZA.utf8") << '\n';
|
||||
chaiscript::ChaiScript chai;
|
||||
const double parsed = chai.eval<double>("print(1.3); 1.3");
|
||||
CHECK(parsed == 1.3);
|
||||
CHECK(parsed == Approx(1.3));
|
||||
const std::string str = chai.eval<std::string>("to_string(1.3)");
|
||||
CHECK(str == "1.3");
|
||||
}
|
||||
|
Reference in New Issue
Block a user