Commit Graph

311 Commits

Author SHA1 Message Date
Alexander Udalov ca565b9c19 Move toString() from primitive ranges to Range
The same can't be done with progressions, because its toString() checks if an
increment is greater than zero, but Progression.increment is of type Number,
which is not Comparable<Int>
2014-01-27 18:33:47 +04:00
Alexander Udalov d66c5b2fbe Fix floating point number hash code in ranges
Don't make 0.0 and -0.0 have the same hash code: they are different in Java (in
the sense that "Double.valueOf(0.0).equals(Double.valueOf(-0.0))" is false),
and they are considered different already in DoubleRange.equals, which calls
Double.compare, which differentiates them
2014-01-27 18:33:46 +04:00
Alexander Udalov d427fcc187 Generate Kotlin sources of progressions
The check in DoubleProgression "if (increment == 0.0 || increment == -0.0)"
(and similar in FloatProgression) was simplified to "if (increment == 0.0)"
because 0.0 == -0.0 on JVM
2014-01-27 18:33:46 +04:00
Alexander Udalov 87a6ca5910 Generate Kotlin sources of ranges 2014-01-27 18:33:46 +04:00
Alexander Udalov f9f1065294 Rewrite built-in primitive iterators to Kotlin 2014-01-27 18:33:45 +04:00
Alexander Udalov bbdc132ccd Generate FunctionN and FunctionImplN classes in Kotlin 2014-01-27 18:33:45 +04:00
Zalim Bashorov f5499a93ed Added the checking of extra generation of tests in TestGenerator.
Dropped tests that have been registered more than once.
2014-01-27 15:34:54 +04:00
Valentin Kipyatkov 020ea99220 Intention "Convert to expression body" 2014-01-23 18:50:26 +04:00
Alexander Udalov db9d0e381b Rework BuiltInsSerializer
BuiltInsSerializer will be distributed with Kotlin compiler from now on. This
will allow to serialize binary data of built-ins on 'ant dist', as opposed to
storing all *.kotlin_class files in the repository: ant dist will just invoke
this serializer from bootstrap-compiler.jar
2014-01-22 19:11:43 +04:00
Evgeny Gerashchenko 8e442bc509 Moved test data. 2014-01-21 18:32:58 +04:00
Evgeny Gerashchenko a75490803a Test for completion of kotlin sources in java. Reused same test data. 2014-01-21 18:32:55 +04:00
Evgeny Gerashchenko e4b9c7fd40 Test for completion of kotlin binaries in java. 2014-01-21 18:32:54 +04:00
Andrey Breslav 77c340d872 Always use Project SDK 2014-01-20 20:08:28 +04:00
Pavel V. Talanov 745252c23e Formatter tests: Separate test model for tests with inverted settings 2014-01-20 19:54:27 +04:00
Andrey Breslav 8f56283771 Same storage manager used by lazy resolve session in AnalyzerFacadeForJVM and the rest of the components 2014-01-20 16:17:53 +04:00
Andrey Breslav 1af71c4dbe Using common storage manager for all lazy services 2014-01-20 16:17:53 +04:00
Evgeny Gerashchenko ae4c68830d Importing root scope without members. 2014-01-16 22:11:55 +04:00
Nikolay Krasko 0d141d959a Add tests for EA-52767 and KT-4366: "java.lang.IllegalArgumentException: Could not find a classifier for "... 2014-01-15 22:01:03 +04:00
Alexey Sedunov 786e59bbfa Implement "Override hierarchy" view 2014-01-15 16:49:39 +04:00
Alexey Sedunov e2118b7ae8 Tests for additional lazy resolve (local classes/objects in class initializers) 2014-01-15 16:49:29 +04:00
Andrey Breslav 372ab7954b Got rid of getExactlyOnePackageFragment() 2014-01-15 16:16:16 +04:00
Andrey Breslav 45bd70daec JavaPackageFragmentProvider is only accessible through JavaDescriptorResolver
We need this to guarantee that only one provider is used: either lazy or eager.
2014-01-15 16:16:16 +04:00
Andrey Breslav 924ff03c1c JavaDescriptorResolver exposed for tests 2014-01-15 16:14:43 +04:00
Evgeny Gerashchenko 1f74f02344 NamespaceFactoryImpl is abolished, since it is almost trivial. 2014-01-14 18:06:47 +04:00
Evgeny Gerashchenko 5319c6e24c LazyResolveNamespaceComparingTest → LazyResolveRecursiveComparingTest 2014-01-14 18:06:47 +04:00
Andrey Breslav 8f8b85101e All IDE code uses VirtualFileFinder instead of KotlinClassFinder + proper service discovery 2014-01-09 20:41:43 +04:00
Andrey Breslav 6c1f579c6d VirtualFileFinder and KotlinClassFinder effectively merged (through inheritance)
This is needed to implement caching of KotlinJvmBinaryClass instance inside CliVirtualFileFinder that relies on reading class headers for filtering
2014-01-09 20:41:43 +04:00
Valentin Kipyatkov 259d9fb891 Smart completion handlers tests made generated 2013-12-26 17:29:39 +04:00
Natalia Ukhorskaya f2f1a1313d Add jdk jars to kotlin classpath
#KT-4214 Fixed
2013-12-26 13:50:10 +04:00
Valentin Kipyatkov b71020efc5 Refactored reference shortening utility (added expression references shortening and rewritten to Kotlin) 2013-12-25 18:40:16 +04:00
Evgeny Gerashchenko bd4073932b Generating inner suites when dir is not empty, but has not files related to current test. 2013-12-24 23:15:28 +04:00
Andrey Breslav 230e534989 Interface JavaPackageFragmentProvider extracted 2013-12-23 21:34:38 +04:00
Evgeny Gerashchenko 2291b74bff Not generating dumb code for empty directories in testData. 2013-12-23 15:56:07 +04:00
Pavel V. Talanov 1464d1f7ad Conversion on copy paste:
Introduce tests for conversion on copy paste
Don't insert additional end of line after each converted element (not needed since converter takes care of formatting)
Add test for some of the trivial cases of conversion on copy paste
2013-12-22 16:50:01 +04:00
Pavel V. Talanov 1570a3792b Converter tests:
Change test data files extension to "java"
2013-12-22 16:49:57 +04:00
Pavel V. Talanov 82b19499e3 Converter tests:
Use generated tests approach in converter tests

