Commit Graph

905 Commits

Author SHA1 Message Date
Svyatoslav Scherbina 2a4d995fd1 Add infrastructure for Native-specific frontend diagnostic tests 2020-02-06 11:00:28 +03:00
Svyatoslav Scherbina 99ba6b5ae1 Make :compiler:tests-common depend on :native:frontend.native 2020-02-06 11:00:25 +03:00
Pavel Kirpichenkov 75d57c7d3f Update pattern for finding diagnostics in diagnostic tests
Also use updated diagnostic pattern in TreesCompareTest.
In rare cases diagnostic was cut too early on !> characters,
that were a part of diagnostic parameter:
<!DIAGNOSTIC("Type<DefinitelyNotNullTypeArgument!!>")!>
2020-02-04 17:49:18 +03:00
Denis Zharkov e0dca92370 FIR: Ignore whitespaces when comparing fir/non-fir diagnostic files 2020-01-30 17:12:50 +03:00
Alexander Udalov d71dec9b64 Minor, fix typo in condition in AbstractWriteFlagsTest 2020-01-30 00:02:20 +01:00
Alexander Udalov dcf6a2199a Generate JvmOverloads methods as final
#KT-33240 Fixed
2020-01-29 18:01:57 +01:00
Mads Ager 73aa36ca59 JVM: Add D8 check that class files can be dexed with D8.
This change adds D8 in addition to Dx which is being deprecated.
At some point after the official Dx deprecation, we should remove
the Dx checker.

Moving to D8 has the additional benefit that D8 can dex code
using java 8 features without using a separate desugaring tool.
2020-01-29 18:00:45 +01:00
Mikhael Bogdanov f5f25224b0 JVM_IR. Add IrAsmLikeInstructionListingTestGenerated tests 2020-01-29 17:00:00 +01:00
Ilya Gorbunov 9f8e3dad33 Add coroutines-compat jar dependency to those tests that require it
#KT-36083
2020-01-29 09:12:40 +03:00
Georgy Bronnikov 8f4b4007fe JVM_IR: Add test for compiling against cross-platform Klib 2020-01-28 12:19:43 +03:00
Georgy Bronnikov 5ede65c525 JVM_IR: read Klib 2020-01-28 12:19:43 +03:00
Dmitry Savvinov 4f5c3d1387 Allow rendering extra tags for lineMarkers in tests 2020-01-24 11:00:16 +03:00
Dmitry Savvinov 5800160ee1 Rewrite GradleDaemonAnalyzerTest
Previously, GradleDaemonAnalyzer reused common IJ infrastructure for
highlighting tests (see DaemonAnalyzerTеstCase, ExpectedHighlightingData
and such).

Unfortunately, this infrastructure had several flaws,
mainly around checking expected highlighting against actual one:

- overlapping line markers lead to crash (fixed in 193+)

- no way to sanitize descriptions of line markers (important for cases
where description returns HTML-formatted text, which makes testdata
completely unreadable and also drives parser insane)

- thrown FileNotFoundException doesn't have a physical file with
expected testdata attached, which makes browsing diff a little less
convenient (no way to apply changes to expected file)

- no easy way to plug-in with additional after-highlighting checks

This commit fixes it by overriding doCheckResult and providing custom
checking of highlighting/line markers, based on TagsTestDataUtil.
Because we don't rely on IJ-checking anymore, we also remove weird hoops
with removing/adding testdata markup in checkFiles.
Also this commit adds strings sanitization in TagsTestDataUtil, removing HTML-tags
and line breaks, so that description of tag is always one-liner with
plain text.
2020-01-24 11:00:16 +03:00
Mark Punzalan 7329a1641a [JVM IR] Fix lambdaInLocalFunction.kt by adding helper methods that
return the target backend under test.
2020-01-23 19:16:27 +01:00
Nikolay Krasko f01b4706d1 Switch to 193 platform 2020-01-19 12:01:53 +03:00
Nikolay Krasko 688ccc4a87 Allow to auto-mute failed tests in RunnerWithIgnoreInDatabase 2020-01-19 11:48:43 +03:00
Nikolay Krasko fd8ff463bb JUnit 4 runner for ignoring muted tests 2020-01-16 20:37:58 +03:00
Ilya Gorbunov ac790bea71 Reorganize diagnostics tests with stdlib and reflect
DiagnosticsTestWithStdLib now require stdlib only.
Move test data accordingly.
The only test that required kotlin-reflect is transformed into
codegen box test.
2020-01-16 15:35:58 +03:00
Mikhael Bogdanov 1032e3a17c Support field type annotations
#KT-35843 Fixed
2020-01-09 14:00:11 +01:00
Mikhael Bogdanov 2ed0cb2a89 Support type annotations
#KT-35843 Fixed
2020-01-09 14:00:11 +01:00
Mark Punzalan 70b304e6e4 [JVM IR] Support target templates in
AbstractCheckLocalVariablesTableTest and fix
`checkLocalVariablesTable/localFun.kt` for JVM IR.

