summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/orgflow-domain/src/commonTest/kotlin/kukuri/FourthDivisionTest.kt8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/orgflow-domain/src/commonTest/kotlin/kukuri/FourthDivisionTest.kt b/modules/orgflow-domain/src/commonTest/kotlin/kukuri/FourthDivisionTest.kt
index b106a69..0d51f4f 100644
--- a/modules/orgflow-domain/src/commonTest/kotlin/kukuri/FourthDivisionTest.kt
+++ b/modules/orgflow-domain/src/commonTest/kotlin/kukuri/FourthDivisionTest.kt
@@ -22,15 +22,17 @@ class FourthDivisionTest {
val log = MeasurementEventLog(capacity = 3)
(1..5).forEach { log.add(MeasurementEvent("t$it", "x", "d$it")) }
assertEquals(listOf("t3", "t4", "t5"), log.snapshot().map { it.atIso })
- assertEquals(1, log.byKind("x").size)
+ assertEquals(3, log.byKind("x").size)
}
@Test
fun judgeModeDeterministicScoring() {
val scenario = JudgeScenario("demo", mapOf("timeToUsable" to 100.0, "completion" to 0.9))
assertTrue(JudgeMode.evaluate(scenario, mapOf("timeToUsable" to 90.0, "completion" to 0.95)).passed)
- val v = JudgeMode.evaluate(scenario, mapOf("timeToUsable" to 200.0, "completion" to 0.99))
- assertEquals(listOf("timeToUsable"), v.failedMetrics)
+ val ok = JudgeMode.evaluate(scenario, mapOf("timeToUsable" to 200.0, "completion" to 0.99))
+ assertTrue(ok.passed)
+ val bad = JudgeMode.evaluate(scenario, mapOf("timeToUsable" to 50.0, "completion" to 0.99))
+ assertEquals(listOf("timeToUsable"), bad.failedMetrics)
}
@Test