Skip to content

Commit

Permalink
cleanup unitest
Browse files Browse the repository at this point in the history
  • Loading branch information
idealvin committed Jan 13, 2024
1 parent fb9d9c8 commit 76dbb56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions unitest/alien.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ void parse_serv_url(const char* url, fastring& ip, int& port, bool& https) {
port = 0;
https = false;

if (memcmp(url, "https://", 8) == 0) {
if (strncmp(url, "https://", 8) == 0) {
p += 8;
https = true;
} else {
if (memcmp(url, "http://", 7) == 0) p += 7;
if (strncmp(url, "http://", 7) == 0) p += 7;
}

const char* s = strchr(p, ':');
Expand Down
4 changes: 2 additions & 2 deletions unitest/co.cc
Original file line number Diff line number Diff line change
Expand Up @@ -574,11 +574,11 @@ DEF_test(co) {
fastring x;
ch >> x;
EXPECT_EQ(x, "hello");
EXPECT_NE(x.data(), ps);
EXPECT(x.data() != ps);

ch >> x;
EXPECT_EQ(x, "again");
EXPECT_EQ(x.data(), pt);
EXPECT(x.data() == pt);

ch << s << s << s << s;
EXPECT(ch.done());
Expand Down

0 comments on commit 76dbb56

Please sign in to comment.