Commit Graph

3245 Commits

Author SHA1 Message Date
Michael Ilseman
b19c2cf9c3 [String] Add generic String.Index and range inits within a String
Adds a generic version of String.Index.init?(_:within:) and
Range<String.Index>.init?(_:in:).

Tests added
2019-03-29 15:43:00 -07:00
Michael Ilseman
4967fc08eb [Unicode] Add convenience APIs to Unicode encodings
Add convenience APIs to the stdlib's Unicode encodings:

* Unicode.UTF16
  * isASCII
  * isSurrogate
* Unicode.UTF8
  * isASCII
  * width
* Unicode.UTF32
  * isASCII
* Unicode.ASCII
  * isASCII

Tests added
2019-03-29 15:43:00 -07:00
Michael Ilseman
751cf26ef5 [Unicode.Scalar] Add RAC UTF8View
This adds new (availability-controlled) API to Unicode.Scalar,
exposing the scalar's UTF-8 code units as a random-access collection
similarly to how it currently exposes UTF-16 code units.

Tests added.
2019-03-29 15:43:00 -07:00
simon gladman
80c529dd89 Add operations that return their result. 2019-03-29 16:48:08 +00:00
simon gladman
6f803763a6 Add operations that return result. 2019-03-29 16:16:57 +00:00
simon gladman
40523b399e add operations that return the result 2019-03-29 15:38:45 +00:00
simon gladman
a3478e0b46 Create versions of operations that return the result. 2019-03-29 14:47:12 +00:00
simon gladman
6a700fdc2a Add operations that return the result 2019-03-29 13:34:32 +00:00
simon gladman
850e1a48de Add operations that return a result. 2019-03-29 11:21:28 +00:00
simon gladman
2547585013 Add versions of operations that return a result. 2019-03-29 10:48:13 +00:00
simon gladman
f1e98b6147 Add versions of operations that return the result as an array. 2019-03-28 17:22:29 +00:00
simon gladman
f5afb0d779 Create integrations functions that return the result. 2019-03-28 16:40:25 +00:00
simon gladman
d3d7c98730 Remove duplicated tests 2019-03-28 16:11:58 +00:00
simon gladman
90187555ad remove duplicated tests 2019-03-28 15:50:12 +00:00
simon gladman
0fa3c40dd6 remove duplicated tests 2019-03-28 15:31:24 +00:00
simon gladman
800318ed88 Remove duplicated tests 2019-03-28 15:15:27 +00:00
simon gladman
75ca8c03d8 Merge branch 'master' into accelerate-vDSP-linearInterpolation 2019-03-27 17:06:53 +00:00
simon gladman
ff599da927 Refactor Tests 2019-03-27 17:06:05 +00:00
simon gladman
393c404a9c Merge branch 'master' into accelerate-vDSP-complexOperations 2019-03-27 17:04:20 +00:00
simon gladman
01ed751137 Refactor Tests 2019-03-27 16:57:44 +00:00
simon gladman
4a2cc1803a Merge branch 'master' into accelerate-vDSP-singleVectorOperations 2019-03-27 16:55:55 +00:00
simon gladman
c6e594f456 Merge branch 'master' into accelerate-vDSP-slidingWindow 2019-03-27 16:54:39 +00:00
simon gladman
d1878a246e Update Accelerate_vDSPConversion.swift 2019-03-27 16:54:05 +00:00
simon gladman
38e0278b1c Refactor tests 2019-03-27 16:18:06 +00:00
simon gladman
f39351ac24 Merge branch 'master' into accelerate-vDSP-miscConversions 2019-03-27 16:16:35 +00:00
simon gladman
51ca33d7b0 Refactor Tests 2019-03-27 15:52:07 +00:00
simon gladman
92feb8acd4 Merge branch 'master' into accelerate-vDSP-geometry 2019-03-27 15:49:42 +00:00
simon gladman
b076cac904 Merge branch 'master' into accelerate-vDSP-differenceEquationAndDownsampling 2019-03-27 15:25:12 +00:00
simon gladman
2fe0ac7de5 Refactor Tests 2019-03-27 15:23:01 +00:00
simon gladman
2f45f2a332 Merge branch 'master' into accelerate-vDSP-vectorReduction 2019-03-27 15:21:19 +00:00
simon gladman
31116aa278 Merge branch 'master' into accelerate-vDSP-polynomialEvaluation 2019-03-27 15:16:44 +00:00
simon gladman
68bc5ac951 Refactor Tests 2019-03-27 15:15:36 +00:00
simon gladman
5e41b10df6 Merge branch 'master' into accelerate-vDSP-clippingLimitThreshold 2019-03-27 15:13:36 +00:00
simon gladman
f6e31df479 Refactor Tests 2019-03-27 15:10:59 +00:00
simon gladman
06f0565b6f Merge branch 'master' into accelerate-vDSP-fillClearGenerate 2019-03-27 15:08:57 +00:00
simon gladman
9e80871ae6 Remove spurious newline 2019-03-27 14:59:55 +00:00
simon gladman
cf988b16cc Refactor Tests 2019-03-27 14:58:25 +00:00
simon gladman
0e82e8f71f Merge branch 'master' into accelerate-vDSP-convolution 2019-03-27 14:56:46 +00:00
simon gladman
28acb638bc Refactor tests. 2019-03-27 14:55:20 +00:00
simon gladman
6597c0db31 Merge branch 'master' into accelerate-vDSP-integration 2019-03-27 14:53:45 +00:00
simon gladman
7bd09f547e Refactor Tests 2019-03-27 14:50:24 +00:00
simon gladman
65e2eb6d8b Merge branch 'master' into accelerate-vDSP-elementwiseVectorArithmetic 2019-03-27 14:48:22 +00:00
simon gladman
2159975665 Refactor Tests 2019-03-27 14:47:02 +00:00
simon gladman
c12cf57294 Merge branch 'master' into accelerate-vDSP-conversion 2019-03-27 14:45:10 +00:00
Nate Cook
b6bb9d2f8c [stdlib] Make unsafe array initializer public (#23134)
[stdlib] Make unsafe array initializer public

This implements SE-0245. The public versions of this initializer call
into the existing, underscored version, which avoids the need for
availability constraints.
2019-03-23 13:18:10 -05:00
Xi Ge
0b84252711 Merge pull request #23491 from nkcsgexi/49161053
test: temporarily disable stdlib/TestJSONEncoder.swift
2019-03-22 11:21:17 -07:00
Xi Ge
841a489055 test: temporarily disable stdlib/TestJSONEncoder.swift
rdar://49161053
2019-03-22 11:19:45 -07:00
Arnold Schwaighofer
a67f3b919d Merge pull request #23452 from aschwaighofer/add_test_optimize_none_implicit_dynamic
Add a test mode to exercise implicit dynamic
2019-03-22 06:24:14 -07:00
Daniel Rodríguez Troitiño
4dcf60ca0f [test] Fix FixedPointConversion tests (#23220)
Fix several problems with FixedPointConversion generation code.

The first problem is that at some point `repr(value)` was being used,
which turn the number into a string. That was great for printing the
number, but make the test against the value of the number (like
`testValue < otherMin` always false. There were a number of tests that
were never performed, specifically the integer tests.

The second problem was using doubles in the Python code. For Float32 and
Float64 the tests were generated correctly, but in the case of Float80,
the test adding or removing a quantity to the maximum/minimum were
failing because of the lack of precission (Adding 0.1 to a very
big/small number is the same as not adding anything). Switching to
Decimal should keep enough precission for the tests.

Finally the last problem was that the bounds of the conversions are not
actually `selfMin` and `selfMax`, but the values returned by the utility
function `getFtoIBounds`. For example for unsigned types, the lower
bound is always -1, not zero (every value between -1 and zero is rounded
to zero, and doesn't fail).

Instead of using nested gyb templates, use lit.cfg %target-ptrsize,
which should be faster, cleaner, and provides correct line-directive
output.

Remove a bunch of warnings in Swift when compiling the generated result
of FixedPointConversion.swift.gyb.

Co-authored-by: Gwynne Raskind <gwynne@users.noreply.github.com>
2019-03-21 13:58:30 -04:00
Arnold Schwaighofer
e113ef8c93 Add a mode to test implicit dynamic with private imports 2019-03-20 14:34:01 -07:00