mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibWeb: Add test for week_number_of_the_last_day microsyntax
This commit is contained in:
parent
479c48643e
commit
dd391d5e8c
Notes:
sideshowbarker
2024-07-17 01:13:25 +09:00
Author: https://github.com/stelar7 Commit: https://github.com/SerenityOS/serenity/commit/dd391d5e8c Pull-request: https://github.com/SerenityOS/serenity/pull/22244 Reviewed-by: https://github.com/bplaat ✅
2 changed files with 25 additions and 0 deletions
|
@ -2,6 +2,7 @@ set(TEST_SOURCES
|
||||||
TestCSSIDSpeed.cpp
|
TestCSSIDSpeed.cpp
|
||||||
TestCSSPixels.cpp
|
TestCSSPixels.cpp
|
||||||
TestHTMLTokenizer.cpp
|
TestHTMLTokenizer.cpp
|
||||||
|
TestMicrosyntax.cpp
|
||||||
TestMimeSniff.cpp
|
TestMimeSniff.cpp
|
||||||
TestNumbers.cpp
|
TestNumbers.cpp
|
||||||
)
|
)
|
||||||
|
|
24
Tests/LibWeb/TestMicrosyntax.cpp
Normal file
24
Tests/LibWeb/TestMicrosyntax.cpp
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023, stelar7 <dudedbz@gmail.com>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <LibTest/TestCase.h>
|
||||||
|
#include <LibWeb/HTML/Dates.h>
|
||||||
|
|
||||||
|
TEST_CASE(week_number_of_the_last_day)
|
||||||
|
{
|
||||||
|
EXPECT_EQ(Web::HTML::week_number_of_the_last_day(1998), (u32)53);
|
||||||
|
EXPECT_EQ(Web::HTML::week_number_of_the_last_day(1999), (u32)52);
|
||||||
|
EXPECT_EQ(Web::HTML::week_number_of_the_last_day(2000), (u32)52);
|
||||||
|
EXPECT_EQ(Web::HTML::week_number_of_the_last_day(2001), (u32)52);
|
||||||
|
EXPECT_EQ(Web::HTML::week_number_of_the_last_day(2002), (u32)52);
|
||||||
|
EXPECT_EQ(Web::HTML::week_number_of_the_last_day(2003), (u32)52);
|
||||||
|
EXPECT_EQ(Web::HTML::week_number_of_the_last_day(2004), (u32)53);
|
||||||
|
EXPECT_EQ(Web::HTML::week_number_of_the_last_day(2005), (u32)52);
|
||||||
|
EXPECT_EQ(Web::HTML::week_number_of_the_last_day(2006), (u32)52);
|
||||||
|
EXPECT_EQ(Web::HTML::week_number_of_the_last_day(2007), (u32)52);
|
||||||
|
EXPECT_EQ(Web::HTML::week_number_of_the_last_day(2008), (u32)52);
|
||||||
|
EXPECT_EQ(Web::HTML::week_number_of_the_last_day(2009), (u32)53);
|
||||||
|
}
|
Loading…
Reference in a new issue