Commit Graph

1149 Commits

Author SHA1 Message Date
Mikhail Zarechenskiy 4b4525ec17 Support !LANGUAGE directive in signature tests 2018-02-05 12:07:39 +03:00
Ilya Gorbunov c06204d0d4 Remove obsolete test classpath helpers 2018-02-02 17:59:29 +03:00
Ilya Chernikov 058ef31d7a Fixes after review 2018-01-30 17:06:16 +03:00
Ilya Chernikov 05f0978865 Fix after review 2018-01-30 17:06:14 +03:00
Ilya Chernikov 0b63e11ea8 Replace android sdk dependencies with custom project build, cleanup update_dependencies.xml 2018-01-30 17:06:11 +03:00
Ilya Chernikov 361d8536ac Switch ant usages to regular dependency 2018-01-30 17:06:10 +03:00
Ilya Chernikov 486c3a2aff Do not depende on the ideaSdk location in integration tests
assume that tests are always run from the project's root
2018-01-30 17:06:10 +03:00
Mikhael Bogdanov 8bfd6d7404 Support JVM_TARGET in diagnostic tests 2018-01-26 10:09:20 +01:00
Mikhael Bogdanov 2340756b88 Minor. Reformat 2018-01-26 10:09:20 +01:00
Alexander Udalov 907f53e539 Refactor ConstantValue implementations
Remove KotlinBuiltIns and take a ModuleDescriptor instance in getType
instead. This will allow to create constant values in contexts where
there's no module or built-ins accessible (such as, deserialization of
module annotations during indexing of .kotlin_module files in IDE).

