Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public data class ModelPreferences(
}

require(speedPriority == null || speedPriority in 0.0..1.0) {
"costPriority must be in 0.0 <= x <= 1.0 value range"
"speedPriority must be in 0.0 <= x <= 1.0 value range"
}

require(intelligencePriority == null || intelligencePriority in 0.0..1.0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ class SamplingTest {
@Test
fun `should reject ModelPreferences with invalid priority`() {
shouldThrow<IllegalArgumentException> { ModelPreferences(costPriority = 1.5) }
.message shouldBe "costPriority must be in 0.0 <= x <= 1.0 value range"
shouldThrow<IllegalArgumentException> { ModelPreferences(speedPriority = -0.1) }
.message shouldBe "speedPriority must be in 0.0 <= x <= 1.0 value range"
shouldThrow<IllegalArgumentException> { ModelPreferences(intelligencePriority = 1.1) }
.message shouldBe "intelligencePriority must be in 0.0 <= x <= 1.0 value range"
}

@Test
Expand Down