Commit Graph

103 Commits

Author SHA1 Message Date
Alexey Andreev 9c7c82b151 KT-2752: refactor NameSuggestion, change rules for determining name stability and applying mangling 2016-10-08 19:25:50 +03:00
Nikolay Krasko 4fd0424b38 Auto-remove local debugger caches on test data modification
(cherry picked from commit 59c28e4)
2016-10-07 13:06:02 +03:00
Denis Zharkov e05e0ec921 Optimize method count for collection stubs
Do not generate stubs if they're already present in superclasses

 #KT-13698 In Progress
2016-10-07 11:59:15 +03:00
Nikolay Krasko 019ba77e2b J2K: AbstractBytecodeTextTest.java fix compile errors
(cherry picked from commit 02b59be)
2016-10-05 18:49:38 +03:00
Nikolay Krasko 32dff799ff J2K: AbstractBytecodeTextTest.java convert
(cherry picked from commit 93fce11)
2016-10-05 18:49:38 +03:00
Nikolay Krasko 5a873432d9 J2K: AbstractBytecodeTextTest.java rename
(cherry picked from commit 8edd7be)
2016-10-05 18:49:38 +03:00
Nikolay Krasko aae0b85684 Refactoring: hide state of occurrence class
(cherry picked from commit 4f438bc)
2016-10-05 18:49:38 +03:00
Nikolay Krasko 3d9d6e666d Test several line numbers are generated for one instruction
(cherry picked from commit 1ea9280)
2016-10-05 18:49:38 +03:00
Dmitry Jemerov d8b0c7aaec Binding trace filtering: do not calculate diagnostics if no one is going to query them 2016-10-04 18:50:30 +02:00
Alexander Udalov df680305ba Improve diagnostic message for UNSUPPORTED_FEATURE
Render lowercase words separated by spaces instead of CamelCase in the
diagnostic message
2016-10-04 10:24:43 +03:00
Alexander Udalov 73652f309f Do not create synthesized equals/hashCode/toString in data classes in compatibility mode
To simplify migration from 1.0 to 1.1, do not allow data classes to
automatically implement abstract equals/hashCode/toString declared in
super-interfaces (KT-11306) if "-language-version 1.0" is specified
2016-10-04 10:24:41 +03:00
Michael Bogdanov 7a5c211e8b Throw jvm-specific error on file compilation 2016-10-03 14:06:02 +03:00
Alexander Udalov 9d778711d2 Support rendering contents of different modules in load* tests
This is needed because otherwise with separate modules turned on in the
compiler, these tests do not display the contents of classes from the
dependency module in the rendered output
2016-10-02 21:03:38 +03:00
Alexander Udalov 3314725700 Pass GlobalSearchScope instance to JvmPackagePartProvider
Currently behavior is unchanged because the "all project" scope is passed,
however in the future this will allow to implement separate modules in the
compiler properly
2016-10-02 21:03:37 +03:00
Alexander Udalov 54dfe760c0 J2K JvmResolveUtil & GenerationUtils: convert & prettify 2016-10-02 21:03:36 +03:00
Alexander Udalov 12205016bc J2K JvmResolveUtil & GenerationUtils: rename .java -> .kt 2016-10-02 21:03:36 +03:00
Alexander Udalov 0ed9897b03 Minor refactorings related to PackagePartProvider and implementations
- Document what exactly should findPackageParts return
- Make EMPTY a named object instead of a val in the companion
- Do not use JvmPackagePartProvider in tests where Empty works fine
- Add a couple default values to arguments of setupResolverForProject
2016-10-02 21:03:34 +03:00
Alexander Udalov 74d6ef73d4 Prevent double initialization in codegen tests, fix ScriptGenTest#testDependentScripts
Add an assertion to prevent duplicate initialization of CodegenTestFiles
instance in CodegenTestCase, which was happening in ScriptGenTest with multiple
invocation of loadFile()
2016-10-02 21:03:28 +03:00
Alexander Udalov a5a874f23f Move module creation into TopDownAnalyzerFacadeForJVM#analyzeFilesWithJavaIntegration
The only place where the logic has changed is in AbstractDiagnosticsTest, where
modules are already created and sealed before the analysis. Copy-paste the
container creation logic there (it's almost fine because it's also present in a
bunch of other tests), and simplify it: get rid of incremental compilation and
other stuff irrelevant for diagnostic tests.

This is needed to make analyzeFilesWithJavaIntegration configure the module
properly before sealing it
2016-10-02 21:03:27 +03:00
Alexey Andreev a18f5eca2d JS: move more test to box tests 2016-09-29 12:00:41 +03:00
Pavel V. Talanov 32daf048c2 PlatformConfigurator: create container for each platform (it contains static services, mostly checkers) ahead of time 2016-09-26 14:42:57 +03:00
Nikolay Krasko 0abf94c2f4 Allow to avoid rebuilding application in debugger tests on local machine
(cherry picked from commit 8b899a7)
2016-09-24 01:44:40 +03:00
Nikolay Krasko 520e187e46 Clean application after test in compiler tests
It's disposed after Disposer.dispose(myTestRootDisposable) in tearDown and mixing compiler tests
with non-compiler tests may ruin classes initialization with

"com.intellij.util.IncorrectOperationException: Sorry but parent: com.intellij.mock.MockApplicationEx@52439591 has already been disposed"

