Ant task - comparator fix (equals added) in Life/Maze tests; failonerror = true
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<property name="kotlin-home" location="${output}/ant-test/kotlin-home"/>
|
||||
<property name="tests-jar" location="${tests-dir}/out.jar"/>
|
||||
<property name="bootstrap-dir" location="${basedir}/bootstrap.compiler"/>
|
||||
<property name="failonerror" value="false"/> <!-- Whether invoking compiled classes should file on error -->
|
||||
<property name="failonerror" value="true"/> <!-- Whether invoking compiled classes should file on error -->
|
||||
|
||||
|
||||
<taskdef resource="net/sf/antcontrib/antlib.xml">
|
||||
|
||||
@@ -153,6 +153,7 @@ fun <K, V> Map<K, V>.set(k : K, v : V) { put(k, v) }
|
||||
|
||||
fun comparator<T> (f : (T, T) -> Int) : Comparator<T> = object : Comparator<T> {
|
||||
override fun compare(o1 : T, o2 : T) : Int = f(o1, o2)
|
||||
override fun equals(p : Any?) : Boolean = false
|
||||
}
|
||||
|
||||
val <T> Array<T>.isEmpty : Boolean get() = size == 0
|
||||
|
||||
@@ -214,6 +214,7 @@ fun <K, V> Map<K, V>.set(k : K, v : V) { put(k, v) }
|
||||
|
||||
fun comparator<T> (f : (T, T) -> Int) : Comparator<T> = object : Comparator<T> {
|
||||
override fun compare(o1 : T, o2 : T) : Int = f(o1, o2)
|
||||
override fun equals(p : Any?) : Boolean = false
|
||||
}
|
||||
|
||||
fun <T, C: Collection<T>> Array<T>.to(result: C) : C {
|
||||
|
||||
Reference in New Issue
Block a user