Use NoScopeRecordCliBindingTrace for codegen tests

This commit is contained in:
Dmitry Petrov
2018-02-13 17:50:53 +03:00
parent 10916b2046
commit 8bfbbe456f
31 changed files with 1013 additions and 41 deletions
+12 -10
View File
@@ -1,4 +1,6 @@
// !LANGUAGE: -ProperIeee754Comparisons
// WITH_RUNTIME
// IGNORE_BACKEND: JS
import kotlin.test.*
@@ -117,14 +119,14 @@ fun box(): String {
assertFalse(adnq != dnq, "Double: (Any?)NaN != NaN?")
assertFalse(adnq != adnq, "Double: (Any?)NaN != (Any?)NaN")
// Stable smart-casts
// Stable smart-casts -- effectively not takein into account in 1.2
if (adn is Double) {
assertFalse(adn == adn, "Double smart-cast: NaN == NaN")
assertTrue(adn != adn, "Double smart-cast: NaN == NaN")
assertTrue(adn == adn, "Double smart-cast: NaN == NaN")
assertFalse(adn != adn, "Double smart-cast: NaN == NaN")
}
if (adnq is Double?) {
assertFalse(adnq == adnq, "Double? smart-cast: NaN? == NaN?")
assertTrue(adnq != adnq, "Double? smart-cast: NaN? == NaN?")
assertTrue(adnq == adnq, "Double? smart-cast: NaN? == NaN?")
assertFalse(adnq != adnq, "Double? smart-cast: NaN? == NaN?")
}
// Unstable smart-casts
if (gdn is Double) {
@@ -192,14 +194,14 @@ fun box(): String {
assertFalse(afnq != fnq, "Float: (Any?)NaN != NaN?")
assertFalse(afnq != afnq, "Float: (Any?)NaN != (Any?)NaN")
// Stable smart-casts
// Stable smart-casts -- effectively not takein into account in 1.2
if (afn is Float) {
assertFalse(afn == afn, "Float smart-cast: NaN == NaN")
assertTrue(afn != afn, "Float smart-cast: NaN == NaN")
assertTrue(afn == afn, "Float smart-cast: NaN == NaN")
assertFalse(afn != afn, "Float smart-cast: NaN == NaN")
}
if (afnq is Float?) {
assertFalse(afnq == afnq, "Float? smart-cast: NaN? == NaN?")
assertTrue(afnq != afnq, "Float? smart-cast: NaN? == NaN?")
assertTrue(afnq == afnq, "Float? smart-cast: NaN? == NaN?")
assertFalse(afnq != afnq, "Float? smart-cast: NaN? == NaN?")
}
// Unstable smart-casts
if (gfn is Float) {