@@ -313,7 +313,7 @@ TEST(ParseAcceptHeaderTest, BasicAcceptParsing) {
313313 std::vector<std::string> result1;
314314 EXPECT_TRUE (detail::parse_accept_header (
315315 " text/html,application/json,text/plain" , result1));
316- EXPECT_EQ (result1.size (), 3 );
316+ EXPECT_EQ (result1.size (), 3U );
317317 EXPECT_EQ (result1[0 ], " text/html" );
318318 EXPECT_EQ (result1[1 ], " application/json" );
319319 EXPECT_EQ (result1[2 ], " text/plain" );
@@ -322,7 +322,7 @@ TEST(ParseAcceptHeaderTest, BasicAcceptParsing) {
322322 std::vector<std::string> result2;
323323 EXPECT_TRUE (detail::parse_accept_header (
324324 " text/html;q=0.9,application/json;q=1.0,text/plain;q=0.8" , result2));
325- EXPECT_EQ (result2.size (), 3 );
325+ EXPECT_EQ (result2.size (), 3U );
326326 EXPECT_EQ (result2[0 ], " application/json" ); // highest q value
327327 EXPECT_EQ (result2[1 ], " text/html" );
328328 EXPECT_EQ (result2[2 ], " text/plain" ); // lowest q value
@@ -333,7 +333,7 @@ TEST(ParseAcceptHeaderTest, MixedQualityValues) {
333333 std::vector<std::string> result;
334334 EXPECT_TRUE (detail::parse_accept_header (
335335 " text/html,application/json;q=0.5,text/plain;q=0.8" , result));
336- EXPECT_EQ (result.size (), 3 );
336+ EXPECT_EQ (result.size (), 3U );
337337 EXPECT_EQ (result[0 ], " text/html" ); // no q value means 1.0
338338 EXPECT_EQ (result[1 ], " text/plain" ); // q=0.8
339339 EXPECT_EQ (result[2 ], " application/json" ); // q=0.5
@@ -348,14 +348,14 @@ TEST(ParseAcceptHeaderTest, EdgeCases) {
348348 // Single type
349349 std::vector<std::string> single_result;
350350 EXPECT_TRUE (detail::parse_accept_header (" application/json" , single_result));
351- EXPECT_EQ (single_result.size (), 1 );
351+ EXPECT_EQ (single_result.size (), 1U );
352352 EXPECT_EQ (single_result[0 ], " application/json" );
353353
354354 // Wildcard types
355355 std::vector<std::string> wildcard_result;
356356 EXPECT_TRUE (detail::parse_accept_header (
357357 " text/*;q=0.5,*/*;q=0.1,application/json" , wildcard_result));
358- EXPECT_EQ (wildcard_result.size (), 3 );
358+ EXPECT_EQ (wildcard_result.size (), 3U );
359359 EXPECT_EQ (wildcard_result[0 ], " application/json" );
360360 EXPECT_EQ (wildcard_result[1 ], " text/*" );
361361 EXPECT_EQ (wildcard_result[2 ], " */*" );
@@ -368,7 +368,7 @@ TEST(ParseAcceptHeaderTest, RealWorldExamples) {
368368 detail::parse_accept_header (" text/html,application/xhtml+xml,application/"
369369 " xml;q=0.9,image/webp,image/apng,*/*;q=0.8" ,
370370 browser_result));
371- EXPECT_EQ (browser_result.size (), 6 );
371+ EXPECT_EQ (browser_result.size (), 6U );
372372 EXPECT_EQ (browser_result[0 ], " text/html" ); // q=1.0 (default)
373373 EXPECT_EQ (browser_result[1 ], " application/xhtml+xml" ); // q=1.0 (default)
374374 EXPECT_EQ (browser_result[2 ], " image/webp" ); // q=1.0 (default)
@@ -381,7 +381,7 @@ TEST(ParseAcceptHeaderTest, RealWorldExamples) {
381381 EXPECT_TRUE (detail::parse_accept_header (
382382 " application/json;q=0.9,application/xml;q=0.8,text/plain;q=0.1" ,
383383 api_result));
384- EXPECT_EQ (api_result.size (), 3 );
384+ EXPECT_EQ (api_result.size (), 3U );
385385 EXPECT_EQ (api_result[0 ], " application/json" );
386386 EXPECT_EQ (api_result[1 ], " application/xml" );
387387 EXPECT_EQ (api_result[2 ], " text/plain" );
@@ -392,15 +392,15 @@ TEST(ParseAcceptHeaderTest, SpecialCases) {
392392 std::vector<std::string> decimal_result;
393393 EXPECT_TRUE (detail::parse_accept_header (
394394 " text/html;q=0.123,application/json;q=0.456" , decimal_result));
395- EXPECT_EQ (decimal_result.size (), 2 );
395+ EXPECT_EQ (decimal_result.size (), 2U );
396396 EXPECT_EQ (decimal_result[0 ], " application/json" ); // Higher q value
397397 EXPECT_EQ (decimal_result[1 ], " text/html" );
398398
399399 // Zero quality (should still be included but with lowest priority)
400400 std::vector<std::string> zero_q_result;
401401 EXPECT_TRUE (detail::parse_accept_header (" text/html;q=0,application/json;q=1" ,
402402 zero_q_result));
403- EXPECT_EQ (zero_q_result.size (), 2 );
403+ EXPECT_EQ (zero_q_result.size (), 2U );
404404 EXPECT_EQ (zero_q_result[0 ], " application/json" ); // q=1
405405 EXPECT_EQ (zero_q_result[1 ], " text/html" ); // q=0
406406
@@ -409,7 +409,7 @@ TEST(ParseAcceptHeaderTest, SpecialCases) {
409409 EXPECT_TRUE (detail::parse_accept_header (
410410 " text/html;q=0.9,application/json;q=0.8,text/plain;q=0.7" ,
411411 no_space_result));
412- EXPECT_EQ (no_space_result.size (), 3 );
412+ EXPECT_EQ (no_space_result.size (), 3U );
413413 EXPECT_EQ (no_space_result[0 ], " text/html" );
414414 EXPECT_EQ (no_space_result[1 ], " application/json" );
415415 EXPECT_EQ (no_space_result[2 ], " text/plain" );
@@ -448,23 +448,23 @@ TEST(ParseAcceptHeaderTest, InvalidCases) {
448448
449449 // Valid cases should still work
450450 EXPECT_TRUE (detail::parse_accept_header (" */*" , result));
451- EXPECT_EQ (result.size (), 1 );
451+ EXPECT_EQ (result.size (), 1U );
452452 EXPECT_EQ (result[0 ], " */*" );
453453
454454 EXPECT_TRUE (detail::parse_accept_header (" *" , result));
455- EXPECT_EQ (result.size (), 1 );
455+ EXPECT_EQ (result.size (), 1U );
456456 EXPECT_EQ (result[0 ], " *" );
457457
458458 EXPECT_TRUE (detail::parse_accept_header (" text/*" , result));
459- EXPECT_EQ (result.size (), 1 );
459+ EXPECT_EQ (result.size (), 1U );
460460 EXPECT_EQ (result[0 ], " text/*" );
461461}
462462
463463TEST (ParseAcceptHeaderTest, ContentTypesPopulatedAndInvalidHeaderHandling) {
464464 Server svr;
465465
466466 svr.Get (" /accept_ok" , [&](const Request &req, Response &res) {
467- EXPECT_EQ (req.accept_content_types .size (), 3 );
467+ EXPECT_EQ (req.accept_content_types .size (), 3U );
468468 EXPECT_EQ (req.accept_content_types [0 ], " application/json" );
469469 EXPECT_EQ (req.accept_content_types [1 ], " text/html" );
470470 EXPECT_EQ (req.accept_content_types [2 ], " */*" );
@@ -8780,16 +8780,16 @@ TEST(MultipartFormDataTest, AccessPartHeaders) {
87808780 auto it = req.files .begin ();
87818781 ASSERT_EQ (" text1" , it->second .name );
87828782 ASSERT_EQ (" text1" , it->second .content );
8783- ASSERT_EQ (1 , it->second .headers .count (" Content-Length" ));
8783+ ASSERT_EQ (1U , it->second .headers .count (" Content-Length" ));
87848784 auto content_length = it->second .headers .find (" CONTENT-length" );
87858785 ASSERT_EQ (" 5" , content_length->second );
8786- ASSERT_EQ (3 , it->second .headers .size ());
8786+ ASSERT_EQ (3U , it->second .headers .size ());
87878787
87888788 ++it;
87898789 ASSERT_EQ (" text2" , it->second .name );
87908790 ASSERT_EQ (" text2" , it->second .content );
87918791 auto &headers = it->second .headers ;
8792- ASSERT_EQ (3 , headers.size ());
8792+ ASSERT_EQ (3U , headers.size ());
87938793 auto custom_header = headers.find (" x-whatever" );
87948794 ASSERT_TRUE (custom_header != headers.end ());
87958795 ASSERT_NE (" customvalue" , custom_header->second );
0 commit comments