Commit Graph

328 Commits

Author SHA1 Message Date
Ilya Matveev ec64fd0477 stdlib: Make toIndex exclusive in sortArrayWith method
This patch makes toIndex parameter exclusive in sortArrayWith method
in order to make this method corresponding to the other ones (e.g.
copyOfRange, Array.sortWith extension etc).
It also improves the external sortBy test in order to use it with
different sort algorithms.
2017-04-13 18:27:08 +07:00
Ilya Matveev bd27d68906 stdlib: Fix contentDeepToString 2017-04-13 18:27:08 +07:00
Svyatoslav Scherbina 2a3450047c Add interop test for returning struct by value 2017-04-10 17:28:25 +03:00
Alexander Gorshenev 49674d2b1b Some mangling disambiguation tests. 2017-04-07 13:47:52 +03:00
Ilya Matveev a69def4254 tests: Generate test tasks for stdlib tests
This patch updates the test execution harness to work with the
new stdlib tests. It allows one to execute stdlib tests as
a part of external testing (./gradlew run_external) or separately
(./gradlew run_external -Pprefix=external_stdlib).
2017-04-07 17:21:11 +07:00
Ilya Matveev 85827b4880 tests: Copy stdlib tests from Kotlin/JVM
This patch copies Kotlin/JVM stdlib tests (libraries/stdlib/test)
excepting ones with explicit java dependencies. It also transforms
the tests to use them as box-tests.
2017-04-07 17:21:11 +07:00
Vasily Levchenko 461b977cae TEST: build slack teamcity properties for testing:
- NEVER commit if konan-reporter-token contains real token.
2017-04-05 14:27:16 +03:00
Svyatoslav Scherbina 50c3be3fc2 Simplify working with values in interop
* Access primitive interop array elements and struct fields without `.value`
* Simplify C*Var* interop types names
2017-03-31 11:44:07 +03:00
Alexander Gorshenev 9fd555471a A couple of konanc driver tests. 2017-03-31 11:07:01 +03:00
Nikolay Igotti 0cbd34086e Added JB copyright (#417) 2017-03-30 09:51:58 +03:00
Igor Chevdar 8e38e28f89 Added tests 2017-03-29 15:58:36 +03:00
SvyatoslavScherbina c1d9dc1cbb Replace CArray by CPointer (#406)
Also do some cleanup.
2017-03-28 17:44:08 +03:00
Svyatoslav Scherbina f65044c7bb Implement interop integer conversions to be used with type inference 2017-03-28 12:23:23 +03:00
SvyatoslavScherbina c4abb8f706 Implement varargs in interop for Kotlin N (#393)
* Implement CValues.equals and .hashCode

* Add trivial test for interop varargs

* Implement varargs in interop for Kotlin N

* Compile and link runtime with libffi

* Fix few places.
2017-03-27 16:44:24 +03:00
Alexander Gorshenev 334d2f0ee6 Remote test execution for cross compiled tests. Run it like:
$ ./gradlew backend.native:tests:run \
    -Premote=user@111.22.33.444 -Ptest_target=raspberrypi

The new gradle command line options:

    -Pbuild_flags  renamed -Pkonanc_flags.
    -Ptest_flags   provides compiler flags to the test builds.
    -Ptest_target  properly sets up compiler as well as interop
                   to cross compile tests.
    -Premote       specifies remote host and login.
2017-03-27 15:14:57 +03:00
Igor Chevdar 00e452bcdf Added tests on link stage (disabled for now). 2017-03-27 12:41:58 +03:00
Ilya Matveev fbc14becfc tools: Add dependecy download helpers
This patch adds 2 helpers to download dependencies for compiler and
stub generator during their execution.

They take list of external dependencies as a parameter and directory
where they must be located. Helpers check if these dependencies exist
in the given directory and download not existing ones.
2017-03-24 19:31:23 +07:00
Alexander Gorshenev ff8acd21e6 This is initial implementation of serializer/deserializer for inline IR bodies.
The deserialization is disabled by default.

Use `-enable deserializer` to enable it.
Use `-verbose deserializer` to watch it crunch.
2017-03-24 01:03:59 +04:00
Nikolay Igotti b5c60e3082 Support data parsing operations (#380) 2017-03-23 12:54:24 +03:00
Igor Chevdar a1061246c9 Added tests on lateinit properties 2017-03-21 19:47:41 +03:00
Svyatoslav Scherbina c9d8d4d57d Implement CValuesRef in interop
* Represent pointer parameters of C functions as `CValuesRef`.
* Represent struct value parameters as `CValue`.
* Implement some helper methods to make the new approach more useful.
* Migrate some code to new interop approach for pointers and values.

Also do not map to `String?`:
- pointers to 8-bit integers;
- pointers to non-const chars.
2017-03-20 15:52:23 +07:00
Konstantin Anisimov 864bd9a212 Support cast type operations in inline 2017-03-17 19:29:35 +07:00
Konstantin Anisimov 449b4cd4b1 Minor test improvement 2017-03-17 19:29:35 +07:00
Alexander Gorshenev a7677e2a8b Renamed interop 'target' to 'flavour'. 2017-03-16 01:55:36 +04:00
Konstantin Anisimov f352c145fd Turn on disabled inlining tests 2017-03-15 20:11:27 +07:00
Konstantin Anisimov 22b74c0a3a New tests added 2017-03-15 20:11:27 +07:00
Konstantin Anisimov 023e0c1c70 Remove dead code from test 2017-03-15 20:11:27 +07:00
Ilya Matveev d3945bff3b tests: Add fail() function to TestUtils 2017-03-13 19:03:57 +03:00
Ilya Matveev 20ffd6d90b tests: Add test for assertion fail 2017-03-13 16:25:48 +03:00
Ilya Matveev a181b0301e Update README.md and HACKING.md 2017-03-13 15:31:46 +03:00
Ilya Matveev bc074e6d39 tests: Update external tests (1.1.2-dev-393) 2017-03-13 15:31:46 +03:00
Ilya Matveev ac56fccb15 tests: Download test data as a teamcity artifact 2017-03-13 15:31:46 +03:00
Svyatoslav Scherbina a41f575f52 backend/tests: add interop_opengl_teapot 2017-03-13 11:00:33 +07:00
Svyatoslav Scherbina 304a9ebd8e build/tests: support declaring tests to be manually executed 2017-03-13 11:00:33 +07:00
Svyatoslav Scherbina 62e678a37a backend/tests: add inline21 2017-03-10 18:08:47 +07:00
Svyatoslav Scherbina 404be59f62 backend/tests: add missing task for inline20 2017-03-10 18:08:47 +07:00
Ilya Matveev ec52aad146 tests: Update some tests 2017-03-10 11:37:00 +03:00
Svyatoslav Scherbina 9e15873d6c backend/testUtils: add assertTrue and assertFalse 2017-03-10 15:30:18 +07:00
Svyatoslav Scherbina 06ba63af06 backend/tests/external: Mute tests with java collection inheritance 2017-03-10 15:03:43 +07:00
Svyatoslav Scherbina 7f72c1c037 backend/tests/external: Mute tests depending on Math 2017-03-10 15:03:43 +07:00
Svyatoslav Scherbina 13bbd7af81 runtime: use exitStatus == 1 if main finished with exception
Also update the corresponding test.
2017-03-10 14:34:10 +07:00
Ilya Matveev 853a40b230 tests: Mute tests with '::class' 2017-03-09 18:01:19 +03:00
Ilya Matveev 60bcc50340 tests: Mute tests with java collection inheritance 2017-03-09 18:01:19 +03:00
Igor Chevdar bc0772eab1 Test on link stage. 2017-03-07 20:02:20 +03:00
Igor Chevdar 1a8ce13067 Added tests 2017-03-07 18:35:36 +03:00
Igor Chevdar 8c1c9f5660 Turned off lowering of outer class for inner class constructors.
Constructors of inner classes already have access to their outer class
through its dispatch receiver parameter.
2017-03-06 21:08:56 +03:00
Igor Chevdar 0ff306ad3a Rewrote enum lowering to support usage from other modules.
- Split up enum lowering into two stages: descriptors creation and IR creation.
- Added link stage test.
- Enum.valueOf() uses binary search instead of linear.
2017-03-06 14:35:39 +03:00
Igor Chevdar bf65a78a93 Made bridge methods public.
Added test on usage of a bridge method from different module.
Bridge methods must be public in order use them from other modules.
2017-03-06 14:35:39 +03:00
Svyatoslav Scherbina 2d3879ea0d backend/tests: add more tailrec tests 2017-03-06 17:09:05 +07:00
Svyatoslav Scherbina 8427612d59 backend/tests: add trivial tests for tailrec 2017-03-03 20:45:39 +07:00