Commit Graph

2015 Commits

Author SHA1 Message Date
Dmitri Gribenko
8fd96943f9 Merge pull request #2949 from austinzheng/az-st3
Adding tests for String's removeSubrange overloads
2016-06-09 07:38:06 -07:00
Brian Gesiak
fd136cc28c Merge pull request #2788 from briancroom/pr-2551
SR-1417: Add non-optional overloads of XCTAssertEqual and XCTAssertNotEqual
2016-06-08 14:41:11 -04:00
Austin Zheng
240460ba38 Adding tests for String's removeSubrange overloads 2016-06-08 09:35:14 -07:00
Austin Zheng
30ba084a70 Adding tests for String's replaceSubrange overloads for closed ranges 2016-06-08 01:01:00 -07:00
Dmitri Gribenko
09c0b60e12 Merge pull request #2929 from ultramiraculous/slice-base
SE-0093 - Add public base property to slices
2016-06-07 20:28:05 -07:00
Austin Zheng
f92be08556 Adding tests for String's replaceSubrange overloads for non-closed ranges 2016-06-07 17:01:39 -07:00
Chris Williams
d08cbd6a60 Test for Slice.base 2016-06-07 16:04:27 -07:00
Austin Zheng
fa6c028edf Adding tests for replaceSubrange overloads for range types (#2774) 2016-06-07 14:21:30 -07:00
Trent Nadeau
b9db36cda5 Removed last uses of @warn_unused_result 2016-06-06 19:12:51 -04:00
Brian Croom
1b7a447955 Test the failure messages for optional and non-optional XCTAssertEqual variants 2016-05-31 08:20:56 -04: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
Dmitri Gribenko
87115f8729 Merge pull request #2717 from kballard/sequence-first-state-next
[Stdlib] Implement sequence(first:next:) and sequence(state:next:)
2016-05-27 18:32:19 -07:00
Kevin Ballard
d1d0e05abc [Stdlib] Implement sequence(first:next:) and sequence(state:next:)
Fixes [SR-1622](https://bugs.swift.org/browse/SR-1622).
2016-05-27 13:03:48 -07:00
Nate Cook
089ea92fdc [stdlib] Fix warnings in Collections validation test 2016-05-26 10:39:34 -05:00
Nate Cook
95de0e41cb [stdlib] Fix _writeBackMutableSlice error messages 2016-05-26 10:39:24 -05:00
Dmitri Gribenko
2daa1400cf Merge pull request #2541 from linux-on-ibm-z/master-s390x
Support Linux on z as a Swift platform
2016-05-25 16:06:10 -07:00
Maxim Moiseev
38f7ec2a32 [stdlib] Fix the String.decodeCString for UTF16 and UTF32 (#2681)
[stdlib] Fix the `String.decodeCString` for UTF16 and UTF32

Resolves [SR-1578](https://bugs.swift.org/browse/SR-1578]
Essentially the problem was that `strlen` is not the right way of
obtaining a length of anything but null-terminated UTF-8 sequence of
characters. Other encodings require alternative mechanisms.
2016-05-25 15:51:10 -07:00
Dmitri Gribenko
855700dd22 Merge pull request #2689 from rintaro/parser-attr-requires-foundation-inactive
[Parser] Don't report AttrsRequiringFoundation in inactive config block
2016-05-25 13:39:42 -07:00
Rintaro Ishizaki
4d686a424f [Parser] Don't report AttrsRequiringFoundation in inactive config block
Fixes rdar://problem/23487944
2016-05-26 02:43:21 +09:00
Bryan Chan
bcc43c0eeb Add support for s390x to UnsafeBitMap test 2016-05-25 07:24:35 -04:00
Gary Liu
9b881cd8ac Fix String.init test in FixedPoint.swift.gyb for big-endian systems. 2016-05-24 20:04:04 -04:00
Bryan Chan
85fde8b1fb Add support for Linux s390x. LLVM's Swift calling convention support is used to ensure correct operations of C++ code in the runtime. This patch also includes some (incomplete) changes to enum handling to make enums work in most common cases. 2016-05-24 20:03:28 -04:00
Maxim Moiseev
eb7c39b4f9 [stdlib] Add String.subscript(_: ClosedRange<Index>) (#2653)
Fixes [SR-1596](https://bugs.swift.org/browse/SR-1596).
2016-05-24 11:35:07 -07:00
Dmitri Gribenko
d74b1834f8 stdlib: Dictionary, Set: stop overallocating the bitmap
The 'sizeInWords(forSizeInBits:)' function was supposed to return the
size in words, but returned the size in bits, overallocating the bitmap
by a factor of 32 or 64, depending on the platform.
2016-05-23 21:12:13 -07:00
Dmitri Gribenko
7c7c42ced2 stdlib: add basic tests for _UnsafeBitMap 2016-05-23 18:41:39 -07:00
Dmitri Gribenko
62a65b81de Hashing test: restore the seed override before finishing the test
Overriding the hash value breaks all Dictionary instances in the test
harness, so do it only temporarily.
2016-05-22 17:17:16 -07:00
Michael Gottesman
3fea66bc98 Revert "Disable XCTest.swift until bot is upgraded."
This reverts commit bddea630d9.
2016-05-18 16:13:18 -07:00
Dmitri Gribenko
bfbd2ffda2 Merge pull request #2561 from rintaro/test-nondarwin-2
[test][stdlib] Enable several test cases on non-Darwin platforms - Part2
2016-05-18 09:05:36 -07:00
David Farler
224d3181ce AtomicInt.swift: Halve the test iterations on debug builds
This test is on the edge of timing on for debug builds and causes
unnecessary noise on the bots.

rdar://problem/26233531
2016-05-17 14:21:21 -07:00
Rintaro Ishizaki
bcc18576cb [stdlib] Enable Set validation test on non-Darwin platforms 2016-05-17 18:45:23 +09:00
Rintaro Ishizaki
bd024bd586 [stdlib] Enable NewArray validation test on non-Darwin platforms 2016-05-17 18:45:23 +09:00
swift-ci
9af514f994 Merge pull request #2544 from rintaro/test-nondarwin-1 2016-05-16 21:30:10 -07:00
Dmitri Gribenko
0868b6f70c stdlib: Dictionary, Set: allow querying for a mismatched type when bridged
Swift's Dictionary and Set are typed, but when bridged to NSDictionary
and NSSet they should behave accordingly, that is, allow querying for
keys of arbitrary types.

rdar://problem/23679193
2016-05-16 15:30:44 -07:00
Dmitri Gribenko
a85a8c1948 OpenCL overlay: make the test more robust by allowing any device 2016-05-16 11:44:11 -07:00
Rintaro Ishizaki
52ecb88256 [stdlib] Enable Dicitionary validation test on non-Darwin platforms 2016-05-17 03:06:58 +09:00
Rintaro Ishizaki
fbc76afa73 [stdlib] Enable validation-test/stdlib/Unicode test on non-Darwin platforms 2016-05-17 03:06:58 +09:00
Rintaro Ishizaki
9c55ad1396 [stdlib] Enable ArrayNew.swift.gyb validation test on non-Darwin platforms 2016-05-16 22:44:24 +09:00
Dmitri Gribenko
b7984be446 stdlib: always check that IteratorProtocol.next() repeatedly returns nil
This is required by SE-0052.
2016-05-15 23:55:48 -07:00
Russ Bishop
1f88150b79 Use forEach() and fix tests 2016-05-14 23:32:41 -07:00
Russ Bishop
f20c9255e9 Changes for code review 2016-05-14 16:57:00 -07:00
Russ Bishop
1d8edfa60f SR-1519: Add Sequence.first(predicate:) 2016-05-13 23:46:05 -07:00
Michael Gottesman
bddea630d9 Disable XCTest.swift until bot is upgraded.
(cherry picked from commit b617d6b8e78a458fc708d4cf422f44f508912c33)
2016-05-13 22:04:40 -07:00
Jacob Mizraji
f37c275c59 re-add symlink removed by ae2ddc9e94be9d5eef25279f9ce7dcd34c6392d4
(cherry picked from commit 909f8d61801363cf8e30f303f521cf94ccda7c6d)
(cherry picked from commit eba30d8c64526cc6b1b7443da302233edea7c82f)
2016-05-13 22:04:29 -07:00
Adrian Prantl
0fac43e11f Adapt to upstream LLVM changes.
<rdar://problem/25949511+25962000>

(cherry picked from commit df9dfac609d17cd26d6107f17024c937b1b5b1a2)
2016-05-13 22:04:00 -07:00
Max Moiseev
14470b11d0 [stdlib] moving the strideable test to where it belongs 2016-05-13 12:25:22 -07:00
Maxim Moiseev
5fe2a0232e [stdlib] Introducing MinimalStrideableIndex... (#2506)
... as well as new test collection types:
`MinimalRandomAccessCollectionWithStrideableIndex` and
`DefaultedRandonAccessCollectionWithStrideableIndex`, to test default
implementation of `index(...)` family of functions provided by the
standard library for the random access collections with strideable
indices.
2016-05-13 11:19:46 -07:00
Trent Nadeau
0cc851568a Updated tests to use @discardableResult and _ = . 2016-05-11 22:53:38 -04:00
Stephen Canon
772d7ec3c5 Merge branch 'SE-0067' of https://github.com/stephentyrone/swift into stephentyrone-SE-0067
Implements almost all of SE-0067. There are a few outstanding features; this implementation does not have:

- formRemainder(dividingBy:)
- formSquareRoot()
- addProduct(_:,_:)

which require additions to the Builtin module. I can probably figure out how to do these, but I haven't had a chance to do so yet. Also missing are the generic initializers and comparisons whose implementation depends on having new Integer protocols.

The last remaining feature of SE-0067 is that while the basic operators +,-,*,/, etc are moved onto the FloatingPoint protocol, they are still required on the concrete types in order to disambiguate overloads. Fixing this seems to require either modifying the overload resolution rules or removing these operators from some other protocols. Or it might just require that someone smarter than me looks at the problem.

Passes the existing tests locally (with the included changes). I'm working on additional tests for the new features.
2016-05-11 22:11:21 -04:00
Max Moiseev
4027afa536 [stdlib] fixing the signature of RandomAccessCollection.index(_:offsetBy:limitedBy:) and uncommenting the test 2016-05-11 17:27:49 -07:00
John McCall
e75dae491e Don't diagnose failures to call symmetrically-typed binary operators
as a failure to convert the individual operand, since the operator
is likely conceptually generic in some way and the choice of any
specific overload is probably arbitrary.

Since we now fall back to a better-informed diagnostics point, take
advantage of this to generate a specialized diagnostic when trying to
compare values of function type with ===.

Fixes rdar://25666129.

This reverts commit 073f427942,
i.e. it reapplies 35ba809fd0 with a
test fix to expect an extra note in one place.
2016-05-11 16:09:28 -07:00