diff options
author | ipknHama <ipknhama@gmail.com> | 2014-08-05 22:38:51 +0900 |
---|---|---|
committer | ipknHama <ipknhama@gmail.com> | 2014-08-06 04:07:46 +0900 |
commit | 88cc6079cb2ba9790a2d8bb9a5955006bfcc7a16 (patch) | |
tree | 10d89cf3d7f4754acc5f61674f16889ca73f01cb /unittest.cpp | |
parent | 9e331deaeecb619221cc0c59c69f14c77bb7c8a4 (diff) | |
download | crow-88cc6079cb2ba9790a2d8bb9a5955006bfcc7a16.tar.gz crow-88cc6079cb2ba9790a2d8bb9a5955006bfcc7a16.zip |
add supporing handlers with res parameter
void handler(const crow::request&, crow::response& res)
{
res.send(data)
res.end()
}
https://news.ycombinator.com/item?id=8004017
Diffstat (limited to 'unittest.cpp')
-rw-r--r-- | unittest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/unittest.cpp b/unittest.cpp index eec119e..e4f8105 100644 --- a/unittest.cpp +++ b/unittest.cpp @@ -220,6 +220,14 @@ TEST(simple_response_routing_params) ASSERT_EQUAL("hello", rp.get<string>(0)); } +TEST(handler_with_response) +{ + Crow app; + CROW_ROUTE(app, "/")([](const crow::request&, crow::response&) + { + }); +} + TEST(server_handling_error_request) { static char buf[2048]; |