Commit Graph

1226 Commits

Author SHA1 Message Date
Dave Abrahams
8d9e62b274 [stdlib] indexing model: rename next/previous
I'm not too satisfied with the names for the updating: versions, but
this is a start.
2016-03-22 17:13:54 -07:00
Max Moiseev
303ddac014 [stdlib][swift-3-indexing-model] fixing ExistentialCollection tests 2016-03-22 16:18:15 -07:00
Max Moiseev
6e76935b33 [stdlib][swift-3-indexing-model] fixing more tests
Algorithm and SequenceWrapperTest
2016-03-22 15:04:29 -07:00
Dmitri Gribenko
168e7e41a5 Merge pull request #1525 from PatrickPijnappel/utf8-rewrite
[stdlib] Rewrite UTF8 decoding
2016-03-22 14:24:11 -07:00
Max Moiseev
5713a6b608 [stdlib][swift-3-indexing-model] fixing stdlib/Generator tests 2016-03-22 12:42:33 -07:00
Max Moiseev
a43a46c8ba [stdlib][swift-3-indexing-model] making Dictionary validation tests pass 2016-03-22 12:05:22 -07:00
Max Moiseev
cf92a80830 [stdlib][swift-3-indexing-model] making Set validation tests pass 2016-03-22 11:57:05 -07:00
Dmitri Gribenko
8f48d85d9e Array tests: split Objective-C-independent tests into a new file
And also merge the small test/1_stdlib/ArrayCore.swift test into it.
2016-03-21 23:27:03 -07:00
Dmitri Gribenko
a6cd57222a Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-03-21 14:41:15 -07:00
Arsen Gasparyan
9dbf4c99c8 Replace if true with do 2016-03-21 23:01:48 +03:00
Ted Kremenek
b6104b9cae Disable "Hashing.swift" test since it fails with some non-zero probability even when the functionality is correct.
This is causing the the test to be largely ignored, and disrupts regular testing
(including in continuous integration) where an integration can fail just
because this tests fails for "expected" reasons.

We should re-enable the test once it is has a way to tolerate the
"expected" failure, perhaps using some notion of statistical confidence
to determine if the failure is real.
2016-03-19 21:27:44 -07:00
Dmitri Gribenko
8ef59b187d Silence warnings in NewArray.swift.gyb 2016-03-19 18:07:58 -07:00
Dmitri Gribenko
3f448b3896 Move NewArray.swift.gyb to validation-test
It depends on checkRangeReplaceable, which was moved to
StdlibCollectionUnittest.
2016-03-19 18:07:50 -07:00
Dmitri Gribenko
aaa486cc7b New indexing model: fix most compilation issues in StdlibCollectionUnittest
We are still hitting what looks like a compiler bug:

error: type alias 'SubSequence' circularly references itself

which is emitted for every minimal collection type.
2016-03-18 23:20:57 -07:00
Dmitri Gribenko
941235c25e New indexing model: remove a duplicate API 2016-03-18 23:03:19 -07:00
Jordan Rose
40f57149f6 Move StdlibUnittest tests to their own directory.
StdlibUnittest.swift became StdlibUnittest/Common.swift;
all others just dropped the "StdlibUnittest" prefix.
2016-03-18 16:19:30 -07:00
Jordan Rose
e6a519fbda [StdlibUnittest] Install our own handler for uncaught ObjC exceptions.
We don't want to be at the whims of the system on what to do with an
uncaught exception; we need to make sure its message gets printed to
stderr so that the parent process can check it.

(There's a bit of trickery here to see if the class looks like an
NSException; otherwise we lose the name of the exception and just get
the reason.)
2016-03-18 13:55:45 -07:00
Doug Gregor
d92ae77076 Eliminate most remaining uses of _convertNSFooToFoo and _convertFooToNSFoo.
Generalized bridging has fully subsumed most of these. NSError is
still special, and _convertStringToNSString remains for the the
runtime's implementation of SwiftObject's -description method.
2016-03-18 11:42:00 -07:00
Harlan Haskins
47541c92b4 [StdlibUnittest] Made output for expected crashes less fatalistic 2016-03-17 18:23:41 -06:00
Max Moiseev
03cbb49982 [stdlib] _stdlibAssert => _debugPrecondition 2016-03-17 12:16:19 -07:00
Dave Abrahams
f493b54e44 [stdlib] indexing model: Interval/Range merge
This is step 1; we still need to introduce ClosedRange.
2016-03-16 15:59:10 -07:00
Ben Langmuir
d22638766e Swap the order of arguments to expectEqual in Hashing test
So that we print "expected" and "actual" on the correct values if it
fails.
2016-03-16 11:32:48 -07:00
Ben Langmuir
24f685c1d2 Decrease the probability that stdlib/Hashing.swift will fail
Bump the number of trials from 10 to 14, which makes the test orders of
magnitude less likely to fail.  For a range of size 10, doing 10 trials
meant that a single call to checkRange would fail ~0.03% of the time;
with 14 trials the spurious failure rate is ~0.0003%. We have 10 calls
to checkRange in this test with ranges of size <= 10.

