Skip to content

Commit

Permalink
ut adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
olofkallander committed Nov 2, 2024
1 parent 06e14aa commit 6d6272d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions httpd/Request.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <string>
#include <cstring>
#include <unordered_map>

namespace httpd
Expand Down Expand Up @@ -33,27 +33,27 @@ namespace
{
Method methodFromString(const char* method)
{
if (strncmp(method, "GET", 3) == 0)
if (std::strncmp(method, "GET", 3) == 0)
{
return Method::GET;
}
else if (strncmp(method, "POST", 4) == 0)
else if (std::strncmp(method, "POST", 4) == 0)
{
return Method::POST;
}
else if (strncmp(method, "DELETE", 6) == 0)
else if (std::strncmp(method, "DELETE", 6) == 0)
{
return Method::DELETE;
}
else if (strncmp(method, "PATCH", 5) == 0)
else if (std::strncmp(method, "PATCH", 5) == 0)
{
return Method::PATCH;
}
else if (strncmp(method, "OPTIONS", 7) == 0)
else if (std::strncmp(method, "OPTIONS", 7) == 0)
{
return Method::OPTIONS;
}
else if (strncmp(method, "PUT", 3) == 0)
else if (std::strncmp(method, "PUT", 3) == 0)
{
return Method::PUT;
}
Expand Down
4 changes: 2 additions & 2 deletions test/transport/JitterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ TEST(Welford, normal)
sqrt(w2.getVariance()));
}
}
EXPECT_NEAR(w2.getMean(), 500.0, 20.0);
EXPECT_NEAR(w2.getVariance(), 100.0 * 100, 2500.0);
EXPECT_NEAR(w2.getMean(), 500.0, 25.0);
EXPECT_NEAR(w2.getVariance(), 100.0 * 100, 2900.0);
}

class JitterBufferTest : public ::testing::Test
Expand Down
1 change: 1 addition & 0 deletions utils/Span.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <array>
#include <iterator>
#include <type_traits>
namespace utils
Expand Down

0 comments on commit 6d6272d

Please sign in to comment.