Updated test data and stdlib sources.

This commit is contained in:
Evgeny Gerashchenko
2013-02-12 02:19:55 +04:00
parent 105d2d72de
commit b9e5704057
43 changed files with 96 additions and 78 deletions
@@ -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
}
+1 -1
View File
@@ -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
}
/**
+1 -1
View File
@@ -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")