Ilya Gorbunov
b99e1111f6
Do not use out projection for Array where appropriate.
2016-01-14 18:30:40 +03:00
Ilya Gorbunov
ea3a2eefe7
File.deleteRecursively returns true even if path specified by File does not exist.
...
False is returned only in case of incomplete deletion.
Distinguish situations when file was not deleted because it's vanished after listing and because of some other error.
2016-01-14 18:14:12 +03:00
Ilya Gorbunov
5e6489f1a2
Minor: refactor file utils test not to use 'assert' to make test assertions. Use assertTrue, assertFalse, assertEquals, assertFailsWith instead.
2016-01-14 18:14:11 +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
Mikhail Glukhikh
99a32b93fb
Implemented missed checks for local functions #KT-10449 Fixed
...
Relevant code/test fixes
2015-12-23 18:22:32 +03:00
Stanislav Erokhin
1574dc78df
Synthetic extensions wins against top-level extension.
2015-12-18 22:49:25 +03:00
Sergey Mashkov
149ce70ce2
Move testing from stdlib to js.stdlib
2015-12-18 22:16:04 +03:00
Ilya Gorbunov
03816373b3
Primitive array constructor-like functions with init lambda.
...
#KT-8831
Update testData and resolve ambiguity in newArray test
2015-12-18 17:54:09 +03:00
Ilya Gorbunov
188119aa83
Prepare to treat keys mapped to null same way as missing keys in Map extensions: getOrElse, getOrPut, getOrImplicitDefault.
2015-12-18 15:24:03 +03:00
Ilya Gorbunov
055c71e8d0
Provide minWith and maxWith to find maximum and minimum values according to the given comparator.
...
#KT-9002 Fixed
2015-12-18 00:00:52 +03:00
Ilya Gorbunov
544bc9a70c
Introduce toMap with key-value pair selector.
...
#KT-6657
2015-12-17 22:50:43 +03:00
Ilya Gorbunov
a4f82a2dc4
Sensible behavior for File.startsWith and File.endsWith
2015-12-14 06:10:26 +03:00
Ilya Gorbunov
d2e22dc794
Fix tests on linux.
...
Add tests for File.startsWith
2015-12-14 06:10:24 +03:00
Ilya Gorbunov
645c78e2f4
Do not use assert in test, use assertTrue or assertEquals
2015-12-14 06:10:22 +03:00
Ilya Gorbunov
cb71e05c51
Deprecate File.directory, root, rootName as properties with unclear behavior.
2015-12-14 06:10:21 +03:00
Ilya Gorbunov
7c9b53c75c
Do not convert separatorsToSystem in file path extensions.
...
Do not require network host in network share root to contain dot.
File.root now is always non-null to be consistent with File.toComponents().root.
Introduce invariantSeparatorsPath property.
Deprecate relativeTo to make it return File later. Introduce toRelativeString instead.
Introduce relativeToOrNull and relativeToOrSelf extensions.
2015-12-14 06:10:18 +03:00
Ilya Gorbunov
52eb9e4276
Refactor FilePathComponents: rename properties, deprecate constructor, rename filePathComponents extension.
2015-12-14 06:09:55 +03:00
Ilya Gorbunov
8deefd56db
Rename FileTreeWalk public parameters and builder methods.
...
Directory filtering now is performed in newly introduced onEnter predicate.
2015-12-14 05:16:06 +03:00
Ilya Gorbunov
e24dbcefb6
Move all mutable state from FileTreeWalk to its iterator implementation, allowing this sequence to be iterated several times.
...
Introduce SingleFileState for single file walks.
Do not check isDirectory in DirectoryState constructor unless assertions are enabled.
2015-12-14 05:16:04 +03:00
Ilya Gorbunov
061803d7b1
Compare root of FilePathComponents according to case-sensitivity rules of current file system.
2015-12-14 05:16:02 +03:00
Ilya Gorbunov
4f2887df64
FileTreeWalk tests: do not remove failed directory from stack as leave is also called on failed dirs.
2015-12-14 05:16:01 +03:00
Ilya Gorbunov
162b152133
Improve File.relativeTo handling relative paths. Paths are normalized before calculating relative path. "x".relativeTo("../y") now is considered to have incompatible roots.
2015-12-14 05:15:59 +03:00
Ilya Gorbunov
9f5a972816
Improve resolve and resolveSibling for relative paths.
2015-12-14 05:15:57 +03:00
Ilya Gorbunov
923effe11d
Change FilePathComponents parsing for file with empty name to enhance finding relative path between relative paths.
2015-12-14 05:15:55 +03:00
Ilya Gorbunov
6301c707cd
Ensure resolveTo fails as expected.
...
Change UNC paths not to be misinterpreted on *nix.
2015-12-14 05:15:53 +03:00
Ilya Gorbunov
515d2cd3e7
FileTreeWalk.filter was dropped, use treeFilter otherwise filtering result becomes different.
...
Refactor walking tests.
2015-12-14 05:15:50 +03:00
Ilya Gorbunov
27551a8399
Make some io test classes non-nested as it's not supported by runners.
2015-12-14 05:15:48 +03:00
Ilya Gorbunov
dd2ae15531
Move code between packages.
2015-12-14 03:49:45 +03:00
Stanislav Erokhin
bc49825f55
Fix testLib test
2015-12-01 15:38:01 +03:00
Alexander Udalov
db2521ee67
Rework TestlibTest, use JUnit console runner instead of manual suite
...
The problem with the manually created suite was that it was created in setUp()
and so a lot of the hard work (compilation, test case lookup) was happening in
setUp(). If any exception is thrown in setUp(), tearDown() is not called,
leaving the application (~9000+ subsequent tests) in the inconsistent state.
Support JUnit 4 tests via JUnit4TestAdapter. Previously only a small number of
test classes were actually run because this test was looking only for JUnit 3
testcases.
Delete FilesTest#relativePath because it was testing a deprecated function
and was failing if run from the project root
2015-11-30 18:58:00 +03:00
Ilya Gorbunov
661e288362
Introduce 'step' property in progressions instead of 'increment'
2015-11-30 14:12:05 +03:00
Ilya Gorbunov
c7d08ea599
Remove *Raw method usages from tests
2015-11-28 07:20:25 +03:00
Yan Zhulanow
9d1af5a17e
Fix tests: "infix modifier required" and "operator modifier required" errors
2015-11-27 15:51:11 +03:00
Yan Zhulanow
a3ff3ffc45
Fix tests: "Placing function type parameters after the function name" error
2015-11-27 15:51:11 +03:00
Ilya Gorbunov
ca4bdd23e0
Provide flatten for sequence of iterables.
...
#KT-9977
2015-11-26 00:45:15 +03:00
Ilya Gorbunov
4181142400
Deprecate sequenceOf(Progression).
2015-11-26 00:45:15 +03:00
Ilya Gorbunov
8440c196d1
GeneratorSequence: do not get first value, until it's requested by iterator, allow initialValue to be null and return EmptySequence in this case.
...
#KT-9153 Fixed
2015-11-26 00:45:15 +03:00
Ilya Gorbunov
229504f42d
Byte iterator only available for buffered input streams,
...
InputStream.buffered() returns BufferedInputStream.
2015-11-25 18:35:03 +03:00
Ilya Gorbunov
542ab6ae34
Deprecate String.toCharList to use toList instead.
2015-11-25 18:34:58 +03:00
Ilya Gorbunov
b253ace198
Test different return results of collection mutation operations.
2015-11-25 17:18:59 +03:00
Ilya Gorbunov
f17316f4b4
Provide removeAll and retainAll with predicate for MutableIterables and MutableList.
...
#KT-8760 Fixed
2015-11-25 17:18:58 +03:00
Ilya Gorbunov
5aa415c609
MutableMap.iterator() returns MutableIterator.
2015-11-21 07:09:07 +03:00
Ilya Gorbunov
2ed277a863
Add upperbound constraint Comparable<T> to toSortedSet() and sortedMapOf()
...
Provide an overload of toSortedSet() with Comparator<in T> parameter
#KT-10115 Fixed
2015-11-21 00:54:33 +03:00
Ilya Gorbunov
b61bef324d
Make Char.category and directionality properties instead of functions.
...
Provide contains(Char) operator for CharCategory.
2015-11-21 00:54:30 +03:00
Ilya Gorbunov
775755dfac
Introduce String.toCharArray() instead of String.getChars()
...
Make special method conversion for java.lang.String.getChars() in J2K
2015-11-21 00:54:29 +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
c3190bbae3
Migrate type parameter list syntax.
2015-11-21 00:54:15 +03:00
Ilya Gorbunov
794819cea2
StdLib cleanup: make calls non-infix
2015-11-21 00:54:10 +03:00
Ilya Gorbunov
88e48380af
StdLib cleanup, deprecated symbol usage: Throwable.getMessage
2015-11-21 00:54:09 +03:00
Ilya Gorbunov
dadcdb5771
StdLib cleanup, deprecated symbol usage: List and Map members
2015-11-21 00:54:08 +03:00