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
Max Moiseev
d5e56d674f
Removing explicit implementation of arithmetic operators from Decimal in favor of defaults
2017-01-12 15:54:37 -08:00
Max Moiseev
fa7368ad7d
Merge remote-tracking branch 'origin/master' into new-integer-protocols
2017-01-11 14:37:01 -08:00
Syo Ikeda
b1011ca176
[Foundation][gardening] Remove unnecessary breaks
2017-01-12 02:06:56 +09:00
Tony Parker
3345050957
Merge pull request #6615 from phausler/data_append_truncation_fix
...
[Foundation] Correct sequence initializers for Data when repeating:count: is called and add a memset fast-path
2017-01-10 13:26:09 -08:00
Max Moiseev
aecccc7e48
Merge remote-tracking branch 'origin/master' into new-integer-protocols
2017-01-09 17:38:04 -08:00
Tony Parker
d34d36ecbc
Remove errant definition of a URLResourceValue key
2017-01-09 16:13:32 -08:00
Tony Parker
1553cdecec
Use the right key for the image thumbnail dictionaries in the URL
...
resources struct.
Fixes rdar://27556178
2017-01-09 15:10:21 -08:00
Doug Gregor
2302f59288
Merge pull request #6531 from Fruneau/indirect-fields
...
Clang Importer: import all indirect fields.
2017-01-09 15:01:02 -08:00
practicalswift
3918d9d251
[gardening] Replace likely word processor artefacts with ASCII equivalents (— → --, … → ...)
2017-01-08 15:23:06 +01:00
Ben Cohen
c0ecff1344
Merge pull request #6508 from airspeedswift/sprightly-look
...
[SDK] Change SKThings.customPlaygroundQuickLook to return a non-optional image
2017-01-07 14:27:38 -08:00
Ben Cohen
578a52627a
Merge branch 'master' into se-147
2017-01-07 13:19:15 -08: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
Max Moiseev
27889c6376
Merge remote-tracking branch 'origin/master' into new-integer-protocols
2017-01-06 15:54:44 -08:00
Robert Widmann
7d427aa62e
Merge pull request #6569 from mekjaer/mk-inconsistent-spacing-on-properties-and-arguments
...
[gardening] spacing on properties and arguments in IndexSet (stdlib)
2017-01-06 16:11:00 -07:00
Philippe Hausler
45714e6263
[Foundation] Correct sequence initializers for Data when repeating:count: is called and add a memset fast-path
2017-01-06 13:56:08 -08:00
practicalswift
6d1ae2a39c
[gardening] 2016 → 2017
2017-01-06 16:41:22 +01:00
Florent Bruneau
68bc423be3
Clang Importer: import all indirect fields.
...
Until now, only indirect fields that didn't belong to a C union (somewhere
between the field declaration and the type in which it is indirectly
exposed) were imported in swift. This patch tries to provide an approach
that allows all those fields to be exposed in swift. However, the downside
is that we introduce new intermediate fields and types, some of the fields
may already have been manually defined in type extension (as seen with the
GLKit overlay).
The main idea here is that we can simply expose the anonymous
struct/unions from which the indirect types are taken and then use swift
computed properties to access the content of those anonymous
struct/unions. As a consequence, each time we encounter an anonymous
struct or union, we actually expose it at __Anonymous_field<id> (where id
is the index of the field in the structure). At this point, we use the
existing mechanism to expose the type as
__Unnamed_<struct|union>_<fieldname>. Then, each indirect field is exposed
as a computed property.
The C object:
typedef union foo_t {
struct {
int a;
int b;
};
int c;
} foo_t;
Is imported as
struct foo_t {
struct __Unnamed_struct___Anonymous_field1 {
var a : Int32
var b : Int32
}
var __Anonymous_field1 : foo_t.__Unnamed_struct___Anonymous_field1
var a : Int32 {
get {
return __Anonymous_field1.a
}
set(newValue) {
__Anonymous_field1.a = newValue
}
}
var b : Int32 {
get {
return __Anonymous_field1.b
}
set(newValue) {
__Anonymous_field1.b = newValue
}
}
var c : Int32
}
This has the advantage to work for both struct and union, even in case we
have several nested anonymous struct/unions. This does not require to know
the size and/or the offset of the fields in the structures and thus can be
properly implemented using front-end data.
Signed-off-by: Florent Bruneau <florent.bruneau@intersec.com >
2017-01-05 22:52:25 +01:00
Ben Cohen
fefc2e40df
Migrate _copyContents to be called from UnsafeMutableBufferPointer with checks for overrun.
2017-01-05 11:59:49 -08:00
Ben Cohen
4dc5eacef5
Merge branch 'master' into im-not-warning-you-again
2017-01-05 10:11:48 -08:00
mekjaer
272dfb26df
Gardening spacing on properties and arguments in IndexSet (stdlib)
2017-01-04 23:09:17 +01:00
Slava Pestov
6bea9534fe
Merge pull request #6523 from jpsim/jp-inconsistent-closure-spacing
...
[gardening] fix mismatched closure open/close spacing in stdlib source
2017-01-03 20:59:38 -08:00
JP Simard
65688bdc39
[gardening] replace unused closure parameters with '_' in stdlib source ( #6522 )
...
* replace unused closure parameters with '_' in stdlib source
* fold some _ closure arguments into line above
* fold more _ closure arguments into line above
2017-01-03 20:10:41 -07:00
Robert Widmann
fca7b66b7c
Merge pull request #6521 from jpsim/jp-void-return
...
[gardening] prefer '-> Void' over '-> ()' in stdlib source
2017-01-03 20:10:13 -07: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
Robert Widmann
359a66488f
Merge pull request #6520 from jpsim/jp-trailing-semicolon
...
[gardening] remove trailing semicolons in stdlib source
2017-01-03 17:31:34 -07:00
Robert Widmann
6dd2dda53e
Merge pull request #6525 from jpsim/jp-omit-control-statement-parens
...
[gardening] remove superfluous parentheses in control statements in stdlib source
2017-01-03 17:27:23 -07:00
Robert Widmann
3828784768
Merge pull request #6526 from jpsim/jp-return-arrow-whitespace
...
[gardening] fix overly-spaced return arrows in XCTest.swift
2017-01-03 17:26:35 -07:00
JP Simard
83b6d3c29c
remove redundant optional nil assignment in stdlib source
...
since this appears to be the convention followed elsewhere in the code base.
2016-12-31 18:45:01 -08:00
JP Simard
2b246893c9
fix overly-spaced return arrows in XCTest.swift
2016-12-31 18:42:52 -08:00
JP Simard
7301b79342
remove superfluous parentheses in control statements in stdlib source
...
since this appears to be the convention followed elsewhere in the code base.
2016-12-31 18:40:15 -08:00
JP Simard
bb0af66904
fix mismatched closure open/close spacing in stdlib source
2016-12-31 18:21:05 -08:00
JP Simard
ea5b665afa
prefer '-> Void' over '-> ()'
...
Apple and the Swift community has settled on this style:
https://devforums.apple.com/message/1133616#1133616
> FWIW, we've recently decided to standardize on () -> Void
> (generally, () for parameters and Void for return types) across all of our
> documentation.
2016-12-31 17:55:19 -08:00
JP Simard
bd34ea5e2d
remove trailing semicolons in stdlib source
2016-12-31 17:51:18 -08:00
ben-cohen
c00485a0f7
use nil coalescing on URL.quarantineProperties { set }
2016-12-29 14:37:08 -08:00
ben-cohen
3f7adc9c22
supress warning on printing out optionals (temporarily, waiting on conditional conformance)
2016-12-29 12:57:32 -08:00
ben-cohen
1fb653cd51
Fix warning on UIImage?-as-Any
2016-12-29 12:20:52 -08:00