Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disabling publish on intellij project as this is a work in progress
- Loading branch information
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
kotlintest-assertions-arrow/src/main/kotlin/io/kotlintest/assertions/arrow/gen/gen.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,15 @@ | ||
//package io.kotlintest.assertions.arrow.gen | ||
// | ||
//import arrow.core.Tuple2 | ||
//import io.kotlintest.properties.Gen | ||
// | ||
//fun <A, B, T> genT(fn: Tuple2<A, B>): Gen<T> = object : Gen<T> { | ||
// | ||
// init { | ||
// println(fn::class.typeParameters) | ||
// } | ||
// | ||
// override fun constants(): Iterable<T> = emptyList() | ||
// override fun random(): Sequence<T> = | ||
// generateSequence { TODO() } | ||
//} |
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
24 changes: 24 additions & 0 deletions
24
kotlintest-tests/src/test/kotlin/com/sksamuel/kotlintest/tests/assertions/arrow/GenTTest.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,24 @@ | ||
//package com.sksamuel.kotlintest.tests.assertions.arrow | ||
// | ||
//import arrow.core.Tuple2 | ||
//import io.kotlintest.assertions.arrow.gen.genT | ||
//import io.kotlintest.specs.StringSpec | ||
// | ||
//@product | ||
//data class Person(val name: String, val age: Int) { | ||
// init { | ||
// require(age > 0, | ||
// { "Age should be greater than zero" }) | ||
// } | ||
// | ||
// companion object | ||
//} | ||
// | ||
//class GenTTest : StringSpec({ | ||
// | ||
// fun tupleToAccount(t: Tuple2<Int, Int>): Person = t.toAccount() | ||
// | ||
// "GenT should infer types for tuples" { | ||
// genT() | ||
// } | ||
//}) |