Jordan Rose
ce07a7b4d1
[test] Actually set the 'asan' feature appropriately when validation testing.
...
Hopefully fixes the ASan bot.
Swift SVN r21915
2014-09-12 18:27:11 +00:00
Dmitri Hrybenko
d7acb06c64
stdlib/Dictionary: use 'delayed bridging' to keep pointers, returned
...
from a bridged NSDictionary, stable
We used to return a fresh pointer value every time an NSDictionary
element is requested, but, unfortunately, our SDK has bugs.
Fixes rdar://18191358 for Dictionary.
Swift SVN r21905
2014-09-12 13:20:30 +00:00
Dmitri Hrybenko
37562576af
Update AtomicInt test for removal of any()
...
Swift SVN r21903
2014-09-12 09:24:34 +00:00
Joe Groff
6f64c4ce12
Update validation tests for raw -> rawValue change.
...
Swift SVN r21893
2014-09-11 22:27:01 +00:00
Dmitri Hrybenko
d68a5c4c98
stdlib: finish implementation of atomics for initializing an ARC
...
reference, add tests
Swift SVN r21873
2014-09-11 14:52:58 +00:00
Joe Pamer
ede74dd90e
When solving for call witness argument conversions, post diagnostics in the case of failures rather than raise an assertion. This addresses crash suite issue 040. (rdar://problem/18233081)
...
Swift SVN r21852
2014-09-10 22:28:03 +00:00
Dmitri Hrybenko
96d00d70b5
StdlibUnittest: add infrastructure for race tests (see examples)
...
This will be used to test rdar://18191358
Swift SVN r21836
2014-09-10 11:58:45 +00:00
Dmitri Hrybenko
2c93cf71f0
Mark compiler_crashers/036-lisp-style.swift as passing
...
Swift SVN r21833
2014-09-10 08:07:47 +00:00
Joe Pamer
9bbf4ac5fe
Improve diagnostic so as not to mystify users.
...
Swift SVN r21824
2014-09-10 01:52:07 +00:00
Joe Pamer
acce45bdc8
Lock down existential metatype to metatype coercions. Since they're currently unsupported, we'll display a semantic error rather than crash.
...
This addresses crash suite scenarios 011 and 013. (rdar://problem/17777218, rdar://problem/18232728)
Swift SVN r21822
2014-09-10 00:54:34 +00:00
Joe Pamer
aeef7f736f
Now that we now longer crash, reinstate test.
...
Swift SVN r21818
2014-09-10 00:05:29 +00:00
Joe Pamer
fa692976f5
If an expression fails to type check, and there were no failures posted or constraints to mine for a reason, we can be fairly certain that the reason for the failure was a lack of contextual type data. In this case, we should post a diagnostic rather than let the failure slip through. This addresses crash suite scenarios 001, 005, 020 and 045. (rdar://problem/16712071, rdar://problem/17317691, rdar://problem/17317691)
...
You'll notice that emitting this diagnostic will make some already noisy closure-related errors slightly more so. This is unfortunate, but for the time-being it's better than crashing.
Swift SVN r21817
2014-09-09 23:58:59 +00:00
Jordan Rose
e5bfd3c5dd
[test] Mark three known crashers as "XFAIL: asan".
...
We're going to crash anyway, we'll fix it when we fix the main issue, and
the main issue isn't memory-error-related. Should unblock the ASan bot.
Swift SVN r21814
2014-09-09 22:46:56 +00:00
Dmitri Hrybenko
decff06131
Remove the test that is duplicate with
...
test/IRGen/mixed_objc_native_protocol_constraints.swift
Swift SVN r21804
2014-09-09 06:55:24 +00:00
Joe Groff
419ba5cbea
Change RawRepresentable to use failable initializers and property requirements.
...
Redefine the RawRepresentable protocol to use an 'init?' method instead of 'fromRaw(Raw)', and a 'raw' get-only property instead of 'toRaw()'. Update the compiler to support deriving conformances for enums and option sets with the new protocol. rdar://problem/18216832
Swift SVN r21762
2014-09-06 18:40:14 +00:00
Mishal Awadah
e5ca8be1a0
Add README with details on swift-compiler-crashes community repo.
...
Swift SVN r21717
2014-09-04 18:21:03 +00:00
Mishal Awadah
798315edd5
Add recent crasher test case from swift-compiler-crashes.
...
Swift SVN r21716
2014-09-04 18:21:02 +00:00
Dmitri Hrybenko
b6308cae7c
Update UnicodeUTFEncoders for failable initializers
...
Swift SVN r21701
2014-09-04 11:11:12 +00:00
Mishal Awadah
d8ce0b80cb
Add basic compilation tests from swift-compiler-crashes ( https://github.com/practicalswift/swift-compiler-crashes.git )
...
Swift SVN r21693
2014-09-04 01:06:26 +00:00
Dmitri Hrybenko
8f2c13fa94
Add a prototype of new hashing APIs (so that it does not bit rot on my disk)
...
Unfortunately, I don't see how to ensure interoperability with Objective-C.
Swift SVN r21581
2014-08-29 16:57:45 +00:00
Dmitri Hrybenko
60cf5d3d1b
SwiftIntTypes.py: remove transitional '_new' suffix from a function name
...
Swift SVN r21579
2014-08-29 15:38:22 +00:00
Dmitri Hrybenko
717171b89d
stdlib tests: use simpler interface to iterate over integer types
...
Swift SVN r21577
2014-08-29 15:14:35 +00:00
Dmitri Hrybenko
2b6ccd2deb
Add tests for traps in shift operations
...
Swift SVN r21575
2014-08-29 15:10:03 +00:00
Dmitri Hrybenko
cb9e5c2c86
stdlib: use simpler interface to iterate over integer types
...
Swift SVN r21573
2014-08-29 14:32:46 +00:00
Dmitri Hrybenko
c5181c2d65
stdlib/FixedPoint: fix hash computation for [U]Int64 on 32-bit platforms
...
It used to trap if the value of [U]Int64 was outside the Int32 range.
rdar://18113807
Swift SVN r21572
2014-08-29 13:48:32 +00:00
Dmitri Hrybenko
1bc40d22ef
FixedPoint test: use correct argument order for expectEquals
...
Swift SVN r21571
2014-08-29 13:37:19 +00:00
Dmitri Hrybenko
14899abdf5
stdlib/FixedPoint: define the same set of 'truncatingBitPattern'
...
initializers on all platforms
rdar://18167806
Swift SVN r21570
2014-08-29 10:32:33 +00:00
Dmitri Hrybenko
be9850d8de
stdlib: add a test for passing literals to the IntXX(bitPattern:) initializer
...
Swift SVN r21482
2014-08-27 10:11:58 +00:00
Dmitri Hrybenko
61ef07732f
stdlib/FixedPoint: add IntXX(truncatingBitPattern:) initializers
...
rdar://18101336
Swift SVN r21481
2014-08-27 10:04:33 +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
fc8af07472
Remove long_tests requirements in the validation testsuite
...
Swift SVN r21278
2014-08-19 11:05:27 +00:00
Dmitri Hrybenko
a74a29ece3
Move long-running code completion tests to the validation testsuite
...
Swift SVN r21277
2014-08-19 11:04:35 +00:00
Dmitri Hrybenko
4a9245fbe4
Move Assert.swift test to the validation testsuite
...
Swift SVN r21269
2014-08-18 23:05:21 +00:00
Dmitri Hrybenko
9ae778a286
Remove long_tests requirement from tests in the validation testsuite
...
Swift SVN r21268
2014-08-18 23:03:50 +00:00
Dmitri Hrybenko
9276660e8a
Move long-running Unicode tests to the validation testsuite
...
Swift SVN r21267
2014-08-18 23:03:47 +00:00
Dmitri Hrybenko
b689a27300
Move FixedPointArithmeticTraps test to the validation test suite
...
Swift SVN r21266
2014-08-18 22:56:01 +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
cfa2bdaf83
stdlib/Hashing: use unchecked arithmetic when mixing in the per-execution seed
...
The per-process seed is actually fixed right now, so this bug was dormant.
Swift SVN r21189
2014-08-14 00:25:44 +00:00
Dmitri Hrybenko
94f5917b6d
Fix hashing test for 32-bit:
...
* update stale values for hashes (the previous one were from one of my
earlier hash implementations)
* add a separate code path for 32-bit where Int type is used
Swift SVN r21147
2014-08-12 16:11:34 +00:00
Dmitri Hrybenko
3a04e0809f
stdlib: add a function to squeeze a number in a given range from a hash value
...
This function mixes the bits in the hash value, which improves Dictionary
performance for keys with bad hashes.
PrecommitBenchmark changes with greater than 7% difference:
``````````Dictionary2`,```1456.00`,```1508.00`,```1502.00`,````624.00`,````607.00`,````592.00`,`864.00`,``145.9%
``````````Dictionary3`,```1379.00`,```1439.00`,```1408.00`,````585.00`,````567.00`,````552.00`,`827.00`,``149.8%
````````````Histogram`,````850.00`,````849.00`,````851.00`,```1053.00`,```1049.00`,```1048.00`,`199.00`,``-19.0%
````````````````Prims`,```1999.00`,```2005.00`,```2018.00`,```1734.00`,```1689.00`,```1701.00`,`310.00`,```18.4%
``````````StrSplitter`,```2365.00`,```2334.00`,```2316.00`,```1979.00`,```1997.00`,```2000.00`,`337.00`,```17.0%
```````````````TwoSum`,```1551.00`,```1568.00`,```1556.00`,```1771.00`,```1741.00`,```1716.00`,`165.00`,```-9.6%
Regressions are in benchmarks that use `Int` as dictionary key: we are just
doing more work than previously (hashing an `Int` was an identity function).
rdar://17962402
Swift SVN r21142
2014-08-12 12:02:26 +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
2e044243df
Relax the FileCheck pattern to allow the test to pass on iOS
...
Swift SVN r21129
2014-08-09 19:28:26 +00:00
Dmitri Hrybenko
4b9c318c05
stdlib: correct trap messages for float to integer conversion
...
rdar://17943841
Swift SVN r21128
2014-08-09 18:02:28 +00:00
Jordan Rose
84514e536f
[CMake] Fix validation testing for variant build.
...
I also broke the non-variant build. Oops.
Swift SVN r21118
2014-08-08 22:50:43 +00:00
Dmitri Hrybenko
a5c03a5e13
stdlib: trap when constructing integers from Float and Double NaNs. Not implementable for Float80 yet.
...
Partially fixes rdar://17958458
Swift SVN r21109
2014-08-08 15:43:39 +00:00
Dmitri Hrybenko
7255f900b9
stdlib: move test for floating point conversion traps to the validation
...
testsuite
Fixes for traps will follow.
Swift SVN r21108
2014-08-08 15:20: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