While this test didn't fail that often before, we have a very large
number of automated builds and it has been a constant low-level source
of friction that this test fails and we have to look at and then ignore
the results.
2016-03-16 11:29:43 -07:00
Dmitri Gribenko
85d955b788 Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-03-15 01:27:03 -07:00
practicalswift
1edb62dc38 [Python] Make flake8 linting pass without errors/warning (w/ default rules) 2016-03-13 20:19:51 +01:00
Patrick Pijnappel
4d05dc69a1 [stdlib] Resolve merge conflict in Unicode.swift 2016-03-13 14:08:23 +11:00
Dmitri Gribenko
3cde854287 Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-03-12 01:11:32 -08:00
Slava Pestov
55519871e0 validation-tests: Don't use AnyObject dispatch in Dictionary.swift
Fixes <rdar://problem/25023473>.
2016-03-11 13:25:54 -08:00
Dmitri Gribenko
d268da0628 New indexing model: avoid allocations in fatalError() when the string buffer is already in UTF-8 2016-03-11 13:08:01 -08: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
Dmitri Gribenko
e9796f1c3d Rename UnicodeCodecType to UnicodeCodec in a new test 2016-03-09 18:40:59 -08:00
gregomni
78216b2990 Change all remaining tests that use typealias in a protocol to use associatedtype. 2016-03-09 18:08:52 -08:00
practicalswift
0796eaad1f [Python] Fix 80-column violations 2016-03-09 23:52:11 +01:00
Max Moiseev
1fae0d1325 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-08 12:48:48 -08:00
Mike Ferris
7fb274a643 <rdar://problem/24814424> Add unit tests for the error handling support in the XCTest swift overlay 2016-03-08 08:35:24 -08:00
Max Moiseev
7fe6916bf6 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-07 12:10:47 -08:00
practicalswift
4c3bca8e04 [gardening] Fix recently introduced typo: "accidently" → "accidentally" 2016-03-05 08:47:36 +01:00
Michael Gottesman
9a5c3eabf2 Merge pull request #968 from ezephir/linux-validation-dictionary-input
[StdLib] Refactor DictionaryKeyValueTypes test input data
2016-03-04 22:54:42 -08:00
Arnold Schwaighofer
0b181a1861 Don't throw away the top bits of our hashed value for strings on 64bit platforms
SR-877
rdar://24918173
2016-03-04 14:29:02 -08:00
Max Moiseev
cf4bafe9e3 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-03 13:22:03 -08:00
Patrick Pijnappel
49741cfdd9 [stdlib] Rewrite UTF8 decoding 2016-03-03 23:30:00 +11:00
practicalswift
e33f1747a9 [Python] Improve Python consistency: "variable in function should be lowercase" (N806)
The repo contains roughly 80 Python scripts. "snake_case" naming is used for
local variables in all those scripts. This is the form recommended by the PEP 8
naming recommendations (Python Software Foundation) and typically associated
with idiomatic Python code.

However, in nine of the 80 scripts there were at least one instance of
"camelCase" naming prior to this commit.

This commit improves consistency in the Python code base by making sure that
these nine remaining files follow the variable naming convention used for
Python code in the project.

References:
* PEP 8: https://www.python.org/dev/peps/pep-0008/
* pep8-naming: https://pypi.python.org/pypi/pep8-naming
2016-03-02 18:56:47 +01:00
Max Moiseev
859db53d87 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-01 12:56:26 -08:00
Emanuel Zephir
a4e8ee04e0 [StdLib] Refactor DictionaryKeyValueTypes test input data
Split the input file into a pure Swift and Objective-C interop files in
anticipation of refactoring tests to remove XFAILs on Linux.
2016-02-29 22:49:35 -08:00
practicalswift
f6d6585ee0 [Python] Improve Python consistency: Use function_name(…) throughout (PEP8) 2016-02-29 22:49:19 +01:00
Dmitri Gribenko
56785e81a6 Merge pull request #1477 from PatrickPijnappel/patch-3
[stdlib] Rewrite UTF8._isValidUTF8()
2016-02-29 13:12:24 -08:00
Max Moiseev
e48f452a2e Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-api-guidelines 2016-02-29 12:15:33 -08:00
Max Moiseev
a49dab6bf8 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-29 12:08:52 -08:00