From 8ece0e457ee994e54c23ee7393fbce831d81a954 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Tue, 2 Jan 2024 13:16:50 -0800 Subject: Fix spelling mistakes These were found with: codespell -w $(git ls-files | grep "\.[hc]\(pp\)\?$") At some point in the future, we might want to get this enabled in CI. Change-Id: Iccb57b2adfd06a2e177e99db2923fe4e8e329118 Signed-off-by: Ed Tanous --- test/http/utility_test.cpp | 4 ++-- test/include/http_utility_test.cpp | 22 +++++++++++----------- .../include/redfish_aggregator_test.cpp | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'test') diff --git a/test/http/utility_test.cpp b/test/http/utility_test.cpp index cc21bbcf2f..5f62d3f3d1 100644 --- a/test/http/utility_test.cpp +++ b/test/http/utility_test.cpp @@ -162,9 +162,9 @@ TEST(AppendUrlFromPieces, PiecesAreAppendedViaDelimiters) appendUrlPieces(url, "bar"); EXPECT_EQ(std::string_view(url.data(), url.size()), "/redfish/v1/foo/bar"); - appendUrlPieces(url, "/", "bad&tring"); + appendUrlPieces(url, "/", "bad&string"); EXPECT_EQ(std::string_view(url.data(), url.size()), - "/redfish/v1/foo/bar/%2F/bad&tring"); + "/redfish/v1/foo/bar/%2F/bad&string"); } } // namespace diff --git a/test/include/http_utility_test.cpp b/test/include/http_utility_test.cpp index 6878001e6a..915b168b49 100644 --- a/test/include/http_utility_test.cpp +++ b/test/include/http_utility_test.cpp @@ -51,36 +51,36 @@ TEST(isContentTypeAllowed, ContainsQFactorWeightingReturnsTrue) ContentType::OctetStream, true)); } -TEST(getPreferedContentType, PositiveTest) +TEST(getPreferredContentType, PositiveTest) { std::array contentType{ContentType::HTML}; EXPECT_EQ( - getPreferedContentType("text/html, application/json", contentType), + getPreferredContentType("text/html, application/json", contentType), ContentType::HTML); std::array htmlJson{ContentType::HTML, ContentType::JSON}; - EXPECT_EQ(getPreferedContentType("text/html, application/json", htmlJson), + EXPECT_EQ(getPreferredContentType("text/html, application/json", htmlJson), ContentType::HTML); std::array jsonHtml{ContentType::JSON, ContentType::HTML}; - EXPECT_EQ(getPreferedContentType("text/html, application/json", jsonHtml), + EXPECT_EQ(getPreferredContentType("text/html, application/json", jsonHtml), ContentType::HTML); std::array cborJson{ContentType::CBOR, ContentType::JSON}; - EXPECT_EQ( - getPreferedContentType("application/cbor, application::json", cborJson), - ContentType::CBOR); + EXPECT_EQ(getPreferredContentType("application/cbor, application::json", + cborJson), + ContentType::CBOR); - EXPECT_EQ(getPreferedContentType("application/json", cborJson), + EXPECT_EQ(getPreferredContentType("application/json", cborJson), ContentType::JSON); - EXPECT_EQ(getPreferedContentType("*/*", cborJson), ContentType::ANY); + EXPECT_EQ(getPreferredContentType("*/*", cborJson), ContentType::ANY); } -TEST(getPreferedContentType, NegativeTest) +TEST(getPreferredContentType, NegativeTest) { std::array contentType{ContentType::CBOR}; EXPECT_EQ( - getPreferedContentType("text/html, application/json", contentType), + getPreferredContentType("text/html, application/json", contentType), ContentType::NoMatch); } } // namespace diff --git a/test/redfish-core/include/redfish_aggregator_test.cpp b/test/redfish-core/include/redfish_aggregator_test.cpp index 26015f7096..0739355974 100644 --- a/test/redfish-core/include/redfish_aggregator_test.cpp +++ b/test/redfish-core/include/redfish_aggregator_test.cpp @@ -137,7 +137,7 @@ TEST(addPrefixToItem, TopLevelCollections) { std::string initial("/redfish/v1/" + std::string(root)); jsonRequest["@odata.id"] = initial; - addPrefixToItem(jsonRequest["@odata.id"], "perfix"); + addPrefixToItem(jsonRequest["@odata.id"], "prefix"); EXPECT_EQ(jsonRequest["@odata.id"], initial); } } -- cgit v1.2.3