Skip to content

Commit cd68532

Browse files
committed
Lint + generate tests
1 parent 4bcc54a commit cd68532

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

Sources/Assimp/AiMatKey.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ extension AiMatKey {
7474
case GLTF_PBRMETALLICROUGHNESS_METALLIC_FACTOR = "$mat.gltf.pbrMetallicRoughness.metallicFactor"
7575
case GLTF_PBRMETALLICROUGHNESS_ROUGHNESS_FACTOR = "$mat.gltf.pbrMetallicRoughness.roughnessFactor"
7676
case GLTF_ALPHAMODE = "$mat.gltf.alphaMode"
77-
case GLTF_ALPHACUTOFF = "$mat.gltf.alphaCutoff"
77+
case GLTF_ALPHACUTOFF = "$mat.gltf.alphaCutoff"
7878
case GLTF_PBRSPECULARGLOSSINESS = "$mat.gltf.pbrSpecularGlossiness"
7979
case GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR = "$mat.gltf.pbrMetallicRoughness.glossinessFactor"
8080
case GLTF_UNLIT = "$mat.gltf.unlit"

Sources/Assimp/AiMaterial.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public struct AiMaterial {
8282
- aiGetMaterialUVTransform
8383
- aiGetMaterialXXX
8484
*/
85-
8685
public func getMaterialProperty(_ key: AiMatKey) -> AiMaterialProperty? {
8786
withUnsafePointer(to: self.material) { matPtr -> AiMaterialProperty? in
8887
let matPropPtr = UnsafeMutablePointer<UnsafePointer<aiMaterialProperty>?>.allocate(capacity: MemoryLayout<aiMaterialProperty>.stride)

Sources/Assimp/AiMesh.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ extension AiMesh: Equatable {
269269
lhs.textureCoords == rhs.textureCoords &&
270270
lhs.vertices == rhs.vertices
271271

272-
//FIXME: lhs.colors == rhs.colors &&
272+
// FIXME: lhs.colors == rhs.colors &&
273273

274274
}
275275
}

Sources/Assimp/AiNode.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public struct AiNode {
2525
///
2626
/// Implementations should be able to handle tokens such as whitespace, tabs, line feeds, quotation marks, ampersands etc.
2727
///
28-
///Sometimes assimp introduces new nodes not present in the source file into the hierarchy (usually out of necessity because sometimes the source hierarchy format is simply not compatible).
28+
/// Sometimes assimp introduces new nodes not present in the source file into the hierarchy (usually out of necessity because sometimes the source hierarchy format is simply not compatible).
2929
///
3030
/// Their names are surrounded by
3131
/// `<>`

Sources/Assimp/AiPostProcessStep.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public struct AiPostProcessStep: OptionSet {
3131
/// Full, weight-based skinning is expensive while animating nodes is extremely cheap,
3232
/// so this step is offered to clean up the data in that regard.
3333
///
34-
///Use #AI_CONFIG_PP_DB_THRESHOLD to control this.
35-
///Use #AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones within the scene qualify for removal.
34+
/// Use #AI_CONFIG_PP_DB_THRESHOLD to control this.
35+
/// Use #AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and only if all bones within the scene qualify for removal.
3636
public static let debone = AiPostProcessStep(rawValue: aiProcess_Debone.rawValue)
3737

3838
/// This step searches all meshes for degenerate primitives and converts them to proper lines or points.

Sources/Assimp/String+aiString.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extension String {
1515
}
1616
guard let boundMemory: UnsafePointer<CChar> = bytesPtr.baseAddress?.bindMemory(to: CChar.self,
1717
capacity: Int(aiString.length)) else {
18-
return nil
18+
return nil
1919
}
2020

2121
let stringBuffer = UnsafeBufferPointer<CChar>(start: boundMemory,
@@ -36,7 +36,7 @@ extension String {
3636
count: length)
3737

3838
let codeUnits: [UTF8.CodeUnit] = bufferPtr
39-
//.map { $0 > 0 ? $0 : Int8(0x20) } // this replaces all invalid characters with blank space
39+
// .map { $0 > 0 ? $0 : Int8(0x20) } // this replaces all invalid characters with blank space
4040
.map { UTF8.CodeUnit($0) }
4141

4242
self.init(decoding: codeUnits, as: UTF8.self)

Tests/AssimpTests/XCTestManifests.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ extension AssimpTests {
77
// to regenerate.
88
static let __allTests__AssimpTests = [
99
("testFailingInitializer", testFailingInitializer),
10+
("testLoadAiScene3DS", testLoadAiScene3DS),
1011
("testLoadAiSceneDAE", testLoadAiSceneDAE),
1112
("testLoadAiSceneObj", testLoadAiSceneObj),
1213
("testVec2fFromAiVector2D", testVec2fFromAiVector2D),
1314
("testVec3fFromAiVector3D", testVec3fFromAiVector3D),
14-
("testVersion", testVersion)
15+
("testVersion", testVersion),
1516
]
1617
}
1718

1819
public func __allTests() -> [XCTestCaseEntry] {
1920
return [
20-
testCase(AssimpTests.__allTests__AssimpTests)
21+
testCase(AssimpTests.__allTests__AssimpTests),
2122
]
2223
}
2324
#endif

0 commit comments

Comments
 (0)