Skip to content

Commit

Permalink
Add Tests and asset for VRM 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
is0263rf committed Apr 5, 2024
1 parent c7b25da commit 6d3ff1e
Show file tree
Hide file tree
Showing 5 changed files with 381 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ let package = Package(
.testTarget(
name: "VRMKitTests",
dependencies: ["VRMKit"],
resources: [.copy("Assets/AliciaSolid.vrm")]
resources: [.copy("Assets/AliciaSolid.vrm"), .copy("Assets/Seed-san.vrm")]
),
.testTarget(
name: "VRMSceneKitTests",
dependencies: ["VRMSceneKit"],
resources: [.copy("Assets/AliciaSolid.vrm")]
resources: [.copy("Assets/AliciaSolid.vrm"), .copy("Assets/Seed-san.vrm")]
),
]
)
Binary file added Tests/VRMKitTests/Assets/Seed-san.vrm
Binary file not shown.
4 changes: 4 additions & 0 deletions Tests/VRMKitTests/Resources.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ import Foundation

enum Resources {
case aliciaSolid
case seedSan

var data: Data {
switch self {
case .aliciaSolid:
let url = Bundle.module.url(forResource: "AliciaSolid", withExtension: "vrm")!
return try! Data(contentsOf: url)
case .seedSan:
let url = Bundle.module.url(forResource: "Seed-san", withExtension: "vrm")!
return try! Data(contentsOf: url)
}
}
}
Loading

0 comments on commit 6d3ff1e

Please sign in to comment.