From 4b88663ba5e32139e035f1b6303dc606d1c87e3f Mon Sep 17 00:00:00 2001 From: Angela Cortecchia Date: Wed, 13 Nov 2024 14:39:01 +0100 Subject: [PATCH] test: fix more significative test --- .../kotlin/it/unibo/collektive/path/PathTest.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dsl/src/commonTest/kotlin/it/unibo/collektive/path/PathTest.kt b/dsl/src/commonTest/kotlin/it/unibo/collektive/path/PathTest.kt index e55973f09..9c92af6be 100644 --- a/dsl/src/commonTest/kotlin/it/unibo/collektive/path/PathTest.kt +++ b/dsl/src/commonTest/kotlin/it/unibo/collektive/path/PathTest.kt @@ -13,10 +13,10 @@ import io.kotest.matchers.shouldBe import it.unibo.collektive.path.impl.PathImpl class PathTest : StringSpec({ - "Should be able to generate 1 million different paths" { - val seq = generateSequence(1) { it + 1 }.take(1_000_000) - seq.count() shouldBe 1_000_000 - val res = seq.map { PathImpl.of(listOf(it)) } - res.count() shouldBe 1_000_000 + "Should be able to generate 1 million different paths without running out of memory" { + val paths = generateSequence(1) { it + 1 } + .take(1_000_000) + .map { PathImpl.of(listOf(it)) } + paths.count() shouldBe 1_000_000 } -}) \ No newline at end of file +})