Commit Graph

523 Commits

Author SHA1 Message Date
Mikhael Bogdanov c61c8d7fa0 Compilation Exception - remove duplicated this on stack
#KT-3114 Fixed
2013-02-11 15:19:49 +04:00
Alexander Udalov 620143ae5b Add test on bytecode text
Test data should be a Kotlin source file with zero or more comments e.g. of
the form: '// 1 INVOKEVIRTUAL'. The test then checks that the generated
bytecode for this file contains exactly one occurrence of the string
'INVOKEVIRTUAL'
2013-02-11 02:01:43 +04:00
Alexander Udalov b485c7ae26 Switch class loading logic in blackBoxWithJava tests
BoxWithJava tests now by default are loaded with the classloader which has
test's classpath in itself, as in the former ClassPathInTheSameClassLoaderTest
2013-02-11 02:01:42 +04:00
Alexander Udalov a61b3ec461 Move multi-file codegen testData to boxMultiFile/
There'll be an auto-generated test over this directory
2013-02-11 02:01:42 +04:00
Alexander Udalov 544aad390d Delete StdlibTest and StdlibTestForever
Move remaining tests to AnnotationGenTest (where they did belong to in the
first place)
2013-02-11 02:01:42 +04:00
Alexander Udalov 90d255e7da Simplify tests on not-null assertions
No need to call blackBoxFile() on a useless test data file. Also creating
environment logic is simplified
2013-02-11 02:01:41 +04:00
Alexander Udalov 9df3c22097 Kill blackBoxFile()
If your test is supposed to use blackBoxFile(), maybe it should be placed into
box/boxWithStdlib directory
2013-02-11 02:01:41 +04:00
Alexander Udalov 31231fe18b Move JdkAnnotationsTest to boxWithStdlib 2013-02-11 02:01:41 +04:00
Alexander Udalov f994c9924f Move FullJdk tests to boxWithStdlib 2013-02-11 02:01:41 +04:00
Alexander Udalov 714708eac7 Delete generated test cases, move testData to boxWithStdlib 2013-02-11 02:01:40 +04:00
Alexander Udalov b311255d96 Extract junit testcase, delete unneeded code 2013-02-11 02:01:40 +04:00
Alexander Udalov 8a605b3884 Codegen tests: move stdlib tests to boxWithStdlib 2013-02-11 02:01:40 +04:00
Alexander Udalov 83b93071d3 Fix over-optimized comparison with null 2013-02-11 02:01:39 +04:00
Alexander Udalov dfc45cc21e Fix Android codegen tests 2013-02-07 22:42:17 +04:00
max-kammerer 843991083d For namespaces with multiple files keep 'Compiled from' information empty 2013-02-07 18:00:53 +04:00
Natalia.Ukhorskaya 11273f3035 Implement package protected visibility 2013-02-06 21:54:19 +04:00
Natalia.Ukhorskaya 88e3b9e190 Add codegen tests for package visibility 2013-02-06 21:54:18 +04:00
Alexander Udalov 64bc79aaac Fix safe calls codegen for nullable generic 2013-02-06 17:54:30 +04:00
Alexander Udalov 433660b2ce Fix codegen of !! for nullable generics 2013-02-06 17:54:29 +04:00
Alexander Udalov 75f09b7527 Fix codegen of as-casts for nullable generics 2013-02-06 17:54:28 +04:00
Alexander Udalov 70f67c7993 Fix elvis expression in case of nullable generic 2013-02-06 17:54:27 +04:00
Alexander Udalov 8697adb28a Fix generic data class hashCode for null
Null may come from everywhere, so we always check for it (when the property's
type is not primitive)
2013-02-06 17:54:26 +04:00
Alexander Udalov 1f4dd8cd33 Add CodegenUtil.isNullableType(), fix assertions
JetType.isNullable() is not accurate when the type denotes a type parameter:
a parameter can be not null (isNullable=false), but its upper bound can be
nullable (<T: Any?>), so null may appear in the value of such type. Therefore
it's preferred to use a special check (isNullableType()) in codegen from now on

Do not generate assertion for parameters of not-null types which have a
nullable upper bound + the same with Java method calls

Also fix Intrinsics class internal name in tests

 #KT-3313 Fixed
