Commit Graph

113 Commits

Author SHA1 Message Date
Kirill Rakhman 5bbec23123 [Test gen] Consolidate file reads for checking directives 2024-02-28 15:20:30 +00:00
Kirill Rakhman 3c23319f70 [Test gen] Remove duplicate checks if file is equal to some string 2024-02-28 15:20:30 +00:00
Kirill Rakhman cba65d7186 [Test gen] Reduce string copying 2024-02-28 15:20:30 +00:00
Kirill Rakhman 7ca6624af4 [Test gen] Reduce Kotlin reflection usage 2024-02-28 15:20:30 +00:00
Marco Pennekamp 708ed81eb2 [Test] Avoid importing unused @Nested annotations in generated tests
- Unused `Nested` imports frequently cause unused import warnings in the
  IDE, which are especially annoying in after-commit warning/error
  analysis.
2024-02-27 20:30:06 +00:00
Dmitriy Novozhilov d9beae0556 [Test] Change indent from four to two spaces in generated tests
This is needed to reduce the size of generated test files, which started
  to exceed default IDE limit
2024-02-16 12:48:24 +00:00
Dmitriy Novozhilov 9b5a9ccba8 [Test] Don't generate throws Exception on methods of generated tests
This is needed to reduce the size of generated test files, which started
 to exceed default IDE limit
Also update some (mostly old) test utilities to remove exceptions from
 java signatures
2024-02-16 12:48:24 +00:00
Evgenii Mazhukin 20af98c776 [Tests] Re-enable K1 IC tests for expect-actual
^KT-60831 fixed
^KT-60831 next step KT-63183


Merge-request: KT-MR-12855
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com>
2023-11-06 19:46:43 +00:00
Svyatoslav Kuzmich 0295057520 Refactor: extract test generation regexp into a common util object 2023-10-12 13:26:58 +00:00
Alexander.Likhachev 6eaccc997f [Build] Fix the typo junit jupyter -> jupiter 2023-09-06 22:47:34 +00:00
Alexander.Likhachev 6f96be0b76 [Build] Get rid of the testApiJUnit5 method
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 53fde520d5 [Build] Add jUnit dependencies in testApiJUnit5 to the implementation configuration
Adding these dependencies to the `api` configuration pollutes classpath for each dependant modules even if it doesn't need them. Instead, the dependencies should be declared more granularly if they're required
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 357d12fc8e [Build] Move JUnit dependencies into the version catalog
The `kotlin-test` dependencies are left untouched as changing them affects publications, thus these versions are independent from the used inside our build
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Kirill Rakhman bb8a46c3a0 [Test] Parallelize test generation 2023-08-28 08:02:05 +00:00
Bogdan Mukvich 2472999242 Fail generateTests when testData directory is empty
When switching git branches, there might be some empty directories left
This causes generateTests to pass locally with no changes and fail on CI
2023-08-25 15:23:40 +00:00
Dmitrii Gridin 60dc0ace47 [LL FIR] add script tests for AbstractClassIdTest
^KT-60728
2023-07-27 12:02:04 +00:00
Pavel Punegov 487a441efc [K/N][test] Fix annotation model generator for use with arrays
Generator should write arrays as java array with values, not its class
2023-04-26 13:20:21 +00:00
Ilya Chernikov fa0cda6236 FIR JS: enable full JS box tests with FIR 2022-11-12 14:34:07 +01:00
Vladimir Sukharev c8864369fd Use main class as test generator name
Merge-request: KT-MR-7031
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-09-09 12:51:18 +00:00
Nikita Bobko 2a4f3f41aa 2/5 Replace source dependency on kotlin-reflect with binary dependency
Review: https://jetbrains.team/p/kt/reviews/6753

Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.

Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276

Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
2022-08-22 15:43:49 +02:00
Nikita Bobko 0874fb71c6 Replace all kotlin-reflect-api dependencies with kotlin-reflect
Review: https://jetbrains.team/p/kt/reviews/6753

