practicalswift
4613b1712b
Merge pull request #2359 from practicalswift/typo-fixes-20160501
...
[gardening] Fix recently introduced typos: "adavances" → "advances", etc. (10 typos)
2016-05-01 20:11:45 +02:00
practicalswift
540cb751ac
[gardening] Fix recently introduced typo: "adavances" → "advances"
...
[gardening] Fix recently introduced typo: "compie" → "compile"
[gardening] Fix recently introduced typo: "consise" → "concise"
[gardening] Fix recently introduced typo: "dengerate" → "degenerate"
[gardening] Fix recently introduced typo: "encodeded" → "encoded"
[gardening] Fix recently introduced typo: "equvalent" → "equivalent"
[gardening] Fix recently introduced typo: "guaranted" → "guaranteed"
[gardening] Fix recently introduced typo: "overridde" → "override"
[gardening] Fix recently introduced typo: "subsquence" → "subsequence"
[gardening] Fix recently introduced typo: "substraction" → "subtraction"
[gardening] Fix recently introduced typo: "whiltespace" → "whitespace"
2016-05-01 20:07:18 +02:00
practicalswift
8e3ba900b0
[gardening] Fix recently introduced headers.
2016-05-01 12:59:13 +02:00
practicalswift
ac6af6a475
[swiftc] Add test case for crash triggered in swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const
...
Stack trace:
```
swift: /path/to/swift/lib/AST/ArchetypeBuilder.cpp:2051: auto swift::ArchetypeBuilder::mapTypeIntoContext(Module *, swift::GenericParamList *, swift::Type, swift::LazyResolver *)::(anonymous class)::operator()(swift::Type) const: Assertion `genericParamsDepth >= depth' failed.
9 swift 0x00000000010d7dc4 swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const + 36
10 swift 0x00000000010d8060 swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const + 704
11 swift 0x00000000010d866c swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const + 2252
12 swift 0x0000000000fa689b swift::ArchetypeBuilder::mapTypeIntoContext(swift::DeclContext*, swift::Type, swift::LazyResolver*) + 171
13 swift 0x00000000010d4dd4 swift::TypeBase::getSuperclass(swift::LazyResolver*) + 244
14 swift 0x0000000000e7e25d swift::TypeChecker::defineDefaultConstructor(swift::NominalTypeDecl*) + 109
15 swift 0x0000000000e7d3a3 swift::TypeChecker::addImplicitConstructors(swift::NominalTypeDecl*) + 1411
20 swift 0x0000000000e77716 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
23 swift 0x0000000000ed91fa swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 218
24 swift 0x0000000000f031ac swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 876
25 swift 0x0000000000e657e1 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 769
27 swift 0x0000000000ed9346 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
28 swift 0x0000000000e991bd swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1117
29 swift 0x0000000000c36eef swift::CompilerInstance::performSema() + 3295
31 swift 0x00000000007c5006 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2838
32 swift 0x0000000000791b08 main + 2840
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28289-swift-type-transform.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28289-swift-type-transform-3028ba.o
1. While type-checking expression at [validation-test/compiler_crashers/28289-swift-type-transform.swift:10:1 - line:11:9] RangeText="{class B<t{typealias d<a>:S<a>class a:d
2. While type-checking 'B' at validation-test/compiler_crashers/28289-swift-type-transform.swift:10:2
3. While defining default constructor for 'a' at validation-test/compiler_crashers/28289-swift-type-transform.swift:10:31
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-05-01 12:36:54 +02:00
Max Moiseev
d00dddbdab
[stdlib][swift-3-indexing-model] fixing the ReversedCollection/lazy test
2016-04-29 13:46:50 -07:00
Austin Zheng
706510febc
Improving LazyFilterCollection tests with random data
2016-04-29 13:37:22 -07:00
Austin Zheng
e9c1db2c2d
Completing LazyFilterCollections, adding tests for LazyFilterCollection
...
Changes:
- Added proper LazyFilterBidirectionalCollection support
- Added tests for LazyFilterCollection variants
2016-04-29 00:50:15 -07:00
Dmitri Gribenko
91f4cbe948
Merge pull request #2337 from austinzheng/az1
...
Fixing index(where:) API test
2016-04-28 23:10:06 -07:00
Doug Gregor
04f4552d07
Fixed a crasher...
2016-04-28 22:47:00 -07:00
Austin Zheng
e034946b45
Fixing index(where:) API test
...
Changes:
- Fixed a bug in the collection unit test exercising the index(where:) API
- Reenabled relevant LazyMapCollection tests
2016-04-28 20:04:39 -07:00
swift-ci
893d2b4489
Merge pull request #2330 from austinzheng/validation-tests
2016-04-28 18:29:46 -07:00
Dmitri Gribenko
069efee426
stdlib: SE-0065: change UnsafeBufferPointer.Indices to CountableRange<Int>
...
CountableRange is cheaper than DefaultRandomAccessIndices.
2016-04-28 17:13:55 -07:00
Dmitri Gribenko
42d9c81919
stdlib: SE-0065: make UnsafeMutableAudioBufferListPointer a random-access collection again
2016-04-28 17:13:55 -07:00
Austin Zheng
0e22ef62af
Adding validation tests for LazyMapCollection
2016-04-28 15:32:06 -07:00
Dmitri Gribenko
75d9d9118c
stdlib: check associated types of LazyMap and LazyFilter
2016-04-28 12:05:03 -07:00
Dmitri Gribenko
263d6a4135
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-26 21:15:13 -07:00
Joe Pamer
75f1dce6c1
Update crasher fixed by 2cdd7d64e1
2016-04-26 18:20:26 -07:00
Dave Abrahams
9bee5d182f
[stdlib] location/formLocation => index/formIndex
2016-04-26 17:46:16 -07:00
Dave Abrahams
debde16e2c
Merge set-api branch into swift-3-indexing-model
2016-04-26 15:56:42 -07:00
Dmitri Gribenko
4f68420ceb
stdlib: add LazyFilterBidirectionalCollection to preserve traversal kind
2016-04-26 13:33:13 -07:00
Dmitri Gribenko
d2522170ac
Fix the Range test in optimized mode
2016-04-26 11:15:49 -07:00
Max Moiseev
28060f0fdf
[stdlib][swift-3-indexing-model] fixing tests for Linux
2016-04-25 16:24:25 -06:00
Dmitri Gribenko
b75d2b9df4
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-25 13:50:09 -07:00
Dave Abrahams
5fcb00364b
Merge branch 'swift-3-indexing-model' of github.com:apple/swift into swift-3-indexing-model
2016-04-25 10:54:09 -07:00
Brian Gesiak
38741f3928
[test] Add Android (and FreeBSD) to OS checks
...
Add Android to the OS checks used to determine whether to import Glibc.
These tests would pass on Android were it not for the fact that Android is not
included in the Glibc check.
Also add FreeBSD where missing.
2016-04-25 10:58:32 -04:00
practicalswift
07324e2cc6
[swiftc] Add test case for crash triggered in swift::GenericParamList::getSubstitutionMap(llvm::ArrayRef<swift::Substitution>) const
...
Stack trace:
```
swift: /path/to/llvm/include/llvm/ADT/ArrayRef.h:139: const T &llvm::ArrayRef<swift::Substitution>::front() const [T = swift::Substitution]: Assertion `!empty()' failed.
8 swift 0x00000000010cff58 swift::GenericParamList::getSubstitutionMap(llvm::ArrayRef<swift::Substitution>) const + 1080
9 swift 0x0000000000ed957c swift::TypeChecker::applyUnboundGenericArguments(swift::UnboundGenericType*, swift::SourceLoc, swift::DeclContext*, llvm::MutableArrayRef<swift::TypeLoc>, bool, swift::GenericTypeResolver*) + 1164
10 swift 0x0000000000ed8f9f swift::TypeChecker::applyGenericArguments(swift::Type, swift::SourceLoc, swift::DeclContext*, swift::GenericIdentTypeRepr*, bool, swift::GenericTypeResolver*) + 431
14 swift 0x0000000000ed988e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
16 swift 0x0000000000eda8a4 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
17 swift 0x0000000000ed978a swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42
18 swift 0x0000000000ea7162 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 690
19 swift 0x0000000000ea8597 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135
20 swift 0x0000000000ea8936 swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) + 102
21 swift 0x0000000000e6cf7f swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 367
22 swift 0x000000000107b917 swift::ProtocolDecl::existentialTypeSupportedSlow(swift::LazyResolver*) + 151
26 swift 0x0000000001015ff4 swift::Decl::walk(swift::ASTWalker&) + 20
27 swift 0x0000000000eddeed swift::TypeChecker::checkUnsupportedProtocolType(swift::Decl*) + 157
29 swift 0x0000000000e6d251 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1089
34 swift 0x0000000000e72306 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
35 swift 0x0000000000e93d82 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 994
36 swift 0x0000000000c339ef swift::CompilerInstance::performSema() + 3295
38 swift 0x00000000007c4556 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2838
39 swift 0x0000000000791068 main + 2840
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28288-swift-genericparamlist-getsubstitutionmap.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28288-swift-genericparamlist-getsubstitutionmap-b0dd35.o
1. While type-checking 'A' at validation-test/compiler_crashers/28288-swift-genericparamlist-getsubstitutionmap.swift:10:1
2. While type-checking 'B' at validation-test/compiler_crashers/28288-swift-genericparamlist-getsubstitutionmap.swift:11:1
3. While resolving type B<Int> at [validation-test/compiler_crashers/28288-swift-genericparamlist-getsubstitutionmap.swift:12:16 - line:12:21] RangeText="B<Int>"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-04-24 22:33:25 +02:00
Dmitri Gribenko
8e886a3bdd
stdlib: ranges: remove range protocols
...
The RangeProtocol was a very weak and fragile abstraction because it
didn't specify the interpretation of the endpoints. To write a
non-trivial algorithm, one usually needed to consult that information.
The standard library code only actually worked correctly with half-open
and closed ranges (and didn't handle fully open ranges, for example).
The other two protocols, HalfOpenRangeProtocol and ClosedRangeProtocol,
were only used for code sharing, and present an ABI burden. We can use
gyb instead.
2016-04-22 18:15:06 -07:00
Dave Abrahams
17cb21ea7e
[stdlib] Move some test resources to StdlibCollectionUnittest
2016-04-22 17:59:58 -07:00
Dave Abrahams
99ac452766
[stdlib] Test additional limited index movement cases
...
The cases where the limit was in the opposite direction of the movement
were not being tested. Also, bring back the explicit expected result.
Some things are not as trivial to compute correctly as they look.
2016-04-22 17:59:54 -07:00
Dmitri Gribenko
fc39950543
Remove an empty test
2016-04-22 16:35:00 -07:00
Dave Abrahams
c099c1a075
[stdlib] More precise testing for traps
...
Let's only detect the traps we're really interested in.
2016-04-22 16:15:31 -07:00
Dave Abrahams
4e4480ada5
[stdlib] More 80-column cleanups
2016-04-22 16:13:32 -07:00
Dave Abrahams
f9c8f3b69a
[stdlib] Add test sanity
...
A number of factors were making it hard to tell what was being tested
here. This commit improves naming, and stops explicitly specifying
expected results that can be trivially computed.
2016-04-22 16:09:10 -07:00
Dmitri Gribenko
54d81b6633
Rewrite tests for _copyToNativeArrayBuffer() default implementations to use StdlibCollectionUnittest infrastructure
2016-04-21 18:31:31 -07:00
Dave Abrahams
47a870cc50
[stdlib] Use location/formLocation for all index movement
2016-04-21 17:13:41 -07:00
Dmitri Gribenko
41e94ac655
stdlib: fix a bug in CountableClosedRange._customContainsEquatableElement() and add better tests for range types
...
The tests are still not thorough enough, but this is a start.
2016-04-21 14:00:18 -07:00
Michael Gottesman
46296aa190
Merge remote-tracking branch 'origin/master' into master-next
2016-04-20 14:03:03 -07:00
Austin Zheng
ac9049cbe6
Manually rebasing string diagnostic tests from @shawnce PR 1688
2016-04-18 17:52:56 -07:00
Dmitri Gribenko
fc8d62dfbb
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-18 14:40:06 -07:00
Mishal Shah
039331c461
Merge pull request #2213 from apple/build-script-long-tests
...
CMake & build-script: add a new tier of testing, "long tests"
2016-04-18 13:04:20 -07:00
Michael Gottesman
d89f252deb
Merge remote-tracking branch 'origin/master' into master-next
2016-04-18 02:26:06 -07:00
practicalswift
a64a828974
Merge pull request #2228 from practicalswift/brackets-ii
...
[gardening] "[ a, b ]" → "[a, b]", "\t" → " ", "are are" → "are"
2016-04-17 21:48:01 +02:00
practicalswift
db452dcbe9
[gardening] "[ a, b ]" → "[a, b]"
2016-04-17 21:26:08 +02:00
Chris Lattner
88b70f15c1
stop using obsolete #line syntax.
2016-04-17 12:20:43 -07:00
practicalswift
c2107f456c
[gardening] "[ a, b ]" → "[a, b]" ( #2227 )
2016-04-17 21:02:18 +02:00
Chris Lattner
3aa4ff4332
fix a validation test that was using ++/--
2016-04-17 09:15:07 -07:00
Mark Lacey
eb1c4dc240
Fix two validation tests that require asserts.
2016-04-16 16:10:51 -07:00
Dmitri Gribenko
457f2b901c
CMake & build-script: add a new tier of testing, "long tests"
...
* The behavior of `build-script -t` is unchanged.
* `build-script -T` continues to run primary and validation test suite,
but without the long tests.
* `build-script --long-test` runs just the long tests.
* `build-script -T --long-test` runs all tests.
2016-04-16 14:03:54 -07:00
Dmitri Gribenko
cfea1a3f58
Merge remote-tracking branch 'origin/master' into swift-3-indexing-model
2016-04-14 17:00:46 -07:00
Dmitri Gribenko
c52787e900
Merge commit '9cdbec13eee72feccfc5f8b987882a8c52e8107b' into swift-3-indexing-model
2016-04-14 16:23:53 -07:00