diff --git a/.github/workflows/ubuntu-build.yml b/.github/workflows/ubuntu-build.yml index 0d73621e..9bc079fb 100644 --- a/.github/workflows/ubuntu-build.yml +++ b/.github/workflows/ubuntu-build.yml @@ -25,7 +25,7 @@ jobs: - name: build run: | mkdir build - cmake -DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF -DOPENGL_SHADER_OUTPUT=ON -S . -B build + cmake -DBUILD_SAMPLES=OFF -DBUILD_TESTS=ON -DOPENGL_SHADER_OUTPUT=ON -S . -B build cd build make - name: test diff --git a/tests/limitless/core/context_test.cpp b/tests/limitless/core/context_test.cpp index 1a013799..3641ba2a 100644 --- a/tests/limitless/core/context_test.cpp +++ b/tests/limitless/core/context_test.cpp @@ -7,7 +7,7 @@ using namespace Limitless; using namespace LimitlessTest; TEST_CASE("Context constructor") { - Context context = {"Title", {1024, 1024}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1024, 1024}, nullptr, {{WindowHint::Hint::Visible, false}}}; REQUIRE(static_cast(context) != nullptr); @@ -15,7 +15,7 @@ TEST_CASE("Context constructor") { } TEST_CASE("Context move constructor") { - Context context1 = {"Title1", {1024, 1024}, {{WindowHint::Visible, false}}}; + Context context1 = {"Title1", {1024, 1024}, nullptr , {{WindowHint::Hint::Visible, false}}}; Context context2 = {std::move(context1)}; REQUIRE(context2.getSize() == glm::uvec2{1024, 1024}); @@ -28,8 +28,8 @@ TEST_CASE("Context move constructor") { } TEST_CASE("Context move operator") { - Context context1 = {"Title1", {1024, 1024}, {{WindowHint::Visible, false}}}; - Context context2 = {"Title2", {512, 512}, {{WindowHint::Visible, false}}}; + Context context1 = {"Title1", {1024, 1024}, nullptr , {{WindowHint::Hint::Visible, false}}}; + Context context2 = {"Title2", {512, 512}, nullptr , {{WindowHint::Hint::Visible, false}}}; context2 = {std::move(context1)}; diff --git a/tests/limitless/core/shader_compiler_test.cpp b/tests/limitless/core/shader_compiler_test.cpp index 8965218a..6d9a7e69 100644 --- a/tests/limitless/core/shader_compiler_test.cpp +++ b/tests/limitless/core/shader_compiler_test.cpp @@ -8,7 +8,7 @@ using namespace Limitless; using namespace LimitlessTest; TEST_CASE("Manual shader program compilation") { - Context context = Context{"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { RendererSettings settings; @@ -27,7 +27,7 @@ TEST_CASE("Manual shader program compilation") { } TEST_CASE("Auto shader program compilation") { - Context context = Context{"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { RendererSettings settings; @@ -43,7 +43,7 @@ TEST_CASE("Auto shader program compilation") { } TEST_CASE("Auto shader program compilation with specified actions") { - Context context = Context{"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { RendererSettings settings; @@ -63,7 +63,7 @@ TEST_CASE("Auto shader program compilation with specified actions") { } TEST_CASE("Throw on not existing path") { - Context context = Context{"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { RendererSettings settings; diff --git a/tests/limitless/core/shader_test.cpp b/tests/limitless/core/shader_test.cpp index 09b43199..6c655bc7 100644 --- a/tests/limitless/core/shader_test.cpp +++ b/tests/limitless/core/shader_test.cpp @@ -8,7 +8,7 @@ using namespace Limitless; using namespace LimitlessTest; TEST_CASE("Loads simple shader without error") { - Context context = Context{"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { Shader shader = Shader{"../../tests/limitless/assets/shader1.vert", Shader::Type::Vertex}; @@ -22,7 +22,7 @@ TEST_CASE("Loads simple shader without error") { } TEST_CASE("Replaces version in shader") { - Context context = Context{"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { Shader shader = Shader{"../../tests/limitless/assets/shader2.vert", Shader::Type::Vertex}; @@ -36,7 +36,7 @@ TEST_CASE("Replaces version in shader") { } TEST_CASE("Resolves include in shader") { - Context context = Context{"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { Shader shader = Shader{"../../tests/limitless/assets/shader4.vert", Shader::Type::Vertex}; @@ -50,7 +50,7 @@ TEST_CASE("Resolves include in shader") { } TEST_CASE("Replaces key-line in shader") { - Context context = Context{"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { Shader shader = Shader{"../../tests/limitless/assets/shader6.vert", Shader::Type::Vertex}; @@ -66,7 +66,7 @@ TEST_CASE("Replaces key-line in shader") { } TEST_CASE("Throw file not found") { - Context context = Context{"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { REQUIRE_THROWS_AS(Shader("../../tests/limitless/assets/3228.vert", Shader::Type::Vertex), shader_file_not_found); @@ -78,7 +78,7 @@ TEST_CASE("Throw file not found") { } TEST_CASE("Throw include not found") { - Context context = Context{"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { REQUIRE_THROWS_AS(Shader("../../tests/limitless/assets/shader7.vert", Shader::Type::Vertex), shader_include_not_found); @@ -90,7 +90,7 @@ TEST_CASE("Throw include not found") { } TEST_CASE("Throw shader_compilation_error") { - Context context = Context{"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { Shader shader = Shader{"../../tests/limitless/assets/shader8.vert", Shader::Type::Vertex}; @@ -103,7 +103,7 @@ TEST_CASE("Throw shader_compilation_error") { } TEST_CASE("Compiles simple shader") { - Context context = Context{"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { Shader shader = Shader{"../../tests/limitless/assets/shader1.vert", Shader::Type::Vertex}; @@ -117,7 +117,7 @@ TEST_CASE("Compiles simple shader") { } TEST_CASE("Shader move ctor") { - Context context = Context{"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { Shader shader1 = Shader{"../../tests/limitless/assets/shader1.vert", Shader::Type::Vertex}; diff --git a/tests/limitless/core/state_buffer_test.cpp b/tests/limitless/core/state_buffer_test.cpp index b131eade..234947bf 100644 --- a/tests/limitless/core/state_buffer_test.cpp +++ b/tests/limitless/core/state_buffer_test.cpp @@ -65,7 +65,7 @@ class BufferChecker { }; TEST_CASE("Buffer mutable constructor") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { StateBuffer buffer = StateBuffer(Buffer::Type::Array, 1024, nullptr, Buffer::Usage::StaticDraw, Buffer::MutableAccess::None); @@ -81,7 +81,7 @@ TEST_CASE("Buffer mutable constructor") { } TEST_CASE("Buffer immutable constructor") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { StateBuffer buffer = StateBuffer(Buffer::Type::Array, 1024, nullptr, Buffer::Storage::Static, Buffer::ImmutableAccess::None); @@ -97,7 +97,7 @@ TEST_CASE("Buffer immutable constructor") { } TEST_CASE("Buffer bind function changes state correctly") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { StateBuffer buffer = StateBuffer(Buffer::Type::Array, 1024, nullptr, Buffer::Usage::StaticDraw, Buffer::MutableAccess::None); @@ -111,7 +111,7 @@ TEST_CASE("Buffer bind function changes state correctly") { } TEST_CASE("Buffer bindAs function changes state correctly") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { StateBuffer buffer = StateBuffer(Buffer::Type::Array, 1024, nullptr, Buffer::Usage::StaticDraw, Buffer::MutableAccess::None); @@ -125,7 +125,7 @@ TEST_CASE("Buffer bindAs function changes state correctly") { } TEST_CASE("Buffer bindBase function changes state correctly") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { StateBuffer buffer = StateBuffer(Buffer::Type::Uniform, 1024, nullptr, Buffer::Usage::StaticDraw, Buffer::MutableAccess::None); @@ -139,7 +139,7 @@ TEST_CASE("Buffer bindBase function changes state correctly") { } TEST_CASE("Buffer bindBaseAs function changes state correctly") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { StateBuffer buffer = StateBuffer(Buffer::Type::Uniform, 1024, nullptr, Buffer::Usage::StaticDraw, Buffer::MutableAccess::None); @@ -153,7 +153,7 @@ TEST_CASE("Buffer bindBaseAs function changes state correctly") { } TEST_CASE("Buffer bindBufferRange function changes state correctly") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { StateBuffer buffer = StateBuffer(Buffer::Type::Uniform, 1024, nullptr, Buffer::Usage::StaticDraw, Buffer::MutableAccess::None); @@ -167,7 +167,7 @@ TEST_CASE("Buffer bindBufferRange function changes state correctly") { } TEST_CASE("Buffer bindBufferRangeAs function changes state correctly") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { StateBuffer buffer = StateBuffer(Buffer::Type::Uniform, 1024, nullptr, Buffer::Usage::StaticDraw, Buffer::MutableAccess::None); @@ -181,7 +181,7 @@ TEST_CASE("Buffer bindBufferRangeAs function changes state correctly") { } TEST_CASE("Buffer mutable mapData function changes state correctly") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { StateBuffer buffer = StateBuffer(Buffer::Type::Uniform, 1024, nullptr, Buffer::Usage::StaticDraw, Buffer::MutableAccess::Write); @@ -223,7 +223,7 @@ TEST_CASE("Buffer mutable mapData function changes state correctly") { } TEST_CASE("Buffer immutable mapData function changes state correctly") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { unsigned char data[1024] = {1}; @@ -263,7 +263,7 @@ TEST_CASE("Buffer immutable mapData function changes state correctly") { } TEST_CASE("Buffer bufferSubData function changes state correctly") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { StateBuffer buffer = StateBuffer(Buffer::Type::Uniform, 1024, nullptr, Buffer::Usage::StaticDraw, Buffer::MutableAccess::None); @@ -277,7 +277,7 @@ TEST_CASE("Buffer bufferSubData function changes state correctly") { } TEST_CASE("Buffer clone function changes state correctly for mutable buffer") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { unsigned char data[1024] = {42}; @@ -298,7 +298,7 @@ TEST_CASE("Buffer clone function changes state correctly for mutable buffer") { } TEST_CASE("Buffer clone function changes state correctly for immutable buffer") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { unsigned char data[1024] = {42}; @@ -319,7 +319,7 @@ TEST_CASE("Buffer clone function changes state correctly for immutable buffer") } TEST_CASE("Buffer resize function changes state correctly for mutable buffer") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { unsigned char data[1024] = {42}; @@ -336,7 +336,7 @@ TEST_CASE("Buffer resize function changes state correctly for mutable buffer") { } TEST_CASE("Buffer resize function changes state correctly for immutable buffer") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { unsigned char data[1024] = {42}; @@ -353,7 +353,7 @@ TEST_CASE("Buffer resize function changes state correctly for immutable buffer") } TEST_CASE("Buffer resize function changes state correctly for immutable buffer with immutable buffers bound") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; StateBuffer fake1 = StateBuffer(Buffer::Type::Uniform, 1024, nullptr, Buffer::Storage::Static, Buffer::ImmutableAccess::None); StateBuffer fake2 = StateBuffer(Buffer::Type::Uniform, 1024, nullptr, Buffer::Storage::Static, Buffer::ImmutableAccess::None); @@ -378,7 +378,7 @@ TEST_CASE("Buffer resize function changes state correctly for immutable buffer w } TEST_CASE("Buffer clone function changes state correctly for immutable buffer with immutable buffers bound") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; StateBuffer fake1 = StateBuffer(Buffer::Type::Uniform, 1024, nullptr, Buffer::Storage::Static, Buffer::ImmutableAccess::None); StateBuffer fake2 = StateBuffer(Buffer::Type::ShaderStorage, 1024, nullptr, Buffer::Storage::Static, Buffer::ImmutableAccess::None); diff --git a/tests/limitless/core/state_texture_test.cpp b/tests/limitless/core/state_texture_test.cpp index fb2c6084..ef08ad16 100644 --- a/tests/limitless/core/state_texture_test.cpp +++ b/tests/limitless/core/state_texture_test.cpp @@ -83,7 +83,7 @@ class TextureChecker { }; TEST_CASE("Texture constructor") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { StateTexture tex = StateTexture(); @@ -98,7 +98,7 @@ TEST_CASE("Texture constructor") { } TEST_CASE("Texture activate function") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { StateTexture tex = StateTexture(); @@ -112,7 +112,7 @@ TEST_CASE("Texture activate function") { } TEST_CASE("Texture bind function") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; { StateTexture tex = StateTexture(); diff --git a/tests/limitless/core/texture_builder_test.cpp b/tests/limitless/core/texture_builder_test.cpp index 7cb785a8..a4cfa327 100644 --- a/tests/limitless/core/texture_builder_test.cpp +++ b/tests/limitless/core/texture_builder_test.cpp @@ -375,162 +375,162 @@ void test_with_type_and_extension_texture(Texture::Type type, ExtensionTextureTy } TEST_CASE("[State Mutable Texture 2D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; test_with_type_and_extension_texture(Texture::Type::Tex2D, ExtensionTextureType::State, TextureType::Mutable); } TEST_CASE("[State Mutable Texture 2D Array]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; test_with_type_and_extension_texture(Texture::Type::Tex2DArray, ExtensionTextureType::State, TextureType::Mutable); } TEST_CASE("[State Mutable Texture 3D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; test_with_type_and_extension_texture(Texture::Type::Tex3D, ExtensionTextureType::State, TextureType::Mutable); } TEST_CASE("[State Immutable Texture 2D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isImmutableTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2D, ExtensionTextureType::State, TextureType::Immutable); } } TEST_CASE("[State Immutable Texture 2D Array]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isImmutableTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2DArray, ExtensionTextureType::State, TextureType::Immutable); } } TEST_CASE("[State Immutable Texture 3D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isImmutableTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex3D, ExtensionTextureType::State, TextureType::Immutable); } } TEST_CASE("[Named Mutable Texture 2D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isNamedTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2D, ExtensionTextureType::Named, TextureType::Mutable); } } TEST_CASE("[Named Mutable Texture 2D Array]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isNamedTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2DArray, ExtensionTextureType::Named, TextureType::Mutable); } } TEST_CASE("[Named Mutable Texture 3D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isNamedTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex3D, ExtensionTextureType::Named, TextureType::Mutable); } } TEST_CASE("[Named Immutable Texture 2D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isNamedTextureSupported() && ContextInitializer::isImmutableTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2D, ExtensionTextureType::Named, TextureType::Immutable); } } TEST_CASE("[Named Immutable Texture 2D Array]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isNamedTextureSupported() && ContextInitializer::isImmutableTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2DArray, ExtensionTextureType::Named, TextureType::Immutable); } } TEST_CASE("[Named Immutable Texture 3D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isNamedTextureSupported() && ContextInitializer::isImmutableTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex3D, ExtensionTextureType::Named, TextureType::Immutable); } } TEST_CASE("[BindlessState Mutable Texture 2D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isBindlessTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2D, ExtensionTextureType::BindlessState,TextureType::Mutable); } } TEST_CASE("[BindlessState Mutable Texture 2D Array]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isBindlessTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2DArray, ExtensionTextureType::BindlessState, TextureType::Mutable); } } TEST_CASE("[BindlessState Mutable Texture 3D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isBindlessTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex3D, ExtensionTextureType::BindlessState,TextureType::Mutable); } } TEST_CASE("[BindlessState Immutable Texture 2D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isBindlessTextureSupported() && ContextInitializer::isImmutableTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2D, ExtensionTextureType::BindlessState, TextureType::Immutable); } } TEST_CASE("[BindlessState Immutable Texture 2D Array]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isBindlessTextureSupported() && ContextInitializer::isImmutableTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2DArray, ExtensionTextureType::BindlessState, TextureType::Immutable); } } TEST_CASE("[BindlessState Immutable Texture 3D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isBindlessTextureSupported() && ContextInitializer::isImmutableTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex3D, ExtensionTextureType::BindlessState, TextureType::Immutable); } } TEST_CASE("[BindlessNamed Mutable Texture 2D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isBindlessTextureSupported() && ContextInitializer::isNamedTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2D, ExtensionTextureType::BindlessNamed, TextureType::Mutable); } } TEST_CASE("[BindlessNamed Mutable Texture 2D Array]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isBindlessTextureSupported() && ContextInitializer::isNamedTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2DArray, ExtensionTextureType::BindlessNamed, TextureType::Mutable); } } TEST_CASE("[BindlessNamed Mutable Texture 3D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isBindlessTextureSupported() && ContextInitializer::isNamedTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex3D, ExtensionTextureType::BindlessNamed, TextureType::Mutable); } } TEST_CASE("[BindlessNamed Immutable Texture 2D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isBindlessTextureSupported() && ContextInitializer::isNamedTextureSupported() && ContextInitializer::isImmutableTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2D, ExtensionTextureType::BindlessNamed, TextureType::Immutable); } } TEST_CASE("[BindlessNamed Immutable Texture 2D Array]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isBindlessTextureSupported() && ContextInitializer::isNamedTextureSupported() && ContextInitializer::isImmutableTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex2DArray, ExtensionTextureType::BindlessNamed, TextureType::Immutable); } } TEST_CASE("[BindlessNamed Immutable Texture 3D]") { - Context context = {"Title", {512, 512}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {512, 512}, nullptr, {{WindowHint::Hint::Visible, false}}}; if (ContextInitializer::isBindlessTextureSupported() && ContextInitializer::isNamedTextureSupported() && ContextInitializer::isImmutableTextureSupported()) { test_with_type_and_extension_texture(Texture::Type::Tex3D, ExtensionTextureType::BindlessNamed, TextureType::Immutable); } diff --git a/tests/limitless/instance/instance_attachment_test.cpp b/tests/limitless/instance/instance_attachment_test.cpp index f2e8501c..56dd36c6 100644 --- a/tests/limitless/instance/instance_attachment_test.cpp +++ b/tests/limitless/instance/instance_attachment_test.cpp @@ -15,7 +15,7 @@ using namespace Limitless; using namespace LimitlessTest; TEST_CASE("InstanceAttachment tests") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.models.add("backpack", ModelLoader::loadModel(assets, "../assets/models/backpack/backpack.obj", {{ diff --git a/tests/limitless/instance/model_instance_test.cpp b/tests/limitless/instance/model_instance_test.cpp index e8759db9..0ff178bb 100644 --- a/tests/limitless/instance/model_instance_test.cpp +++ b/tests/limitless/instance/model_instance_test.cpp @@ -15,7 +15,7 @@ using namespace Limitless; using namespace LimitlessTest; TEST_CASE("ModelInstance model constructor") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.models.add("backpack", ModelLoader::loadModel(assets, "../assets/models/backpack/backpack.obj", {{ @@ -30,7 +30,7 @@ TEST_CASE("ModelInstance model constructor") { } TEST_CASE("ModelInstance model constructor with element model") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.load(context); @@ -42,7 +42,7 @@ TEST_CASE("ModelInstance model constructor with element model") { } TEST_CASE("ModelInstance elementary model constructor") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.load(context); @@ -54,7 +54,7 @@ TEST_CASE("ModelInstance elementary model constructor") { } TEST_CASE("ModelInstance elementary model constructor with model") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.load(context); @@ -70,7 +70,7 @@ TEST_CASE("ModelInstance elementary model constructor with model") { } TEST_CASE("ModelInstance model copy constructor") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.load(context); Camera camera {{1, 1}}; @@ -106,7 +106,7 @@ TEST_CASE("ModelInstance model copy constructor") { } TEST_CASE("ModelInstance clone") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.load(context); Camera camera {{1, 1}}; @@ -141,7 +141,7 @@ TEST_CASE("ModelInstance clone") { } TEST_CASE("ModelInstance get meshes") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.load(context); Camera camera {{1, 1}}; diff --git a/tests/limitless/instance/skeletal_instance_test.cpp b/tests/limitless/instance/skeletal_instance_test.cpp index a9f2a0fc..f8853386 100644 --- a/tests/limitless/instance/skeletal_instance_test.cpp +++ b/tests/limitless/instance/skeletal_instance_test.cpp @@ -15,7 +15,7 @@ using namespace Limitless; using namespace LimitlessTest; TEST_CASE("SkeletalInstance constructor") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.models.add("boblamp", ModelLoader::loadModel(assets, "../assets/models/boblamp/boblampclean.md5mesh", {{ @@ -28,7 +28,7 @@ TEST_CASE("SkeletalInstance constructor") { } TEST_CASE("SkeletalInstance copy constructor") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.load(context); Camera camera {{1, 1}}; @@ -64,7 +64,7 @@ TEST_CASE("SkeletalInstance copy constructor") { } TEST_CASE("SkeletalInstance clone") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.load(context); Camera camera {{1, 1}}; @@ -99,7 +99,7 @@ TEST_CASE("SkeletalInstance clone") { } TEST_CASE("SkeletalInstance animation") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.models.add("boblamp", ModelLoader::loadModel(assets, "../assets/models/boblamp/boblampclean.md5mesh", {{ diff --git a/tests/limitless/instance/socket_attachment_test.cpp b/tests/limitless/instance/socket_attachment_test.cpp index b784d50f..44c12f4e 100644 --- a/tests/limitless/instance/socket_attachment_test.cpp +++ b/tests/limitless/instance/socket_attachment_test.cpp @@ -14,7 +14,7 @@ using namespace Limitless; using namespace LimitlessTest; TEST_CASE("SocketAttachment tests") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.models.add("boblamp", ModelLoader::loadModel(assets, "../assets/models/boblamp/boblampclean.md5mesh", {{ diff --git a/tests/limitless/ms/material_builder_test.cpp b/tests/limitless/ms/material_builder_test.cpp index 6773ce1b..401a7ecc 100644 --- a/tests/limitless/ms/material_builder_test.cpp +++ b/tests/limitless/ms/material_builder_test.cpp @@ -11,7 +11,7 @@ using namespace Limitless::ms; using namespace LimitlessTest; TEST_CASE("Material::Builder throw on empty properties") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -22,7 +22,7 @@ TEST_CASE("Material::Builder throw on empty properties") { } TEST_CASE("Material::Builder throw on empty name") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -35,7 +35,7 @@ TEST_CASE("Material::Builder throw on empty name") { TEST_CASE("Material::Builder successfully build material with color") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -53,7 +53,7 @@ TEST_CASE("Material::Builder successfully build material with color") { } TEST_CASE("Material::Builder successfully build material with color and not default model shader") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -73,7 +73,7 @@ TEST_CASE("Material::Builder successfully build material with color and not defa } TEST_CASE("Material::Builder assigns different material index") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -96,7 +96,7 @@ TEST_CASE("Material::Builder assigns different material index") { } TEST_CASE("Material::Builder reuses shader index if material types are equal") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -119,7 +119,7 @@ TEST_CASE("Material::Builder reuses shader index if material types are equal") { } TEST_CASE("Material::Builder assigns new index if material is custom") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -143,7 +143,7 @@ TEST_CASE("Material::Builder assigns new index if material is custom") { } TEST_CASE("Material::Builder builds material with emissive color") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -161,7 +161,7 @@ TEST_CASE("Material::Builder builds material with emissive color") { } TEST_CASE("Material::Builder builds material with metallic") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -179,7 +179,7 @@ TEST_CASE("Material::Builder builds material with metallic") { } TEST_CASE("Material::Builder builds material with roughness") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -197,7 +197,7 @@ TEST_CASE("Material::Builder builds material with roughness") { } TEST_CASE("Material::Builder builds material with index of refraction") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -216,7 +216,7 @@ TEST_CASE("Material::Builder builds material with index of refraction") { } TEST_CASE("Material::Builder builds material with absorption") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -234,7 +234,7 @@ TEST_CASE("Material::Builder builds material with absorption") { } TEST_CASE("Material::Builder builds material with diffuse") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.textures.add("fake", Textures::fake()); @@ -253,7 +253,7 @@ TEST_CASE("Material::Builder builds material with diffuse") { } TEST_CASE("Material::Builder builds material with normal") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.textures.add("fake", Textures::fake()); @@ -272,7 +272,7 @@ TEST_CASE("Material::Builder builds material with normal") { } TEST_CASE("Material::Builder builds material with EmissiveMask") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.textures.add("fake", Textures::fake()); @@ -291,7 +291,7 @@ TEST_CASE("Material::Builder builds material with EmissiveMask") { } TEST_CASE("Material::Builder builds material with BlendMask") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.textures.add("fake", Textures::fake()); @@ -310,7 +310,7 @@ TEST_CASE("Material::Builder builds material with BlendMask") { } TEST_CASE("Material::Builder builds material with MetallicTexture") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.textures.add("fake", Textures::fake()); @@ -329,7 +329,7 @@ TEST_CASE("Material::Builder builds material with MetallicTexture") { } TEST_CASE("Material::Builder builds material with RoughnessTexture") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.textures.add("fake", Textures::fake()); @@ -348,7 +348,7 @@ TEST_CASE("Material::Builder builds material with RoughnessTexture") { } TEST_CASE("Material::Builder builds material with AmbientOcclusionTexture") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.textures.add("fake", Textures::fake()); @@ -367,7 +367,7 @@ TEST_CASE("Material::Builder builds material with AmbientOcclusionTexture") { } TEST_CASE("Material::Builder builds material with ORM") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; assets.textures.add("fake", Textures::fake()); @@ -386,7 +386,7 @@ TEST_CASE("Material::Builder builds material with ORM") { } TEST_CASE("Material::Builder builds material with blending") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -406,7 +406,7 @@ TEST_CASE("Material::Builder builds material with blending") { } TEST_CASE("Material::Builder builds material with shading") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -426,7 +426,7 @@ TEST_CASE("Material::Builder builds material with shading") { } TEST_CASE("Material::Builder builds material with two sided") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -446,7 +446,7 @@ TEST_CASE("Material::Builder builds material with two sided") { } TEST_CASE("Material::Builder builds material with refraction") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -466,7 +466,7 @@ TEST_CASE("Material::Builder builds material with refraction") { } TEST_CASE("Material::Builder builds material with fragment snippet") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -486,7 +486,7 @@ TEST_CASE("Material::Builder builds material with fragment snippet") { } TEST_CASE("Material::Builder builds material with vertex snippet") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -506,7 +506,7 @@ TEST_CASE("Material::Builder builds material with vertex snippet") { } TEST_CASE("Material::Builder builds material with global snippet") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -526,7 +526,7 @@ TEST_CASE("Material::Builder builds material with global snippet") { } //TEST_CASE("Material::Builder builds material with custom uniform") { -// Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; +// Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; // Assets assets {"../assets"}; // // Material::Builder builder {}; @@ -547,7 +547,7 @@ TEST_CASE("Material::Builder builds material with global snippet") { //} TEST_CASE("Material::Builder builds material with model shaders") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -569,7 +569,7 @@ TEST_CASE("Material::Builder builds material with model shaders") { } TEST_CASE("Material::Builder builds skybox material") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder {}; @@ -591,7 +591,7 @@ TEST_CASE("Material::Builder builds skybox material") { } //TEST_CASE("Material::Builder builds with specified properties") { -// Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; +// Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; // Assets assets {"../assets"}; // // std::map> properties; @@ -612,7 +612,7 @@ TEST_CASE("Material::Builder builds skybox material") { //} // //TEST_CASE("Material::Builder builds with specified uniforms") { -// Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; +// Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; // Assets assets {"../assets"}; // // std::map> uniforms; diff --git a/tests/limitless/ms/material_compiler_test.cpp b/tests/limitless/ms/material_compiler_test.cpp index d9b82c32..97d95872 100644 --- a/tests/limitless/ms/material_compiler_test.cpp +++ b/tests/limitless/ms/material_compiler_test.cpp @@ -13,7 +13,7 @@ using namespace Limitless::ms; using namespace LimitlessTest; void test_MaterialCompiler_compiles_material_with_color(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; Material::Builder builder {}; @@ -28,7 +28,7 @@ void test_MaterialCompiler_compiles_material_with_color(RendererSettings& settin } void test_MaterialCompiler_compiles_material_with_emissive(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; Material::Builder builder {}; @@ -45,7 +45,7 @@ void test_MaterialCompiler_compiles_material_with_emissive(RendererSettings& set } void test_MaterialCompiler_compiles_material_with_metalic(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; Material::Builder builder {}; @@ -62,7 +62,7 @@ void test_MaterialCompiler_compiles_material_with_metalic(RendererSettings& sett } void test_MaterialCompiler_compiles_material_with_roughness(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; Material::Builder builder {}; @@ -79,7 +79,7 @@ void test_MaterialCompiler_compiles_material_with_roughness(RendererSettings& se } void test_MaterialCompiler_compiles_material_with_refraction_ior(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; Material::Builder builder {}; @@ -97,7 +97,7 @@ void test_MaterialCompiler_compiles_material_with_refraction_ior(RendererSetting } void test_MaterialCompiler_compiles_material_with_refration_abs(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; Material::Builder builder {}; @@ -115,7 +115,7 @@ void test_MaterialCompiler_compiles_material_with_refration_abs(RendererSettings } void test_MaterialCompiler_compiles_material_with_diffuse(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; assets.textures.add("fake", Textures::fake()); @@ -133,7 +133,7 @@ void test_MaterialCompiler_compiles_material_with_diffuse(RendererSettings& sett } void test_MaterialCompiler_compiles_material_with_normal(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; assets.textures.add("fake", Textures::fake()); @@ -151,7 +151,7 @@ void test_MaterialCompiler_compiles_material_with_normal(RendererSettings& setti } void test_MaterialCompiler_compiles_material_with_emissivemask(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; assets.textures.add("fake", Textures::fake()); @@ -169,7 +169,7 @@ void test_MaterialCompiler_compiles_material_with_emissivemask(RendererSettings& } void test_MaterialCompiler_compiles_material_with_blendmask(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; assets.textures.add("fake", Textures::fake()); @@ -187,7 +187,7 @@ void test_MaterialCompiler_compiles_material_with_blendmask(RendererSettings& se } void test_MaterialCompiler_compiles_material_with_mettalictexture(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; assets.textures.add("fake", Textures::fake()); @@ -205,7 +205,7 @@ void test_MaterialCompiler_compiles_material_with_mettalictexture(RendererSettin } void test_MaterialCompiler_compiles_material_with_roughnesstexture(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; assets.textures.add("fake", Textures::fake()); @@ -223,7 +223,7 @@ void test_MaterialCompiler_compiles_material_with_roughnesstexture(RendererSetti } void test_MaterialCompiler_compiles_material_with_ao(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; assets.textures.add("fake", Textures::fake()); @@ -241,7 +241,7 @@ void test_MaterialCompiler_compiles_material_with_ao(RendererSettings& settings) } void test_MaterialCompiler_compiles_material_with_orm(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; assets.textures.add("fake", Textures::fake()); @@ -259,7 +259,7 @@ void test_MaterialCompiler_compiles_material_with_orm(RendererSettings& settings } void test_MaterialCompiler_compiles_material_with_unlit(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; Material::Builder builder {}; @@ -277,7 +277,7 @@ void test_MaterialCompiler_compiles_material_with_unlit(RendererSettings& settin } void test_MaterialCompiler_compiles_material_with_lit(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; Material::Builder builder {}; @@ -295,7 +295,7 @@ void test_MaterialCompiler_compiles_material_with_lit(RendererSettings& settings } void test_MaterialCompiler_compiles_material_with_custom_fragment(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; Material::Builder builder {}; @@ -313,7 +313,7 @@ void test_MaterialCompiler_compiles_material_with_custom_fragment(RendererSettin } void test_MaterialCompiler_compiles_material_with_custom_vertex(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; Material::Builder builder {}; @@ -331,7 +331,7 @@ void test_MaterialCompiler_compiles_material_with_custom_vertex(RendererSettings } void test_MaterialCompiler_compiles_material_with_custom_global(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; Material::Builder builder {}; @@ -349,7 +349,7 @@ void test_MaterialCompiler_compiles_material_with_custom_global(RendererSettings } void test_MaterialCompiler_compiles_material_with_custom_uniform_value(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; Material::Builder builder {}; @@ -367,7 +367,7 @@ void test_MaterialCompiler_compiles_material_with_custom_uniform_value(RendererS } void test_MaterialCompiler_compiles_material_with_custom_uniform_sampler(RendererSettings& settings) { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; assets.textures.add("fake", Textures::fake()); @@ -726,7 +726,7 @@ TEST_CASE("test_MaterialCompiler_compiles_material_with_custom_uniform_sampler f } TEST_CASE("MaterialCompiler throws") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../../assets"}; Material::Builder builder {}; diff --git a/tests/limitless/ms/material_test.cpp b/tests/limitless/ms/material_test.cpp index aee23ae6..c50b67d5 100644 --- a/tests/limitless/ms/material_test.cpp +++ b/tests/limitless/ms/material_test.cpp @@ -11,7 +11,7 @@ using namespace Limitless::ms; using namespace LimitlessTest; TEST_CASE("Material copy constructor makes deep copy") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder = Material::builder(); @@ -31,7 +31,7 @@ TEST_CASE("Material copy constructor makes deep copy") { } // //TEST_CASE("Material update resets uniforms") { -// Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; +// Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; // Assets assets {"../assets"}; // // Material::Builder builder = Material::builder(); @@ -51,7 +51,7 @@ TEST_CASE("Material copy constructor makes deep copy") { //} // //TEST_CASE("Material update does not updates uniforms") { -// Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; +// Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; // Assets assets {"../assets"}; // // Material::Builder builder = Material::builder(); @@ -74,7 +74,7 @@ TEST_CASE("Material copy constructor makes deep copy") { //} //TEST_CASE("Material contains works") { -// Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; +// Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; // Assets assets {"../assets"}; // // Material::Builder builder = Material::builder(); @@ -92,7 +92,7 @@ TEST_CASE("Material copy constructor makes deep copy") { //} TEST_CASE("Material equality operator works") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; Assets assets {"../assets"}; Material::Builder builder = Material::builder(); diff --git a/tests/limitless/opengl_state.hpp b/tests/limitless/opengl_state.hpp index 47e18a0f..c2afbe2a 100644 --- a/tests/limitless/opengl_state.hpp +++ b/tests/limitless/opengl_state.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include @@ -15,7 +15,7 @@ namespace LimitlessTest { } SECTION("checking state") { - if (auto* state = ContextState::getState(glfwGetCurrentContext()); state) { + if (auto* state = Context::getCurrentContext(); state) { StateQuery query; REQUIRE(state->getCapabilities().at(Capabilities::Blending) == query.getb(QueryState::Blend)); diff --git a/tests/texture_tests.cpp b/tests/texture_tests.cpp index 9aea7e9e..a3c797d9 100644 --- a/tests/texture_tests.cpp +++ b/tests/texture_tests.cpp @@ -7,7 +7,7 @@ using namespace Limitless; TEST_CASE("StateTexture id generation") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; StateTexture texture; REQUIRE(texture.getId() != 0); @@ -16,7 +16,7 @@ TEST_CASE("StateTexture id generation") { } TEST_CASE("StateTexture cleaning up ContextState") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; constexpr auto bind_index = 3; { @@ -30,7 +30,7 @@ TEST_CASE("StateTexture cleaning up ContextState") { } TEST_CASE("StateTexture move constructor") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; StateTexture texture; const auto id = texture.getId(); @@ -44,7 +44,7 @@ TEST_CASE("StateTexture move constructor") { } TEST_CASE("StateTexture move operator") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; StateTexture texture; const auto id = texture.getId(); @@ -60,7 +60,7 @@ TEST_CASE("StateTexture move operator") { } TEST_CASE("StateTexture clone function") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; auto texture = std::unique_ptr(new StateTexture()); @@ -73,7 +73,7 @@ TEST_CASE("StateTexture clone function") { } TEST_CASE("StateTexture activate") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; constexpr auto active_index = 5; StateTexture::activate(active_index); @@ -85,7 +85,7 @@ TEST_CASE("StateTexture activate") { } TEST_CASE("StateTexture bind") { - Context context = {"Title", {1, 1}, {{WindowHint::Visible, false}}}; + Context context = {"Title", {1, 1}, nullptr, {{WindowHint::Hint::Visible, false}}}; StateTexture texture;