Commit Graph

32 Commits

Author SHA1 Message Date
Rick van Voorden
f8ae46b3f3 [inclusive-language] changed sanity to soundness 2024-01-25 18:18:02 -08:00
Erik Eckstein
7ee2c105d5 tests: disable floating point conversion tests for the x86_64 simulator
There is a problem with 16-bit floating point conversions.

rdar://104232602
2023-01-16 09:58:23 +01:00
Max Desiatov
372ada0e24 test: add handling for Wasm/WASI (#39519)
This change adds support for WASI in stdlib tests. Some tests that expect a crash to happen had to be disabled, since there's currently no way to observe such crash from a WASI host.
2022-01-12 14:24:50 +00:00
Karoy Lorentey
f7f44763eb [test] Add missing version guards to tests for new stdlib behavior
rdar://75837172
2021-03-30 22:06:55 -07:00
Ben Rimmington
5be886f094 [stdlib] Reinstate some tests (#36072) 2021-03-02 18:13:04 +00:00
Xiaodi Wu
23dc001364 Merge pull request #33910 from xwu/exactness-in-little-things-a-wonderful-source-of-cheerfulness
[stdlib] Simplify 'BinaryFloatingPoint.init?<T: BinaryFloatingPoint>(exactly: T)'
2020-10-05 12:14:27 -04:00
Xiaodi Wu
6216ccdcad [stdlib] Fix a Float16-to-integer conversion bug (#33893)
* [stdlib] Fix a Float16-to-integer conversion bug

* [stdlib] Add a test for 'Int(exactly: Float16.infinity)'
2020-09-16 14:53:06 -04:00
Xiaodi Wu
26cda274ca [stdlib] Simplify 'BinaryFloatingPoint.init?<T: BinaryFloatingPoint>(exactly: T)' 2020-09-11 09:56:58 -04:00
Xiaodi Wu
6e46135965 [stdlib] Update tests for generic floating-point conversion 2020-03-03 18:35:27 -05:00
Xi Ge
b2b128caa0 test: temporarily disable several failing tests on CI. rdar://49026133 2019-03-19 11:18:05 -07:00
Pavol Vaskovic
ac04995089 [Gardening] Remove DoubleWidth dead code from test 2019-03-01 20:51:43 +01:00
Saleem Abdulrasool
37032d8995 test: guard Float80 on Windows
Windows does not support fp80 even on x86.  Adjust the test conditions
accordingly.
2018-12-11 08:45:59 -08:00
Doug Gregor
ab75577079 [stdlib] Teach abs(_:) to use magnitude when it can.
Within the (single) implementation of abs(_:), dynamically check whether
the numeric type and its `Magnitude` are of the same type and, if so,
return the result of `magnitude`. This ensures that we do the right thing
with respect to (e.g.) floating point values like -0.0, without resorting
to overloading of abs(_:).
2018-12-05 21:05:52 -08:00
Arnold Schwaighofer
2d8a1dbbfe Codesign test/stdlib 2018-08-10 06:58:40 -07:00
Ravi Kandhadai
addae9bae4 [SIL Diagnostics] Add warnings for imprecision during assignment of
floating-point literals to variables of floating-point type.
2018-06-18 12:02:23 -07:00
Michael Ilseman
c4614a9208 [test] De-gyb stdlib unittest.
StdlibUnittest uses gyb to avoid duplicating many source-context
arguments. However, this means that any test that wishes to add new
expect helpers has to also be gybbed. Given that this structure hasn't
changed in years, and we should have a real language support
eventually, de-gyb it.
2018-04-19 13:06:14 -07:00
Max Moiseev
141fefc06b Update tests after removal of DoubleWidth 2018-03-23 17:14:46 -07:00
Stephen Canon
8e11af4012 Make the naming of underlying builtin for FP + Vector match Integer. (#15430)
* Make the underlying builtins for FP + Vector match Integer.

For stdlib integer types, these are named `_value` and `init(_ _value: Builtin.xxx)`. This patch adopts the same scheme for stdlib floating point and SDK overlay vector types, and removes a legacy init for integers that was only needed to support them. There should be no changes visible outside of the stdlib, and no functional change within the stdlib; the naming of some implementation details is simply more uniform now.
2018-03-22 16:43:20 -04:00
Xiaodi Wu
e7da51e000 Adjust floating-point nextUp test for NaN on ARM 2018-03-09 15:23:27 -06:00
Erik Eckstein
d5b8c89cff tests: disable a floating point test for arm 2018-03-09 11:09:57 -08:00
Xiaodi Wu
ba186c366e Adjust floating-point nextUp test for NaN 2018-03-07 13:36:17 -06:00
Xiaodi Wu
a1779df06b Revise implementation and tests for NaN conversions 2018-01-07 01:25:25 -06:00
Xiaodi Wu
d965a13c44 Implement generic conversions to floating point 2018-01-06 19:03:23 -06:00
Arnold Schwaighofer
3a0ac62776 Disable signaling NaN tests on i386
i386 does not support signaling NaNs (SR-1515)

rdar://35085021
2017-10-20 11:49:51 -07:00
Mishal Shah
c5ff1f2cac Update master to build with Xcode 9 beta 1, OS X 10.13, iOS 11, tvOS 11, and watchOS 4 SDKs. 2017-06-14 16:20:35 -07:00
Dmitri Gribenko
486cab447d tests: replace 'rm -rf %t && mkdir -p %t' with '%empty-directory(%t)'
These changes were made using a script.
2017-06-04 11:08:39 -07:00
Robert Widmann
53ea193134 Un-XFAIL floating point test in resilient mode 2017-04-30 19:13:51 -04:00
Hooman Mehr
d7d05e1a92 Make .significandWidth do the right thing for exact powers of two
Resolves SR-2868.
2016-12-08 14:49:19 -05:00
practicalswift
cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02:00
Slava Pestov
d28b8ead50 Add resilient_stdlib to available_features and XFAIL remaining failing tests
All unoptimized tests should now pass when Swift is built with
'build-script -- --swift-stdlib-enable-resilience=1'.

There are still some issues when the tests themselves are built
with optimizations via 'check-swift-validation-optimize'.

Fixes <rdar://problem/28409189>.
2016-09-30 18:28:12 -07:00
Dmitri Gribenko
30509f1b64 StdlibUnittest: add an argument label to checkHashable
I think it improves readability of the callsite.
2016-09-15 10:20:09 -07:00
Max Moiseev
9fc37efee4 [test] renaming test/1_stdlib to just test/stdlib 2016-09-01 16:51:43 -07:00