From afb2062b61ab98537e8911422e184db057c15e54 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 16:05:46 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- test/gl/context.test.cpp | 1 - test/gl/enum.test.cpp | 11 +++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/gl/context.test.cpp b/test/gl/context.test.cpp index 85311a9c8..e04d08f3b 100644 --- a/test/gl/context.test.cpp +++ b/test/gl/context.test.cpp @@ -122,4 +122,3 @@ TEST(GLContextMode, Shared) { test::checkImage("test/fixtures/shared_context", frontend.render(map).image, 0.5, 0.1); } - diff --git a/test/gl/enum.test.cpp b/test/gl/enum.test.cpp index d4802232e..6cc13d0e2 100644 --- a/test/gl/enum.test.cpp +++ b/test/gl/enum.test.cpp @@ -21,11 +21,14 @@ TEST(GL, DrawModeType) { namespace { template -auto enumIdentity(T x) { return Enum::from(Enum::to(x)); } +auto enumIdentity(T x) { + return Enum::from(Enum::to(x)); } +} // namespace TEST(GL, ColorBlendEquationType) { - //const auto identity = [](auto x){ return Enum::from(Enum::to(x)); }; + // const auto identity = [](auto x){ return Enum::from(Enum::to(x)); + // }; ASSERT_EQ(ColorBlendEquationType::Add, enumIdentity(ColorBlendEquationType::Add)); ASSERT_EQ(ColorBlendEquationType::Subtract, enumIdentity(ColorBlendEquationType::Subtract)); ASSERT_EQ(ColorBlendEquationType::ReverseSubtract, enumIdentity(ColorBlendEquationType::ReverseSubtract)); @@ -50,7 +53,7 @@ TEST(GL, ColorBlendFactorType) { ASSERT_EQ(ColorBlendFactorType::ConstantAlpha, enumIdentity(ColorBlendFactorType::ConstantAlpha)); ASSERT_EQ(ColorBlendFactorType::OneMinusConstantAlpha, enumIdentity(ColorBlendFactorType::OneMinusConstantAlpha)); ASSERT_EQ(ColorBlendFactorType::SrcAlphaSaturate, enumIdentity(ColorBlendFactorType::SrcAlphaSaturate)); - + ASSERT_EQ(GL_INVALID_ENUM, Enum::to(static_cast(-1))); ASSERT_EQ(ColorBlendFactorType{}, Enum::from(GL_RGBA8)); } @@ -64,7 +67,7 @@ TEST(GL, DepthFunctionType) { ASSERT_EQ(DepthFunctionType::NotEqual, enumIdentity(DepthFunctionType::NotEqual)); ASSERT_EQ(DepthFunctionType::GreaterEqual, enumIdentity(DepthFunctionType::GreaterEqual)); ASSERT_EQ(DepthFunctionType::Always, enumIdentity(DepthFunctionType::Always)); - + ASSERT_EQ(GL_INVALID_ENUM, Enum::to(static_cast(-1))); ASSERT_EQ(DepthFunctionType{}, Enum::from(GL_RGBA8)); }