Updated test data and stdlib sources.
This commit is contained in:
@@ -54,7 +54,7 @@ public fun <T> Iterable<T>.containsItem(item : T) : Boolean {
|
||||
return this.contains(item);
|
||||
}
|
||||
|
||||
for (var elem in this) {
|
||||
for (elem in this) {
|
||||
if (elem == item) {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public inline fun <T : Comparable<*>> compareValues(a: T?, b: T?): Int {
|
||||
/**
|
||||
* Creates a comparator using the sequence of functions used to calculate a value to compare on
|
||||
*/
|
||||
public inline fun <T> comparator(vararg val functions: T.() -> Comparable<*>?): Comparator<T> {
|
||||
public inline fun <T> comparator(vararg functions: T.() -> Comparable<*>?): Comparator<T> {
|
||||
return FunctionComparator<T>(*functions)
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public fun StringTemplate.toHtml(formatter : HtmlFormatter = HtmlFormatter()) :
|
||||
* to escape particular characters in different output formats such as [[HtmlFormatter]
|
||||
*/
|
||||
public trait Formatter {
|
||||
public fun format(buffer : Appendable, val value : Any?) : Unit
|
||||
public fun format(buffer : Appendable, value : Any?) : Unit
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@ package test.arrays
|
||||
import kotlin.test.*
|
||||
import org.junit.Test as test
|
||||
|
||||
fun <T> checkContent(val iter : Iterator<T>, val length : Int, val value : (Int) -> T) {
|
||||
fun <T> checkContent(iter : Iterator<T>, length : Int, value : (Int) -> T) {
|
||||
var idx = 0
|
||||
while (idx != length && iter.hasNext()) {
|
||||
assertEquals(value(idx++), iter.next(), "Invalid element")
|
||||
|
||||
Reference in New Issue
Block a user