cmake: add swift test

This commit is contained in:
Anonymous Maarten
2024-07-26 21:00:33 +02:00
parent 37881b3150
commit 8a5d1fc196
4 changed files with 45 additions and 0 deletions

13
cmake/test/main.swift Normal file
View File

@@ -0,0 +1,13 @@
/* Contributed by Piotr Usewicz (https://github.com/pusewicz) */
import SDL3
guard SDL_Init(Uint32(SDL_INIT_VIDEO)) == 0 else {
fatalError("SDL_Init error: \(String(cString: SDL_GetError()))")
}
var sdlVersion = SDL_GetVersion()
print("SDL version: \(sdlVersion)")
SDL_Quit()