Commit Graph

38 Commits

Author SHA1 Message Date
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
Evgeny Gerashchenko a4031225d0 Changed usages of upto/downto in test to rangeTo and downTo, respectively.
#KT-2519 in progress
2012-08-08 14:48:04 +04:00
James Strachan 713a2d3bf0 enabled more tests now that KT-2520 is fixed 2012-08-03 09:00:25 +01:00
James Strachan 559cfe29c8 added test case for KT-2520 2012-07-25 05:58:09 -04:00
James Strachan 1d342978d0 #KT-1675 Fixed, renaming join() -> makeString() and adding an appendString() which reduces the possible number of appendables being created 2012-04-02 20:01:24 +01:00
James Strachan a1e4357767 added some more sample scripts which run - with return types 2012-03-18 10:09:00 +00:00
James Strachan 78d3c7ef47 switched back to cleaner nested functions & used the same name 2012-03-17 16:38:50 +00:00
James Strachan d8aa0d139e tidied up the comments 2012-03-17 10:33:11 +00:00
James Strachan ed6ffe34fa added an experiment of compositional map/filter style functions on nullables to mimick Scala's Option behaviour without any wrapper classes 2012-03-17 09:35:35 +00:00
James Strachan 9fb6a71b59 added request.getParameter() code for more accurate comparsion - thanks for the heads up Cedric! 2012-03-17 08:39:33 +00:00
James Strachan 46b5b1b177 added a sample experiment comparing Scala's use of Option[T] and how we can use T? in Kotlin today together with how we may support it in the future 2012-03-16 10:59:03 +00:00
James Strachan 7ef65c0099 moved the stdlib tests into the same directory as the stdlib, so it works a bit better with maven support in IDEA 2012-03-14 16:14:14 +00:00