Commit Graph

29 Commits

Author SHA1 Message Date
Karoy Lorentey
5274295e3f [test] Update tests for new (conditional) _debugPrecondition behavior 2022-02-18 21:54:02 -08:00
Guillaume Lessard
71f2d8e12d [test] disambiguate _internalInvariant
This test disables access controls, and it mistakenly used the Concurrency module's version of `_internalInvarant` instead of the Standard Library's version.
2021-11-10 11:59:04 -07:00
Ben Cohen
1673c12d78 [stdlib] Replace "sanityCheck" with "internalInvariant" (#20616)
* Replace "sanityCheck" with "internalInvariant"
2018-11-15 20:50:22 -08:00
Arnold Schwaighofer
b62c6e64ff Codesign validation-test/stdlib 2018-08-10 09:39:09 -07:00
Ben Cohen
345879429b [stdlib] Take several underscored stdlib functions private (#18134)
* Make _sanityCheck internal

* Make _debugPrecondition internal

* Make Optional._unsafelyUnwrappedUnchecked internal.

* Make _precondition internal

* Switch Foundation _sanityChecks to assertions

* Update file check tests

* Remove one more _debugPrecondition

* Update Optimization-with-check tests
2018-07-24 18:26:19 -07:00
Lance Parker
acf94f94ec Add -Onone to all the _Debug tests 2017-09-18 12:56:52 -07:00
Dmitri Gribenko
984210aa53 tests: replace '// RUN: rm -rf' '// RUN: mkdir' pairs with '%empty-directory(...)'
These changes were made using a script.
2017-06-04 11:08:39 -07:00
Slava Pestov
ddc51c5917 AST: Implement SE-0102, introducing new semantics for Never alongside @noreturn
No migrator support yet, and the code for @noreturn is still in
place.
2016-07-22 14:56:39 -07:00
Dmitri Gribenko
6985b958fd Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-04-04 11:42:17 -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
a6cd57222a Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-03-21 14:41:15 -07:00
Max Moiseev
03cbb49982 [stdlib] _stdlibAssert => _debugPrecondition 2016-03-17 12:16:19 -07:00
Dmitri Gribenko
d268da0628 New indexing model: avoid allocations in fatalError() when the string buffer is already in UTF-8 2016-03-11 13:08:01 -08:00
Jordan Rose
e4e9c71d8f StdlibUnittest: Rename enum cases and static vars to match API guidelines. 2016-02-24 18:23:59 -08:00
Max Moiseev
40b1a0b7e0 [stdlib] all sorts of require renamed back to precondition 2016-02-19 18:21:29 -08:00
Max Moiseev
200be71583 Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-23 10:28:04 -08:00
Max Moiseev
51865a17b2 _debugRequire => _stdlibAssert etc. 2015-12-22 10:18:36 -08:00
ken0nek
fcd8fcee91 Convert [Cc]an not -> [Cc]annot 2015-12-23 00:55:48 +09:00
Maxim Moiseev
c4763ae686 _debugPrecondition => _debugRequire 2015-12-16 17:20:40 -08:00
Maxim Moiseev
e6468a0eca _precondition => _require 2015-12-16 17:19:01 -08:00
Maxim Moiseev
f2f50d6a9d precondition => require 2015-12-16 17:16:08 -08:00
Erik Eckstein
461cf5359b tests: Improve comment for StdlibUnittest-import workaround. 2015-11-30 13:11:00 -08:00
Erik Eckstein
308f39fe56 stdlib tests: add import statements to prevent unresolved symbols when compiling StdlibUnittest with -sil-serialize-all.
rdar://problem/18917405
2015-11-19 15:18:18 -08:00
Arnold Schwaighofer
4d4329b0e0 Add executable_test to the validation test suite
Swift SVN r29278
2015-06-03 23:28:43 +00:00
Dave Abrahams
6423209466 [stdlib] Fix assert docs and semantics
We must not lie to the user or to the optimizer!

Swift SVN r25913
2015-03-10 04:37:12 +00:00
Dmitri Hrybenko
7ec747157f More tests pass on Linux when autolinking information is present in -O
Swift SVN r25848
2015-03-08 04:15:10 +00:00
Graham Batty
7346a9733d Update test and validation-test flags for linux.
Swift SVN r25506
2015-02-24 18:55:42 +00:00
Doug Gregor
7764f64cf8 Simplify assertion machinery in the standard library.
This change includes a number of simplifications that allow us to
eliminate the type checker hack that specifically tries
AssertString. Doing so provides a 25% speedup in the
test/stdlib/ArrayNew.swift test (which is type-checker bound).

The specific simplifications here:
  - User-level
  assert/precondition/preconditionalFailure/assertionFailer/fatalError
  always take an autoclosure producing a String, eliminating the need
  for the StaticString/AssertString dance.
  - Standard-library internal _precondition/_sanityCheck/etc. always
  take a StaticString. When we want to improve the diagnostics in the
  standard library, we can provide a separate overload or
  differently-named function.
  - Remove AssertString, AssertStringType, StaticStringType, which are
  no longer used or needed
  - Remove the AssertString hack from the compiler
  - Remove the "BooleanType" overloads of these functions, because
  their usefuless left when we stopped making optional types conform
  to BooleanType (sorry, should have been a separate patch).



Swift SVN r22139
2014-09-19 17:56:50 +00:00
Dmitri Hrybenko
4a9245fbe4 Move Assert.swift test to the validation testsuite
Swift SVN r21269
2014-08-18 23:05:21 +00:00