adding test

This commit is contained in:
2025-01-12 21:12:11 +01:00
parent 5f7d90b0ec
commit 76483ae32e
4 changed files with 13 additions and 3 deletions

View File

@@ -95,7 +95,7 @@ jobs:
run: xmake --yes
# Test the engine
- name: Build Pulse
- name: Test Vulkan
run: |
xmake config --vulkan-tests=y --yes
xmake build --yes VulkanUnitTests

View File

@@ -91,7 +91,7 @@ jobs:
run: xmake --yes
# Test the engine
- name: Build Pulse
- name: Test Vulkan
run: |
xmake config --vulkan-tests=y --yes
xmake build --yes VulkanUnitTests

View File

@@ -86,7 +86,7 @@ jobs:
run: xmake --yes
# Test the engine
- name: Build Pulse
- name: Test Vulkan
run: |
xmake config --vulkan-tests=y --yes
xmake build --yes VulkanUnitTests

View File

@@ -9,6 +9,15 @@ void DumbDebugCallBack(PulseDebugMessageSeverity severity, const char* message)
(void)message;
}
void TestVulkanSupport()
{
if(!PulseSupportsBackend(PULSE_BACKEND_VULKAN, PULSE_SHADER_FORMAT_SPIRV_BIT))
{
TEST_FAIL_MESSAGE("Vulkan is not supported");
exit(1);
}
}
void TestBackendSetup()
{
PulseBackend backend = PulseLoadBackend(PULSE_BACKEND_VULKAN, PULSE_SHADER_FORMAT_SPIRV_BIT, PULSE_HIGH_DEBUG);
@@ -36,6 +45,7 @@ void TestWrongBackendSetup()
void TestBackend()
{
RUN_TEST(TestVulkanSupport);
RUN_TEST(TestBackendSetup);
RUN_TEST(TestBackendAnySetup);
RUN_TEST(TestWrongBackendSetup);