(cherry picked from commit f3badb6)
2016-09-24 01:44:38 +03:00
Mikhail Zarechenskiy 2fc8f5d5e2 Move util function closer to its usage and remove empty file 2016-09-20 16:23:43 +03:00
Mikhail Zarechenskiy 8a0107ea5f Move property with template to script definition interface 2016-09-20 16:23:42 +03:00
Mikhail Zarechenskiy 7739677a06 Adapt ScriptCodegenTests to last changes
Get rid of possibility to configure script definition without template
class, therefore all tests now are using default script argument
2016-09-20 16:23:41 +03:00
Mikhail Zarechenskiy b18cbc37c6 Do not generate properties from script constructor
From now all script parameter properties are generated by template class
2016-09-20 16:22:42 +03:00
Nikolay Krasko 4b9b3b07e7 Update to 162.1447.7 2016-09-20 15:26:53 +03:00
Nikolay Krasko 7d1a5f1d2b Tests only: add new method in MockPsiManager.java 2016-09-20 15:10:51 +03:00
Nikolay Krasko c7ac8e1650 Tests only: implement new method 2016-09-20 15:10:42 +03:00
Nikolay Krasko 99ed926554 Tests only: reparseRange parameters changed
https://github.com/JetBrains/intellij-community/commit/94863a8df423d3568167f709371d42c7410d0946
2016-09-20 15:10:38 +03:00
Dmitry Petrov 796d11c860 ClassDescriptor is now a super-interface for ClassConstructorDescriptor and TypeAliasConstructorDescriptor. 2016-09-20 10:55:36 +03:00
Denis Zharkov 1cc7f19d10 Fix AnnotationDescriptorResolver tests
Do not run annotation resolver tests on lambda parameters,
mostly because it's impossible to annotate them by now
(see KT-13900 and `val functionLiteral` in compiler/testData/resolveAnnotations/testFile.kt)

It was working before only because lambda parameter hadn't been parsed at all,
while after introduction of destructuring in lambda parameters
it gets parsed normally

 #KT-13900 Submitted
2016-09-19 20:22:57 +03:00
Alexander Udalov aec31bd88f Uninherit LanguageVersion from LanguageFeatureSettings
Introduce LanguageVersionSettingsImpl to store everything related to the
selected language version
2016-09-19 15:20:47 +03:00
Yan Zhulanow 471ddc5a93 Kapt: Write annotations with the "SOURCE" retention if kapt2 is enabled
(cherry picked from commit 6177b2b)
2016-09-10 17:36:15 +03:00
Michael Bogdanov a12d7b6019 Check lambda inlining in package part files in test framework 2016-09-07 12:01:47 +03:00
Yan Zhulanow 9960e7f7cd Kapt: Get rid of the 'compiler-tests' dependency in 'plugins-tests'
(cherry picked from commit bb370f1)
2016-08-29 16:31:16 +03:00
Ilya Gorbunov 403e2ab4ea Redefine configuration kinds, so that the most of test dependent on JDK_ONLY now use mock kotlin runtime:
MOCK_RUNTIME -> JDK_ONLY
JDK_ONLY -> JDK_NO_RUNTIME
2016-08-17 12:40:50 +03:00
Pavel V. Talanov cdbd7fbab0 Refactor: split classes in 'asJava' package into several subpackages to reflect their structure 2016-07-28 18:00:47 +03:00
Dmitry Jemerov 82babaff7e to reduce VM contention between JVM with tests and JVM with Ant, run Ant with -Xmx128m 2016-07-18 16:56:46 +02:00
Michael Bogdanov 93f6761671 Print bytecode on linenumber test fail 2016-07-09 07:45:57 +03:00
Alexander Udalov a533f8597d Fix debug names for some slices
Also move RUNTIME_ASSERTION_INFO and LOAD_FROM_JAVA_SIGNATURE_ERRORS to a
single class for simplicity
2016-07-05 18:18:26 +03:00
Ilya Chernikov 55e084db8e Refactor script resolving interface again
- remove Future from resovler since the idea need additional considerations
- simplify script contents interface
 -extend script dependencies with additional javaHome property
2016-06-30 21:32:40 +02:00
Ilya Chernikov dfec16d8e0 Refactor script resolving interface
- return Future from resovler
- pack script contents data to a separate interface
 -extend script dependencies with additional scripts property
 - minor renames and moves
2016-06-30 21:32:39 +02:00
Alexander Udalov 1690dcd8df Refactor FakeCallResolver and usages
Remove useless overload, inline another to the single usage in tests, make some
parameters non-null
2016-06-30 21:29:23 +03:00
Ilya Chernikov 4f05f839a3 Add previous imports to resolving interfaces to enable effective caching implementations 2016-06-25 22:24:45 +03:00
Ilya Chernikov 64bb47ed37 Switch to File instead of String for classpaths in script dependencies 2016-06-25 22:24:30 +03:00
Ilya Chernikov 082290f8e3 Refactor script dependencies management 2016-06-25 22:24:23 +03:00
Ilya Chernikov 402e8c1e3e Add dependency from annotation extraction mechanisms to the prototype, with tests 2016-06-25 22:24:14 +03:00
Alexander Udalov b4f81d4bb5 Use 'JVM_TARGET: 1.8' directive in codegen tests on 1.8 target 2016-06-16 16:51:18 +03:00