Commit Graph

1231 Commits

Author SHA1 Message Date
Max Moiseev
171169b01f [stdlib][swift-3-indexing-model] fixing Arrays tests 2016-04-01 14:12:17 -07:00
Dmitri Gribenko
5b2527ebb1 stdlib: make _writeBackMutableSlice() callable from StdlibCollectionUnittest 2016-04-01 14:12:16 -07:00
Dmitri Gribenko
340f464b6d StdlibCollectionUnittest: rename methods for consistency 2016-04-01 14:12:15 -07:00
Dmitri Gribenko
5a12349e9c Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-04-01 14:12:13 -07:00
Max Moiseev
97f06a09a7 [stdlib][swift-3-indexing-model] removing Strideable requirement for checkBidirectionalCollection 2016-04-01 14:11:54 -07:00
Dmitri Gribenko
8fbe94fe01 New indexing model: make validation-test/stdlib/CollectionType.swift.gyb compile (but not pass yet) 2016-04-01 14:11:53 -07:00
Dmitri Gribenko
629a941130 Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-04-01 14:11:51 -07:00
Slava Pestov
49c54870c1 Serialization: Auto-linking recursively walks modules imported from -sil-serialize-all modules 2016-04-01 12:21:36 -07:00
Dmitri Gribenko
f782cba799 StdlibUnittest: fix a compiler warning 2016-03-31 09:52:28 -07:00
Dmitri Gribenko
66808b96b9 StdlibUnittest: correct precondition() message 2016-03-31 09:28:01 -07:00
Dmitri Gribenko
27e2f7f6d9 StdlibUnittest: new feature: data-parameterized tests 2016-03-31 00:50:10 -07:00
Dmitri Gribenko
cd4b963d40 StdlibUnittest: use 'Array.append(Element)' instead of 'Array += Array' 2016-03-30 21:03:24 -07:00
Dmitri Gribenko
76083bb1f3 StdlibUnittest: make TestSuite and other helper classes final
These classes are not meant to be subclassed.
2016-03-30 20:46:21 -07:00
swift-ci
5e6f4cf252 Merge pull request #1939 from tinysun212/pr-portable-random 2016-03-30 15:43:14 -07:00
Han Sangjin
5c1854bfcf stdlib: Portable random function
Changed rand32() implementation using a random engine in C++11 <random>.
2016-03-31 04:39:46 +09:00
Dmitri Gribenko
bd9e855e5b StdlibCollectionUnittest: make it work with new slice types, and add more test cases 2016-03-29 17:22:52 -07:00
Dmitri Gribenko
f065fde8e8 New indexing model: StdlibCollectionUnittest: rename methods for consistency 2016-03-29 16:35:32 -07:00
Max Moiseev
c93fcb98ae [stdlib][swift-3-indexing-model] fixing Concatenate tests
The 'reversed' tests are marked as XFAILing, because required methods
are not implemented on `ReversedCollection`.
2016-03-29 14:56:22 -07:00
Max Moiseev
b30a550801 [stdlib][swift-3-indexing-model] Fixing checkCollection functions 2016-03-29 14:56:21 -07:00
Oleksandr Tymoshenko
12dd0755af Fix build on FreeBSD
On FreBSD pthread_t and posix_spawn_file_actions_t are opaque pointers
so they should be initialized with nil as on Darwin
2016-03-29 11:49:34 -07:00
Dave Abrahams
8e4f85277b Merge remote-tracking branch 'refs/remotes/origin/master' into merge 2016-03-29 09:19:34 -07:00
Dave Abrahams
a5c3c63c3d [stdlib] Indexing model: nix RangeOfStrideable
Instead, use CountableRange which is constrained to have a Strideable
Bound whose Stride conforms to Integer.
2016-03-28 17:06:09 -07:00
David Farler
5ea5bb06a3 Split swift-refleciton-test into host and target test targets
swift-reflection-test is now the test that forks a swift executable
and performs remote reflection, making it runnable on other targets,
such as the iOS simulator.

swift-reflection-dump is now a host-side tool that dumps the remote
reflection sections for any platform binary and will continue to
link in LLVM object file support.

This necessitates finally moving lib/Refleciton into stdlib/public,
since we're linking target-specific versions of the test tool and
we would eventually like to adopt some of this functionality in
the runtime anyway.
2016-03-28 16:34:44 -07:00
Dave Abrahams
da5c4036ac func index(n: IndexDistance, stepsFrom i: Index)
M-x findr-query-replace

