From 6d6272dae97dc396664fa5081fb9c616ad6a1ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olof=20K=C3=A4llander?= Date: Sat, 2 Nov 2024 09:00:10 +0000 Subject: [PATCH] ut adjust --- httpd/Request.h | 14 +++++++------- test/transport/JitterTest.cpp | 4 ++-- utils/Span.h | 1 + 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/httpd/Request.h b/httpd/Request.h index 5e4909df9..8466071c8 100644 --- a/httpd/Request.h +++ b/httpd/Request.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include namespace httpd @@ -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; } diff --git a/test/transport/JitterTest.cpp b/test/transport/JitterTest.cpp index fa55bc5ee..527262562 100644 --- a/test/transport/JitterTest.cpp +++ b/test/transport/JitterTest.cpp @@ -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 diff --git a/utils/Span.h b/utils/Span.h index b41b6f5b5..926b0cef6 100644 --- a/utils/Span.h +++ b/utils/Span.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include namespace utils