Commit Graph

32 Commits

Author SHA1 Message Date
Max Moiseev
0490e86d01 [stdlib] strideTo/strideThrough => stride(to:...)/stride(through:...) 2016-02-24 09:56:10 -08:00
Dave Abrahams
64a5165ecf stdlib: deinitializePointee(_) => deinitialize()
Tacking "Pointee" on just for unary operations (and especially
operations with an optional count) created inconsistency.
2016-02-23 15:34:20 -08:00
Dave Abrahams
d96b051d28 stdlib: initializePointee(_) => initialize(with:)
Tacking "Pointee" on just for unary operations (and especially
operations with an optional count) created inconsistency.
2016-02-23 15:15:23 -08:00
Max Moiseev
40b1a0b7e0 [stdlib] all sorts of require renamed back to precondition 2016-02-19 18:21:29 -08:00
Dmitri Gribenko
f64f0be93a stdlib: ManagedBuffer.create(_:) => .create(minimumCapacity:) 2016-02-19 15:04:54 -08:00
Max Moiseev
61c837209b Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-04 16:13:39 -08:00
Dmitri Gribenko
9bcd5a1056 Collection.length => .count 2016-01-22 18:41:19 -08:00
Erik Eckstein
adef0368bb tests: add import statements to workaround linker errors in all relevant tests.
This is needed if we compile StdlibUnittest with -sil-serialize-all
So far I added the imports only in files which needed them. But this may change, depending on the optimizer (inlining).
Adding them in all files doesn't harm and avoids confusion if someone makes an unrelated change which would result in such a linker error.
2016-01-21 09:59:50 -08:00
Max Moiseev
f51e708a8f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-04 12:25:25 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
ken0nek
3ac60b13f5 Add spaces before and after closure arrow in test 2015-12-23 04:38:46 +09:00
Max Moiseev
bc942090ee cleaning up initializePointee/deinitializePointee, error messages and comments 2015-12-18 16:22:24 -08:00
Dmitri Gribenko
5498aa1938 stride(to:by:) => strideTo(_:by:)
and `stride(through:by:)` => `strideThrough(_:by:)`
2015-12-18 16:20:01 -08:00
Dmitri Gribenko
73ce9ae7e9 Collection.count => .length
And other API changes that naturally fall out from this, like
Array(repeating:count:) => Array(repeating:length:).
2015-12-17 15:55:29 -08:00
Maxim Moiseev
f2f50d6a9d precondition => require 2015-12-16 17:16:08 -08:00
Maxim Moiseev
9d0c912c70 Merging UnsafePointer.deinitializePointee
An optimization should be added in order for the new one to be
efficient, i.e. if the `count` value is equal to `1`, the underlying
`Builtin.destroy` should be called, instead of
`Builtin.destroyArray`.
2015-12-16 17:15:00 -08:00
Maxim Moiseev
6c50752aed UnsafePointer: initializeMemory and deinitializePointee 2015-12-16 17:11:57 -08:00
Dmitri Gribenko
3d0ad16094 Unsafe[Mutable]Pointer.memory => .pointee 2015-12-16 15:50:31 -08:00
Jordan Rose
83e2e0bbb2 Move the 'stride' family into methods on Strideable.
Part of the Protocol Extensions TLF.

rdar://problem/22085144

Swift SVN r30974
2015-08-04 01:32:41 +00:00
Dmitri Hrybenko
ce71984eb8 stdlib: add the missing initializer to NonObjectiveCBase
rdar://20321708

Swift SVN r30527
2015-07-23 05:21:43 +00:00
Dave Abrahams
8c855e1ecf [stdlibunittest] automatic LifetimeTracked checking/setup
In setup and teardown, we can initialize and check for leaks

Swift SVN r29789
2015-06-29 20:45:50 +00:00
Dmitri Hrybenko
0622e17151 stdlib: add tests for generic parameter names on ManagedBuffer and friends
Part of rdar://21429126

Swift SVN r29639
2015-06-24 20:42:07 +00:00
Arnold Schwaighofer
859fbc0162 More executable_test for the test directory
Swift SVN r29280
2015-06-03 23:28:51 +00:00
Andrew Trick
239eb58e7e Fix stdlib ManagedBuffer.swift test at -O
Swift SVN r28646
2015-05-15 23:02:40 +00:00
Chris Lattner
56bf85cc5f fix <rdar://problem/19874152> Swift 1.2 struct memberwise initializer violates new sanctity of previously set let property
If a non-static 'let' field in a struct has an initializer, its implicitly generated
memberwise initializer should not override that.  Handle this by having the memberwise initializer
and default initializer use the initial value of the property instead of an argument to the init.

This would have been a lot easier if sema was synthesizing the ctor bodies instead of SILGen,
but here it is.  The missing case is narrow (let (x,y) = (1,2)) and for now we just disable
implicit synthesization of the incorrect case.



Swift SVN r25424
2015-02-20 07:26:57 +00:00
Graham Batty
83b4384fac Update test flags for linux failures and support.
Also removed the sdk 'feature' in favour of the more specific
objc_interop.

Swift SVN r24856
2015-01-30 21:31:48 +00:00
Chris Willmore
03a6190a1f <rdar://problem/19031957> Change failable casts from "as" to "as!"
Previously the "as" keyword could either represent coercion or or forced
downcasting. This change separates the two notions. "as" now only means
type conversion, while the new "as!" operator is used to perform forced
downcasting. If a program uses "as" where "as!" is called for, we emit a
diagnostic and fixit.

Internally, this change removes the UnresolvedCheckedCastExpr class, in
favor of directly instantiating CoerceExpr when parsing the "as"
operator, and ForcedCheckedCastExpr when parsing the "as!" operator.

Swift SVN r24253
2015-01-08 00:33:59 +00:00
Graham Batty
83f27a8af7 Revert "Mark tests that don't pass on linux as XFAIL."
This reverts commit 2711ca86de7bf6a7885ccea24219a48a590b1e95.

Swift SVN r23577
2014-11-24 17:42:13 +00:00
Graham Batty
198402dcfe Mark tests that don't pass on linux as XFAIL.
Swift SVN r23573
2014-11-24 17:40:37 +00:00
Dave Abrahams
279ba3b811 [stdlib] Add tests to diagnose a bot failure
----

[ RUN      ] ManagedBuffer.ManagedBufferPointer
err>>> fatal error: ManagedBufferPointer buffer class has declared stored properties: file /Users/buildslave/jenkins/sharedspace/swift-release-asserts/swift/src/tools/swift/stdlib/core/ManagedBuffer.swift, line 286
err>>> CRASHED: SIGTRAP
[     FAIL ] ManagedBuffer.ManagedBufferPointer

Swift SVN r22748
2014-10-15 04:16:28 +00:00
Dave Abrahams
903459d87e [stdlib] ManagedBuffer updates
Edit comments, add a holdsUniqueReference test, and make the buffer
class validity check work for the empty array buffer class.

Swift SVN r22747
2014-10-15 03:57:56 +00:00
Jordan Rose
e83c117c30 [test] Hack: run stdlib tests first to start long-running tests earlier.
This decreases total testing time by over a minute on my old Mac Pro.
It probably has much less effect on systems with fewer cores, but shouldn't
be any worse there.

Swift SVN r22745
2014-10-15 01:30:51 +00:00