diff --git a/src/test/java/com/github/knokko/boiler/builder/TestBoilerBuilder.java b/src/test/java/com/github/knokko/boiler/builder/TestBoilerBuilder.java index 2fff9f1..ee37447 100644 --- a/src/test/java/com/github/knokko/boiler/builder/TestBoilerBuilder.java +++ b/src/test/java/com/github/knokko/boiler/builder/TestBoilerBuilder.java @@ -5,6 +5,7 @@ import com.github.knokko.boiler.builder.queue.QueueFamilyMapping; import com.github.knokko.boiler.debug.ValidationException; import com.github.knokko.boiler.exceptions.NoVkPhysicalDeviceException; +import com.github.knokko.boiler.util.CollectionHelper; import org.junit.jupiter.api.Test; import org.lwjgl.vulkan.*; @@ -361,4 +362,17 @@ public void testQueueFamilyMapper() { boiler.destroyInitialObjects(); } + + @Test + public void testApiDump() { + var builder = new BoilerBuilder( + VK_API_VERSION_1_0, "TestApiDump", 1 + ).apiDump().vkInstanceCreator((ciInstance, stack) -> { + var layers = CollectionHelper.decodeStringSet(ciInstance.ppEnabledLayerNames()); + assertTrue(layers.contains("VK_LAYER_LUNARG_api_dump"), "layers were " + layers); + throw new RuntimeException("Mission completed"); + }).validation().forbidValidationErrors(); + + assertEquals("Mission completed", assertThrows(RuntimeException.class, builder::build).getMessage()); + } }