Skip to content

Commit

Permalink
Refactor tests/ to snake_case
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Jul 1, 2024
1 parent ab2aeb8 commit aa57d02
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/testoscar/Graphics/TestAntiAliasingLevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@

using namespace osc;

TEST(AntiAliasingLevel, DefaultCtorIsEquivalentTo1XLevel)
TEST(AntiAliasingLevel, default_constructor_returns_1x)
{
static_assert(AntiAliasingLevel{} == AntiAliasingLevel{1});
}

TEST(AntiAliasingLevel, CtorWithZeroClampsToOne)
TEST(AntiAliasingLevel, constructing_with_zero_clamps_to_1x)
{
static_assert(AntiAliasingLevel{0} == AntiAliasingLevel{1});
}

TEST(AntiAliasingLevel, CtorWithBelowZeroClampsToOne)
TEST(AntiAliasingLevel, constructing_with_negative_number_clamps_to_1x)
{
static_assert(AntiAliasingLevel{-1} == AntiAliasingLevel{1});
}

TEST(AntiAliasingLevel, InvalidValuesClampedToNextLowerCorrectValue)
TEST(AntiAliasingLevel, constructing_with_invalid_values_clamps_to_next_lower_correct_value)
{
static_assert(AntiAliasingLevel{3} == AntiAliasingLevel{2});
static_assert(AntiAliasingLevel{5} == AntiAliasingLevel{4});
Expand All @@ -40,15 +40,15 @@ TEST(AntiAliasingLevel, InvalidValuesClampedToNextLowerCorrectValue)
static_assert(AntiAliasingLevel{33} == AntiAliasingLevel{32});
}

TEST(AntiAliasingLevel, IncrementGoesToTheNextLogicalAntiAliasingLevel)
TEST(AntiAliasingLevel, increment_operator_multiplies_antialiasing_level_by_2)
{
static_assert(++AntiAliasingLevel{1} == AntiAliasingLevel{2});
static_assert(++AntiAliasingLevel{2} == AntiAliasingLevel{4});
static_assert(++AntiAliasingLevel{4} == AntiAliasingLevel{8});
static_assert(++AntiAliasingLevel{8} == AntiAliasingLevel{16});
}

TEST(AntiAliasingLevel, LessThanWorksAsExpected)
TEST(AntiAliasingLevel, less_than_operator_behaves_as_expected)
{
static_assert(AntiAliasingLevel{1} < AntiAliasingLevel{2});
static_assert(AntiAliasingLevel{2} < AntiAliasingLevel{4});
Expand All @@ -58,7 +58,7 @@ TEST(AntiAliasingLevel, LessThanWorksAsExpected)
static_assert(AntiAliasingLevel{32} < AntiAliasingLevel{64});
}

TEST(AntiAliasingLevel, GetU32ReturnsExpectedValues)
TEST(AntiAliasingLevel, get_as_uint32_t_returns_expected_values)
{
static_assert(AntiAliasingLevel{-1}.get_as<uint32_t>() == 1u);
static_assert(AntiAliasingLevel{1}.get_as<uint32_t>() == 1u);
Expand All @@ -68,7 +68,7 @@ TEST(AntiAliasingLevel, GetU32ReturnsExpectedValues)
static_assert(AntiAliasingLevel{8}.get_as<uint32_t>() == 8u);
}

TEST(AntiAliasingLevel, CanStreamToOutput)
TEST(AntiAliasingLevel, operator_arrow_arrow_writes_equivalent_string_representation_to_ostream)
{
ASSERT_EQ(stream_to_string(AntiAliasingLevel{1}), "1x");
ASSERT_EQ(stream_to_string(AntiAliasingLevel{2}), "2x");
Expand All @@ -79,12 +79,12 @@ TEST(AntiAliasingLevel, CanStreamToOutput)
ASSERT_EQ(stream_to_string(AntiAliasingLevel{64}), "64x");
}

TEST(AntiAliasingLevel, MinReturns1X)
TEST(AntiAliasingLevel, min_returns_1x)
{
static_assert(AntiAliasingLevel::min() == AntiAliasingLevel{1});
}

TEST(AntiAliasingLevel, NoneReturns1X)
TEST(AntiAliasingLevel, none_returns_1x)
{
static_assert(AntiAliasingLevel::none() == AntiAliasingLevel{1});
}

0 comments on commit aa57d02

Please sign in to comment.