mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-21 09:36:24 +00:00
cmake: add swift test
This commit is contained in:
13
cmake/test/main.swift
Normal file
13
cmake/test/main.swift
Normal 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()
|
||||
Reference in New Issue
Block a user