Cotton code
29 lines · 1.4 KB · SwiftRaw
@testable import CottonFaces@testable import CottonUIimport XCTest/// RULE: a moment is drawn under the house watercolour its own emotions call/// — the night sky for a quiet one, the rain cloud for a heavy one, the scene/// most of them call and the first-named on a tie — never at random, and a/// moment that names neither keeps the sprig. Every word a scene names is a/// word of the vocabulary, so a renamed emotion can't silently stop calling/// its picture (coordinator's review, 24 Oct 2026).final class MoodSceneTests: XCTestCase {    func testEveryWordASceneNamesIsAnEmotion() {        for scene in MoodFaceKnobs.scenes {            XCTAssertTrue(scene.emotions.isSubset(of: Set(Emotions.all)), "\(scene.art): \(scene.emotions.subtracting(Emotions.all))")        }    }    func testTheEmotionsHeldPickTheScene() {        XCTAssertEqual(MoodScene.art(for: ["tired", "proud", "calm"]), "face-art-night-sky")        XCTAssertEqual(MoodScene.art(for: ["anxious", "restless"]), "face-art-rain-cloud")        XCTAssertEqual(MoodScene.art(for: ["calm", "anxious", "stressed"]), "face-art-rain-cloud", "most of them call the cloud")        XCTAssertEqual(MoodScene.art(for: ["calm", "anxious"]), "face-art-night-sky", "a tie goes to the first named")    }    func testAMomentThatNamesNeitherDrawsNoScene() {        XCTAssertNil(MoodScene.art(for: ["happy", "proud"]))        XCTAssertNil(MoodScene.art(for: []))    }}