Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd43fddf

Browse files
committed
Fix request_base_test
Don't use incorretly the string's substring constructor
1 parentdddc187 commitd43fddf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎http/test/request_base_test.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ TEST(request_test, request_storage_flow) {
4242
ASSERT_EQ(bytes_read,sizeof(data));
4343
std::string flattened;
4444
simple.flatten(flattened);
45-
ASSERT_EQ(flattened,std::string(output,sizeof(data)));
46-
ASSERT_EQ(std::string(data,sizeof(data)),std::string(output,sizeof(data)));
45+
ASSERT_EQ(flattened, output);
46+
ASSERT_EQ(std::string(data,sizeof(data)), output);
4747
simple.clear();
4848
}
4949

@@ -58,9 +58,8 @@ TEST(request_test, request_storage_copy) {
5858
ASSERT_EQ(bytes_read,sizeof(quick_brown));
5959
std::string flattened;
6060
copy.flatten(flattened);
61-
ASSERT_EQ(flattened,std::string(output,sizeof(quick_brown)));
62-
ASSERT_EQ(std::string(quick_brown,sizeof(quick_brown)),
63-
std::string(output,sizeof(quick_brown)));
61+
ASSERT_EQ(flattened, output);
62+
ASSERT_EQ(std::string(quick_brown,sizeof(quick_brown)), output);
6463
copy.clear();
6564
flattened.clear();
6665
original.flatten(flattened);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp