Commit Graph

53 Commits

Author SHA1 Message Date
Iaroslav Postovalov fb80c0cb0d Override toString function in stdlib delegates
Co-authored-by: ilya-g <ilya.gorbunov@jetbrains.com>
2023-04-11 14:46:29 +00:00
Svyatoslav Scherbina 0f4173cdfa Fix running stdlib tests in worker on Native
Add `@SharedImmutable` or `@ThreadLocal` where required.
2020-12-14 19:03:06 +03:00
Ilya Gorbunov 696701d377 Drop deprecated MutableMap property delegation operator 2020-06-22 12:29:25 +03:00
Ilya Gorbunov de6154980d Make ReadOnlyProperty and PropertyDelegateProvider fun interfaces 2020-06-17 19:45:15 +03:00
Ilya Gorbunov ea1e16e309 Delegate properties to property references
#KT-8658
2020-04-15 18:37:33 +03:00
nikita.movshin 65244b4bea Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Ilya Gorbunov 1a8b258d86 Raise deprecation level for map delegation accessor according to #KT-18789
#KT-21703
2018-09-11 18:15:03 +03:00
Ilya Gorbunov ecf0d7ec0d Reformat stdlib tests and samples
#KT-5558
2018-04-27 05:28:57 +03:00
Ilya Gorbunov e21c235bbb Add or update copyrights in the standard library sources 2018-04-26 21:57:50 +03:00
Ilya Gorbunov 9b38e5e7b5 stdlib tests: move JVM-only test source files 2018-04-12 17:53:00 +03:00
Ilya Gorbunov 7a40b4c5f1 Refactor: extract JVM-specific tests into separate files
Make KotlinVersion random comparison test running in JS
2018-03-22 17:08:43 +03:00
Ilya Gorbunov 0b9830248d Restore original accessor signature as deprecated
The deprecated function is not operator because it covers cases where it was used in explicit form.

#KT-18789
2017-12-07 20:26:53 +03:00
Ilya Gorbunov 7efaa7cabc Allow delegating val properties to out-projected MutableMap
Change generic signature of MutableMap.getValue, use 'out @Exact V' and `V1: V` types instead of single `in V`.
Fix affected IR generation tests.

