Commit Graph

484 Commits

Author SHA1 Message Date
Alexander Udalov def37c6830 Test generator: improve import statements in generated tests
- delete unused "junit.framework.Assert" import
- delete import of the abstract super class, because it always happens to be in
  the same package
- reorder other imports in such way that "Optimize Imports" action in IDEA will
  mostly have no effect in generated tests. However this will still happen in
  tests without any nested test cases (useless imports of InnerClasses etc.)
2014-08-25 19:00:08 +04:00
Alexander Udalov fb3ef047fc Test generator: inline the constant FQ name 2014-08-25 19:00:04 +04:00
Alexander Udalov d5d4cff701 Minor, remove dependency of everything on "descriptor.loader.java"
Everything already depends on "frontend.java" which exports
"descriptor.loader.java"
2014-08-25 17:53:18 +04:00
Pavel V. Talanov b749beb5fa Fix AnalyzerFacadeForJvm reference in GenerateInjectors 2014-08-23 12:46:31 +04:00
Pavel V. Talanov db5303c019 Implement modules in IDE
IDE:
Rewrite AnalyzerFacade and implementations for JS and JVM to support creating separate analyzers for each module
Introduce ModuleInfo which is an intermediate entity between configuration (tests or idea modules) and ModuleDescriptor
Implement IdeaModuleInfos which represent IDEA modules, sdks and libraries
Add (somewhat thin) test checking their behaviour
Implement getModuleInfo() - utility to obtain IdeaModuleInfo for PsiElement
Drop Project.getLazyResolveSession() - not possible to obtain resolve session for the whole project any more
Adjust JavaResolveExtension accordingly
KotlinSignature Intention/Marker - make sure that analyzed element is cls element (he's not in resolve scope otherwise)

LightClasses:
Create separate package light classes for each module
Java code can only reference light class from the first module among it's dependencies
Duplicate jvm signature is only reported on package declarations inside one module

Injectors:
Receive GlobalSearchScope as paramer for VirtualFileFinder and JavaClassFinder
which allows to narrow analyzer scope

JDR:
Introduce ModuleClassResolver resolves java classes in correct java descriptor resolver (corresponding ModuleDescriptor)
Add test checking that java classes belong to correct module

Debugger:
Provide context to analyze files created by debugger in

Converter:
Postprocessor now needs a context to analyze resulting code in

JetPsiFactory:
Add verification that files created by psi factory are not analyzed without context (that is almost never a good idea)

Other:
Use new API in various tests, utilities, run configuration producers and builtin serializers
Various "TODO: (module refactoring)" which mark the unfinished parts
2014-08-22 22:58:54 +04:00
Andrey Breslav 1933e30905 Test data split between compiledJava tests and compiledKotlin tests
Basically, this commit splits test data from the from java-txt-kt to two pairs java-txt and kt-txt.
This commit leads to some duplication in test data.
This is temporary: in the platform types branch the test data for LoadJava tests will be changed dramatically, so duplication will go away
2014-08-21 12:22:22 +04:00
Alexander Udalov d373c09cfb Generate REPL interpreter tests 2014-08-13 15:13:17 +04:00
Alexander Udalov 9ae95c1e5c Generate codegen tests on scripts 2014-08-13 15:13:17 +04:00
Pavel V. Talanov aa02388aa0 Merge j2k and j2k-tests modules 2014-08-12 21:13:45 +04:00
Alexey Kudravtsev 8f388c49c2 js.frontend new module 2014-08-07 08:51:10 +04:00
Alexander Udalov fb958897a9 Introduce kotlin.Cloneable
- Cloneable is a trait with a single protected member 'clone', which is mapped
  to java.lang.Cloneable on JVM
- 'clone' is non-abstract to be able to call 'super.clone()' in the
  implementations. Also if you need your class to be Cloneable, most of the
  time inheriting from Cloneable and calling 'super.clone()' will work
- hack 'super.clone()' in JVM intrinsics and TImpl delegation generation
- make arrays Cloneable, handle 'clone()' calls in the intrinsic

 #KT-4890 Fixed
2014-07-25 21:19:39 +04:00
Natalia Ukhorskaya 6440884a40 Add tests for tracing frame 2014-07-16 15:17:44 +04:00
Valentin Kipyatkov 9bd742472d Fixed KT-5339 J2K: convert Objects.equals to == and !=
Mock JDK regenerated to add java.util.Objects

 #KT-5339 Fixed
2014-07-10 23:20:38 +04:00
Evgeny Gerashchenko 479711e812 Moved current incremental compiler test data into subdirectory.
Tweaked test generator to avoid creating test methods for parent directory of tests.
2014-07-10 15:05:20 +04:00
Evgeny Gerashchenko 62bb3f8782 Renamed CodeTransformationTest -> IntentionTest. 2014-07-10 15:05:18 +04:00
Evgeny Gerashchenko fda7aeecfb Simplified CodeTransformationTest. Only one doTest method remains, intention class is moved to test data. Merged other intention tests (SpecifyTypeExplicitlyTest, ConvertToBlock/ExpressionBodyTest) into this one. 2014-07-10 15:05:17 +04:00
Evgeny Gerashchenko b1003fc034 Extracted test for "Join Lines" from CodeTransformationsTest. 2014-07-10 15:05:17 +04:00
Pavel V. Talanov 59e43020c3 Initial version of storing SourceElements in descriptors
Introduce SourceElement, JavaSourceElementFactory, DeclarationDescriptorWithSource
Implement getSource() for eager, lazy and java descriptors
2014-07-09 18:19:34 +04:00
Alexander Udalov b9fd52739f Move around some descriptor implementations
- mutable class, mutable package fragment and their dependencies go to module
  'frontend'
- ModuleDescriptorImpl and PackageFragmentDescriptorImpl are moved to the
  package "impl" in their module
2014-07-07 18:15:31 +04:00
Mikhael Bogdanov 02c6bdeaa3 Inline test data structure changed 2014-07-07 10:51:46 +04:00
Andrey Breslav 98e87f2f95 Removing unneeded "public override val" from constructors across the project
#KT-4295 Fixed
2014-07-05 18:31:55 +04:00
Pavel V. Talanov 55ae3cab19 Drop DependencyClassByQualifiedNameResolver and implementation 2014-07-03 20:46:37 +04:00
Alexander Udalov aea230d677 Introduce black box with Java codegen tests
In contrast to "black box against Java", it supports cyclic dependencies
between Java and Kotlin sources in one test case
2014-06-26 20:57:40 +04:00
Alexander Udalov 09863445bb Rename tests: boxWithJava -> boxAgainstJava 2014-06-26 20:57:40 +04:00
zarechenskiy 0355b1bd53 Implement JavaTypeSubstitutor without PSI 2014-06-24 20:06:13 +04:00
Natalia Ukhorskaya b5f6df3144 Cache bytecodes for JetCodeFragment in Evaluate Expression 2014-06-23 17:17:39 +04:00
Andrey Breslav afca70eb41 Test for nullability annotations generalized and generated 2014-06-19 22:10:57 +04:00
Andrey Breslav bb581bb645 Only normalize names when accessing PSI, not earlier
#KT-4833 Fixed
2014-06-19 22:10:52 +04:00
Andrey Breslav d25b2459d4 Report clashing signatures in the IDE
Expose extra diagnostics about platform signature clashes from light class data

 #KT-1 In Progress
2014-06-19 22:10:45 +04:00
Evgeny Gerashchenko aa41ae09ed Merge remote-tracking branch 'origin/master' into incremental 2014-06-19 11:43:59 +04:00
Evgeny Gerashchenko 205f99bf60 Made incremental compilation test auto-generated. 2014-06-18 22:56:42 +04:00
Evgeny Gerashchenko a82849f289 Removed member filter from injectors. 2014-06-18 22:56:33 +04:00
Evgeny Gerashchenko ca1ee69e4c Loading descriptors from incremental cache instead of package classes. 2014-06-18 22:56:33 +04:00
Alexander Udalov ad23a2d05b Fix equals and hashCode for empty ranges and progressions
Empty range is equal to any other empty range
2014-06-18 20:35:25 +04:00
Alexander Udalov 751f062f23 Add *Range.isEmpty(), *Progression.isEmpty() 2014-06-18 20:22:24 +04:00
Evgeny Gerashchenko 7fdd4a339e KT-5087 Private members of Java classes should be marked as invisible, not unresolved
#KT-5087 fixed
2014-06-18 19:52:15 +04:00
Andrey Breslav fe09bd4fd8 Tests for annotation deserialization when platform names are used 2014-06-10 18:21:37 +04:00
Valentin Kipyatkov 6b11a5b3d9 Java to Kotlin converter: no more 2 conversion modes for each test, just a few tests to test non-standard settings 2014-06-10 14:26:51 +04:00
Evgeny Gerashchenko c7318b3880 Added slashes in generated tests when they are invoked on directory.
This makes it easier to find directory for test using IDEA's go to file/search everywhere features.
2014-06-06 14:33:21 +04:00
Alexey Sedunov 4a5d2e6728 Add tests for element -> pseudo-value mapping 2014-06-03 18:17:07 +04:00
Nikolay Krasko f1f13d1f2a Show members from supertypes in file structure view (KT-4448)
#KT-4448 Fixed
2014-05-30 00:04:06 +04:00
Nikolay Krasko dfd66440b4 Tests for file structure 2014-05-30 00:04:03 +04:00
Zack Grannan b2858e5b82 Added ConvertToConcatenatedStringIntention 2014-05-23 16:27:46 +04:00
Pavel V. Talanov c9eb313ec4 Add MultiFileHighlightingTest which checks that other files are not parsed during highlighting 2014-05-21 15:40:30 +04:00
Pavel V. Talanov fbf2cded0d Refactor AbstractMultiFileJvmBasicCompletionTest to extend CompletionTestCase
Extract common code from JetFixtureCompletionBaseTestCase to CompletionTestUtil.kt
Reason for this change is that I couldn't get the check that prohibits tree loading to work with fixture test case
2014-05-21 15:40:12 +04:00
Pavel V. Talanov fd3d322300 Add LazyResolveByStubTest
Tests that lazy resolve uses stubs instead of AST
2014-05-21 15:40:05 +04:00
Alexander Udalov 54c21ffbf3 Delete K*FunctionNImpl classes
In favor of KFunctionImpl, KMemberFunctionImpl and KExtensionFunctionImpl
2014-05-19 19:50:59 +04:00
Alexander Udalov 5488a8402f Move and rename KFunctionImpl classes
Move from package "kotlin.reflect" to "kotlin.reflect.jvm.internal". They are
internal detail of the compiler and should not be used directly (especially now
that "kotlin.reflect" is in default import paths).

Also rename "KFunctionImplN" to "KFunctionNImpl", because this name makes more
sense
2014-05-19 19:50:58 +04:00
Alexander Udalov 51a16fe491 Drop FunctionImplN and ExtensionFunctionImplN
We have FunctionImpl and ExtensionFunctionImpl classes now (2 classes, not 46)
2014-05-19 19:50:58 +04:00
Alexander Udalov 0c2c203e96 Move KFunctionN classes to package "kotlin.reflect" 2014-05-19 19:50:57 +04:00