mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 13:05:20 +01:00
Remove deprecated code, add exception.hpp to single_header_generator.py script
This commit is contained in:
parent
956156b412
commit
567995aafb
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
headers_dir = 'include/ss/'
|
headers_dir = 'include/ss/'
|
||||||
headers = ['type_traits.hpp',
|
headers = ['type_traits.hpp',
|
||||||
|
'exception.hpp',
|
||||||
'function_traits.hpp',
|
'function_traits.hpp',
|
||||||
'restrictions.hpp',
|
'restrictions.hpp',
|
||||||
'common.hpp',
|
'common.hpp',
|
||||||
|
@ -364,7 +364,6 @@ TEST_CASE("converter test ss:ax restriction (all except)") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("converter test ss:ax restriction (all except) with exceptions") {
|
TEST_CASE("converter test ss:ax restriction (all except) with exceptions") {
|
||||||
// TODO remove ss::string_error
|
|
||||||
ss::converter<ss::throw_on_error> c;
|
ss::converter<ss::throw_on_error> c;
|
||||||
|
|
||||||
REQUIRE_EXCEPTION(c.convert<ss::ax<int, 0>>("0"));
|
REQUIRE_EXCEPTION(c.convert<ss::ax<int, 0>>("0"));
|
||||||
@ -425,7 +424,6 @@ TEST_CASE("converter test ss:nx restriction (none except)") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("converter test ss:nx restriction (none except) with exceptions") {
|
TEST_CASE("converter test ss:nx restriction (none except) with exceptions") {
|
||||||
// TODO remove ss::string_error
|
|
||||||
ss::converter<ss::throw_on_error> c;
|
ss::converter<ss::throw_on_error> c;
|
||||||
|
|
||||||
REQUIRE_EXCEPTION(c.convert<ss::nx<int, 1>>("3"));
|
REQUIRE_EXCEPTION(c.convert<ss::nx<int, 1>>("3"));
|
||||||
@ -493,7 +491,6 @@ TEST_CASE("converter test ss:ir restriction (in range)") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("converter test ss:ir restriction (in range) with exceptions") {
|
TEST_CASE("converter test ss:ir restriction (in range) with exceptions") {
|
||||||
// TODO remove ss::string_error
|
|
||||||
ss::converter<ss::throw_on_error> c;
|
ss::converter<ss::throw_on_error> c;
|
||||||
|
|
||||||
REQUIRE_EXCEPTION(c.convert<ss::ir<int, 0, 2>>("3"));
|
REQUIRE_EXCEPTION(c.convert<ss::ir<int, 0, 2>>("3"));
|
||||||
@ -561,7 +558,6 @@ TEST_CASE("converter test ss:oor restriction (out of range)") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("converter test ss:oor restriction (out of range) with exceptions") {
|
TEST_CASE("converter test ss:oor restriction (out of range) with exceptions") {
|
||||||
// TODO remove ss::string_error
|
|
||||||
ss::converter<ss::throw_on_error> c;
|
ss::converter<ss::throw_on_error> c;
|
||||||
|
|
||||||
REQUIRE_EXCEPTION(c.convert<ss::oor<int, 1, 5>>("3"));
|
REQUIRE_EXCEPTION(c.convert<ss::oor<int, 1, 5>>("3"));
|
||||||
@ -641,7 +637,6 @@ TEST_CASE("converter test ss:ne restriction (not empty)") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("converter test ss:ne restriction (not empty) with exceptions") {
|
TEST_CASE("converter test ss:ne restriction (not empty) with exceptions") {
|
||||||
// TODO remove ss::string_error
|
|
||||||
ss::converter<ss::throw_on_error> c;
|
ss::converter<ss::throw_on_error> c;
|
||||||
|
|
||||||
REQUIRE_EXCEPTION(c.convert<ss::ne<std::string>>(""));
|
REQUIRE_EXCEPTION(c.convert<ss::ne<std::string>>(""));
|
||||||
@ -733,7 +728,6 @@ TEST_CASE(
|
|||||||
|
|
||||||
TEST_CASE("converter test ss:lt ss::lte ss::gt ss::gte restriction (in range) "
|
TEST_CASE("converter test ss:lt ss::lte ss::gt ss::gte restriction (in range) "
|
||||||
"with exception") {
|
"with exception") {
|
||||||
// TODO remove ss::string_error
|
|
||||||
ss::converter<ss::throw_on_error> c;
|
ss::converter<ss::throw_on_error> c;
|
||||||
|
|
||||||
REQUIRE_EXCEPTION(c.convert<ss::lt<int, 3>>("3"));
|
REQUIRE_EXCEPTION(c.convert<ss::lt<int, 3>>("3"));
|
||||||
@ -792,7 +786,6 @@ TEST_CASE("converter test error mode") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("converter test throw on error mode") {
|
TEST_CASE("converter test throw on error mode") {
|
||||||
// TODO remove ss::string_error
|
|
||||||
ss::converter<ss::throw_on_error> c;
|
ss::converter<ss::throw_on_error> c;
|
||||||
REQUIRE_EXCEPTION(c.convert<int>("junk"));
|
REQUIRE_EXCEPTION(c.convert<int>("junk"));
|
||||||
}
|
}
|
||||||
@ -846,7 +839,6 @@ TEST_CASE("converter test converter with quotes spacing and escaping") {
|
|||||||
|
|
||||||
TEST_CASE("converter test converter with quotes spacing and escaping with "
|
TEST_CASE("converter test converter with quotes spacing and escaping with "
|
||||||
"exceptions") {
|
"exceptions") {
|
||||||
// TODO remove ss::string_error on all below
|
|
||||||
try {
|
try {
|
||||||
ss::converter<ss::throw_on_error> c;
|
ss::converter<ss::throw_on_error> c;
|
||||||
|
|
||||||
@ -957,7 +949,6 @@ TEST_CASE("converter test invalid split conversions") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("converter test invalid split conversions with exceptions") {
|
TEST_CASE("converter test invalid split conversions with exceptions") {
|
||||||
// TODO remove ss::string_error
|
|
||||||
ss::converter<ss::escape<'\\'>, ss::trim<' '>, ss::quote<'"'>,
|
ss::converter<ss::escape<'\\'>, ss::trim<' '>, ss::quote<'"'>,
|
||||||
ss::throw_on_error>
|
ss::throw_on_error>
|
||||||
c;
|
c;
|
||||||
|
@ -79,8 +79,6 @@ struct buffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define CHECK_NOT_VARIANT(var, type) CHECK(!std::holds_alternative<type>(var));
|
#define CHECK_NOT_VARIANT(var, type) CHECK(!std::holds_alternative<type>(var));
|
||||||
// TODO remove
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
#define REQUIRE_EXCEPTION(...) \
|
#define REQUIRE_EXCEPTION(...) \
|
||||||
try { \
|
try { \
|
||||||
|
@ -547,7 +547,6 @@ auto expect_unterminated_quote(Splitter& s, const std::string& line) {
|
|||||||
CHECK(s.unterminated_quote());
|
CHECK(s.unterminated_quote());
|
||||||
return vec;
|
return vec;
|
||||||
} catch (ss::exception& e) {
|
} catch (ss::exception& e) {
|
||||||
// TODO check if this is ok
|
|
||||||
FAIL(std::string{e.what()});
|
FAIL(std::string{e.what()});
|
||||||
return decltype(s.split(buff(line.c_str()))){};
|
return decltype(s.split(buff(line.c_str()))){};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user