Compile common stdlib tests against common stdlib

Declare platform-specific test utilities as expect.
This commit is contained in:
Ilya Gorbunov
2017-12-22 15:34:26 +03:00
parent c030a047aa
commit ecd42f14b3
7 changed files with 84 additions and 13 deletions
+4 -1
View File
@@ -14,11 +14,14 @@
* limitations under the License.
*/
package kotlin.test
package test
import kotlin.test.*
public fun assertTypeEquals(expected: Any?, actual: Any?) {
assertEquals(expected?.let { it::class.js }, actual?.let { it::class.js })
}
@Suppress("NOTHING_TO_INLINE")
internal inline fun String.removeLeadingPlusOnJava6(): String = this
internal fun doubleTotalOrderEquals(a: Double?, b: Double?) = a == b || (a != a && b != b)