mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[ios] Improved test
This commit is contained in:
parent
cc43fd549b
commit
1627bd81e5
@ -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"
|
||||
)
|
||||
]
|
||||
)
|
||||
@ -11,4 +11,7 @@ runSkeletonDrawableTest()
|
||||
|
||||
// Run the new SpineSwift API test
|
||||
print("\n=== Testing SpineSwift API ===")
|
||||
runSkeletonDrawableTestSwift()
|
||||
print("Starting SpineSwift test...")
|
||||
print("About to call runSkeletonDrawableTestSwift...")
|
||||
runSkeletonDrawableTestSwift()
|
||||
print("SpineSwift test completed")
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user