Commit Graph

36 Commits

Author SHA1 Message Date
Jordan Rose
e4e9c71d8f StdlibUnittest: Rename enum cases and static vars to match API guidelines. 2016-02-24 18:23:59 -08:00
Dmitri Gribenko
0e1c488f9a stdlib: print, debugPrint: 'toStream:' => 'to:' 2016-02-15 23:48:02 -08:00
Max Moiseev
61c837209b Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-04 16:13:39 -08:00
Guillaume Lessard
bc932451f2 Validation tests for .Never and .Always TestPredicate cases 2016-01-28 23:48:29 -07:00
Max Moiseev
08e1e4a043 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-11 16:51:11 -08:00
Greg Parker
1e5ae166e5 [test] Camouflage "XFAIL:" output checks so lit doesn't interpret them. 2016-01-09 03:27:56 -08:00
Dmitri Gribenko
3d0ad16094 Unsafe[Mutable]Pointer.memory => .pointee 2015-12-16 15:50:31 -08:00
Dmitri Gribenko
339c7a99dc Remove no-argument initializers from unsafe pointer types
The preferred way to create a nil pointer is to use the 'nil' literal.

Affected types:
AutoreleasingUnsafeMutablePointer
OpaquePointer
UnsafeMutablePointer
UnsafePointer
2015-12-16 14:59:50 -08:00
Erik Eckstein
0830c36974 [tests] add import statements to prevent unresolved symbols when compiling StdlibUnittest with -sil-serialize-all.
This is the second part of 308f39fe56.
It fixes (better: works-around) linker errors when testing in optimized mode.
2015-12-15 10:46:10 -08:00
David Farler
9aa7663ad3 Always debugPrint containers' elements
rdar://problem/19312992

Swift SVN r31067
2015-08-07 06:14:19 +00:00
Joe Pamer
828eb68e72 Commit DaveA's API changes to 'print', along with the compiler changes necessary to support them.
There's still work left to do. In terms of next steps, there's still rdar://problem/22126141, which covers removing the 'workaround' overloads for print (that prevent bogus overload resolution failures), as well as providing a decent diagnostic when users invoke print with 'appendNewline'.

Swift SVN r30976
2015-08-04 01:57:11 +00:00
Dave Abrahams
ef198daa2b [stdlibunittest] Finish threading new trace facility through
Swift SVN r29955
2015-07-08 02:52:27 +00:00
Dave Abrahams
3179f78cbd Fix up stdlibunittest validation test
This should make the bot happier.

Swift SVN r29954
2015-07-08 01:34:30 +00:00
Dave Abrahams
ce93b0a9e0 [stdlibunittest] Still more de-boilerplating WIP
Swift SVN r29951
2015-07-08 00:28:33 +00:00
Dmitri Hrybenko
4603431bd4 StdlibUnittest: implement more strict checks for using invalid indices
Add a shared buffer to every range replaceable mutable collection to
track logical mutations, and invalidate all indices on every mutation.

Swift SVN r29917
2015-07-06 16:12:03 +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
Arnold Schwaighofer
edf20fb43a Change test to not depend on being compiled with -Onone
Swift SVN r29288
2015-06-04 01:55:49 +00:00
Arnold Schwaighofer
2c617bf75b This test case assumes to be compiled without optimizations
Swift SVN r29281
2015-06-03 23:28:53 +00:00
Arnold Schwaighofer
ee0a1d1a58 More executable tests in validation-test
Swift SVN r29279
2015-06-03 23:28:45 +00:00
Dmitri Hrybenko
3a2bb97cd6 Fix tests for expectCrashLater() for iOS
On iOS we recieve a different signal.  That's not the point of the test,
and since we FileCheck the message anyway, the exact signal name does
not really matter.

Swift SVN r28513
2015-05-13 08:47:33 +00:00
Dmitri Hrybenko
e315581f74 StdlibUnittest tests: use a runtime trap to test expectCrashLater
This change makes the test output the same in normal runs and in ASan
builds.

