-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
58 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
partiql-planner/src/test/kotlin/org/partiql/planner/internal/typer/path/SanityTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.partiql.planner.internal.typer.path | ||
|
||
import org.junit.jupiter.api.DynamicContainer | ||
import org.junit.jupiter.api.TestFactory | ||
import org.partiql.planner.internal.typer.PartiQLTyperTestBase | ||
import org.partiql.types.StaticType | ||
import java.util.stream.Stream | ||
|
||
/** | ||
* This test makes sure that the planner can resolve various path expression | ||
*/ | ||
class SanityTests : PartiQLTyperTestBase() { | ||
@TestFactory | ||
fun path(): Stream<DynamicContainer> { | ||
val tests = buildList { | ||
(0..14).forEach { | ||
this.add("paths-${it.toString().padStart(2,'0')}") | ||
} | ||
}.map { inputs.get("basics", it)!! } | ||
|
||
val argsMap: Map<TestResult, Set<List<StaticType>>> = buildMap { | ||
put(TestResult.Success(StaticType.ANY), setOf(listOf(StaticType.ANY, StaticType.ANY))) | ||
put(TestResult.Failure, emptySet<List<StaticType>>()) | ||
} | ||
|
||
return super.testGen("path", tests, argsMap) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters