Skip to content

Commit

Permalink
Expand GMT date equality check
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti committed Jul 29, 2024
1 parent b402a24 commit 3f0196c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/unit/http/time_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,16 @@ TEST(HTTP_Time, gmt_invalid) {
EXPECT_THROW(sourcemeta::hydra::http::from_gmt("FOO"), std::invalid_argument);
}

TEST(HTTP_Time, gmt_comparison_equal) {
TEST(HTTP_Time, gmt_comparison_equal_1) {
EXPECT_EQ(sourcemeta::hydra::http::from_gmt("Wed, 21 Oct 2015 11:28:00 GMT"),
sourcemeta::hydra::http::from_gmt("Wed, 21 Oct 2015 11:28:00 GMT"));
}

TEST(HTTP_Time, gmt_comparison_equal_2) {
EXPECT_EQ(sourcemeta::hydra::http::from_gmt("Mon, 29 Jul 2024 16:30:29 GMT"),
sourcemeta::hydra::http::from_gmt("Mon, 29 Jul 2024 16:30:29 GMT"));
}

TEST(HTTP_Time, gmt_comparison_less_than) {
EXPECT_TRUE(
sourcemeta::hydra::http::from_gmt("Wed, 21 Oct 2015 11:27:00 GMT") <
Expand Down

0 comments on commit 3f0196c

Please sign in to comment.