Commit Graph

14 Commits

Author SHA1 Message Date
Dave Abrahams
9857aaa1de [StdlibUnittest] Use _UnitTestArray now
This commit decouples StdlibUnittest from many details of
[Contiguous]Array, so tests can give useful feedback even in the
presence of a broken [Contiguous]Array implementation while we refactor.

Unfortunately, it wasn't practical to make _UnitTestArray use a
storage class other than _ContiguousArrayStorage[Base], so we still have
to watch out when making changes there.

Swift SVN r22875
2014-10-22 05:28:23 +00:00
Dave Abrahams
c799f3687c [StdlibUnittest] Try to use ContiguousArray
ContiguousArray is a simpler component, thus less prone to breakage.
Builting the unit testing framework atop broken components is a very bad
idea, so let's not.

This is a reinstatement of an earlier commit, plus changes to make the
validation tests work.

Swift SVN r22867
2014-10-21 22:17:06 +00:00
Dave Abrahams
215929b20e Revert "[StdlibUnittest] Try to use ContiguousArray"
This reverts commit r22769, which broke the validation tests

Swift SVN r22792
2014-10-16 03:46:35 +00:00
Dave Abrahams
cf8e450510 [StdlibUnittest] Try to use ContiguousArray
ContiguousArray is a simpler component, thus less prone to breakage.
Builting the unit testing framework atop broken components is a very bad
idea, so let's not.

Swift SVN r22769
2014-10-15 20:27:55 +00:00
Dave Abrahams
156020de19 [stdlib] Rename 'countElements' => 'count'
The name was not only long and unwieldy, but inconsistent with our
conscious decision to avoid the use of "elements" in APIs as mostly
redundant.

Swift SVN r22408
2014-09-30 22:00:26 +00:00
Dave Abrahams
d8122fd010 [testing] Purge use of mixed-sign arithmetic
Swift SVN r22401
2014-09-30 20:21:00 +00:00
Dmitri Hrybenko
fbd91f7ac3 Add missing 'public' modifiers in StdlibUnittest
Swift SVN r22216
2014-09-23 13:31:24 +00:00
Dmitri Hrybenko
d68a5c4c98 stdlib: finish implementation of atomics for initializing an ARC
reference, add tests

Swift SVN r21873
2014-09-11 14:52:58 +00:00
Dmitri Hrybenko
96d00d70b5 StdlibUnittest: add infrastructure for race tests (see examples)
This will be used to test rdar://18191358

Swift SVN r21836
2014-09-10 11:58:45 +00:00
Dave Abrahams
6c07fb4ad1 [stdlib] Revert UnsafePointer casting change
The syntax being reverted added busywork and noise to the common case
where you want to say "I have the right address, but the wrong type,"
without adding any real safety.

Also it eliminated the ability to write UnsafePointer<T>(otherPointer),
without adding ".self" to T.  Overall, it was not a win.

This reverts commits r21324 and r21342

Swift SVN r21424
2014-08-22 21:53:12 +00:00
Dave Abrahams
1fb0f889d7 [stdlib] Make UnsafePointer conversions explicit
Previously, it was possible to write Unsafe[Mutable]Pointer(x) and have
Swift deduce the pointee type based on context.  Since reinterpreting
memory is a fundamentally type-unsafe operation, it's better to be
explicit about conversions from Unsafe[Mutable]Pointer<T> to
Unsafe[Mutable]Pointer<U>.  This change is consistent with the move from
reinterpretCast(x) to unsafeBitCast(x, T.self).

Also, we've encoded the operations of explicitly adding or removing
mutability as properties, so that adding mutability can be separated
from wild reinterpretCast'ing, a much more severe form of unsafety.

Swift SVN r21324
2014-08-20 23:15:56 +00:00
Dmitri Hrybenko
4b9c318c05 stdlib: correct trap messages for float to integer conversion
rdar://17943841


Swift SVN r21128
2014-08-09 18:02:28 +00:00
Dmitri Hrybenko
4fa064696d NSString APIs test: attempt to fix the test on iOS by removing a dependency on
a file in the source tree


Swift SVN r21105
2014-08-08 11:58:56 +00:00
Dmitri Hrybenko
f2436065db StdlibUnittest: run tests out of process
The test harness now can recover after test crashes, allowing:

- check for crashes themselves (without reporting them to the Python lit driver,
  which is about 10x slower -- even if CrashTracer is disabled);

- recover from unexpected test crashes and run the rest of the tests;

- this lays the groundwork for assertions that end the test execution, but
  allow the rest of the tests to run (rdar://17906801).

Note that we don't spawn a fresh process for every test.  We create a child
process and reuse it until it crashes.


Swift SVN r21090
2014-08-07 15:14:57 +00:00