Note that some values (KClassValue, EnumValue, AnnotationValue) still
take module-dependent objects (KotlinType, ClassDescriptor and
AnnotationDescriptor respectively). This is to be refactored later
2018-01-18 12:49:38 +01:00
Mikhael Bogdanov 7f1cc81d39 Support test directives in android tests 2018-01-18 10:08:58 +01:00
Dmitry Petrov 432c743771 Formatting: ir.tree and some common code 2018-01-17 12:31:07 +03:00
Dmitry Petrov 2f09c51dca Formatting: IR test classes 2018-01-17 12:31:07 +03:00
Cuihtlauac Alvarado c5982e7ff5 Avoid pick environement variables test failures (#1467)
Remove all lines containing a "Picked up <ENVIRONMENT_VARIALBE>: ..."

Remove empty ERR: section

FIX: KT-22241
2018-01-16 12:33:19 +01:00
Nikolay Krasko 4c09a6cf06 Allow different diagnostics in Javac tests - workaround for IDEA-184289 2018-01-12 13:54:42 +03:00
Nicolay Mitropolsky a278e4ccef Fixing non-running tests, that used MockApplication environment 2018-01-12 13:54:25 +03:00
Nicolay Mitropolsky 7758875955 EdtTestUtil.runInEdtAndWait fix for proper user action emulation
changed because `com.intellij.ide.IdeEventQueue` doesn't consider events from `SwingUtilities.invokeAndWait` as user interaction
2018-01-12 13:53:42 +03:00
Vyacheslav Gerasimov 35fa8efbf3 Fix compilation after moving to idea 173 2018-01-12 13:52:52 +03:00
Dmitry Jemerov 86c10b635a Initial implementation of method separators
#KT-13029 Fixed
2018-01-10 13:17:33 +01:00
Alexey Tsvetkov fec2d08d22 Compile actual and expected declarations together
#KT-20840 fixed
2017-12-22 16:12:19 +03:00
Mikhael Bogdanov b65dcf27ee Provide test source mapping data for separate and non-separate compilation
Compilation in same module or in separate ones
2017-12-21 12:52:28 +01:00
Mikhael Bogdanov 4017195ff1 Always include stdlib in IrTests 2017-12-20 10:48:38 +01:00
Mikhael Bogdanov ef433d163e Apply common header directives to second file in AbstractCompileKotlinAgainstKotlinTest 2017-12-19 16:11:39 +01:00
Alexander Udalov c5c4c9cfcc Support "-module-name" argument for common code compiler
#KT-20892 Fixed
2017-12-13 11:49:58 +01:00
Denis Zharkov ac56965a99 Do not force loading all kt-files inside LazyPackageDescriptor constructor
Effectively it leads to all stubs being built for any once used package

The idea is that they only were used for FILE_TO_PACKAGE_FRAGMENT
that is mostly read in backend and rarely in the IDE, so we can replace
its usages with searching through related package-fragments
2017-12-07 12:53:33 +03:00
Alexander Udalov 7248f2568a Drop USE_NEW_INFERENCE, configure language version settings in KotlinTestUtils
This will only have effect for tests which do not use their own instance
of LanguageVersionSettings though
2017-12-01 13:35:25 +01:00
Dmitry Petrov d976eeabf7 Refactor GenerationState creation 2017-11-29 12:17:06 +03:00
Mikhail Zarechenskiy 81b3fefa58 Improve test framework for diagnostic tests with NI
Mark with `NI;` or `OI;` only diagnostics that are specific for concrete inference
2017-11-29 02:49:31 +03:00
Ilya Gorbunov 4f76cdfc34 Use new annotations in mutability tests instead of old ones 2017-11-28 17:45:10 +03:00
Mikhael Bogdanov f529069077 Move common test parts to tests-common. Minify test jar dependencies 2017-11-28 11:04:39 +01:00
Pavel V. Talanov cdfdc1d19b Refactor script definitions loading
Make ScriptDefinitionProvider an interface
    and provide different implementation for cli and IDEA
Rework ide extension point to a simpler interface (ScriptDefinitionContributor)
Move template loading logic into a top level function
Allow script definitions to be reloaded in IDE
2017-11-14 16:30:33 +03:00
Mikhail Zarechenskiy 28e539b158 Simplify CompilerTestLanguageVersionSettings: merge two maps into one 2017-11-13 16:27:26 +03:00
Mikhail Zarechenskiy cd2d32d92a Set up specific LV settings for compiler tests
For example, to configure NI

(cherry picked from commit e0c6aec)
2017-11-13 16:27:25 +03:00
Mikhail Zarechenskiy 91a6591b70 Load compiler language version settings for resolved calls tests 2017-11-13 16:27:24 +03:00
Mikhail Zarechenskiy 20bf238006 Load compiler language version settings for codegen tests 2017-11-13 16:27:23 +03:00
Mikhail Zarechenskiy 85d442133d Load compiler language version settings for foreign annotations tests
To set specific features for compiler tests
2017-11-13 16:27:22 +03:00
Mikhail Zarechenskiy ef1d1ef946 Enable new inference feature by system property for tests only 2017-11-13 16:27:19 +03:00
Mikhail Zarechenskiy fbbe396881 Add configuration key to enable new inference for compiler tests 2017-11-13 16:27:18 +03:00
Mikhail Zarechenskiy 84ac5a3e22 Use separate directive to check results of descriptor renderer for NI 2017-11-13 16:24:33 +03:00
Mikhail Zarechenskiy 0410287cf9 Add flag to force loading old inference diagnostics 2017-11-13 16:23:05 +03:00
Mikhail Zarechenskiy 6486c8dccc Add ability to reuse one diagnostic test file for old and new inference 2017-11-13 16:23:05 +03:00
Mikhail Zarechenskiy 73b4e24d54 Introduce language feature for NI, remove old setting 2017-11-13 16:23:04 +03:00
Alexander Udalov d26486b7df Move JvmRuntimeDescriptorLoaderTest to core/descriptors.runtime/tests
This allows to get rid of the dependency on descriptors.runtime from
compiler/IDE tests which is problematic: classes there clash with the
classes in kotlin-reflect, which reference declarations in shadowed
packages
2017-11-10 18:58:31 +01:00
Alexander Udalov 51e00eb05e Move descriptors.runtime sources to package kotlin.reflect.jvm.internal
To make it obvious that this is a part of kotlin-reflect and should not
be packed into the compiler jar. Also copy 'classId' utility to
AbstractLocalClassProtoTest to minimize dependencies on
kotlin.reflect.jvm.internal

Note that the module itself is still needed and can't be merged into
kotlin-reflect because of the way it's used in
AbstractJvmRuntimeDescriptorLoaderTest
2017-11-10 18:58:31 +01:00
Simon Ogorodnik 0a4860b4d7 Add instrumentation to locate not cleared MockApplication 2017-10-31 20:25:00 +03:00
Alexander Udalov fbda2a4343 Do not use MockLibraryUtil in AbstractTopLevelMembersInvocationTest
MockLibraryUtil runs the compiler in the new class loader, which is
useful for IDE tests to avoid loading KotlinCoreEnvironment, but is not
needed and is suboptimal for compiler tests.

Also use another method in AbstractForeignAnnotationsTest to assert that
there are no files in the compiled libraries
2017-10-31 07:36:46 +01:00
Alexander Udalov a64fc10e94 Extract compiler-executing code in AbstractCliTest to CompilerTestUtil 2017-10-31 07:36:46 +01:00
Alexander Udalov 33549362cb Move compiler/tests-common/{src -> tests}, adjust dependencies 2017-10-31 07:36:45 +01:00
Alexander Udalov c2276e2ccb Rename module ':compiler.tests-common' -> ':compiler:tests-common' 2017-10-31 07:36:45 +01:00