Skip to content

Commit

Permalink
Updated unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Dec 14, 2024
1 parent 6db8eb3 commit 50eb3aa
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions Tests/SDLTests/SDLTests.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,36 @@
import Foundation
import XCTest
@testable import SDL

class SDLTests: XCTestCase {

func testExample() {

func testDrivers() {

print("Available Render Drivers:")
let renderDrivers = SDLRenderer.Driver.all
XCTAssert(renderDrivers.count > 0)
if renderDrivers.isEmpty == false {
print("=======")
for driver in renderDrivers {

do {
let info = try SDLRenderer.Info(driver: driver)
print("Driver:", driver.rawValue)
print("Name:", info.name)
print("Options:")
info.options.forEach { print(" \($0)") }
print("Formats:")
info.formats.forEach { print(" \($0)") }
if info.maximumSize.width > 0 || info.maximumSize.height > 0 {
print("Maximum Size:")
print(" Width: \(info.maximumSize.width)")
print(" Height: \(info.maximumSize.height)")
}
print("=======")
} catch {
print("Could not get information for driver \(driver.rawValue)")
}
}
}
}
}

0 comments on commit 50eb3aa

Please sign in to comment.