Why: I'm going to replace source dependency on kotlin-reflect with
binary dependency. Normalize reflect dependency before global
processing.
2022-08-22 15:43:11 +02:00
Dmitry Savvinov c1e21f5b8f [mpp, tests] Add infrastructure for *Generated KPM Core tests 2022-08-12 12:34:14 +02:00
Dmitriy Novozhilov 543675d99d [Test] Don't fail generation of tests if License file not found 2022-04-08 09:42:02 +00:00
Ilya Kirillov 4530041cbb Analysis API: move reference resolve testsdata with errors to dedicated folders 2022-01-31 21:12:30 +01:00
Dmitriy Dolovov 18cd07ea5f [Test] Fix proper use of annotation parameter names in generated classes
When an annotation parameter has a different name than "value" or there is more than one annotation parameter we need to specify annotation parameter names explicitly in generated Java source code.

Fix using classes as annotation parameters in generated classes
2022-01-28 16:23:35 +03:00
Evgeniy.Zhelenskiy df1de3a7d3 [JVM] Forbid non-JvmInline value classes again 2022-01-14 13:51:56 +00:00
Evgeniy.Zhelenskiy 7595f798e1 [JVM] Introduce MF Value Classes to frontend 2022-01-14 13:51:55 +00:00
Ilya Kirillov 5c22a03e82 FIR IDE: simplify test generation dsl 2022-01-02 21:56:51 +03:00
Ilya Kirillov 40fdb26569 Analysis LC: introduce Symbol LC tests 2021-12-27 16:23:18 +03:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Evgeniy.Zhelenskiy ec2e96f3e4 Regenerate inline class tests as 1 arg value classes 2021-12-15 17:14:22 +00:00
Dmitriy Dolovov 60dcafcf43 [Test] TestGen: Use canonical class names for generated imports
This is needed to have correct class names for inner/nested classes. For example, to have `import java.util.AbstractMap.SimpleEntry` instead of `import java.util.AbstractMap$SimpleEntry`.
2021-12-14 13:48:23 +03:00
Evgeniy.Zhelenskiy 1874318954 [Tests] Windows regeneration does not change tests 2021-12-13 17:54:15 +03:00
Evgeniy.Zhelenskiy b1d1f87318 [Tests] Introduce reversible source file preprocessor 2021-12-10 18:19:17 +03:00
Evgeniy.Zhelenskiy cb4ec932d7 [Tests] Introduce replacing source transformer 2021-12-10 18:19:17 +03:00
Evgeniy.Zhelenskiy cd1d77e760 [Tests] Regenerate tests with correct postfix 2021-12-10 18:19:17 +03:00
Evgeniy.Zhelenskiy 2874462e3a [Tests] Introduce transformers functions object 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy c27b647ce8 [Tests] Native tests runTest applies source transformers 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy 9b196c738f [Tests] Generify transforming tests method model 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy e62c6e3eac [Tests] All tests correct generation 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy f0af2487c7 [Tests] Replace @JvmInline with actual OPTIONAL_JVM_INLINE_ANNOTATION 2021-12-10 18:19:16 +03:00
Evgeniy.Zhelenskiy f92290dfdf [Tests] Generate runTest with transformer parameter + example 2021-12-10 18:19:15 +03:00
Ilya Kirillov 82db5fa443 Analysis API: refactor test generation dsl 2021-11-17 20:55:09 +01:00
Dmitriy Dolovov e7caaa464e [Test] Fix using classes as annotation parameters in generated classes 2021-11-11 12:32:53 +03:00
Dmitriy Novozhilov e56c87a17a [Build] Move utils for generation JUnit 5 tests to :generators module 2021-10-12 17:26:18 +03:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Ilya Kirillov 5b38bd2be2 FIR IDE: fix generators after changing analysis api packages 2021-09-15 11:32:47 +02:00
Dmitriy Novozhilov c2e2068682 [Test] Add ability to mark group of tests with specific tags
Currently tags can be applied to all tests in specific testdata
  directory by placing `_tags.txt` file in it, where all tags should
  be listed on separate lines. Test generator adds those tags to
  corresponding generated test classes with `@Tag` annotation

Please note that is applicable only to JUnit 5 tests
2021-08-01 22:23:41 +03:00
Ilya Kirillov 75331b3448 FIR IDE: abstract low-level-api from dependency on idea 2021-06-20 22:07:11 +02:00