2013-02-05 21:52:29 +04:00
Alexander Udalov 8eb6047972 Fix assertions generation for substituted members 2013-02-05 16:26:56 +04:00
Alexander Udalov 4ca522bf0e Fix codegen of do-while condition
The condition of a do-while loop can use variables declared in the loop
(variables can only be declared inside a block). Previously this behaviour
caused crash because after the block was generated, all variables declared
inside that block were gone from myFrameMap

 #KT-3280 Fixed
2013-02-04 15:30:38 +04:00
Alexander Udalov 2e64aac788 Add regression test for KT-3132
#KT-3132 Obsolete
2013-01-31 20:59:16 +04:00
Alexander Udalov 1d8e7626a1 Regenerate ranges testData 2013-01-31 20:58:22 +04:00
Andrey Breslav bbde38a6dc KT-1360 Vararg bug in front-end 2013-01-31 18:54:37 +04:00
Andrey Breslav 2d2c44ca9d KT-2106 Mixed named and positional arguments should be allowed
#KT-2106 Fixed
2013-01-31 15:43:14 +04:00
Evgeny Gerashchenko 57e985b7f1 Generated codegen tests for ranges. 2013-01-30 19:24:15 +04:00
Evgeny Gerashchenko 21c37951d6 Removed old range test which were spread all over the place. 2013-01-30 19:23:51 +04:00
Evgeny Gerashchenko b2e74b1473 Adapted code to new structure of ranges. 2013-01-29 22:55:06 +04:00
Evgeny Gerashchenko 9fa3e47b65 Added start and end property to generic range. 2013-01-29 22:55:05 +04:00
Evgeny Gerashchenko 0e0c048074 New structure of range classes. 2013-01-29 22:55:05 +04:00
Evgeny Gerashchenko 0ff3589bb9 Moved *Range.step() functions to stdlib. 2013-01-29 22:55:05 +04:00
Evgeny Gerashchenko 9b866b2e12 Implemented reversed() in proper way.
- converted it into function
- return sequence values
- implemented for sequences as well
2013-01-29 22:55:05 +04:00
Evgeny Gerashchenko c8a194c0a8 Dropped *Range.isReversed 2013-01-29 22:55:04 +04:00
Alexander Udalov 9007a6214a Fix closure's reference to outer closure
#KT-3276 Fixed
2013-01-29 22:41:58 +04:00
Alexander Udalov 2904d1745b Remove generated black box java codegen test
Move all testData to boxWithJava/
2013-01-28 18:20:41 +04:00
Alexander Udalov 86938f57b1 Remove codegen tests with Java, move testData to boxWithJava/
There'll be a single generated test class like
BlackBoxCodegenTestGenerated
2013-01-28 18:20:37 +04:00
Alexander Udalov 10c5949199 Extract some codegen tests to black box testData 2013-01-28 18:20:33 +04:00
Alexander Udalov 5313cf3bf0 Fix failing tests, copy testData
Some tests were using files that others called blackBoxFile() on. Since
those files are now moved to box/, copy them back to make the tests pass
2013-01-28 18:20:25 +04:00
Alexander Udalov 7ce62a5b64 Remove generated codegen tests, move all testData to box/
A single test file will be generated out of box/ directory
2013-01-28 18:20:21 +04:00
Alexander Udalov 41a416da60 Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be
auto-generated
2013-01-28 18:20:17 +04:00
Alexander Udalov df5b809b46 Refactor CodegenTestCase
- prohibit main(Array<String>) in favor of box(): String
- move all script-related code to ScriptGenTest
- remove unused environment-creating methods
- inline trivial methods & other minor stuff
2013-01-25 23:06:43 +04:00
Alexander Udalov 74467df3ef Sort out blackBox*() methods
- get rid of blackBox(), extract tests into files
- delete single-file usages of blackBoxMultiFile()
- inline some other blackBox methods
- suppress exception in blackBoxWithJava()
2013-01-25 23:06:42 +04:00
Alexander Udalov c8f73cfdae Remove codegen tests out of JetNpeTest 2013-01-25 23:06:42 +04:00
Alexander Udalov aa4e69de11 Remove obsolete special files from android tests 2013-01-24 21:12:28 +04:00
Alexander Udalov 0090ce3322 Refactor codegen tests: no special box() result
box() shall always return "OK"
2013-01-24 21:12:28 +04:00
Alexander Udalov de37f73c8d Remove tests on RTTI
It was never implemented
2013-01-24 21:12:27 +04:00