Upgrade catch to new version
This commit is contained in:
@@ -168,7 +168,7 @@ namespace chaiscript {
|
|||||||
neg_exponent = false;
|
neg_exponent = false;
|
||||||
} else if (c < '0' || c > '9') {
|
} else if (c < '0' || c > '9') {
|
||||||
return final_value(t, base, exponent, neg_exponent);
|
return final_value(t, base, exponent, neg_exponent);
|
||||||
} else if (decimal_place == 0) {
|
} else if (decimal_place < T(10)) {
|
||||||
t *= T(10);
|
t *= T(10);
|
||||||
t += T(c - '0');
|
t += T(c - '0');
|
||||||
} else {
|
} 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__
|
#ifdef __GNUC__
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wshadow"
|
#pragma GCC diagnostic ignored "-Wparentheses"
|
||||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
|
||||||
#endif
|
#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
|
#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';
|
std::cout << "Current locale: " << std::setlocale(LC_ALL, "en_ZA.utf8") << '\n';
|
||||||
chaiscript::ChaiScript chai;
|
chaiscript::ChaiScript chai;
|
||||||
const double parsed = chai.eval<double>("print(1.3); 1.3");
|
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)");
|
const std::string str = chai.eval<std::string>("to_string(1.3)");
|
||||||
CHECK(str == "1.3");
|
CHECK(str == "1.3");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user