Also improved diagnosability of CheckLocalVariablesTableTest failures.
2020-01-08 18:45:40 +01:00
Alexander Udalov cc0b231b3b Convert SyntheticMethodForAnnotatedPropertyGenTest to a box test 2019-12-30 16:30:50 +01:00
Nikolay Krasko 70067bc9bf Better fix for compiler plugin test initialization
The previous one didn't work in 191.
Also revert changes in tests-common module.
2019-12-30 13:22:34 +03:00
Simon Ogorodnik 1715f1a864 [FIR] Refactoring: create use-site scopes via scope provider 2019-12-30 12:52:58 +03:00
Dmitry Petrov 76e7a9ba4a Generate instructions as text in case of other exceptions
It makes possible to analyze what causes a failure if DxChecker.check fails
2019-12-30 11:26:21 +03:00
Nikolay Krasko 4c28e0dec3 Split tests to common and platform parts 2019-12-27 16:53:17 +03:00
Nikolay Krasko 70ff3d36d0 Fix running tests in compiler plugins 2019-12-25 14:05:16 +03:00
Nikolay Krasko d575df56e9 Minor: show method key in parse error 2019-12-25 14:05:14 +03:00
Nikolay Krasko 8014a6509e Allow to mute JUnit 4 tests with parameters 2019-12-25 14:05:04 +03:00
pyos 26822a0cde Minor: IGNORE_BACKEND: ANY_FIR -> IGNORE_BACKEND_FIR: ANY
for consistency with blackbox tests.
2019-12-20 15:12:36 +03:00
pyos 2adcb5dec4 Add the ANY_FIR target for muting Fir2IrText tests 2019-12-20 13:03:39 +03:00
Nikolay Krasko 3e48494837 Proper ignore new daemon tests without warning about tests absence 2019-12-20 02:37:57 +03:00
Mikhail Glukhikh 48c74fd1ba FIR black box codegen tests: do not print bytecode to the console
#KT-35030 Fixed
2019-12-19 16:03:16 +03:00
Steven Schäfer 5d3ef4c632 JVM IR: Fix names of fake local variables for inline arguments 2019-12-18 18:50:29 +01:00
Simon Ogorodnik dd803cb650 [FIR] Fix moduleInfo module names 2019-12-16 21:21:05 +03:00
Dmitriy Novozhilov c6b9593157 [FIR-TEST] Add identity checker of old frontend and fir testdata to old FE diagnostics tests 2019-12-12 16:11:47 +03:00
Dmitriy Novozhilov e9c02a1cca [FIR-TEST] Add fir diagnostics test based on diagnostics tests from old frontend 2019-12-12 16:11:46 +03:00
Dmitriy Novozhilov 5b1f96ba1b [TEST] Add ability to exclude some testdata with pattern in test generator 2019-12-12 16:11:42 +03:00
Ilmir Usmanov df0a86ea57 Add NOP as first instruction in coroutine's try blocks
#KT-35035 Fixed
2019-12-11 15:01:41 +01:00
Nikolay Krasko 29fbb8e22f Update to 193.5233.102 release (KT-35239)
- Mute android specific import tests (KT-35225).
- Mute GradleMultiplatformWizardTest (IDEA-225878).
- Minor update of test data.
2019-12-03 17:34:47 +03:00
Nikolay Krasko fa64b5794b Allow to mute parameterized GradleImportingTestCase JUnit 4 tests 2019-12-03 17:34:46 +03:00
Alexander Udalov fd627603a0 Refactor CompilationErrorHandler
It only had one implementation THROW_EXCEPTION, inline it everywhere
with a call to a static method
2019-12-03 10:48:34 +01:00
pyos 65cc0fa463 PSI2IR: have GeneratorExtensions implement StubGeneratorExtensions 2019-12-02 17:10:04 +01:00
Mads Ager e2a1cb1077 JVM_IR: Generate fake inlining local variables for debugging. 2019-11-29 13:38:34 +01:00
Vyacheslav Gerasimov 26113b1e0f Create target directories while copying compiler.xml for tests 2019-11-28 16:02:41 +03:00
Yan Zhulanow 60a77acd7a Pill: Fix compiler tests (support both JPS build and Pill in JUnit 3 runner) 2019-11-28 20:02:40 +09:00
Jiaxiang Chen e49431a12c Debug information test: make stepping information more readable. 2019-11-26 17:59:28 +03:00
Nikolay Krasko 5d6333f0f4 193: Better services registration for parser tests 2019-11-26 15:39:27 +03:00
Jiaxiang Chen 0ea407fef9 debug information test: handle vm resume correctly. 2019-11-26 14:52:58 +03:00
Dmitriy Novozhilov 841ba6ea11 [FIR] Add generating of rawBuilder tests for light tree 2019-11-25 14:44:45 +03:00