Commit 8099ab2642

8099ab264278da98f627af27947215c81e603460

parent: abaafc9ad1

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-22 18:51 UTC

Pin the catalogue to the cup and the box; require an authoring record per model

Ref #7

Layout: unified · split

Packages/FoldKit/Sources/FoldKitTestSupport/Helpers.swift +5
@@ -488,6 +488,11 @@ public func pattern(_ name: String) -> URL {
488488 modelsDirectory.appendingPathComponent("\(name)-cp.fold")
489489}
490490
491/// `docs/authoring/<name>.md`.
492public func authoringDoc(_ name: String) -> URL {
493 modelsDirectory.deletingLastPathComponent().appendingPathComponent("docs/authoring/\(name).md")
494}
495
491496#if os(macOS)
492497/// Runs the built `foldlint` on `url`, returning its exit status and its standard output and
493498/// error together. The executable is beside the test bundle, which may hold this module's
Packages/FoldKit/Tests/ModelsTests/CatalogueTests.swift +6 −4
@@ -119,12 +119,14 @@ private func sessionCamera(_ file: FoldFile, _ step: FoldStep, aspect: Double) -
119119 return Camera(eye: target + distance * eye, target: target, up: up, fieldOfView: fieldOfView)
120120}
121121
122@Test func theCatalogueContainsTheCup() throws {
123 #expect(try ModelLibrary.names().contains("cup"))
122@Test func theCatalogueContainsTheCupAndTheBox() throws {
123 #expect(try Set(ModelLibrary.names()) == ["cup", "box"])
124124}
125125
126@Test func theCatalogueContainsTheBox() throws {
127 #expect(try ModelLibrary.names().contains("box"))
126@Test func everyModelHasAnAuthoringRecord() throws {
127 for name in try ModelLibrary.names() {
128 #expect(FileManager.default.fileExists(atPath: authoringDoc(name).path))
129 }
128130}
129131
130132@Test func theBoxRaisesItsEndsOnSolvedCurvesAndEndsStanding() throws {