v1.4.0 release: live-coding scratch editor, interpreted Graph DSL, ClosureSynthesizer + SampleLoop
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
// ReevalStateTests.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#if os(macOS)
|
||||
import Testing
|
||||
@testable import LyrebirdLiveCompileUI
|
||||
|
||||
@Suite("ReevalState")
|
||||
struct ReevalStateTests {
|
||||
|
||||
@Test
|
||||
func canEvaluateFalseWhenEmptyOrCompiling() {
|
||||
#expect(ReevalState.empty.canEvaluate == false)
|
||||
#expect(ReevalState.compiling.canEvaluate == false)
|
||||
}
|
||||
|
||||
@Test
|
||||
func canEvaluateTrueWhenRunnable() {
|
||||
#expect(ReevalState.dirty.canEvaluate == true)
|
||||
#expect(ReevalState.clean.canEvaluate == true)
|
||||
#expect(ReevalState.queued(untilBeat: 4.0).canEvaluate == true)
|
||||
#expect(ReevalState.failed(diagnosticCount: 0).canEvaluate == true)
|
||||
#expect(ReevalState.failed(diagnosticCount: 3).canEvaluate == true)
|
||||
}
|
||||
|
||||
@Test
|
||||
func failedCarriesDiagnosticCount() {
|
||||
#expect(ReevalState.failed(diagnosticCount: 2) == .failed(diagnosticCount: 2))
|
||||
#expect(ReevalState.failed(diagnosticCount: 2) != .failed(diagnosticCount: 5))
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user