Commit Graph

61 Commits

Author SHA1 Message Date
Ilya Gorbunov f5f5a2dcc1 Move progression final element test to stdlib tests.
Less values are tested for iteration not to timeout in js tests.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov 91f4cf0ebc Drop Progression<T> and its deprecated properties: start, end, increment.
Drop deprecated range extensions.
Make progression constructors private.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov 6dd8470835 Drop deprecated primitive ranges and progressions: for Byte and Short 2016-01-22 05:54:38 +03:00
Ilya Gorbunov de11ed4fc6 Primitive Companion objects do not longer implement IntegerConstants and FloatingPointConstants. All declarations moved inside companions.
IntegerConstants and FloatingPointConstants are dropped.
#KT-8897 Fixed
2015-12-24 06:17:03 +03:00
Ilya Gorbunov 661e288362 Introduce 'step' property in progressions instead of 'increment' 2015-11-30 14:12:05 +03:00
Ilya Gorbunov af9020a010 Update Range and Progression built-in implementations in js library.
No need to define special method mapping for js ranges/progressions.
Support progression companion objects' function fromClosedRange as intrinsic
2015-11-11 03:53:51 +03:00
Ilya Gorbunov 6bac3e1986 Drop Ranges, Progressions, ProgressionIterators for Double and Float.
Undeprecate generic Comparable.rangeTo, but return private implementation instead.
Undeprecate contains and coerceIn for generic ranges.
2015-11-11 03:53:47 +03:00
Ilya Gorbunov 4d2f9b82da reversed() behavior changed for progressions. Stepped progression behavior changes: 'end' property is now deprecated, use 'last' instead. 2015-11-11 03:53:45 +03:00
Ilya Gorbunov 5ebb3d20e8 Change internal implementation of progression: use first, last instead of start, end
Keep the end value as it was passed to progression constructor.
Deprecate primary progression constructor and introduce factory method in companion object.
2015-11-11 03:53:40 +03:00
Ilya Gorbunov 25da037868 Update range iteration tests and regenerate test data. 2015-11-11 03:53:37 +03:00
Ilya Gorbunov 69dc6701cc Deprecate Double, Float and Comparable range implementations. 2015-10-19 15:37:41 +03:00
Ilya Gorbunov 12d9beb3a4 Deprecate join (use joinToString instead)
#KT-6909
2015-10-08 17:48:33 +03:00
Ilya Gorbunov 404b228954 StdLib cleanup: replace fails with assertFails 2015-10-07 22:36:06 +03:00
Stanislav Erokhin 8efbf4fc32 Fixed testdata -- removed package import 2015-09-18 21:00:20 +03:00
Denis Zharkov 5cecaa6f87 Get rid of deprecated annotations and modifiers in stdlib (besides JS) 2015-09-18 10:14:28 +03:00
Ilya Gorbunov f7c2f034b3 Remove usages of deprecated failsWith 2015-09-08 10:28:03 +03:00
Denis Zharkov e8f91e596c Adjust test data after fixes about generic nullability 2015-08-28 18:50:26 +03:00
Ilya Gorbunov b7fbb60db4 Generate contains function for all combinations of primitive numeric ranges and arguments.
#KT-6361
2015-07-24 04:14:06 +03:00
Ilya Gorbunov 8892192e9c Generate openRange tests for compiler.
#KT-4665
2015-07-24 04:13:53 +03:00
Ilya Gorbunov 71f3e3049a Provide until function to construct integer ranges with an end being excluded from range.
#KT-4665 Fixed
2015-07-24 04:13:41 +03:00
Ilya Gorbunov f440d97e04 Remove unnecessary Char.toChar from tests. 2015-07-06 17:57:35 +03:00
Ilya Ryzhenkov 24ee79aa2d Replace ArrayList<Any>() with stdlib_emptyListClass() and fix test. #KT-6013 Fixed 2014-11-06 16:45:56 +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 a94f12d8fe Use f/L literal suffixes instead of toFloat()/toLong() 2014-06-18 20:35:25 +04:00
Alexander Udalov ad23a2d05b Fix equals and hashCode for empty ranges and progressions
Empty range is equal to any other empty range
2014-06-18 20:35:25 +04:00
Alexander Udalov 751f062f23 Add *Range.isEmpty(), *Progression.isEmpty() 2014-06-18 20:22:24 +04:00
Ilya Ryzhenkov f471f7901c Migrate to using join* functions instead of deprecated. 2014-06-10 11:11:02 +04:00
Andrey Breslav 5536f4da07 Test data generated from both files separated in 717f03f474 2014-04-24 16:22:43 +04:00
Ilya Ryzhenkov 717f03f474 Split tests into platform independent and JVM parts to run subset of tests in JS 2014-04-24 12:59:43 +04:00
Ilya Ryzhenkov fb7034a472 Clean TODOs and commented code which works. 2014-03-19 20:25:15 +04:00
Natalia Ukhorskaya 4329c42e3f Make unary minus and unary plus return int for byte and short 2013-12-23 13:46:00 +04:00
Natalia Ukhorskaya d63f6843c8 Merge ConstantExpressionEvaluator and CompileTimeConstantResolver 2013-12-05 15:21:50 +04:00
Alexander Udalov ee80e0b8ca Fix loops over progressions near to MAX_VALUE/MIN_VALUE
#KT-492 Fixed

