Commit Graph

46 Commits

Author SHA1 Message Date
Ben Rimmington
f2c952cb69 [stdlib] Remove more unneeded numericCasts 2020-05-10 12:31:55 +01:00
Ben Cohen
83823f5f7f [stdlib] Obsolete various compatibility shims in 5.0 (#19008)
* Obsolete ModifierSlice typealiases in 5.0

* Obsolete *Indexable in 5.0

* Obsolete IteratorOverOne/EmptyIterator in 5.0

* Obsolete lazy typealiases in 5.0

* Drop .characters from tests

* Obsolete old literal protocols in 5.0

* Obsolete Range conversion helpers in 5.0

* Obsolete IndexDistance helpers in 5.0

* Obsolete Unsafe compat helpers in 5.0

* Obsolete flatMap compatibility helper in 5.0

* Obsolete withMutableCharacters in 5.0

* Obsolete customPlaygroundQuickLook in 5.0

* Deprecate Zip2Sequence streams in 5.0

* Replace * with swift on lotsa stuff

* Back off obsoleting playground conformances for now
2018-08-28 13:20:25 -07:00
Ben Cohen
85d190cd7d [stdlib] Replace various uses of BlahSlice with Slice to reduce warnings (#13263)
* Kill the slice variants from the gybbed collection test types

* Handful more SDK instances

* Fix SequencesCollections.swift.gyb
2017-12-05 19:09:56 -08:00
Rintaro Ishizaki
5c991e7e35 [validation-test] Remove -sil-serialize-all workaround from Collection and Slice tests
This workaround is not required since 49c54870c1
2016-06-20 11:32:46 +09:00
Dmitri Gribenko
efc351f69d Merge pull request #3011 from rintaro/tests-target-simple-run-swiftgyb
[test] Add %target-run-simple-swiftgyb substitution
2016-06-14 22:43:48 -07:00
rintaro ishizaki
6e4792cb5b [test] Adjust validation-test/stdlib/{Collection, Slice}
* utils/split_file.py compatible Inputs/Template.swift.gyb
* Result scripts can be ran by %target-run-simple-swift, not GYB
* Renamed stdlib/Slice/*.swift.gyb to stdlib/Slice/*.swift
2016-06-15 11:49:43 +09:00
rintaro ishizaki
2addf475b5 [test] Add instruction for generating validation-test/stdlib/{Collection,Slice} tests
Using utils/gyb and utils/split_file.py
2016-06-14 19:50:39 +09:00
Rintaro Ishizaki
1bdce7ced6 [lit] Add substitutions: %utils and %line-directive
%utils => ${SWIFT_SOURCE_DIR}/utils
%line-directive => ${SWIFT_SOURCE_DIR}/utils/line-directive
2016-06-11 02:41:15 +09:00
Dave Abrahams
93dfc16626 [stdlib] More reliably avoid running duplicate tests
Removing the “checksAdded” parameter from collection unit tests and
simply sharing a global variable is a better way to go.  We don't
use threads at that level, so there's no thread safety issue, and we
already committed to globals when we introduced the logging wrappers.
2016-05-02 15:30:29 -07:00
Dave Abrahams
9bee5d182f [stdlib] location/formLocation => index/formIndex 2016-04-26 17:46:16 -07:00
Dave Abrahams
47a870cc50 [stdlib] Use location/formLocation for all index movement 2016-04-21 17:13:41 -07:00
Dmitri Gribenko
7d82037309 Slice tests: update expectations: creating out of bounds indices traps now 2016-04-01 14:14:56 -07:00
Dmitri Gribenko
4066326c6c Move GenerateSliceTests.py to utils/split-generated-tests, it will be used for other tests, too 2016-04-01 14:12:19 -07:00
Dmitri Gribenko
3e8ffae660 New indexing model: update the test generator for Slice* tests 2016-03-29 17:34:03 -07:00
practicalswift
1edb62dc38 [Python] Make flake8 linting pass without errors/warning (w/ default rules) 2016-03-13 20:19:51 +01:00
practicalswift
7b1fd47f93 [Python] Make slice tests output identical to pre-cleanup outputs
In order to avoid introducing unnecessary diffs.
2016-03-10 19:48:12 +01:00
practicalswift
d6a7b2f517 [Python] Remove file level Python linting bypass ("noqa") 2016-03-10 13:33:57 +01:00
practicalswift
42b7e3f8d6 Merge pull request #1598 from practicalswift/fix-80-column-violations-in-python-code
[Python] Fix 80 column violations
2016-03-10 10:35:25 +01:00
practicalswift
0796eaad1f [Python] Fix 80-column violations 2016-03-09 23:52:11 +01:00
Max Moiseev
859db53d87 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-01 12:56:26 -08:00
practicalswift
f6d6585ee0 [Python] Improve Python consistency: Use function_name(…) throughout (PEP8) 2016-02-29 22:49:19 +01:00
Jordan Rose
b319e3da32 stdlib: Adjust to insert(contentsOf:at:) and append(contentsOf:)
instead of insertContents(of:at:) and appendContents(of:),
originally insertContentsOf(_:at:) and appendContentsOf(_:)
per internal discussion.
2016-02-25 12:50:39 -08:00
Jordan Rose
e4e9c71d8f StdlibUnittest: Rename enum cases and static vars to match API guidelines. 2016-02-24 18:23:59 -08:00
Max Moiseev
bb3eaaf308 Merging in latest master 2016-02-24 15:10:25 -08:00
Janosch Hildebrand
af69499a47 [stdlib] Expand subscript(_: Range) tests on MutableCollectionType
Add tests for replacing a slice with a slice of a different size.
2016-02-23 16:55:40 +01:00
Max Moiseev
4b9eab6288 appendContentsOf => appendContents(of:) 2016-02-22 18:02:04 -08:00
Dmitri Gribenko
efaa39ea79 stdlib: add first argument labels and some other changes to conform to API guidelines 2016-02-15 23:47:54 -08:00
Max Moiseev
61c837209b Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-04 16:13:39 -08:00
Dmitri Gribenko
aeeb9c1325 Move collection testing code from StdlibUnittest to a new library
This brings down StdlibUnittest build time to 90 seconds with either
a DebugAssert or a ReleaseAssert compiler.

The new library, StdlibCollectionTests, is only built when running
validation tests.
2016-01-26 18:58:03 -08:00
practicalswift
1cd4d4e9c9 [gardening] Fix violations of non-controversial PEP8 rules
Fixes:
* multiple statements on one line (colon) (E701)
* missing whitespace around arithmetic operator (E226)
* missing whitespace around operator (E225)
* closing bracket does not match visual indentation (E124)
* blank line contains whitespace (W293)
* continuation line missing indentation or outdented (E122)
* continuation line over-indented for hanging indent (E126)
* missing expected blank line (E301)
* trailing whitespace (W291)
* unexpected spaces around keyword / parameter equals (E251)
* whitespace after '(', '[' or '{' (E201)
* whitespace before ')', ']' or '}' (E202)
* whitespace before ',' or ':' (E203)
2016-01-23 09:23:33 +01:00
Dmitri Gribenko
9bcd5a1056 Collection.length => .count 2016-01-22 18:41:19 -08:00
Doug Gregor
7d70b704e4 Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines 2016-01-19 23:18:20 -08:00
practicalswift
22d043fcc0 [gardening] Fix violations of non-controversial PEP8 rules.
Fixes:
* blank line at end of file
* closing bracket does not match indentation of opening bracket's line
* continuation line over-indented for hanging indent
* continuation line over-indented for visual indent
* continuation line unaligned for hanging indent
* inline comment should start with '# '
* missing whitespace around arithmetic operator
* missing whitespace around bitwise or shift operator
* multiple imports on one line
* multiple spaces after ':'
* multiple spaces after operator
2016-01-16 00:47:43 +01:00
practicalswift
bf90a10adc Avoid multiple imports on same line. 2016-01-09 01:39:22 +01:00
Max Moiseev
f51e708a8f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-04 12:25:25 -08:00
Alex Chan
1f2a39c5f3 Tidy up Python file handlers
Rather than using `f = open(path).read()`, which leaves the file open
for an indeterminate period of time, switch to the `with open(path) as f`
idiom, which ensures the file is always closed correctly.
2015-12-22 22:33:18 +00:00
Maxim Moiseev
9e50505970 internal or public // @testable initializers 2015-12-17 17:02:49 -08:00
Dmitri Gribenko
73ce9ae7e9 Collection.count => .length
And other API changes that naturally fall out from this, like
Array(repeating:count:) => Array(repeating:length:).
2015-12-17 15:55:29 -08:00
Max Moiseev
a28a510407 Fixing tests 2015-12-17 10:24:40 -08:00
Maxim Moiseev
fc65e676cd fixing validation tests 2015-12-16 17:21:57 -08:00
Doug Gregor
1ba7b5d98d Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2015-12-15 16:01:48 -08:00
Erik Eckstein
6e763b7c4f [tests] add import statements (for fixing linker errors) also in the slice generator script.
And re-generated all files.
2015-12-15 13:21:15 -08:00
Max Moiseev
806be29941 Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-14 12:05:35 -08:00
Arsen Gasparyan
52890e5c30 Replace if true {} with do {} 2015-12-13 10:54:54 +03:00
Maxim Moiseev
7e2466c14e CollectionType => Collection 2015-12-09 17:12:48 -08:00
Dmitri Hrybenko
ff1680c7ea stdlib: expand the test boilerplate from Slice.swift.gyb
This test organization allows running more tests in parallel.

Part of rdar://22297353

Swift SVN r31287
2015-08-18 03:54:13 +00:00