Commit Graph

6 Commits

Author SHA1 Message Date
Sergej Jaskiewicz 5e63f7627f [klib] Test signature descriptions in irText tests
KT-59486
2023-07-14 20:26:45 +00:00
Sergej Jaskiewicz fd76a34277 [IR] Don't print flags in declaration references in irText tests
This doesn't reduce the quality of tests, because the flags are still
printed for declarations themselves. We only omit them in references.

However, this makes the tests more compatible with non-JVM backends
(see KT-58605), because flags of referenced stdlib declarations may
differ among target platforms.
2023-05-30 17:26:30 +00:00
Sergej Jaskiewicz 6e8283a6fe [IR] Dump IdSignatures and mangled names in irText tests
The reason #1 for this feature is that we want to test IdSignatures
generated for declarations. Currently, there is no (easy) way to ensure
that a change in the signature building logic doesn't cause any breaking
changes wrt klibs.

Now, most IdSignatures include hashed mangled names in them, so even if
we catch a regression where the included hash changes, there would be no
way of knowing immediately what caused it, unless we'd also have mangled
names in the expectations.

The reason #2 is to test the manglers themselves. Currently, there are
no tests for them. They heavily duplicate each other, this is already
causing issues (see KT-57427) that would be very hard to catch without
these tests.

^KT-58238 Fixed
2023-05-15 18:20:45 +00:00
Sergej Jaskiewicz 88b7f30867 [test] Use custom ignore directive for AbstractKlibJsTextTestCase tests
We've muted some irText tests on JS in the previous commits because
test expectations in some tests are different when targeting JS.

AbstractKlibJsTextTestCase tests use a different logic:
they compare the dump of the deserialized IR with the frontend-generated
IR, not with the expectations in text files, thus muted tests weren't
actually failing.

Here we introduce a temporary fix, namely
a separate // IGNORE directive for klib tests.

When klib tests are moved to the new test infrastructure, there will be
no need to do this.
2023-03-22 15:18:17 +00:00
Sergej Jaskiewicz 7dba138da6 [test] Don't run K2-specific irText tests against K1 2023-03-22 15:18:16 +00:00
Sergej Jaskiewicz ebafdd3af0 [test] Move irText tests from fir2ir/testData to compiler/testData
Let's store them conveniently in one place!
2023-03-22 15:18:15 +00:00