From 1627bd81e53e4250f23e5d14ea8a82139e618cc0 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Mon, 11 Aug 2025 20:29:54 +0200 Subject: [PATCH] [ios] Improved test --- spine-ios/test/Package.swift | 8 ++++++++ spine-ios/test/src/main.swift | 5 ++++- spine-ios/test/src/skeleton_drawable_test_swift.swift | 6 ++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/spine-ios/test/Package.swift b/spine-ios/test/Package.swift index 6cb872713..c1bebe498 100644 --- a/spine-ios/test/Package.swift +++ b/spine-ios/test/Package.swift @@ -19,6 +19,14 @@ let package = Package( .product(name: "SpineSwift", package: "spine-runtimes") ], path: "src" + ), + .executableTarget( + name: "SimpleTest", + dependencies: [ + .product(name: "SpineC", package: "spine-runtimes"), + .product(name: "SpineSwift", package: "spine-runtimes") + ], + path: "simpletest" ) ] ) \ No newline at end of file diff --git a/spine-ios/test/src/main.swift b/spine-ios/test/src/main.swift index 501fbe59e..51b4a91ec 100644 --- a/spine-ios/test/src/main.swift +++ b/spine-ios/test/src/main.swift @@ -11,4 +11,7 @@ runSkeletonDrawableTest() // Run the new SpineSwift API test print("\n=== Testing SpineSwift API ===") -runSkeletonDrawableTestSwift() \ No newline at end of file +print("Starting SpineSwift test...") +print("About to call runSkeletonDrawableTestSwift...") +runSkeletonDrawableTestSwift() +print("SpineSwift test completed") \ No newline at end of file diff --git a/spine-ios/test/src/skeleton_drawable_test_swift.swift b/spine-ios/test/src/skeleton_drawable_test_swift.swift index 85d29bbc0..bcc829496 100644 --- a/spine-ios/test/src/skeleton_drawable_test_swift.swift +++ b/spine-ios/test/src/skeleton_drawable_test_swift.swift @@ -4,19 +4,25 @@ import SpineSwift func runSkeletonDrawableTestSwift() { print("Testing SkeletonDrawable with SpineSwift API...") + print("Step 1: Enable debug extension") // Enable debug extension if needed enableDebugExtension(false) + print(" Debug extension configured") + print("Step 2: Load file paths") // Load atlas and skeleton data let atlasPath = "../../spine-ts/assets/spineboy.atlas" let jsonPath = "../../spine-ts/assets/spineboy-pro.json" + print("Step 3: Read atlas file") // Read atlas file guard let atlasData = try? String(contentsOfFile: atlasPath, encoding: .utf8) else { print("❌ Failed to read atlas file: \(atlasPath)") return } + print(" Atlas file read successfully") + print("Step 4: Load atlas with SpineSwift API") // Load atlas let atlas: Atlas do {