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
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
61c837209b Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-04 16:13:39 -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
Max Moiseev
a7339e67ac Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-22 11:36:07 -08:00
Chris Lattner
82e5c0c592 Update various tests to stop using ++/-- 2015-12-21 18:07:37 -08:00
Max Moiseev
bc942090ee cleaning up initializePointee/deinitializePointee, error messages and comments 2015-12-18 16:22:24 -08:00
Maxim Moiseev
ee7d55f74b moving unsafeUnwrap into Optional 2015-12-16 17:24:12 -08:00
Maxim Moiseev
6c50752aed UnsafePointer: initializeMemory and deinitializePointee 2015-12-16 17:11:57 -08:00
Dmitri Gribenko
f1dbe205a3 UnsafeMutablePointer.dealloc(_:) => .deallocateCapacity(_:) 2015-12-16 15:47:58 -08:00
Dmitri Gribenko
1f70e25899 UnsafeMutablePointer.alloc(_:) => UnsafeMutablePointer(allocatingCapacity:) 2015-12-16 15:45:48 -08:00
Andrew Trick
a8a49afd9e Add Builtin.isOptional.
There was previously no way to detect a type that is nominally
Optional at runtime. The standard library, namely OutputStream, needs
to handle Optionals specially in order to cirumvent conversion to the
Optional's wrapped type. This should be done with conditional
conformance, but until that feature is available, Builtin.isOptional
will serve as a useful crutch.
2015-12-09 16:06:42 -08:00
Arnold Schwaighofer
cc4e41cb3e Add a ispod builtin and _isPOD function to the stdlib
The builtin returns true if the argument type is a POD type: needs no special
handling for copy and destruct operations.

Swift SVN r32242
2015-09-25 22:05:14 +00:00
Andrew Trick
c4f141a121 Reapply "Add test cases for isUnique sanity checks."
Handle linux.

Swift SVN r30357
2015-07-18 02:36:57 +00:00
Andrew Trick
6672ea0dbc Revert "Add test cases for isUnique sanity checks."
This reverts commit r30339.

Temporarilly remove these tests because I forgot to handle linux and
may end up reorganizing the tests.

Swift SVN r30340
2015-07-17 23:37:15 +00:00
Andrew Trick
59909cbd5a Add test cases for isUnique sanity checks.
Swift SVN r30339
2015-07-17 23:22:06 +00:00
Arnold Schwaighofer
f7771859d8 Rename the optimize_test feature to executable_test and document that feature.
Swift SVN r29213
2015-06-01 23:44:13 +00:00
Arnold Schwaighofer
3643c614a3 Run tests in optimize test modes
This runs all files that have a target-build-swift or target-run-stdlib-swift
RUN line in optimize test mode.

Swift SVN r29206
2015-06-01 21:23:31 +00:00
Andrew Trick
75892559cf Update test cases for Builtin.isUnique.
Swift SVN r28269
2015-05-07 16:39:26 +00:00
Dave Abrahams
b3c5883965 [stdlib] Kill redundant definition
type equality is implemented in the stdlib now

Swift SVN r28155
2015-05-05 05:40:21 +00:00
Andrew Trick
8346eba525 Revert "Update test cases for Builtin.isUnique."
This reverts commit f835a115e283dd03001f397ae1538b3745ad779a.

ExistentialCollection tests failed in the release+asserts build.

Swift SVN r27939
2015-04-29 22:53:55 +00:00
Dave Abrahams
27448f174f [stdlib] == and != for metatypes and optional metatypes
Swift SVN r27933
2015-04-29 22:19:01 +00:00
Andrew Trick
041bf1c61d Update test cases for Builtin.isUnique.
Swift SVN r27931
2015-04-29 21:59:21 +00:00
Dave Abrahams
7cd1429f59 [stdlib] Add _getSuperclass(AnyClass)
We'll need this to handle class mirrors properly

Swift SVN r27500
2015-04-20 21:58:24 +00:00
Dmitri Hrybenko
ff2dd6320a stdlib: fix coding style
When colon specifies is-a relationship between types, we put spaces on
both sides of the colon.

Swift SVN r27016
2015-04-05 05:54:55 +00:00
Joe Groff
3c215a6e53 Execution tests for array value witnesses.
Swift SVN r26925
2015-04-03 02:13:11 +00:00
Graham Batty
0a73f54e98 Implement a glibc module for StdlibUnittest on linux
Swift SVN r25807
2015-03-06 22:05:13 +00:00
Dave Abrahams
f7000ce3cb [stdlib] Add unsafeUnwrap(x)
Also the internal version, _unsafeUnwrap, for more-efficiently
unwrapping non-empty optionals.

Swift SVN r25008
2015-02-05 19:18:30 +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
Erik Eckstein
54e1071da0 Add a builtin assumeNonNegative.
It returns the argument and specifies that the value is not negative.
It has only an effect if the argument is a load or call.

The effect of this builtin is that for the load/call argument a positive range metadata is created in llvm ir.

I also added a public function _assumeNonNegative(x: Int) -> Int in the stdlib.
To be on the save side, I prefixed it with an underscore. But maybe it makes sense to make it available for all users.



Swift SVN r23582
2014-11-26 09:53:14 +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
Joe Groff
805191954d Update tests for isUniquelyReferenced change.
Swift SVN r23552
2014-11-22 16:59:27 +00:00
Dave Abrahams
44cadbf37c [stdlib] A few tests for Builtins.swift
Not comprehensive, but I had them stashed and they're better than
having no tests.

Swift SVN r23185
2014-11-09 03:33:59 +00:00