\<func advance(\([^(),]*\|[^(),]+([^()]*)[^(),]*\)\(,[
]*\)by \([^(),]*\|[^(),]+([^()]*)[^(),]*\)

func index(\3\2stepsFrom \1
2016-03-28 13:23:04 -07:00
Dave Abrahams
81d3e8ca83 limit: => limitedBy:, pt 2
M-x findr-query-replace

\<limit: \([^(),]*\|[^(),]+([^()]*)[^(),]*\))\( *\(?:[^ -]\|-[^>]\)\)

limitedBy: \1)\2
2016-03-28 13:12:02 -07:00
Dave Abrahams
4d651f8fc0 limit: => limitedBy:, pt 1
M-x findr-query-replace

\(,[
]*\)limit: \([^(),]*\|[^(),]+([^()]*)[^(),]*\)) ->

\1limitedBy limit: \2) ->
2016-03-28 13:03:59 -07:00
Dave Abrahams
01127b32d5 index(n, stepsFrom: i)
M-x findr-query-replace

\<advance(\([^:]+?\),\([
]+\)by: *\([^(),]*\|[^(),]+([^()]*)[^(),]*\)\(,\(?:[
]+\)limit: *\(?:[^()]*\|[^()]+([^()]*)[^()]*\)\)?)

index(\3,\2stepsFrom: \1\4)
2016-03-25 17:54:39 -07:00
David Farler
aa310cf0a7 Rename SwiftReflectionTest Cmake target to swiftSwiftReflectionTest
It appears a little redundant but this follows the convention of the
other private stdlib library targets, where "SwiftReflectionTest" is
the module name, so it should be included in the target name.
2016-03-25 13:33:16 -07:00
Dmitri Gribenko
2a66514058 CMake: SwiftReflectionTest depends on Darwin 2016-03-25 11:38:45 -07:00
Chris Lattner
e4c7bca43a Merge pull request #1861 from practicalswift/weekly-cleanup-01
[gardening] Weekly gardening: typos, duplicate includes, header formatting, etc.
2016-03-24 22:39:36 -07:00
practicalswift
d00a5ef814 [gardening] Weekly gardening: typos, duplicate includes, header formatting, etc. 2016-03-24 22:41:10 +01:00
David Farler
790b7de5e4 Reenable building the SwiftReflectionTest library
This wasn't importing the Mach-O APIs from the right module.
2016-03-24 14:15:55 -07:00
David Farler
e65f685a23 Temporarily disable SwiftReflectionTest library builds
Some Mach APIs don't appear to resolve on iOS.
2016-03-24 12:40:59 -07:00
David Farler
0f62e6691c Add SwiftReflectionTest helper library
This is a small helper library to communicate information back to
swift-reflection-test from a test swift executable. Each swift test
file under test/Reflection should link this library to get the main
test hook to send responses back to the test tool.
2016-03-24 12:05:18 -07:00
Dave Abrahams
11259d1d14 [stdlib] indexing model: rename in-place indexing
This time, choose something that's at least compliant with the API
guidelines.
2016-03-23 17:16:20 -07:00
Max Moiseev
d721a03d90 [stdlib][swift-3-indexing-model] fixing Index tests 2016-03-23 16:07:20 -07:00
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
Jordan Rose
cd9114423a Reapply "[StdlibUnittest] Install our own handler for uncaught ObjC exceptions."
This reapplies e6a519f and 86dcce1 by reverting e86d3bd, which reverted
more than it needed to.
2016-03-22 16:24:40 -07:00
Dmitri Gribenko
a6cd57222a Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-03-21 14:41:15 -07:00
Dave Abrahams
c8f5047f66 [stdlib] indexing model: Workaround for compiler bug
"type circularly references itself"
2016-03-21 13:52:08 -07:00
Michael Ilseman
e86d3bde6c Revert "[ReconstructType] Fix decl lookup when there are multiple constructors"
This reverts commit 65c86b713d.

I attempted to resolve the merge conflict, but Jordan will need to do
a second check.
2016-03-20 20:00:37 -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
9dd485eb89 New indexing model: WIP on updating StdlibCollectionUnittest 2016-03-18 23:03:01 -07:00
Jordan Rose
86dcce1259 [StdlibUnittest] Don't catch ObjC exceptions on non-ObjC platforms.
My apologies!
2016-03-18 14:25:07 -07:00
Dave Abrahams
6dee0c0cd3 [stdlib] indexing model: restore checkRangeReplaceable
Failures down to 19, 4 in stdlib.
2016-03-18 14:06:42 -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
Dave Abrahams
88a9f2e628 [stdlib] indexing model: Complete Interval/Range merge
Down to 22 failures; only 5 in stdlib tests
2016-03-18 10:04:09 -07:00
Harlan Haskins
47541c92b4 [StdlibUnittest] Made output for expected crashes less fatalistic 2016-03-17 18:23:41 -06:00
Harlan Haskins
424eec9960 [StdlibUnitTest] Disable printing child stderr for expected crashes. 2016-03-17 15:14:05 -06:00
Dave Abrahams
17f841430c Merge Range work 2016-03-16 15:59:39 -07:00