#KT-18789 Fixed
2017-12-07 20:26:53 +03:00
Ilya Gorbunov 20b122c1dd Use kotlin.test.Test instead of org.junit.Test in common stdlib tests
(and in jvm-only and js-only tests also)
2017-10-15 17:40:53 +03:00
Igor Chevdar fd380f7545 Split up test on map access onto two tests: stdlib & compiler box test 2017-07-12 15:12:33 +03:00
Igor Chevdar d7e4350d42 Ignored/fixed some tests for Kotlin/Native 2017-06-28 12:54:32 +03:00
Ilya Gorbunov 6ae19e03d5 Clean warnings and refactor stdlib tests.
Merge RangeJVMTest into RangeTest.
2017-04-18 18:51:20 +03:00
Ilya Gorbunov 6a70761783 Minor: normalize '@Test' annotation casing in all tests. 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 50cd620f92 Remove java.util.* imports from common code. 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 8d76617094 Merge ReversedViews tests in one file as they can all run now in JS.
Make SynchronizedLazyValTest jvm-only.
2016-10-26 17:47:15 +03:00
Ilya Gorbunov 4b533b297e reified assertFailsWith available in kotlin-test for JS
#KT-11346
2016-04-27 18:22:20 +03:00
Ilya Gorbunov d1a5988bfc Drop deprecations: complicated map delegates and kotlin.support.AbstractIterator. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov 9d24f1d1cf Delegates.mapVal and mapVar preserve type of the receiver to when calling default value lambda. 2015-11-21 00:54:22 +03:00
Ilya Gorbunov 70fdc379ef Drop deprecated Delegates.lazy and blockingLazy and ObservableProperty constructor-like function 2015-11-06 01:12:07 +03:00
Alexander Udalov 556a169a5d Update stdlib usages of PropertyMetadata to KProperty<*> 2015-10-15 00:05:31 +03:00
Ilya Gorbunov 93c73500d7 Do not allow to delegate readonly property to a map with incompatible value type.
Infer type of delegated readonly property from the map value type.
2015-10-14 18:22:30 +03:00
Ilya Gorbunov 0df3d37f88 Drop deprecated API. 2015-10-07 22:36:38 +03:00
Ilya Gorbunov 73e41fb216 StdLib cleanup: remove unused imports 2015-10-07 22:36:13 +03:00
Ilya Gorbunov 404b228954 StdLib cleanup: replace fails with assertFails 2015-10-07 22:36:06 +03:00
Mikhail Glukhikh 86833c1a74 Migration to new backing field syntax 2015-09-22 10:15:52 +03:00
Denis Zharkov 5cecaa6f87 Get rid of deprecated annotations and modifiers in stdlib (besides JS) 2015-09-18 10:14:28 +03:00
Michael Nedzelsky 44691018ce add explicit types for some top-level public val/var declarations in MapDelegationTest due KT-9072 2015-09-08 02:06:34 +03:00
Ilya Gorbunov b3073dbd2d Provide lazy implementation with an external object to synchronize on. 2015-09-02 15:49:53 +03:00
Denis Zharkov e8f91e596c Adjust test data after fixes about generic nullability 2015-08-28 18:50:26 +03:00
Ilya Gorbunov 9dbc4e4eef Provide another type of callback to the ObservableProperty which is called after the property value has been changed.
#KT-6866 Fixed
2015-07-01 22:23:11 +03:00
Ilya Gorbunov 9caf5baf34 Refactor delegation unit tests. 2015-06-24 21:39:41 +03:00
Ilya Gorbunov d04e94c826 Use NoSuchElementException instead of KeyMissingException. Deprecate KeyMissingException. 2015-06-24 21:39:40 +03:00
Ilya Gorbunov a6b7857d57 Drop complicated MapAccessors. Deprecate simple cases of Delegates.mapVar and Delegates.mapVal in favor of direct delegation without wrappers. 2015-06-24 21:39:37 +03:00
Ilya Gorbunov 5306e88425 Provide the way to specify implicit default for a readonly or mutable map.
Refactor: rename default key and value providers.
2015-06-24 21:39:33 +03:00
Ilya Gorbunov d137a83471 Simple extensions to delegate readonly property to Map and read-write property to MutableMap without delegate wrappers.
Delegation to map with custom key selector by map accessors.
2015-06-24 21:39:31 +03:00
Ilya Gorbunov 536e669023 Provide Lazy<T> in kotlin package — an interface that represents lazily computed value. Read-only properties can be delegated to lazy with the extension getter. Delegates.lazy and blockingLazy are deprecated. 2015-06-19 23:08:09 +03:00
Ilya Gorbunov fb6c7e20de Use identity equals in lazy unescape.
#KT-7474 Fixed
2015-06-19 23:00:01 +03:00
Dmitry Jemerov 2a99f757c4 replace 'trait' keyword with 'interface' in library code 2015-05-12 17:07:46 +02:00
Stanislav Erokhin b703f59e04 Migrate kotlin sources, maven projects and stdlib to new lambda syntax 2015-04-07 13:08:53 +03:00
Zalim Bashorov f202ad9f98 Stdlib: run all stdlib tests with JS backend(as possible). 2014-10-13 21:25:56 +04:00
Alexander Udalov 3dcd85bdb4 Add toString() to Any, fix all tests
#KT-4517 Fixed
2014-03-02 19:54:49 +04:00
Natalia.Ukhorskaya a37be3c205 Add tests for observable/vetoable properties 2013-06-27 11:00:48 +04:00
Svetlana Isakova fc0077cf9b removed explicit type arguments
from delegation tests where possible
2013-06-06 17:20:11 +04:00
Maxim Shafirov 58914cdf33 Delegate properties stdlib, take 2. 2013-05-30 19:06:45 +04:00
Natalia.Ukhorskaya 97c33b02ab Add library classes for delegated properties 2013-05-21 13:21:53 +04:00