For Byte, Char and Short ranges, promote the type of the loop parameter to int
to avoid overflows. For Int and Long ranges at the end of the loop over a
progression we now check if the new (incremented) value of the loop parameter
is greater than the old value iff increment > 0
2013-06-20 16:03:00 +04:00
Alexander Udalov 33d6347876 Fix loop over a range literal up to MAX_VALUE
#KT-492 In Progress

For Byte, Char and Short explicit casting from Int is removed -- loop parameter
is already stored in an Int anyway. For Int and Long comparison "i < end" at
the beginning of the loop is replaced to "i != end" at the end of the loop + a
special check for an empty loop
2013-06-20 16:02:59 +04:00
Zalim Bashorov 7143393172 Added support bitwise operations in js translator 2013-03-19 16:31:02 +04:00
Evgeny Gerashchenko ccab19b2a1 Added range/progression tests with NaN ends. 2013-02-13 18:08:36 +04:00
Evgeny Gerashchenko 021496c07d Prohibited NaN steps. 2013-02-13 18:08:36 +04:00
Evgeny Gerashchenko 5a4ae00970 Added range iteration test with non-literal ranges. 2013-02-13 18:08:33 +04:00
Maxim Shafirov 9f546f938d KT-3192 Drop kotlin.nullable package
#KT-3192 Fixed
2013-02-04 18:02:52 +04:00
Evgeny Gerashchenko 57e985b7f1 Generated codegen tests for ranges. 2013-01-30 19:24:15 +04:00
Evgeny Gerashchenko 58f37f38f4 Renamed NumberSequence to Progression. 2013-01-29 22:55:10 +04:00
Evgeny Gerashchenko dd4b508213 Adapted usage of failsWith(). 2013-01-29 22:55:10 +04:00
Evgeny Gerashchenko 2fd1430329 Tests for all kinds of ranges and sequences. 2013-01-29 22:55:09 +04:00
Evgeny Gerashchenko 6d41697af0 Added ComparableRange. 2013-01-29 22:55:07 +04:00
Evgeny Gerashchenko b2e74b1473 Adapted code to new structure of ranges. 2013-01-29 22:55:06 +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
Pavel V. Talanov efe0c83872 Delete some strange code left (accidentally?) for the purpose of testing KT-1515. 2012-10-01 16:17:42 +04:00
Andrey Breslav 66faa0c03a For-loop range expression (collection) can not be null 2012-08-24 19:49:33 +04:00
James Strachan ecbd4daefb avoid unnecessary verbose type parameters now the type inferencer is better 2012-08-17 09:44:52 +01:00
Evgeny Gerashchenko 1bc99ef19a KT-2579 Rename Range.minus() to reversed and make it extension
#KT-2579 fixed
2012-08-09 19:14:14 +04:00