Introduce two seperate generated test cases of each of configurations, all tests are generated in both test cases
Test data for plugin configuration has extension "ide.kt", for basic configuration "*.kt"
Test data file is used to determine type of the test (file/class/expression/...) instead of directory, all test data is moved accordingly
Add abstract base classes for generated tests
Rename test folder "file" to "misc" (for the lack of imagination)
2013-12-22 15:53:13 +04:00
Evgeny Gerashchenko b4dbd69d23 Using triple quotes for regexps. 2013-12-19 21:48:41 +04:00
Evgeny Gerashchenko 4f36031874 Using null instead empty string for directory. 2013-12-19 21:48:40 +04:00
Evgeny Gerashchenko 9134fc8586 Rewritten single class tests to DSL. 2013-12-19 21:48:38 +04:00
Evgeny Gerashchenko dd5766d878 Renamed some generated tests to follow conventions. 2013-12-19 21:48:38 +04:00
Evgeny Gerashchenko cd8f5fae54 Renamed some generated tests to follow conventions. 2013-12-19 21:48:37 +04:00
Evgeny Gerashchenko 7c4675a9c0 Removed unnecessary "recursive = false" 2013-12-19 21:48:37 +04:00
Evgeny Gerashchenko fa89d537fa Fixed generator class name. 2013-12-19 21:48:36 +04:00
Evgeny Gerashchenko 50d578e0ea Rewritten Generate Tests to Kotlin. 2013-12-19 21:48:36 +04:00
Evgeny Gerashchenko ac9d520946 Temporarily renamed GenerateTests.java -> GenerateTests.kt 2013-12-19 21:48:25 +04:00
Evgeny Gerashchenko b7cfd676bf Merged LoadCompiledKotlin test int LoadJavaTest. 2013-12-17 20:28:59 +04:00
Evgeny Gerashchenko 62f44f7ed0 Minor. Reordered test methods. 2013-12-17 20:28:58 +04:00
Evgeny Gerashchenko a49551dd35 Introduced getFqNameSafe method. 2013-12-17 20:28:57 +04:00
Evgeny Gerashchenko 3352d8a954 Minor. Renamed method. 2013-12-17 20:28:56 +04:00
Evgeny Gerashchenko fbd398fd8e Added test for finding subpackages in mixed Java & compiled Kotlin package. 2013-12-17 20:28:52 +04:00