File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,23 @@ static const url_parsing_test_data test_data[] = {
6565
6666TEST_SUITE (" [MESSAGE]" )
6767{
68+ TEST_CASE (" enums" )
69+ {
70+ REQUIRE (http::verb_enum (http::verb_label (http::UNKNOWN_VERB)) == http::UNKNOWN_VERB);
71+ REQUIRE (http::verb_enum (http::verb_label (http::GET)) == http::GET);
72+ REQUIRE (http::verb_enum (http::verb_label (http::HEAD)) == http::HEAD);
73+ REQUIRE (http::verb_enum (http::verb_label (http::POST)) == http::POST);
74+ REQUIRE (http::verb_enum (http::verb_label (http::PUT)) == http::PUT);
75+ REQUIRE (http::verb_enum (http::verb_label (http::DELETE)) == http::DELETE);
76+ REQUIRE (http::verb_enum (http::verb_label (http::CONNECT)) == http::CONNECT);
77+ REQUIRE (http::verb_enum (http::verb_label (http::OPTIONS)) == http::OPTIONS);
78+ REQUIRE (http::verb_enum (http::verb_label (http::TRACE)) == http::TRACE);
79+ REQUIRE (http::verb_enum (http::verb_label (http::PATCH)) == http::PATCH);
80+
81+ for (unsigned int f = http::unknown_field ; f <= http::xref ; ++f)
82+ REQUIRE (http::field_enum (http::field_label ((http::field)f)) == f);
83+ }
84+
6885 TEST_CASE (" url parsing" )
6986 {
7087 for (auto data : test_data)
You can’t perform that action at this time.
0 commit comments