Commit Graph

50 Commits

Author SHA1 Message Date
Alexander Gorshenev 1d265bc50c Here goes stdlib separation.
$ gradlew backend.native:stdlib

builds you stdlib.kt.bc now.

The test runs are taught to supply
-library stdlib.kt.bc to kotlin compiler for proper imports resolution,
and then later stdlib.kt.bc is provided to clang for the final link step.
2016-11-18 19:11:38 +04:00
Konstantin Anisimov c1bb762417 TESTS: "for" and INSTANCEOF, NOT_INSTANCEOF, isInstanceOf on interface are added 2016-11-18 16:22:27 +03:00
Konstantin Anisimov 9c28555e55 Test for cast added 2016-11-18 15:47:28 +03:00
Vasily Levchenko f588814927 tests: disable method_call test until #74 won't be applied 2016-11-18 13:56:14 +03:00
Nikolay Igotti fa7bcd90e3 Remove duplicated test. 2016-11-17 14:27:45 +03:00
Konstantin Anisimov f80697817e Test for getters/setters added 2016-11-17 12:25:12 +03:00
Svyatoslav Scherbina 5db25a3985 backend: add tests for duplicated string literals 2016-11-17 12:17:47 +07:00
Nikolay Igotti 16a44ef765 Fix test that would require autoboxing. 2016-11-16 16:28:25 +03:00
Nikolay Igotti 26e8b4860a Enable array1 test. 2016-11-16 16:24:33 +03:00
Nikolay Igotti 0f12daa591 Fix expectations. 2016-11-16 11:23:05 +03:00
Svyatoslav Scherbina 1ff59e2cd2 backend: add some trivial tests for RTTI 2016-11-16 14:58:57 +07:00
Nikolay Igotti db15540a74 Review feedback on previous changes. (#64) 2016-11-16 10:46:56 +03:00
Nikolay Igotti c5cfa0ac4f Add String.subSequence implementation. (#61) 2016-11-15 13:27:21 +03:00
Konstantin Anisimov 04822dda69 Tests for integer cmp operation added 2016-11-15 09:41:25 +03:00
Nikolay Igotti ae5e838305 Add overrides by name. (#54) 2016-11-14 13:25:50 +03:00
Konstantin Anisimov fa3943c8bd TEST: enabled hello2 test case 2016-11-11 17:43:44 +03:00
Nikolay Igotti 4b7f67d976 Fix array accessor signatures, add array test to fix. 2016-11-11 16:21:48 +03:00
Svyatoslav Scherbina edf3708515 build: fix linking tests on Linux
runtime now requires "-lm"
2016-11-11 19:22:34 +07:00
Svyatoslav Scherbina bee2a76008 build: refactor platform checks
also improve verbosity when downloading dependencies fails
2016-11-11 19:22:34 +07:00
Nikolay Igotti 720947facb Alloc arrays, fix RTTI for Any (#49) 2016-11-11 15:03:49 +03:00
Nikolay Igotti af85121b2c Add primitive types to String conversion. (#50) 2016-11-11 14:16:15 +03:00
Konstantin Anisimov a910627357 tests: added eqeq test
tests: sum-test: emproved test sum of int with various types of second argument (byte, short and etc)
tests: hello2 minor fix in test
2016-11-10 15:25:08 +03:00
Nikolay Igotti 00fdc90d43 Hack to run tests on Linux. 2016-11-08 18:31:45 +03:00
Nikolay Igotti 91035b692b Add more console operations, nicer naming in natives. (#46) 2016-11-08 17:38:36 +03:00
Alexander Udalov a7bef2d0ee Lower priority of compiler built-ins in resolution (#43)
* Remove unneeded module context creation in K2Native

Calling this method is useful only when its result is used

* Use JvmAbi from compiler instead of reflection implementation

Package "kotlin.reflect.jvm.internal.impl" is internal implementation detail of
kotlin-reflect and should not be used

* Run native back-end with "-ea"

This allows to get more detailed messages in case something fails

* Lower priority of compiler built-ins in resolution

CREATE_BUILT_INS_FROM_MODULE_DEPENDENCIES makes sure that the "built-ins" that
the compiler front-end uses during the resolution are loaded from the module
being resolved itself, i.e. from its sources and/or dependencies. E.g. if
there's a class named kotlin.Any in module sources, it'll become the default
supertype for any class without an explicit supertype.

ADD_BUILT_INS_FROM_COMPILER_TO_DEPENDENCIES adds the built-ins from the
compiler jar to the end of the dependencies list of the module being resolved.
This option makes sure that if there's no built-in class in module
sources/dependencies and it is required by the front-end, the class definition
from the compiler jar will be taken instead of failing with an exception.

If both of these options are turned on, the effect is basically that compiler
built-ins are still there in the classpath, but have a lower priority than
classes explicitly declared in sources
2016-11-08 16:20:33 +03:00
Svyatoslav Scherbina 55f8257f92 build: simplify clang(++) configuration
also introduce 'execClang' block
2016-11-08 13:51:25 +07:00
Konstantin Anisimov 152e738e23 Tests for "while" and "do-while" loop generation 2016-11-08 06:35:50 +03:00
Konstantin Anisimov ea149fab4e Tests for "PLUSEQ" and "MINUSEQ" 2016-11-07 18:00:30 +03:00
Konstantin Anisimov 3c68ee4ce5 testsuite updated to reflect recent changes in codegen: branch support 2016-11-07 17:34:01 +03:00
Vasily Levchenko 147de5d3ad added .usr/bin path to tools chain to take right variants of binutils from our system archieve 2016-11-07 17:25:08 +03:00
Nikolay Igotti f06aeef9ce Some work for string concatenation. (#40) 2016-11-07 15:58:11 +03:00
Svyatoslav Scherbina 451ac00087 backend/tests: enable hello0 2016-11-07 17:42:47 +07:00
Vasily Levchenko 8880a8b7a9 disable object initialization test 2016-11-03 18:34:35 +03:00
Konstantin Anisimov 4078e4004c tests for local variables 2016-11-03 16:19:03 +03:00
Vasily Levchenko c6a5ec26d9 stash conflict occsionaly commited removed 2016-11-03 06:29:41 +03:00
Vasily Levchenko 09fb11fbc9 linux run test fix (except RTTI linking problems) 2016-11-03 06:19:26 +03:00
Svyatoslav Scherbina 58e8ed1850 backend/tests/build: fix compiler native library path 2016-11-02 17:02:14 +07:00
Svyatoslav Scherbina e7558f9ddc build: add target native SDK as downloadable dependency
also improve Gradle native toolchains configuration
2016-11-02 17:02:14 +07:00
Vasily Levchenko b3fb82da07 unwanted print 2016-11-01 21:58:02 +03:00
Vasily Levchenko ac761e0cbf unit tests and run tests are splitted
run tests can use golden value and test data to process and compare results
2016-11-01 21:49:20 +03:00
Nikolay Igotti 283303210f Rename kotlin_native -> kotlin. 2016-11-01 16:13:46 +03:00
Nikolay Igotti 7eeb2d3046 Various fixes for HelloWorld. (#27) 2016-11-01 15:33:41 +03:00
Vasily Levchenko df9bf60c30 g/c: unused vars 2016-10-31 20:56:58 +03:00
Vasily Levchenko ae3fbfcc67 g/c: line balance 2016-10-31 20:56:58 +03:00
Vasily Levchenko 90883b6ced g/c: -linq 2016-10-31 20:56:58 +03:00
Svyatoslav Scherbina 394b4ce6ec backend/build: depend on kotlin-compiler.jar from repo
instead of the jars from backend.native/kotlin-ir
2016-10-31 13:32:02 +07:00
Konstantin Anisimov f02e0af5a2 various numeric literals' tests 2016-10-28 12:27:12 +03:00
Svyatoslav Scherbina 6bfbf1050b build: compile backend.native/tests with Kotlin runtime 2016-10-27 19:32:45 +03:00
Vasily Levchenko 2690c87b9f tests depends on :runtime:build and :backend.native:build 2016-10-26 20:37:42 +03:00
Vasily Levchenko a4dd4c241a gradle replacement for Makefile in tests 2016-10-26 13:12:22 +03:00