Doug Gregor
208b2c180c
[XCTest overlay] Remove extraneous XCAssert(Not)Equal overloads.
...
XCTest had XCAssert(Not)Equal overloads for optionals, arrays
(including contiguous arrays and array slices), and dictionaries to
work around the lack of conditional conformances to Equatable. Now
that we have the latter, remove the former.
Fixes rdar://problem/17924430.
2017-11-27 21:09:50 -08:00
Lance Parker
414614cf88
Revert "Revert "[stdlib]Enable Swift 4 mode for the overlays ( #12608 )"" ( #12751 )
...
This reverts commit bcf5d66c8e .
2017-11-06 14:03:48 -08:00
Mishal Shah
bcf5d66c8e
Revert "[stdlib]Enable Swift 4 mode for the overlays ( #12608 )"
...
This reverts commit f54d8b4ef2 .
2017-11-03 11:52:30 -07:00
Lance Parker
f54d8b4ef2
[stdlib]Enable Swift 4 mode for the overlays ( #12608 )
...
Enable Swift 4 mode for the overlays
2017-11-03 10:11:45 -07:00
Kuba (Brecka) Mracek
d03a575279
Unify the capitalization across all user-visible error messages ( #11599 )
...
* Unify the capitalization across all user-visible error messages (fatal errors, assertion failures, precondition failures) produced by the runtime, standard library and the compiler.
* Update some more tests to the new expectations.
2017-08-29 12:16:04 -07:00
Mishal Shah
64a77ca716
Update master to build with Xcode 9 beta 4, macOS 10.13, iOS 11, tvOS 11, and watchOS 4 SDKs.
2017-07-28 11:17:59 -07:00
Mishal Shah
c5ff1f2cac
Update master to build with Xcode 9 beta 1, OS X 10.13, iOS 11, tvOS 11, and watchOS 4 SDKs.
2017-06-14 16:20:35 -07:00
Brian Croom
dc4e856875
Merge pull request #6991 from briancroom/fix-XCTAssert-perf-regression
...
[SR-3701] [XCTest] Reduce bridging overhead from the exception-catching trampoline
2017-01-24 10:53:22 -08:00
Brian Croom
42b6577aa9
[XCTest] Reduce bridging overhead from the exception-catching trampoline
...
By returning `nil` instead of an empty dictionary in the common case where
no exception is encountered, we skip any dictionary-bridging work which
can become expensive if making assertions in a tight loop.
2017-01-23 15:02:38 -08:00
practicalswift
a9d6d8938c
[gardening] Fix recently introduced typos
2017-01-22 20:40:45 +01:00
Robert Widmann
cef4e66233
Merge pull request #6776 from ArtSabintsev/feature/XCTAssertNoThrow
...
Implementation for XCTAssertNoThrow
2017-01-13 01:39:26 -07:00
Arthur Ariel Sabintsev
5008ed8421
Changed constant to _XCTAssertionType.noThrow
2017-01-13 02:43:11 -05:00
Arthur Ariel Sabintsev
741056578f
Revert "All declarations in XCTest in SDK and XCTest in validations-tests have 2 spaces instead of 4"
...
This reverts commit 43a7b31490 .
2017-01-13 01:38:27 -05:00
Arthur Ariel Sabintsev
43a7b31490
All declarations in XCTest in SDK and XCTest in validations-tests have 2 spaces instead of 4
2017-01-13 01:36:37 -05:00
Arthur Ariel Sabintsev
ec8e6c5a38
Changed success condition
2017-01-13 01:31:29 -05:00
Arthur Ariel Sabintsev
5f9352c8d2
Fixed indentation.
2017-01-13 01:28:53 -05:00
Arthur Ariel Sabintsev
b6d36fa86e
Simplified throwable function evaluation and success case requirements.
2017-01-13 01:24:53 -05:00
Arthur Ariel Sabintsev
13094af307
Fixed indentation
2017-01-13 01:18:21 -05:00
Arthur Ariel Sabintsev
31b96ad3cd
Adjusted _XCTRegisterFailure conditions. Added validation test for XCTAssertNoThrow
2017-01-13 00:41:47 -05:00
Arthur Ariel Sabintsev
7d726f2f32
Fixed smal bug with how expression was called
2017-01-13 00:20:54 -05:00
Arthur Ariel Sabintsev
f329b3b8bb
Implemented assertionType in failure cases
2017-01-13 00:20:30 -05:00
Arthur Ariel Sabintsev
93bc18129f
Now outputting caughtError
2017-01-13 00:17:44 -05:00
Arthur Ariel Sabintsev
e19da0b6b5
Fixed copy-paste error in error case. XCTAssertLessThanOrEqual to XCTAssertThrowsError
2017-01-13 00:09:28 -05:00
Arthur Ariel Sabintsev
e5e8eb7603
First pass at implementing XCTAssertNoThrow
2017-01-13 00:08:31 -05:00
Ben Cohen
3bdada1773
Merge pull request #6506 from airspeedswift/im-not-warning-you-again
...
[stdlib] Squash various warnings
2017-01-06 16:51:06 -08:00
practicalswift
6d1ae2a39c
[gardening] 2016 → 2017
2017-01-06 16:41:22 +01:00
Ben Cohen
4dc5eacef5
Merge branch 'master' into im-not-warning-you-again
2017-01-05 10:11:48 -08:00
JP Simard
891729f6c2
remove redundant '-> Void' return types from functions in stdlib source
...
since omitting it appears to be the convention followed elsewhere in
the code base.
2017-01-03 16:38:57 -08:00
JP Simard
2b246893c9
fix overly-spaced return arrows in XCTest.swift
2016-12-31 18:42:52 -08:00
ben-cohen
3f7adc9c22
supress warning on printing out optionals (temporarily, waiting on conditional conformance)
2016-12-29 12:57:32 -08:00
practicalswift
797b80765f
[gardening] Use the correct base URL ( https://swift.org ) in references to the Swift website
...
Remove all references to the old non-TLS enabled base URL (http://swift.org )
2016-11-20 17:36:03 +01:00
Jordan Rose
2e560b0319
[SDK] Use an extra shim header to remove _silgen_name from XCTest.
2016-10-15 14:59:27 -07:00
Michael Ilseman
b7c9eddd11
[noescape by default] drop @noescape from stdlib
2016-08-04 16:09:01 -07:00
Joe Groff
62afa03eb9
Improve Foundation overlay to handle bridging subscripts and dictionary literals.
...
SE-0072 took implicit bridging conversions away, which regressed the ability to express NSDictionaries as dictionary literals and index them using literal keys. Address this by changing the signature of init(dictionaryLiteral:) to use Hashable and Any, and by replacing the subscript from Objective-C with one using _Hashable that does the bridging on the user's behalf. This largely restores the QoI of working with NS collections.
2016-08-04 08:42:36 -07:00
Joe Groff
c748ba6c12
Merge pull request #3870 from jckarter/no-bridged-default-literal-types
...
Sema: Don't try bridged classes as default literal types.
2016-07-29 22:16:53 -07:00
Doug Gregor
b9363fe6bd
[SE-0111] Enable SE-0111 by default.
2016-07-29 17:28:24 -07:00
Joe Groff
11f03cd8b5
Sema: Don't try bridged classes as default literal types.
...
One last bit of SE-0072. We shouldn't fall back to bridged classes in the absence of type context for literals anymore. By itself, this kind of hoses the use of literals with NS types, but I think we can get most of the QoI back with overlay changes I plan to propose following this.
2016-07-29 15:18:31 -07:00
Chris Lattner
af30ae3222
Remove the last parts of the Boolean protocol, finishing up:
...
SE-0109: Remove the Boolean protocol.
We still love you George, even if we forgot your e.
2016-07-17 22:18:17 -07:00
Doug Gregor
823c24b355
[SE-0112] Rename ErrorProtocol to Error.
...
This is bullet (5) of the proposed solution in SE-0112, and the last
major piece to be implemented.
2016-07-12 10:53:52 -07:00
Nicola Salmoria
956b6b1cad
SR-1417: Add non-optional overloads of XCTAssertEqual and XCTAssertNotEqual
...
Previously, the only version of the functions that accepted values was the one that implicitly wraps them into Optionals. This generated a confusing error message when the assert failed. Having a separate overload that accepts non-optional types ensures that the correct description is printed when the assert fails.
2016-05-31 08:16:02 -04:00
Chris Lattner
4fd8418ba7
move the stdlib to put noescape and autoclosure on the type, instead of
...
the parameter. Progress towards SE-0049.
2016-04-14 23:13:43 -07:00
Harlan
2d50e81347
Updated lingering XCTest argument labels
...
This should be the last of the SE-0046 XCTest changes
2016-04-07 14:08:50 -07:00
Harlan Haskins
706230ff7d
Fixed XCTAssert argument labels
2016-04-07 13:43:44 -07:00
Manav Gabhawala
7928140f79
[SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary
2016-04-06 20:21:58 -04:00
Jordan Rose
b71f7440f0
stdlib: Rename cases in XCTest._XCTThrowableBlockResult.
...
This is a non-public enum, so there's no migration needed.
2016-02-24 17:46:11 -08:00
Max Moiseev
40b1a0b7e0
[stdlib] all sorts of require renamed back to precondition
2016-02-19 18:21:29 -08:00
Dmitri Gribenko
65d840c0ae
stdlib: lowercase cases in Optional and ImplicitlyUnwrappedOptional
2016-02-18 00:40:33 -08:00
Max Moiseev
3a3984877a
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-15 15:43:34 -08:00
Max Moiseev
61c837209b
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-04 16:13:39 -08:00
Chris Lattner
0619e57a61
Switch the stdlib to use #file instead of __FILE__, and deprecate the __FILE__ identifiers.
...
This also updates the tests that would otherwise fail.
2016-02-04 15:08:31 -08:00