mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
Tests/AK: Add some basic ceil_div() tests
This commit is contained in:
parent
c9a461ee75
commit
f2ebad11a8
Notes:
sideshowbarker
2024-07-16 19:17:47 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/f2ebad11a8 Pull-request: https://github.com/SerenityOS/serenity/pull/24127
@ -12,6 +12,21 @@
|
||||
#include <AK/Variant.h>
|
||||
#include <AK/Vector.h>
|
||||
|
||||
TEST_CASE(ceil_div)
|
||||
{
|
||||
EXPECT_EQ(ceil_div(0, 1), 0);
|
||||
EXPECT_EQ(ceil_div(1, 1), 1);
|
||||
EXPECT_EQ(ceil_div(2, 1), 2);
|
||||
EXPECT_EQ(ceil_div(3, 1), 3);
|
||||
EXPECT_EQ(ceil_div(4, 1), 4);
|
||||
|
||||
EXPECT_EQ(ceil_div(0, 2), 0);
|
||||
EXPECT_EQ(ceil_div(1, 2), 1);
|
||||
EXPECT_EQ(ceil_div(2, 2), 1);
|
||||
EXPECT_EQ(ceil_div(3, 2), 2);
|
||||
EXPECT_EQ(ceil_div(4, 2), 2);
|
||||
}
|
||||
|
||||
TEST_CASE(mix)
|
||||
{
|
||||
double a = 1.0;
|
||||
|
Loading…
Reference in New Issue
Block a user