Unverified Commit 60ae191a authored by Igor [hyperxor]'s avatar Igor [hyperxor] Committed by GitHub

Fix typo and constifiy variables (#800)

* Fix typo and add const

* revert one change
parent 4ed3f8e1
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
using namespace Pistache; using namespace Pistache;
TEST(stream, test_buffer) { TEST(stream, test_buffer) {
char str[] = "test_string"; const char str[] = "test_string";
size_t len = strlen(str); const size_t len = strlen(str);
RawBuffer buffer1(str, len, false); RawBuffer buffer1(str, len, false);
RawBuffer buffer2 = buffer1.detach(0); RawBuffer buffer2 = buffer1.detach(0);
...@@ -29,7 +29,7 @@ TEST(stream, test_buffer) { ...@@ -29,7 +29,7 @@ TEST(stream, test_buffer) {
ASSERT_EQ(buffer4.size(), 0u); ASSERT_EQ(buffer4.size(), 0u);
ASSERT_EQ(buffer4.isDetached(), false); ASSERT_EQ(buffer4.isDetached(), false);
ASSERT_THROW(buffer1.detach(2 * len);, std::range_error); ASSERT_THROW(buffer1.detach(2 * len), std::range_error);
} }
TEST(stream, test_file_buffer) { TEST(stream, test_file_buffer) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment