Skip to content

Commit

Permalink
Test BoilerBuilder.apiDump (as far as I can)
Browse files Browse the repository at this point in the history
  • Loading branch information
knokko committed Aug 11, 2024
1 parent 29c7cee commit 6204144
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;

Expand Down Expand Up @@ -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());
}
}

0 comments on commit 6204144

Please sign in to comment.