Swift SVN r28507
2015-05-13 06:36:15 +00:00
Dmitri Hrybenko
0d42ed3eb2 StdlibUnittest: provide explanatory output about failing crash tests
Swift SVN r28404
2015-05-10 23:17:44 +00:00
Dmitri Hrybenko
f46f16ae82 stdlib: implement new print() API
rdar://20775683

Swift SVN r28309
2015-05-08 01:37:59 +00:00
Dmitri Hrybenko
350248dae5 Reorganize the directory structure under 'stdlib'
The standard library has grown significantly, and we need a new
directory structure that clearly reflects the role of the APIs, and
allows future growth.

See stdlib/{public,internal,private}/README.txt for more information.

Swift SVN r25876
2015-03-09 05:26:05 +00:00
Graham Batty
0a73f54e98 Implement a glibc module for StdlibUnittest on linux
Swift SVN r25807
2015-03-06 22:05:13 +00:00
Dmitri Hrybenko
581dc3c35d stdlib: split topic-focused modules out of StdlibUnittest
The new modules are:

* SwiftUnstable -- assorted additions to the core standard library
  (more algorithms etc.)

* SwiftUnstableDarwinExtras -- proposed additions to the Darwin overlay,
  not yet reviewed by the Darwin team.

* SwiftUnstablePthreadExtras -- wrappers that make it possible to
  use pthread in Swift (they work around the lack of block-based API in
  pthread).  In future these could be possibly folded into the Darwin
  overlay as well.

These APIs are useful without StdlibUnittest for writing automation
tools in Swift.  Just like SwiftExperimental, none of these modules are
exposed to extrenal users.

Also, since these new modules can be compiled with -sil-serialize-all
(unlike StdlibUnittest, where we can't apply the flag because of
compiler bugs), standard library tests that need to run optimized code
(like AtomicInt.swift) are *much* faster now.

Swift SVN r25679
2015-03-02 10:38:42 +00:00
Graham Batty
7346a9733d Update test and validation-test flags for linux.
Swift SVN r25506
2015-02-24 18:55:42 +00:00
Dmitri Hrybenko
a35767757e StdlibUnittest: add an asertion, expectUnreachable()
Swift SVN r25090
2015-02-09 05:39:26 +00:00
Dave Abrahams
3f36a4d5e7 Use %target-run-stdlib-swift in more tests
Now that it disables access control, this lit definition applies to many
more tests, where we used to use %target-run-stdlib-swift before access
control came online.

Also, drop -Xfrontend -disable-access-control from a bunch of tests that
don't need it.

Swift SVN r22634
2014-10-09 20:53:07 +00:00
Dmitri Hrybenko
f1c3d879ef StdlibUnittest: add setUp and tearDown functions, which are executed before and
after every test


Swift SVN r21362
2014-08-21 16:56:49 +00:00
Dmitri Hrybenko
8cca039e62 StdlibUnittest: rename TestCase to TestSuite since it contains multiple tests
Thanks, Ben!


Swift SVN r21222
2014-08-15 00:09:58 +00:00
Dmitri Hrybenko
8ab9066061 Relax FileCheck patterns because stdout and stderr are sometimes mixed
Swift SVN r21130
2014-08-10 17:18:05 +00:00
Dmitri Hrybenko
ff8f68f3c6 StdlibUnittest: use builder syntax for 'xfail' and 'skip' annotations
Swift SVN r21106
2014-08-08 13:41:07 +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
Dmitri Hrybenko
bc144c313e NSString test: disable the problematic test on iOS simulator and iOS 7.*
Swift SVN r21043
2014-08-05 21:24:51 +00:00
Dmitri Hrybenko
ab8b14f2d5 StdlibUnittest: allow xfail and skip annotations on tests
rdar://17906092


Swift SVN r21040
2014-08-05 15:03:54 +00:00