Compare commits

..

267 Commits

Author SHA1 Message Date
Lukas Kubanek 06fd5ea31a Updated to Xcode 13.2 2021-11-25 20:58:08 +01:00
Lukas Kubanek 36f17aa442 Updated to Xcode 13.1 2021-10-19 11:11:29 +02:00
Lukas Kubanek 6c891952f4 Raised minimum macOS deployment target for test targets 2021-08-18 16:06:27 +02:00
Lukas Kubanek 3bac27b7a8 Added macOS 11 & Xcode 13 CI configuration 2021-08-18 15:39:28 +02:00
Lukas Kubanek 94d4b11aec Fixed compatibility issue with Swift 5.5 2021-08-18 15:23:00 +02:00
Lukas Kubanek 4be394e313 Updated to Xcode 13 β1 2021-06-08 09:44:17 +02:00
Lukas Kubanek 891ecf6e2d Bumped version numbers 2021-04-05 17:41:47 +02:00
Lukas Kubanek 736e0ea7da Removed Travis leftover 2021-04-05 17:39:28 +02:00
Lukas Kubanek c63ab5a3aa Merge pull request #69 from lukaskubanek/v4.0
v4.0
2021-04-05 17:36:11 +02:00
Lukas Kubanek f06553a74d Fixed links to releases in README 2021-04-05 17:22:40 +02:00
Lukas Kubanek 72f8248df1 Last tweaks to README 2021-04-05 17:06:38 +02:00
Lukas Kubanek 8ef9e9263f Edited README 2021-04-05 16:55:41 +02:00
Lukas Kubanek ab03176239 Updated README 2021-04-05 16:27:22 +02:00
Lukas Kubanek 4df7502e09 Removed obsolete Travis CI configuration 2021-04-05 16:02:55 +02:00
Lukas Kubanek 9bf57b0504 Removed playground that showcases the Codable API 2021-04-05 15:59:59 +02:00
Lukas Kubanek 92ae96cf2a Moved examples from playground to doc comments 2021-04-05 15:56:43 +02:00
Lukas Kubanek b120d60c55 update(_:at:) now returns a non-optional element 2021-04-05 15:48:37 +02:00
Lukas Kubanek cb4cb74a00 Added an invariant assertion 2021-04-05 12:27:37 +02:00
Lukas Kubanek 6bbbee5447 macOS 11 is apparently not yet ready for CI workflows… 2021-04-04 23:45:34 +02:00
Lukas Kubanek e5bc9eceae Fixed location of test files 2021-04-04 23:39:21 +02:00
Lukas Kubanek f153d5df84 Fixed invalid CI job name 2021-04-04 23:36:26 +02:00
Lukas Kubanek 1164a68fc8 Added missing steps section to macOS 11 CI job 2021-04-04 23:35:14 +02:00
Lukas Kubanek 596396a8e8 Tweaked name of macOS 11 CI job 2021-04-04 23:34:08 +02:00
Lukas Kubanek 027494878b Added macOS 11 to CI config file 2021-04-04 23:33:31 +02:00
Lukas Kubanek 74f50a4c71 Standardized path to source files 2021-04-04 23:24:55 +02:00
Lukas Kubanek ad37e7c91f Added conformance to Hashable 2021-04-04 23:10:46 +02:00
Lukas Kubanek 4c236e1b82 Fixed typos 2021-04-04 23:09:28 +02:00
Lukas Kubanek d78cc12e8d Updated to Xcode 12.5 2021-03-04 16:56:04 +01:00
Lukas Kubanek 8866b3e301 Updated to Xcode 12.4 2021-02-04 18:44:52 +01:00
Lukas Kubanek c3c5931187 2020 → 2021 2021-01-04 14:30:28 +01:00
Lukas Kubanek af7d973978 Updated CI configuration 2020-12-17 14:38:34 +01:00
Lukas Kubanek ab67e0fea8 Updated to Xcode 12.3 2020-12-09 21:49:18 +01:00
Lukas Kubanek 14e4501035 Fixed issues with slice-based mutations
- Introduced a dedicated slice type OrderedDictionarySlice
- Used new pattern for reordering methods with internal methods that take a range
- Included all reorderering methods from MutableCollection in both the base and slice types
- Added tests for access through slice
- Removed _unsafeValue(forKey:)
- Removed canUpdate(_:at:keyPresentAtIndex:)
- Refactored preconditions
- Regrouped code
2020-10-05 22:40:57 +02:00
Lukas Kubanek a569fc06f5 Added tests for subscript ambiguity
Refs #49
2020-10-05 13:54:42 +02:00
Lukas Kubanek 465ea731a3 Used Index type in swapAt(_:_:) 2020-10-05 13:39:37 +02:00
Lukas Kubanek 8a7247d9d4 Made XCTUnwrap shim internal 2020-10-05 12:14:48 +02:00
Lukas Kubanek 909bed0ada Added shim for XCTUnwrap 2020-10-05 12:07:32 +02:00
Lukas Kubanek 5a5a8cc62d Introduced OrderedDictionary.filter(_:)
Closes #66
2020-10-05 12:01:02 +02:00
Lukas Kubanek e44b3a7f4c Used Self wherever possible 2020-10-05 11:48:33 +02:00
Lukas Kubanek ecdc5f971b Revamped whole test suite
- Split tests into multiple files
- Added tests for functionality coming from MutableCollection
2020-10-05 11:44:47 +02:00
Lukas Kubanek efcb0db2e0 Reverted usage of key paths for map 2020-10-05 09:23:42 +02:00
Lukas Kubanek 1743d4dc3f Added initial conformance to MutableCollection
- Removed override subscript(bounds:) since it’s now inherited from MutableCollection
- Implemented getter for subscript(position:)
- Implemented override for swarAt(_:_:)
- Tweaked implementations of sort methods
2020-10-05 00:42:57 +02:00
Lukas Kubanek fb67bd25b0 Fixed typos in docs 2020-10-05 00:42:57 +02:00
Lukas Kubanek 69c8843b76 Moved canInsert(_:) to deprecations 2020-10-05 00:42:56 +02:00
Lukas Kubanek 36ff800650 Made backing storage private 2020-10-04 22:38:56 +02:00
Lukas Kubanek 13101672c2 Added conformance to RandomAccessCollection
Refs #64
2020-10-04 22:37:44 +02:00
Lukas Kubanek 7abeecbf58 Deprecated moveElement(forKey:to:) 2020-10-04 21:46:41 +02:00
Lukas Kubanek 13bf59d5bd Tweaked documentation comments 2020-10-04 21:11:06 +02:00
Lukas Kubanek 47f66b1abd Exposed direct access to key array
- Introduced type alias OrderedDictionary.LazyValues
- Removed OrderedDictionarySlice, OrderedDictionaryKeys & OrderedDictionaryValues

Closes #67
2020-10-04 20:55:50 +02:00
Lukas Kubanek 42bb82b87b Moved LinuxMain.swift
Closes #63
2020-10-04 20:27:01 +02:00
Lukas Kubanek 30c36e66fd Tweaked CI configuration 2020-10-04 20:26:52 +02:00
Lukas Kubanek 3f6f0750cf Dropped support for Swift 4.2 2020-10-04 19:31:25 +02:00
Lukas Kubanek ae2cc6dd55 Bumped macOS deployment target for tests to 10.15 2020-09-29 19:34:04 +02:00
Lukas Kubanek 0d48ec751a Updated to Xcode 12.2 β1 2020-09-20 21:22:09 +02:00
Lukas Kubanek d2dec8bba0 Activated „Build Active Scheme“ on playgrounds 2020-09-10 14:57:38 +02:00
Lukas Kubanek e8795b26df Updated to Xcode 12 β1 2020-06-23 09:21:53 +02:00
Lukas Kubanek ab7784b97f Removed obsolete file references 2020-06-23 09:21:19 +02:00
Lukas Kubanek 9adcc6f84c Bumped version to 3.0.1 2020-05-28 10:34:55 +02:00
Lukas Kubanek 4ccfd1b9a3 Re-added marketing version to Xcode project settings 2020-05-28 10:34:20 +02:00
Lukas Kubanek f08ff3e872 Updated version in README 2020-05-22 09:08:16 +02:00
Lukas Kubanek f0da8a43be Removed concrete version from Xcode project 2020-05-22 09:07:44 +02:00
Lukas Kubanek dbd6b816db Mentioned older Swift versions support in README 2020-05-22 09:04:56 +02:00
Lukas Kubanek 9818933b59 Dropped support for Swift <4.2 (#61) 2020-05-22 08:57:45 +02:00
Lukas Kubanek 88cc1ad101 Moved Travis scripts 2020-05-21 23:48:15 +02:00
Lukas Kubanek 4cd37bd207 Reduced Travis configuration to Swift 4.2 only 2020-05-21 23:44:40 +02:00
Lukas Kubanek 5e62daeff2 Added GitHub action for CI (#59) 2020-05-21 23:31:42 +02:00
Lukas Kubanek 52e42cd938 Refreshed README 2020-05-21 16:14:49 +02:00
Lukas Kubanek dbf4484048 Updated manifest files 2020-05-21 16:14:49 +02:00
Lukas Kubanek 804f2847b4 Updated .gitignore 2020-05-21 16:14:49 +02:00
Lukas Kubanek 46952da3c3 Updated to Xcode 11.4
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2020-03-26 10:29:23 +01:00
Lukas Kubanek acb62df760 Bumped version to 2.4.0
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2020-03-02 10:58:22 +00:00
Lukas Kubanek f303e02f63 Merge branch 'pr-capacity'
Closes #54

Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2020-03-02 10:38:54 +00:00
Lukas Kubanek 244d0128c9 Added basic tests for capacity reservation
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2020-03-02 10:32:41 +00:00
Lukas Kubanek 0d5e16fc4f Expose min reserved capacity of underlying types
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2020-03-02 10:32:24 +00:00
Lukas Kubanek ecd3f176e5 Introduced init(minimumCapacity:)
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2020-03-02 10:26:27 +00:00
Lukas Kubanek ac3f8fa5eb Tweaked documentation comments
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2020-03-02 10:26:26 +00:00
Gal Cohen 19046fb4a8 adds capacity getter and reserveCapacity method 2020-01-31 21:30:29 -05:00
Lukas Kubanek 005ef5c3ee 2019 → 2020
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2020-01-12 10:08:56 +01:00
Lukas Kubanek 68f2557694 Updated to Xcode 11.2
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-11-04 16:53:55 +01:00
Lukas Kubanek 72d4779e9b Concretized Swift version in the recent tweak
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-09-26 16:14:02 +02:00
Lukas Kubanek 8547583792 Another try to satisfy Swift 4.0
It turns out Swift <4.1 does not understand the rethrows keyword and thus sees the newly annotated initializer as failing. Resorted to a force unwrap in the deprecated initializer as its parameter is non-throwing.

Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-09-26 16:04:40 +02:00
Lukas Kubanek 3688348461 Another attempt on fixing the bug with missing try keyword
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-09-26 15:40:41 +02:00
Lukas Kubanek f875439709 Fixed a bug introduced in the last commit
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-09-26 15:32:43 +02:00
Lukas Kubanek 1920f07525 init(values:uniquelyKeyedBy:) now takes throwing closure
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-09-26 15:03:57 +02:00
Lukas Kubanek 69ed90dcfc Bumped version to 2.3.0
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-07-30 15:41:05 +02:00
Lukas Kubanek 33fa9622ce Removed irrelevant part of a playground
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-07-30 15:40:31 +02:00
Lukas Kubanek 468ad1c83a Attempted to fix type inference issue in Swift 4
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-07-12 13:00:43 +02:00
Lukas Kubanek 174c21d58f Fixed a warning for Swift 5.0
Fixes #52

Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-07-12 12:44:37 +02:00
Lukas Kubanek 5f076fccbb init(_:) → init(uniqueKeysWithValues:)
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-07-12 12:38:22 +02:00
Lukas Kubanek 642b5623b7 init(values:keyedBy:) → init(values:uniquelyKeyedBy:)
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-07-12 12:22:32 +02:00
Lukas Kubanek 03b5817530 Annotated Travis configuration with exact 4.1.X version
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-07-12 09:42:34 +02:00
Lukas Kubanek 7ba07fcef1 Re-added Travis configurations for different Swift versions
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-07-12 09:35:49 +02:00
Lukas Kubanek 0e1273e2ab Attempt to use specified Swift versions by Travis
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-07-12 09:25:32 +02:00
Lukas Kubanek 7b8b3c39a3 Simplified Travis setup
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-07-12 09:11:26 +02:00
Lukas Kubanek 1e5c2926a7 Made tests compatible with Swift 4
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-07-12 08:56:24 +02:00
Lukas Kubanek b678702e3d Introduced mapValues(_:) & compactMapValues(_:)
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-07-12 08:38:59 +02:00
Lukas Kubanek 4e4b205dcb Revert "Disabled automatic linking"
This reverts commit b345a3e8df.
2019-07-04 14:53:30 +02:00
Lukas Kubanek b345a3e8df Disabled automatic linking
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-06-05 16:56:17 +02:00
Lukas Kubanek 2cf9220874 Updated project file to Xcode 11
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-06-04 10:13:56 +02:00
Lukas Kubanek 08e9ff5371 Minor adjustment in README
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-04-29 14:01:50 +02:00
Lukas Kubanek e7adba0cb9 Fixed version numbers by bumped version to 2.2.2
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-04-29 13:54:22 +02:00
Lukas Kubanek 5a288f4197 Attempted to fix the issue with package definition
Fixes #51

Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-04-29 13:14:59 +02:00
Lukas Kubanek 56bfdfc953 Bumped version to 2.2.0
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-04-04 12:26:30 +02:00
Lukas Kubanek 34efc031a4 Moved safe extension API flag back to target level
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-04-04 12:20:01 +02:00
Lukas Kubanek 3541842cd3 Enabled safe extension API flag on project level
This refines #50 and applies the change to the macOS target as well.

Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-04-04 12:18:26 +02:00
Lukas Kubanek d75fe1429b Merge pull request #50 from graphiclife/master
Issue #10: Safe for app extensions
2019-04-04 12:14:34 +02:00
Måns Siljehav f8d5a75dd5 Issue #10: Safe for app extensions
• Checked the "Require Only App-Extension-Safe API" box in the Build Settings for the OrderedDictionary-iOS target.
2019-04-04 11:15:44 +02:00
Lukas Kubanek 596a7d2c1b Changed handling of modifiers in extensions
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-03-25 08:26:41 +01:00
Lukas Kubanek f2a320bc6b Initial migration to Xcode 10.2
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-03-24 15:17:52 +01:00
Lukas Kubanek f36353d61f 2018 → 2019
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-01-11 20:21:01 +01:00
Lukas Kubanek fb30ee0cc3 Fixed a reference link
Signed-off-by: Lukas Kubanek <lukas.kubanek@me.com>
2019-01-08 18:14:34 +01:00
Lukas Kubanek 4234d43565 Merge pull request #48 from gl2748/patch-1
Update package.swift
2018-10-02 22:59:51 +02:00
Iain Maitland 77d0b4937a Update package.swift
Per:
`swiftLanguageVersions` needs to be an `Int`
*Per*
https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV4.md#package
and
https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV4.md#swiftlanguageversions

This is causing a failing CI test for me.
2018-10-01 14:50:54 -04:00
Lukas Kubanek 4c89d79979 Bumped version to 2.1.0 2018-07-10 15:15:50 +02:00
Lukas Kubanek 397e3e4c20 Minor tweaks to the README 2018-07-10 15:11:26 +02:00
Lukas Kubanek a4abc2ee8b Updated README
- Add installation note for SPM
- Add note about no support for CocoaPods
2018-07-10 15:09:53 +02:00
Lukas Kubanek 2e54a9935b Improved #if macro 2018-07-10 14:26:35 +02:00
Lukas Kubanek ea47632047 One more refactoring of tests 2018-07-10 14:23:43 +02:00
Lukas Kubanek 1d9696939a Added initial support for SPM
Closes #42
2018-07-10 13:19:31 +02:00
Lukas Kubanek 1a26252cf7 Annotated sort methods with throws keyword 2018-07-10 13:01:31 +02:00
Lukas Kubanek 0d73c529f2 Added methods for popping/removing first and last key-value pairs
Thanks to @maicki for initial ideas

Closes #33
2018-07-10 12:53:07 +02:00
Lukas Kubanek 42030fb42a Reordered sections in OrderedDictionary 2018-07-10 12:33:29 +02:00
Lukas Kubanek e689725b4d Bumped year in license file 2018-07-10 11:57:37 +02:00
Lukas Kubanek b896bb0751 Removed empty header file 2018-07-10 11:55:38 +02:00
Lukas Kubanek 37bfcd67b2 Wrapped long method declarations 2018-07-10 11:53:52 +02:00
Lukas Kubanek cb7638e658 Added test for creation from a Dictionary
Closes #39
2018-07-10 11:53:52 +02:00
Lukas Kubanek 95e5cc9c11 Refactored tests 2018-07-10 11:53:37 +02:00
Lukas Kubanek 917cb33775 Introduced Dictionary.sorted(by:)
Refs #39
2018-07-10 11:53:37 +02:00
Lukas Kubanek 0b061bb25d Merge pull request #47 from maicki/maicki/improve-lookup
Improve key lookup
2018-07-10 11:26:54 +02:00
Michael Schneider 1d439a86ed Improve key lookup 2018-07-09 09:44:56 -07:00
Lukas Kubanek be3d9f1c69 Updated to Swift 4.2 & Xcode 10 2018-06-06 10:00:23 +02:00
Lukas Kubanek f89f30b9d1 Update README.md 2018-05-22 16:03:28 +02:00
Lukas Kubanek 9821943fff Bumped version to 2.0.0 2018-05-22 15:56:34 +02:00
Lukas Kubanek d609a252f8 Minor update 2018-05-22 15:54:09 +02:00
Lukas Kubanek 642d7e34f4 Merge pull request #40 from lukaskubanek/swift-4.1
Support for Swift 4.1
2018-05-22 15:52:55 +02:00
Lukas Kubanek 9faf5ab0ea Updated Travis config (2) 2018-03-27 20:56:06 +02:00
Lukas Kubanek f1a207a3e6 Updated Travis config 2018-03-27 20:43:51 +02:00
Lukas Kubanek aeac204817 Handled some warnings 2018-03-27 20:38:48 +02:00
Lukas Kubanek 32ef58d871 Added conditional Codable conformace for Swift 4.1
Initially, I tried to unify the implementation between the Swift 4.0 and Swift 4.1 version but had not much success…
2018-03-27 20:34:54 +02:00
Lukas Kubanek 6ee0ceaa48 Used equality in tests 2018-03-27 17:53:35 +02:00
Lukas Kubanek 0b6c95022e OrderedDictionary now truly conforms to Equatable 2018-03-27 17:38:55 +02:00
Lukas Kubanek b733108558 Introduced custom subtypes for keys and values collections 2018-03-27 17:32:46 +02:00
Lukas Kubanek 14cb718fe2 Simplified OrderedDictionarySlice type 2018-03-27 17:22:05 +02:00
Lukas Kubanek 77dbbf1c1f Updated to Xcode 9.3 β4 2018-03-27 17:21:34 +02:00
Lukas Kubanek 4be64d3c09 Updated README to mention Swift 4.1 support 2018-03-27 16:15:24 +02:00
Lukas Kubanek 2699924867 Updated version in release badge 2018-03-27 16:11:48 +02:00
Lukas Kubanek 87b46f36e1 Bumped version to 1.1.0 and updated copyright year 2018-03-27 15:34:19 +02:00
Lukas Kubanek 28cd25d536 Added support for moving elements to new index 2018-01-23 15:43:56 +01:00
Lukas Kubanek 122814a5cd Added an initializer from unsorted dictionary
Closes #30
2018-01-17 13:23:51 +01:00
Lukas Kubanek b49641a892 Improved methods for insertion checks
- Introduced canInsert(at:)
- Introduced canInsert(key:)
- Deprecated canInsert(_:)
2018-01-17 11:51:32 +01:00
Lukas Kubanek f8630257e6 Fixed a typo 2017-12-01 09:23:51 +01:00
Lukas Kubanek 46d4c52934 Updated to Xcode 9.1 beta 2 2017-10-17 18:19:28 +02:00
Lukas Kubanek fb66d1e9d8 Updated README 2017-09-25 10:59:00 +02:00
Lukas Kubanek 638d4ae0d1 Merge pull request #37 from callo90/master
Disabled Code coverage issue Carthage/Carthage#2056
2017-09-25 10:55:38 +02:00
callo90 f3d18a63fa Disabled Code coverage issue Carthage/Carthage#2056 2017-09-20 18:14:18 -05:00
Lukas Kubanek d01a024ae7 Updated README 2017-08-29 15:27:47 +02:00
Lukas Kubanek a9a37b7978 Updated README 2017-08-29 15:27:16 +02:00
Lukas Kubanek d87cac83e5 Fixed version number 2017-08-29 11:31:25 +02:00
Lukas Kubanek 754d4096da Updated license 2017-08-29 11:22:39 +02:00
Lukas Kubanek c5d09d3bc0 Updated README 2017-08-14 17:04:30 +02:00
Lukas Kubanek 5877a0a683 Exposed an unorderedDictionary property
Closes #34
2017-08-12 17:18:46 +02:00
Lukas Kubanek 5b6c8e3541 Added initializers from value sequences 2017-08-12 17:11:24 +02:00
Lukas Kubanek 502a9e128e Removed migrations code 2017-08-12 16:51:21 +02:00
Lukas Kubanek be22dfd473 Merge pull request #32 from lukaskubanek/codable
Codable Conformance
2017-08-12 16:49:46 +02:00
Lukas Kubanek a027b5c88b Added the Codable extension to iOS target 2017-08-12 16:46:26 +02:00
Lukas Kubanek 5f71a748f5 Added tests for Codable conformance 2017-08-12 16:39:44 +02:00
Lukas Kubanek 220b435d2a Moved conformance to Codable to another file 2017-08-12 16:31:25 +02:00
Lukas Kubanek 1120534fde Reduced the width of documentation comments 2017-07-18 17:24:23 +02:00
Lukas Kubanek 3dfa4db66a Added experimental conformance to Codable 2017-07-18 17:21:16 +02:00
Lukas Kubanek 3fe91a8722 Merge pull request #31 from lukaskubanek/xcode-9
Xcode 9 & Swift 4 support
2017-07-18 16:11:09 +02:00
Lukas Kubanek efb886e6c9 Further updates to Swift 4 2017-06-06 17:25:15 +02:00
Lukas Kubanek a0b52c1d28 Updated playground 2017-06-06 17:22:41 +02:00
Lukas Kubanek ccb19e2f1d Updated README 2017-06-06 17:18:14 +02:00
Lukas Kubanek 7d2362fe63 Updated Travis to use Xcode 9 in the future 2017-06-06 17:15:15 +02:00
Lukas Kubanek 117efdb7bd Initial migration to Xcode 9 and Swift 4 2017-06-06 17:13:33 +02:00
Lukas Kubanek d84ddf7f40 Updated for Xcode 8.3 beta 2017-03-18 16:01:28 +01:00
Lukas Kubanek 73ee947220 Set release number in badge manually 2017-01-12 22:43:07 +01:00
Lukas Kubanek 9715568f02 Merge pull request #23 from lukaskubanek/swift-3
Support for Swift 3
2017-01-12 22:35:20 +01:00
Lukas Kubanek 751bbe1bcc Updated playground 2017-01-12 21:01:32 +01:00
Lukas Kubanek af87ceac65 Updated tests 2017-01-12 21:00:29 +01:00
Lukas Kubanek 99f26c7f93 Removed OrderedDictionaryError thrown for invalid index updates 2017-01-12 20:57:54 +01:00
Lukas Kubanek 8e43c679de Added code comments 2017-01-12 20:05:39 +01:00
Lukas Kubanek b18549782d Made the link to code relative 2017-01-12 19:44:27 +01:00
Lukas Kubanek 5b4de32ee2 Changed the links format in README 2017-01-12 19:42:10 +01:00
Lukas Kubanek 64924a208c Updated README 2017-01-12 19:38:42 +01:00
Lukas Kubanek 310c182dc3 Minor changes 2017-01-08 12:03:53 +01:00
Lukas Kubanek c7ac65504d [Travis] Trying to get the playground validation work 2017-01-07 21:06:55 +01:00
Lukas Kubanek ce50489b8f [Travis] Fixed path to the playground validation script #3 2017-01-07 21:02:31 +01:00
Lukas Kubanek b6d563a3cc Minor changes 2017-01-07 21:01:27 +01:00
Lukas Kubanek bb3ee42176 [Travis] Fixed path to the playground validation script #2 2017-01-07 20:59:33 +01:00
Lukas Kubanek b0251e74d3 [Travis] Fixed path to the playground validation script 2017-01-07 20:54:50 +01:00
Lukas Kubanek c8d61b939b [Travis] Added initial support for validating the playground 2017-01-07 20:50:39 +01:00
Lukas Kubanek b832b9925c Made the playground compile again 2017-01-07 20:37:04 +01:00
Lukas Kubanek 21b9930d36 The standard initializer now works on arbitrary sequences 2017-01-07 19:57:27 +01:00
Lukas Kubanek f81ab4e6a0 [Travis] Removed playground validation 2017-01-07 17:25:57 +01:00
Lukas Kubanek f53a24821a [Travis] Updated the build script to work with Xcode project instead of workspace 2017-01-07 17:20:49 +01:00
Lukas Kubanek a742de8c3d [Travis] Used Xcode project instead of workspace 2017-01-07 17:17:10 +01:00
Lukas Kubanek 855e6f6a0f Updated Travis configuration
And added a script from ReactiveSwift
2017-01-07 17:13:08 +01:00
Lukas Kubanek 6cd117b224 Renamed product names in schemes 2017-01-07 16:53:21 +01:00
Lukas Kubanek dd71f6e196 Unified width of documentation comments 2017-01-07 16:52:43 +01:00
Lukas Kubanek a63943c0ae Removed the setter of the index-based subscript
This is now possible since we removed the conformance to MutableCollection.
2017-01-07 16:52:43 +01:00
Lukas Kubanek 3d78836dcd Removed conformance to MutableCollection
This enables the removal of the range subscript setter which might bring the ordered dictionary into an inconsistant state.
2017-01-07 16:52:43 +01:00
Lukas Kubanek be180eeaf4 Fixed OrderedDictionarySlice and added test for access 2017-01-07 16:52:43 +01:00
Lukas Kubanek 8a2127d8f4 Extracted and refactored description creation 2017-01-07 16:52:43 +01:00
Lukas Kubanek 616815b08c Reworked index-based insertion and update methods 2017-01-07 16:52:43 +01:00
Lukas Kubanek 90c35cb532 Introduced OrderedDictionaryError 2017-01-07 16:52:43 +01:00
Lukas Kubanek b892a31bd9 Enabled test coverage 2017-01-07 16:52:43 +01:00
Lukas Kubanek 699727683d Removed conformance to RandomAccessCollection
Because the RandomAccessCollection breaks the itegrity of the ordered dictionary by setting elements with same keys at multiple indices, OrderedDictionary cannot conform to it. The sorting methods had to be reimplemented using the method which calculates the array of sorted elements.
2017-01-07 16:52:11 +01:00
Lukas Kubanek 8efd15b99a Refactoring 2017-01-07 16:51:36 +01:00
Lukas Kubanek a043a863a7 Ordered keys and values are returned as lazy collections 2017-01-07 16:51:36 +01:00
Lukas Kubanek ccdb7bf482 Further polishing of API for Swift 3 2017-01-07 16:51:04 +01:00
Lukas Kubanek c5a5e91d2f Continuing polishing API for Swift 3 2017-01-07 16:49:37 +01:00
Lukas Kubanek b53a974021 Began polishing API for Swift 3 2017-01-07 16:48:20 +01:00
Lukas Kubanek 066b38d0ec Refactored tests and added a few new ones 2017-01-06 23:55:54 +01:00
Lukas Kubanek 8b9d033d7d Added conformance to RandomAccessCollection
This way we gain support for accessing the collection by the index and further functionality like sorting for free.
2017-01-06 23:33:44 +01:00
Lukas Kubanek befb924574 Recreated the Xcode project 2017-01-06 20:15:47 +01:00
Lukas Kubanek e9fa5e8191 Made the main module compile again 2017-01-06 19:29:11 +01:00
Lukas Kubanek fa8cb4d120 Run automatic migration to Swift 3 2017-01-06 17:30:59 +01:00
Lukas Kubanek d7daeb0518 Merge pull request #19 from lukaskubanek/swift2.3
Swift 2.3
2016-09-24 21:19:47 +02:00
Lukas Kubanek 9b6c798a17 Migrated the iOS target to Swift 2.3 as well 2016-09-24 21:12:31 +02:00
Lukas Kubanek 959f4f0eb1 Updated Travis configuration 2016-09-24 21:07:53 +02:00
Lukas Kubanek 040aadd65f Updated the README 2016-09-24 21:06:01 +02:00
Lukas Kubanek b6a99e3ffe Changed the target name to use “Mac” suffix instead of “OSX”
Closes #15
2016-09-24 21:00:10 +02:00
Lukas Kubanek 20d4d7e7c4 Ran the migrator for Swift 2.3 2016-09-23 18:44:18 +02:00
Lukas Kubanek a8a69e4570 Updated schemes for new test target product names 2016-06-16 12:02:37 +02:00
Lukas Kubanek cea6cb0952 Updated test target product names 2016-06-16 10:22:36 +02:00
Lukas Kubanek fae6eb2617 Reordered groups 2016-06-15 18:33:39 +02:00
Lukas Kubanek 0e3030af48 Reverted the empty initializer 2016-05-05 18:50:23 +02:00
Lukas Kubanek 9a255de350 Improved the playground 2016-05-05 18:43:27 +02:00
Lukas Kubanek ca1fc87240 Updated LICENSE and added reference to chagelog 2016-05-05 17:49:03 +02:00
Lukas Kubanek dff7877e06 Updated README 2016-05-05 17:41:28 +02:00
Lukas Kubanek 32ec1a11ce Cleanup 2016-05-05 16:56:15 +02:00
Lukas Kubanek 4d8f31303a Used default generator
Refs #3
2016-05-05 15:17:13 +02:00
Lukas Kubanek b4da0afe8b Introduced method valueForKey(_:)
Refs #13
2016-05-05 14:44:44 +02:00
Lukas Kubanek 34e3aa1c95 Refactored tests 2016-05-05 14:19:44 +02:00
Lukas Kubanek 0ec1461200 Added conformance to DictionaryLiteralConvertible and improved description output
Closes #4
Refs #11
2016-05-05 13:16:50 +02:00
Lukas Kubanek 3706b45822 Updated project settings to work with extensions
Refs #10
2016-04-14 20:07:38 +02:00
Lukas Kubanek 2438623b7c Updated README for 0.6 release 2016-03-27 16:55:29 +02:00
Lukas Kubanek af69193370 Updated README 2016-03-27 16:34:25 +02:00
Lukas Kubanek 20c169a7b8 Updated Travis CI configuration for Xcode 7.3 2016-03-27 16:21:25 +02:00
Lukas Kubanek 87efd44e09 Minor refactoring 2016-03-27 13:17:41 +02:00
Lukas Kubanek e7bba55479 Updated syntax for Swift 2.2 2016-02-16 07:46:01 +01:00
Lukas Kubanek 4dcdf588ee Updated to Xcode 7.3 beta 2016-01-24 11:23:56 +01:00
Lukas Kubanek 4065061d25 Bumped version 2016-01-06 23:51:04 +01:00
Marius Bergmann 60ffb98742 Set iOS deployment target to 8.0
All tests also pass on 8.0. This makes it possible to use the project in
an 8.x application.
2016-01-05 16:56:09 +01:00
Lukas Kubanek d70db906df Fix in the README 2015-12-18 10:19:39 +01:00
Lukas Kubanek 30bb351de2 Updated to Xcode 7.2 2015-12-15 12:20:05 +01:00
Lukas Kubanek 0022833380 Fixed a typo 2015-12-10 10:11:04 +01:00
Lukas Kubanek 1219d6dd8a Updated README and playground 2015-12-06 14:48:50 +01:00
Lukas Kubanek c5e6b63a9c Added support for sorting
Closes #5
2015-12-06 14:30:23 +01:00
Lukas Kubanek a2d0ef2c1b Cleaned up tests 2015-12-06 14:16:42 +01:00
Lukas Kubanek 61729a772b Updated framework search headers 2015-12-06 13:56:39 +01:00
Lukas Kubanek 5e51f91e07 The backing store properties are now initialized in-place 2015-12-04 13:58:55 +01:00
Lukas Kubanek 5acd33d10a Removed the dependency on Nimble for tests 2015-11-27 15:13:04 +01:00
Lukas Kubanek 1a4623ceff And hopefully the last change 2015-11-15 18:45:01 +01:00
Lukas Kubanek 8016abd95b Synxed with an older version of synx and fixed Carthage 2015-11-15 17:52:18 +01:00
Lukas Kubanek e58469f8e4 Synxed the project structure and updated dependencies
- Added Carthage to .gitignore
- Updated Nimble to v3.0
- Added a script for updating the dependencies
2015-11-15 17:01:36 +01:00
Lukas Kubanek 100e077a0d Added a convenience method for inserting new element 2015-11-04 13:51:17 +01:00
Lukas Kubanek 72ccef23af Updated installation section in README 2015-10-21 11:50:19 +02:00
Lukas Kubanek 1a9ac85931 Added properties orderedKeys & orderedValues
Closes #1
2015-10-14 20:48:41 +02:00
Lukas Kubanek 9074b8abe8 Updated readme 2015-09-11 10:24:58 +02:00
Lukas Kubanek 7f58e9ae8d Minor refactoring 2015-09-11 10:23:01 +02:00
Lukas Kubanek feffcd9041 Improved fatal error message for insertion using negative index 2015-09-11 10:22:53 +02:00
Lukas Kubanek e963b30ff8 Added support for index-based insertion 2015-09-11 10:17:28 +02:00
Lukas Kubanek 23725866ab Improved fatal error messages 2015-09-11 09:35:42 +02:00
Lukas Kubanek 9aa12bb2aa Updated readme 2015-09-10 21:58:39 +02:00
Lukas Kubanek 4bcf559767 Updated the Swift/Xcode requirement 2015-09-10 19:16:48 +02:00
73 changed files with 3078 additions and 2183 deletions
+61
View File
@@ -0,0 +1,61 @@
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
macos-11:
name: macOS 11 (Xcode ${{ matrix.xcode }})
runs-on: macos-11
strategy:
matrix:
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md#xcode
xcode:
- "13.0" # Swift 5.5
- "12.5.1" # Swift 5.4.2
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Build
run: swift build -v
- name: Test
run: swift test -v
macos-10_15:
name: macOS 10.15 (Xcode ${{ matrix.xcode }})
runs-on: macos-10.15
strategy:
matrix:
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md#xcode
xcode:
- "12.3" # Swift 5.3.2
- "12.2" # Swift 5.3.1
- "11.7" # Swift 5.2.4
- "11.3.1" # Swift 5.1.3
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Build
run: swift build -v
- name: Test
run: swift test -v
linux:
name: Linux
runs-on: ubuntu-latest
container:
image: swift:5.3
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: swift build -v
- name: Test
run: swift test -v
+8 -27
View File
@@ -1,30 +1,11 @@
# OS X
# SPM
.build
.swiftpm
# Xcode
xcuserdata/
# macOS
.DS_Store
.AppleDouble
.LSOverride
# Ruby
.ruby-*
.rbenv-*
# Xcode
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
*.xctimeline
# Carthage
Carthage/Checkouts
Carthage/**/OrderedDictionary*
-13
View File
@@ -1,13 +0,0 @@
language: objective-c
branches:
only:
- master
xcode_project: OrderedDictionary.xcodeproj
xcode_scheme: OrderedDictionary-iOS
osx_image: xcode7
xcode_sdk: iphonesimulator
script:
- xcodebuild clean build test -project OrderedDictionary.xcodeproj -scheme OrderedDictionary-iOS -destination "platform=iOS Simulator,name=iPhone 6,OS=9.0"
-1
View File
@@ -1 +0,0 @@
github "Quick/Nimble" "e84623d953d811f74a2afcda4fa0c8121e7dad7d"
-1
View File
@@ -1 +0,0 @@
github "Quick/Nimble" "e84623d953d811f74a2afcda4fa0c8121e7dad7d"
-20
View File
@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.net.jeffhui.Nimble</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
Versions/Current/Headers
-1
View File
@@ -1 +0,0 @@
Versions/Current/Modules
-1
View File
@@ -1 +0,0 @@
Versions/Current/Nimble
-1
View File
@@ -1 +0,0 @@
Versions/Current/Resources
-129
View File
@@ -1,129 +0,0 @@
#import <Foundation/Foundation.h>
@class NMBExpectation;
@class NMBObjCBeCloseToMatcher;
@class NMBObjCRaiseExceptionMatcher;
@protocol NMBMatcher;
#define NIMBLE_EXPORT FOUNDATION_EXPORT
#ifdef NIMBLE_DISABLE_SHORT_SYNTAX
#define NIMBLE_SHORT(PROTO, ORIGINAL)
#else
#define NIMBLE_SHORT(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE PROTO { return (ORIGINAL); }
#endif
NIMBLE_EXPORT NMBExpectation *NMB_expect(id(^actualBlock)(), NSString *file, NSUInteger line);
NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *file, NSUInteger line);
NIMBLE_EXPORT id<NMBMatcher> NMB_equal(id expectedValue);
NIMBLE_SHORT(id<NMBMatcher> equal(id expectedValue),
NMB_equal(expectedValue));
NIMBLE_EXPORT NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue);
NIMBLE_SHORT(NMBObjCBeCloseToMatcher *beCloseTo(id expectedValue),
NMB_beCloseTo(expectedValue));
NIMBLE_EXPORT id<NMBMatcher> NMB_beAnInstanceOf(Class expectedClass);
NIMBLE_SHORT(id<NMBMatcher> beAnInstanceOf(Class expectedClass),
NMB_beAnInstanceOf(expectedClass));
NIMBLE_EXPORT id<NMBMatcher> NMB_beAKindOf(Class expectedClass);
NIMBLE_SHORT(id<NMBMatcher> beAKindOf(Class expectedClass),
NMB_beAKindOf(expectedClass));
NIMBLE_EXPORT id<NMBMatcher> NMB_beginWith(id itemElementOrSubstring);
NIMBLE_SHORT(id<NMBMatcher> beginWith(id itemElementOrSubstring),
NMB_beginWith(itemElementOrSubstring));
NIMBLE_EXPORT id<NMBMatcher> NMB_beGreaterThan(NSNumber *expectedValue);
NIMBLE_SHORT(id<NMBMatcher> beGreaterThan(NSNumber *expectedValue),
NMB_beGreaterThan(expectedValue));
NIMBLE_EXPORT id<NMBMatcher> NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue);
NIMBLE_SHORT(id<NMBMatcher> beGreaterThanOrEqualTo(NSNumber *expectedValue),
NMB_beGreaterThanOrEqualTo(expectedValue));
NIMBLE_EXPORT id<NMBMatcher> NMB_beIdenticalTo(id expectedInstance);
NIMBLE_SHORT(id<NMBMatcher> beIdenticalTo(id expectedInstance),
NMB_beIdenticalTo(expectedInstance));
NIMBLE_EXPORT id<NMBMatcher> NMB_beLessThan(NSNumber *expectedValue);
NIMBLE_SHORT(id<NMBMatcher> beLessThan(NSNumber *expectedValue),
NMB_beLessThan(expectedValue));
NIMBLE_EXPORT id<NMBMatcher> NMB_beLessThanOrEqualTo(NSNumber *expectedValue);
NIMBLE_SHORT(id<NMBMatcher> beLessThanOrEqualTo(NSNumber *expectedValue),
NMB_beLessThanOrEqualTo(expectedValue));
NIMBLE_EXPORT id<NMBMatcher> NMB_beTruthy(void);
NIMBLE_SHORT(id<NMBMatcher> beTruthy(void),
NMB_beTruthy());
NIMBLE_EXPORT id<NMBMatcher> NMB_beFalsy(void);
NIMBLE_SHORT(id<NMBMatcher> beFalsy(void),
NMB_beFalsy());
NIMBLE_EXPORT id<NMBMatcher> NMB_beTrue(void);
NIMBLE_SHORT(id<NMBMatcher> beTrue(void),
NMB_beTrue());
NIMBLE_EXPORT id<NMBMatcher> NMB_beFalse(void);
NIMBLE_SHORT(id<NMBMatcher> beFalse(void),
NMB_beFalse());
NIMBLE_EXPORT id<NMBMatcher> NMB_beNil(void);
NIMBLE_SHORT(id<NMBMatcher> beNil(void),
NMB_beNil());
NIMBLE_EXPORT id<NMBMatcher> NMB_beEmpty(void);
NIMBLE_SHORT(id<NMBMatcher> beEmpty(void),
NMB_beEmpty());
NIMBLE_EXPORT id<NMBMatcher> NMB_containWithNilTermination(id itemOrSubstring, ...) NS_REQUIRES_NIL_TERMINATION;
#define NMB_contain(...) NMB_containWithNilTermination(__VA_ARGS__, nil)
#ifndef NIMBLE_DISABLE_SHORT_SYNTAX
#define contain(...) NMB_contain(__VA_ARGS__)
#endif
NIMBLE_EXPORT id<NMBMatcher> NMB_endWith(id itemElementOrSubstring);
NIMBLE_SHORT(id<NMBMatcher> endWith(id itemElementOrSubstring),
NMB_endWith(itemElementOrSubstring));
NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException(void);
NIMBLE_SHORT(NMBObjCRaiseExceptionMatcher *raiseException(void),
NMB_raiseException());
NIMBLE_EXPORT id<NMBMatcher> NMB_match(id expectedValue);
NIMBLE_SHORT(id<NMBMatcher> match(id expectedValue),
NMB_match(expectedValue));
NIMBLE_EXPORT id<NMBMatcher> NMB_allPass(id matcher);
NIMBLE_SHORT(id<NMBMatcher> allPass(id matcher),
NMB_allPass(matcher));
// In order to preserve breakpoint behavior despite using macros to fill in __FILE__ and __LINE__,
// define a builder that populates __FILE__ and __LINE__, and returns a block that takes timeout
// and action arguments. See https://github.com/Quick/Quick/pull/185 for details.
typedef void (^NMBWaitUntilTimeoutBlock)(NSTimeInterval timeout, void (^action)(void (^)(void)));
typedef void (^NMBWaitUntilBlock)(void (^action)(void (^)(void)));
NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line);
NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line);
NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line);
#define NMB_waitUntilTimeout NMB_waitUntilTimeoutBuilder(@(__FILE__), __LINE__)
#define NMB_waitUntil NMB_waitUntilBuilder(@(__FILE__), __LINE__)
#ifndef NIMBLE_DISABLE_SHORT_SYNTAX
#define expect(...) NMB_expect(^id{ return (__VA_ARGS__); }, @(__FILE__), __LINE__)
#define expectAction(BLOCK) NMB_expectAction((BLOCK), @(__FILE__), __LINE__)
#define failWithMessage(msg) NMB_failWithMessage(msg, @(__FILE__), __LINE__)
#define fail() failWithMessage(@"fail() always fails")
#define waitUntilTimeout NMB_waitUntilTimeout
#define waitUntil NMB_waitUntil
#endif
@@ -1,8 +0,0 @@
#import <Foundation/Foundation.h>
@interface NMBExceptionCapture : NSObject
- (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally;
- (void)tryBlock:(void(^)())unsafeBlock;
@end
-364
View File
@@ -1,364 +0,0 @@
// Generated by Apple Swift version 2.0 (swiftlang-700.0.57.3 clang-700.0.72)
#pragma clang diagnostic push
#if defined(__has_include) && __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <objc/NSObject.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if defined(__has_include) && __has_include(<uchar.h>)
# include <uchar.h>
#elif !defined(__cplusplus) || __cplusplus < 201103L
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
#endif
typedef struct _NSZone NSZone;
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if defined(__has_attribute) && __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if defined(__has_attribute) && __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if defined(__has_attribute) && __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name) enum _name : _type _name; enum SWIFT_ENUM_EXTRA _name : _type
#endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
#if defined(__has_feature) && __has_feature(modules)
@import ObjectiveC;
@import Foundation;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
/// Encapsulates the failure message that matchers can report to the end user.
///
/// This is shared state between Nimble and matchers that mutate this value.
SWIFT_CLASS("_TtC6Nimble14FailureMessage")
@interface FailureMessage : NSObject
@property (nonatomic, copy) NSString * __nonnull expected;
@property (nonatomic, copy) NSString * __nullable actualValue;
@property (nonatomic, copy) NSString * __nonnull to;
@property (nonatomic, copy) NSString * __nonnull postfixMessage;
@property (nonatomic, copy) NSString * __nonnull postfixActual;
@property (nonatomic, copy) NSString * __nullable userDescription;
@property (nonatomic, copy) NSString * __nonnull stringValue;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithStringValue:(NSString * __nonnull)stringValue OBJC_DESIGNATED_INITIALIZER;
@end
/// Protocol for types that support only beEmpty()
SWIFT_PROTOCOL("_TtP6Nimble13NMBCollection_")
@protocol NMBCollection
@property (nonatomic, readonly) NSInteger count;
@end
/// Protocol for types to support beLessThan(), beLessThanOrEqualTo(), beGreaterThan(), beGreaterThanOrEqualTo(), and equal() matchers.
///
/// Types that conform to Swift's Comparable protocol will work implicitly too
SWIFT_PROTOCOL("_TtP6Nimble13NMBComparable_")
@protocol NMBComparable
- (NSComparisonResult)NMB_compare:(id <NMBComparable> __null_unspecified)otherObject;
@end
/// Protocol for types that support contain() matcher.
SWIFT_PROTOCOL("_TtP6Nimble12NMBContainer_")
@protocol NMBContainer
- (BOOL)containsObject:(id __null_unspecified)object;
@end
/// Protocol for types to support beCloseTo() matcher
SWIFT_PROTOCOL("_TtP6Nimble20NMBDoubleConvertible_")
@protocol NMBDoubleConvertible
@property (nonatomic, readonly) double doubleValue;
@end
@protocol NMBMatcher;
SWIFT_CLASS("_TtC6Nimble14NMBExpectation")
@interface NMBExpectation : NSObject
- (nonnull instancetype)initWithActualBlock:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock negative:(BOOL)negative file:(NSString * __nonnull)file line:(NSUInteger)line OBJC_DESIGNATED_INITIALIZER;
@property (nonatomic, readonly, copy) NMBExpectation * __nonnull (^ __nonnull withTimeout)(NSTimeInterval);
@property (nonatomic, readonly, copy) void (^ __nonnull to)(id <NMBMatcher> __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toWithDescription)(id <NMBMatcher> __nonnull, NSString * __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toNot)(id <NMBMatcher> __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toNotWithDescription)(id <NMBMatcher> __nonnull, NSString * __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull notTo)(id <NMBMatcher> __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull notToWithDescription)(id <NMBMatcher> __nonnull, NSString * __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toEventually)(id <NMBMatcher> __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toEventuallyWithDescription)(id <NMBMatcher> __nonnull, NSString * __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toEventuallyNot)(id <NMBMatcher> __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toEventuallyNotWithDescription)(id <NMBMatcher> __nonnull, NSString * __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toNotEventually)(id <NMBMatcher> __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toNotEventuallyWithDescription)(id <NMBMatcher> __nonnull, NSString * __nonnull);
+ (void)failWithMessage:(NSString * __nonnull)message file:(NSString * __nonnull)file line:(NSUInteger)line;
@end
@class SourceLocation;
/// Objective-C interface to the Swift variant of Matcher.
SWIFT_PROTOCOL("_TtP6Nimble10NMBMatcher_")
@protocol NMBMatcher
- (BOOL)matches:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
- (BOOL)doesNotMatch:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
@end
SWIFT_CLASS("_TtC6Nimble23NMBObjCBeCloseToMatcher")
@interface NMBObjCBeCloseToMatcher : NSObject <NMBMatcher>
- (BOOL)matches:(NSObject * __null_unspecified (^ __nonnull)(void))actualExpression failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
- (BOOL)doesNotMatch:(NSObject * __null_unspecified (^ __nonnull)(void))actualExpression failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
@property (nonatomic, readonly, copy) NMBObjCBeCloseToMatcher * __nonnull (^ __nonnull within)(double);
@end
SWIFT_CLASS("_TtC6Nimble14NMBObjCMatcher")
@interface NMBObjCMatcher : NSObject <NMBMatcher>
- (BOOL)matches:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
- (BOOL)doesNotMatch:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beEmptyMatcher;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beIdenticalToMatcher:(NSObject * __nullable)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beginWithMatcher:(id __nonnull)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beGreaterThanOrEqualToMatcher:(id <NMBComparable> __nullable)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)containMatcher:(NSArray<NSObject *> * __nonnull)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beGreaterThanMatcher:(id <NMBComparable> __nullable)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beLessThanMatcher:(id <NMBComparable> __nullable)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (id <NMBMatcher> __nonnull)equalMatcher:(NSObject * __nonnull)expected;
@end
@class NSString;
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (id <NMBMatcher> __nonnull)matchMatcher:(NSString * __nonnull)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (id <NMBMatcher> __nonnull)beAKindOfMatcher:(Class __nonnull)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)allPassMatcher:(NMBObjCMatcher * __nonnull)matcher;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (id <NMBMatcher> __nonnull)beAnInstanceOfMatcher:(Class __nonnull)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beLessThanOrEqualToMatcher:(id <NMBComparable> __nullable)expected;
@end
@class NSNumber;
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCBeCloseToMatcher * __nonnull)beCloseToMatcher:(NSNumber * __nonnull)expected within:(double)within;
@end
@class NMBObjCRaiseExceptionMatcher;
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCRaiseExceptionMatcher * __nonnull)raiseExceptionMatcher;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)endWithMatcher:(id __nonnull)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beNilMatcher;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beTruthyMatcher;
+ (NMBObjCMatcher * __nonnull)beFalsyMatcher;
+ (NMBObjCMatcher * __nonnull)beTrueMatcher;
+ (NMBObjCMatcher * __nonnull)beFalseMatcher;
@end
@class NSDictionary;
@class NSException;
SWIFT_CLASS("_TtC6Nimble28NMBObjCRaiseExceptionMatcher")
@interface NMBObjCRaiseExceptionMatcher : NSObject <NMBMatcher>
- (BOOL)matches:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
- (BOOL)doesNotMatch:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
@property (nonatomic, readonly, copy) NMBObjCRaiseExceptionMatcher * __nonnull (^ __nonnull named)(NSString * __nonnull);
@property (nonatomic, readonly, copy) NMBObjCRaiseExceptionMatcher * __nonnull (^ __nonnull reason)(NSString * __nullable);
@property (nonatomic, readonly, copy) NMBObjCRaiseExceptionMatcher * __nonnull (^ __nonnull userInfo)(NSDictionary * __nullable);
@property (nonatomic, readonly, copy) NMBObjCRaiseExceptionMatcher * __nonnull (^ __nonnull satisfyingBlock)(void (^ __nullable)(NSException * __nonnull));
@end
/// Protocol for types that support beginWith(), endWith(), beEmpty() matchers
SWIFT_PROTOCOL("_TtP6Nimble20NMBOrderedCollection_")
@protocol NMBOrderedCollection <NMBCollection>
- (NSInteger)indexOfObject:(id __null_unspecified)object;
@end
@interface NSArray (SWIFT_EXTENSION(Nimble)) <NMBContainer>
@end
@interface NSArray (SWIFT_EXTENSION(Nimble)) <NMBOrderedCollection, NMBCollection>
@end
@interface NSArray (SWIFT_EXTENSION(Nimble))
@end
@interface NSDictionary (SWIFT_EXTENSION(Nimble)) <NMBCollection>
@end
@interface NSHashTable (SWIFT_EXTENSION(Nimble)) <NMBContainer>
@end
@interface NSHashTable (SWIFT_EXTENSION(Nimble)) <NMBCollection>
@end
@interface NSNumber (SWIFT_EXTENSION(Nimble)) <NMBDoubleConvertible>
@end
@interface NSNumber (SWIFT_EXTENSION(Nimble)) <NMBComparable>
- (NSComparisonResult)NMB_compare:(id <NMBComparable> __null_unspecified)otherObject;
@end
@interface NSSet (SWIFT_EXTENSION(Nimble)) <NMBCollection>
@end
@interface NSSet (SWIFT_EXTENSION(Nimble)) <NMBContainer>
@end
@interface NSString (SWIFT_EXTENSION(Nimble)) <NMBComparable>
- (NSComparisonResult)NMB_compare:(id <NMBComparable> __null_unspecified)otherObject;
@end
SWIFT_CLASS("_TtC6Nimble14SourceLocation")
@interface SourceLocation : NSObject
@property (nonatomic, readonly, copy) NSString * __nonnull file;
@property (nonatomic, readonly) NSUInteger line;
@property (nonatomic, readonly, copy) NSString * __nonnull description;
@end
#pragma clang diagnostic pop
-6
View File
@@ -1,6 +0,0 @@
#import <Foundation/Foundation.h>
#import <Nimble/NMBExceptionCapture.h>
#import <Nimble/DSL.h>
FOUNDATION_EXPORT double NimbleVersionNumber;
FOUNDATION_EXPORT const unsigned char NimbleVersionString[];
@@ -1,10 +0,0 @@
framework module Nimble {
umbrella header "Nimble.h"
export *
module * { export * }
}
module Nimble.Swift {
header "Nimble-Swift.h"
}
Binary file not shown.
-51
View File
@@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>14F27</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Nimble</string>
<key>CFBundleIdentifier</key>
<string>net.jeffhui.Nimble</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Nimble</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>7A192o</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>15A244e</string>
<key>DTSDKName</key>
<string>macosx10.11</string>
<key>DTXcode</key>
<string>0700</string>
<key>DTXcodeBuild</key>
<string>7A192o</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2014 Jeff Hui. All rights reserved.</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
</dict>
</plist>
-1
View File
@@ -1 +0,0 @@
A
-20
View File
@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.net.jeffhui.Nimble</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file not shown.
-129
View File
@@ -1,129 +0,0 @@
#import <Foundation/Foundation.h>
@class NMBExpectation;
@class NMBObjCBeCloseToMatcher;
@class NMBObjCRaiseExceptionMatcher;
@protocol NMBMatcher;
#define NIMBLE_EXPORT FOUNDATION_EXPORT
#ifdef NIMBLE_DISABLE_SHORT_SYNTAX
#define NIMBLE_SHORT(PROTO, ORIGINAL)
#else
#define NIMBLE_SHORT(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE PROTO { return (ORIGINAL); }
#endif
NIMBLE_EXPORT NMBExpectation *NMB_expect(id(^actualBlock)(), NSString *file, NSUInteger line);
NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *file, NSUInteger line);
NIMBLE_EXPORT id<NMBMatcher> NMB_equal(id expectedValue);
NIMBLE_SHORT(id<NMBMatcher> equal(id expectedValue),
NMB_equal(expectedValue));
NIMBLE_EXPORT NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue);
NIMBLE_SHORT(NMBObjCBeCloseToMatcher *beCloseTo(id expectedValue),
NMB_beCloseTo(expectedValue));
NIMBLE_EXPORT id<NMBMatcher> NMB_beAnInstanceOf(Class expectedClass);
NIMBLE_SHORT(id<NMBMatcher> beAnInstanceOf(Class expectedClass),
NMB_beAnInstanceOf(expectedClass));
NIMBLE_EXPORT id<NMBMatcher> NMB_beAKindOf(Class expectedClass);
NIMBLE_SHORT(id<NMBMatcher> beAKindOf(Class expectedClass),
NMB_beAKindOf(expectedClass));
NIMBLE_EXPORT id<NMBMatcher> NMB_beginWith(id itemElementOrSubstring);
NIMBLE_SHORT(id<NMBMatcher> beginWith(id itemElementOrSubstring),
NMB_beginWith(itemElementOrSubstring));
NIMBLE_EXPORT id<NMBMatcher> NMB_beGreaterThan(NSNumber *expectedValue);
NIMBLE_SHORT(id<NMBMatcher> beGreaterThan(NSNumber *expectedValue),
NMB_beGreaterThan(expectedValue));
NIMBLE_EXPORT id<NMBMatcher> NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue);
NIMBLE_SHORT(id<NMBMatcher> beGreaterThanOrEqualTo(NSNumber *expectedValue),
NMB_beGreaterThanOrEqualTo(expectedValue));
NIMBLE_EXPORT id<NMBMatcher> NMB_beIdenticalTo(id expectedInstance);
NIMBLE_SHORT(id<NMBMatcher> beIdenticalTo(id expectedInstance),
NMB_beIdenticalTo(expectedInstance));
NIMBLE_EXPORT id<NMBMatcher> NMB_beLessThan(NSNumber *expectedValue);
NIMBLE_SHORT(id<NMBMatcher> beLessThan(NSNumber *expectedValue),
NMB_beLessThan(expectedValue));
NIMBLE_EXPORT id<NMBMatcher> NMB_beLessThanOrEqualTo(NSNumber *expectedValue);
NIMBLE_SHORT(id<NMBMatcher> beLessThanOrEqualTo(NSNumber *expectedValue),
NMB_beLessThanOrEqualTo(expectedValue));
NIMBLE_EXPORT id<NMBMatcher> NMB_beTruthy(void);
NIMBLE_SHORT(id<NMBMatcher> beTruthy(void),
NMB_beTruthy());
NIMBLE_EXPORT id<NMBMatcher> NMB_beFalsy(void);
NIMBLE_SHORT(id<NMBMatcher> beFalsy(void),
NMB_beFalsy());
NIMBLE_EXPORT id<NMBMatcher> NMB_beTrue(void);
NIMBLE_SHORT(id<NMBMatcher> beTrue(void),
NMB_beTrue());
NIMBLE_EXPORT id<NMBMatcher> NMB_beFalse(void);
NIMBLE_SHORT(id<NMBMatcher> beFalse(void),
NMB_beFalse());
NIMBLE_EXPORT id<NMBMatcher> NMB_beNil(void);
NIMBLE_SHORT(id<NMBMatcher> beNil(void),
NMB_beNil());
NIMBLE_EXPORT id<NMBMatcher> NMB_beEmpty(void);
NIMBLE_SHORT(id<NMBMatcher> beEmpty(void),
NMB_beEmpty());
NIMBLE_EXPORT id<NMBMatcher> NMB_containWithNilTermination(id itemOrSubstring, ...) NS_REQUIRES_NIL_TERMINATION;
#define NMB_contain(...) NMB_containWithNilTermination(__VA_ARGS__, nil)
#ifndef NIMBLE_DISABLE_SHORT_SYNTAX
#define contain(...) NMB_contain(__VA_ARGS__)
#endif
NIMBLE_EXPORT id<NMBMatcher> NMB_endWith(id itemElementOrSubstring);
NIMBLE_SHORT(id<NMBMatcher> endWith(id itemElementOrSubstring),
NMB_endWith(itemElementOrSubstring));
NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException(void);
NIMBLE_SHORT(NMBObjCRaiseExceptionMatcher *raiseException(void),
NMB_raiseException());
NIMBLE_EXPORT id<NMBMatcher> NMB_match(id expectedValue);
NIMBLE_SHORT(id<NMBMatcher> match(id expectedValue),
NMB_match(expectedValue));
NIMBLE_EXPORT id<NMBMatcher> NMB_allPass(id matcher);
NIMBLE_SHORT(id<NMBMatcher> allPass(id matcher),
NMB_allPass(matcher));
// In order to preserve breakpoint behavior despite using macros to fill in __FILE__ and __LINE__,
// define a builder that populates __FILE__ and __LINE__, and returns a block that takes timeout
// and action arguments. See https://github.com/Quick/Quick/pull/185 for details.
typedef void (^NMBWaitUntilTimeoutBlock)(NSTimeInterval timeout, void (^action)(void (^)(void)));
typedef void (^NMBWaitUntilBlock)(void (^action)(void (^)(void)));
NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line);
NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line);
NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line);
#define NMB_waitUntilTimeout NMB_waitUntilTimeoutBuilder(@(__FILE__), __LINE__)
#define NMB_waitUntil NMB_waitUntilBuilder(@(__FILE__), __LINE__)
#ifndef NIMBLE_DISABLE_SHORT_SYNTAX
#define expect(...) NMB_expect(^id{ return (__VA_ARGS__); }, @(__FILE__), __LINE__)
#define expectAction(BLOCK) NMB_expectAction((BLOCK), @(__FILE__), __LINE__)
#define failWithMessage(msg) NMB_failWithMessage(msg, @(__FILE__), __LINE__)
#define fail() failWithMessage(@"fail() always fails")
#define waitUntilTimeout NMB_waitUntilTimeout
#define waitUntil NMB_waitUntil
#endif
-8
View File
@@ -1,8 +0,0 @@
#import <Foundation/Foundation.h>
@interface NMBExceptionCapture : NSObject
- (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally;
- (void)tryBlock:(void(^)())unsafeBlock;
@end
-364
View File
@@ -1,364 +0,0 @@
// Generated by Apple Swift version 2.0 (swiftlang-700.0.57.3 clang-700.0.72)
#pragma clang diagnostic push
#if defined(__has_include) && __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <objc/NSObject.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if defined(__has_include) && __has_include(<uchar.h>)
# include <uchar.h>
#elif !defined(__cplusplus) || __cplusplus < 201103L
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
#endif
typedef struct _NSZone NSZone;
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if defined(__has_attribute) && __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if defined(__has_attribute) && __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if defined(__has_attribute) && __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name) enum _name : _type _name; enum SWIFT_ENUM_EXTRA _name : _type
#endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
#if defined(__has_feature) && __has_feature(modules)
@import ObjectiveC;
@import Foundation;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
/// Encapsulates the failure message that matchers can report to the end user.
///
/// This is shared state between Nimble and matchers that mutate this value.
SWIFT_CLASS("_TtC6Nimble14FailureMessage")
@interface FailureMessage : NSObject
@property (nonatomic, copy) NSString * __nonnull expected;
@property (nonatomic, copy) NSString * __nullable actualValue;
@property (nonatomic, copy) NSString * __nonnull to;
@property (nonatomic, copy) NSString * __nonnull postfixMessage;
@property (nonatomic, copy) NSString * __nonnull postfixActual;
@property (nonatomic, copy) NSString * __nullable userDescription;
@property (nonatomic, copy) NSString * __nonnull stringValue;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithStringValue:(NSString * __nonnull)stringValue OBJC_DESIGNATED_INITIALIZER;
@end
/// Protocol for types that support only beEmpty()
SWIFT_PROTOCOL("_TtP6Nimble13NMBCollection_")
@protocol NMBCollection
@property (nonatomic, readonly) NSInteger count;
@end
/// Protocol for types to support beLessThan(), beLessThanOrEqualTo(), beGreaterThan(), beGreaterThanOrEqualTo(), and equal() matchers.
///
/// Types that conform to Swift's Comparable protocol will work implicitly too
SWIFT_PROTOCOL("_TtP6Nimble13NMBComparable_")
@protocol NMBComparable
- (NSComparisonResult)NMB_compare:(id <NMBComparable> __null_unspecified)otherObject;
@end
/// Protocol for types that support contain() matcher.
SWIFT_PROTOCOL("_TtP6Nimble12NMBContainer_")
@protocol NMBContainer
- (BOOL)containsObject:(id __null_unspecified)object;
@end
/// Protocol for types to support beCloseTo() matcher
SWIFT_PROTOCOL("_TtP6Nimble20NMBDoubleConvertible_")
@protocol NMBDoubleConvertible
@property (nonatomic, readonly) double doubleValue;
@end
@protocol NMBMatcher;
SWIFT_CLASS("_TtC6Nimble14NMBExpectation")
@interface NMBExpectation : NSObject
- (nonnull instancetype)initWithActualBlock:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock negative:(BOOL)negative file:(NSString * __nonnull)file line:(NSUInteger)line OBJC_DESIGNATED_INITIALIZER;
@property (nonatomic, readonly, copy) NMBExpectation * __nonnull (^ __nonnull withTimeout)(NSTimeInterval);
@property (nonatomic, readonly, copy) void (^ __nonnull to)(id <NMBMatcher> __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toWithDescription)(id <NMBMatcher> __nonnull, NSString * __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toNot)(id <NMBMatcher> __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toNotWithDescription)(id <NMBMatcher> __nonnull, NSString * __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull notTo)(id <NMBMatcher> __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull notToWithDescription)(id <NMBMatcher> __nonnull, NSString * __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toEventually)(id <NMBMatcher> __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toEventuallyWithDescription)(id <NMBMatcher> __nonnull, NSString * __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toEventuallyNot)(id <NMBMatcher> __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toEventuallyNotWithDescription)(id <NMBMatcher> __nonnull, NSString * __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toNotEventually)(id <NMBMatcher> __nonnull);
@property (nonatomic, readonly, copy) void (^ __nonnull toNotEventuallyWithDescription)(id <NMBMatcher> __nonnull, NSString * __nonnull);
+ (void)failWithMessage:(NSString * __nonnull)message file:(NSString * __nonnull)file line:(NSUInteger)line;
@end
@class SourceLocation;
/// Objective-C interface to the Swift variant of Matcher.
SWIFT_PROTOCOL("_TtP6Nimble10NMBMatcher_")
@protocol NMBMatcher
- (BOOL)matches:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
- (BOOL)doesNotMatch:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
@end
SWIFT_CLASS("_TtC6Nimble23NMBObjCBeCloseToMatcher")
@interface NMBObjCBeCloseToMatcher : NSObject <NMBMatcher>
- (BOOL)matches:(NSObject * __null_unspecified (^ __nonnull)(void))actualExpression failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
- (BOOL)doesNotMatch:(NSObject * __null_unspecified (^ __nonnull)(void))actualExpression failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
@property (nonatomic, readonly, copy) NMBObjCBeCloseToMatcher * __nonnull (^ __nonnull within)(double);
@end
SWIFT_CLASS("_TtC6Nimble14NMBObjCMatcher")
@interface NMBObjCMatcher : NSObject <NMBMatcher>
- (BOOL)matches:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
- (BOOL)doesNotMatch:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beEmptyMatcher;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beIdenticalToMatcher:(NSObject * __nullable)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beginWithMatcher:(id __nonnull)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beGreaterThanOrEqualToMatcher:(id <NMBComparable> __nullable)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)containMatcher:(NSArray<NSObject *> * __nonnull)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beGreaterThanMatcher:(id <NMBComparable> __nullable)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beLessThanMatcher:(id <NMBComparable> __nullable)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (id <NMBMatcher> __nonnull)equalMatcher:(NSObject * __nonnull)expected;
@end
@class NSString;
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (id <NMBMatcher> __nonnull)matchMatcher:(NSString * __nonnull)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (id <NMBMatcher> __nonnull)beAKindOfMatcher:(Class __nonnull)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)allPassMatcher:(NMBObjCMatcher * __nonnull)matcher;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (id <NMBMatcher> __nonnull)beAnInstanceOfMatcher:(Class __nonnull)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beLessThanOrEqualToMatcher:(id <NMBComparable> __nullable)expected;
@end
@class NSNumber;
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCBeCloseToMatcher * __nonnull)beCloseToMatcher:(NSNumber * __nonnull)expected within:(double)within;
@end
@class NMBObjCRaiseExceptionMatcher;
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCRaiseExceptionMatcher * __nonnull)raiseExceptionMatcher;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)endWithMatcher:(id __nonnull)expected;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beNilMatcher;
@end
@interface NMBObjCMatcher (SWIFT_EXTENSION(Nimble))
+ (NMBObjCMatcher * __nonnull)beTruthyMatcher;
+ (NMBObjCMatcher * __nonnull)beFalsyMatcher;
+ (NMBObjCMatcher * __nonnull)beTrueMatcher;
+ (NMBObjCMatcher * __nonnull)beFalseMatcher;
@end
@class NSDictionary;
@class NSException;
SWIFT_CLASS("_TtC6Nimble28NMBObjCRaiseExceptionMatcher")
@interface NMBObjCRaiseExceptionMatcher : NSObject <NMBMatcher>
- (BOOL)matches:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
- (BOOL)doesNotMatch:(NSObject * __null_unspecified (^ __nonnull)(void))actualBlock failureMessage:(FailureMessage * __nonnull)failureMessage location:(SourceLocation * __nonnull)location;
@property (nonatomic, readonly, copy) NMBObjCRaiseExceptionMatcher * __nonnull (^ __nonnull named)(NSString * __nonnull);
@property (nonatomic, readonly, copy) NMBObjCRaiseExceptionMatcher * __nonnull (^ __nonnull reason)(NSString * __nullable);
@property (nonatomic, readonly, copy) NMBObjCRaiseExceptionMatcher * __nonnull (^ __nonnull userInfo)(NSDictionary * __nullable);
@property (nonatomic, readonly, copy) NMBObjCRaiseExceptionMatcher * __nonnull (^ __nonnull satisfyingBlock)(void (^ __nullable)(NSException * __nonnull));
@end
/// Protocol for types that support beginWith(), endWith(), beEmpty() matchers
SWIFT_PROTOCOL("_TtP6Nimble20NMBOrderedCollection_")
@protocol NMBOrderedCollection <NMBCollection>
- (NSInteger)indexOfObject:(id __null_unspecified)object;
@end
@interface NSArray (SWIFT_EXTENSION(Nimble)) <NMBContainer>
@end
@interface NSArray (SWIFT_EXTENSION(Nimble)) <NMBOrderedCollection, NMBCollection>
@end
@interface NSArray (SWIFT_EXTENSION(Nimble))
@end
@interface NSDictionary (SWIFT_EXTENSION(Nimble)) <NMBCollection>
@end
@interface NSHashTable (SWIFT_EXTENSION(Nimble)) <NMBContainer>
@end
@interface NSHashTable (SWIFT_EXTENSION(Nimble)) <NMBCollection>
@end
@interface NSNumber (SWIFT_EXTENSION(Nimble)) <NMBDoubleConvertible>
@end
@interface NSNumber (SWIFT_EXTENSION(Nimble)) <NMBComparable>
- (NSComparisonResult)NMB_compare:(id <NMBComparable> __null_unspecified)otherObject;
@end
@interface NSSet (SWIFT_EXTENSION(Nimble)) <NMBCollection>
@end
@interface NSSet (SWIFT_EXTENSION(Nimble)) <NMBContainer>
@end
@interface NSString (SWIFT_EXTENSION(Nimble)) <NMBComparable>
- (NSComparisonResult)NMB_compare:(id <NMBComparable> __null_unspecified)otherObject;
@end
SWIFT_CLASS("_TtC6Nimble14SourceLocation")
@interface SourceLocation : NSObject
@property (nonatomic, readonly, copy) NSString * __nonnull file;
@property (nonatomic, readonly) NSUInteger line;
@property (nonatomic, readonly, copy) NSString * __nonnull description;
@end
#pragma clang diagnostic pop
-6
View File
@@ -1,6 +0,0 @@
#import <Foundation/Foundation.h>
#import <Nimble/NMBExceptionCapture.h>
#import <Nimble/DSL.h>
FOUNDATION_EXPORT double NimbleVersionNumber;
FOUNDATION_EXPORT const unsigned char NimbleVersionString[];
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-10
View File
@@ -1,10 +0,0 @@
framework module Nimble {
umbrella header "Nimble.h"
export *
module * { export * }
}
module Nimble.Swift {
header "Nimble-Swift.h"
}
BIN
View File
Binary file not shown.
-183
View File
@@ -1,183 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Headers/DSL.h</key>
<data>
auYzCIxlY2jTkyI1BlljW3KUTJY=
</data>
<key>Headers/NMBExceptionCapture.h</key>
<data>
ncXv+PqMUjLHOJpiFz6BKmTAq5o=
</data>
<key>Headers/Nimble-Swift.h</key>
<data>
ix7zUf4GFfA4sevTnSKvAsAN3xM=
</data>
<key>Headers/Nimble.h</key>
<data>
HXkPd6XbqY7QmdFCpOCNIHhI4v0=
</data>
<key>Info.plist</key>
<data>
m9rBh3svN6G89okFeorwD5OH+2g=
</data>
<key>Modules/Nimble.swiftmodule/arm.swiftdoc</key>
<data>
lSaVfyH8XbRz0WDbmqKJxc5QtbY=
</data>
<key>Modules/Nimble.swiftmodule/arm.swiftmodule</key>
<data>
NseDOVaErTA347+6KjeL5eI3+kI=
</data>
<key>Modules/Nimble.swiftmodule/arm64.swiftdoc</key>
<data>
6W52hA33Ca+9qq8Yiql4aY8+0Rk=
</data>
<key>Modules/Nimble.swiftmodule/arm64.swiftmodule</key>
<data>
Yn3aQiLuskjb8JCg2+JAqYVrN/Y=
</data>
<key>Modules/module.modulemap</key>
<data>
HraXvk1VTxnsGdY8oSlKGNkdg60=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/DSL.h</key>
<data>
auYzCIxlY2jTkyI1BlljW3KUTJY=
</data>
<key>Headers/NMBExceptionCapture.h</key>
<data>
ncXv+PqMUjLHOJpiFz6BKmTAq5o=
</data>
<key>Headers/Nimble-Swift.h</key>
<data>
ix7zUf4GFfA4sevTnSKvAsAN3xM=
</data>
<key>Headers/Nimble.h</key>
<data>
HXkPd6XbqY7QmdFCpOCNIHhI4v0=
</data>
<key>Modules/Nimble.swiftmodule/arm.swiftdoc</key>
<data>
lSaVfyH8XbRz0WDbmqKJxc5QtbY=
</data>
<key>Modules/Nimble.swiftmodule/arm.swiftmodule</key>
<data>
NseDOVaErTA347+6KjeL5eI3+kI=
</data>
<key>Modules/Nimble.swiftmodule/arm64.swiftdoc</key>
<data>
6W52hA33Ca+9qq8Yiql4aY8+0Rk=
</data>
<key>Modules/Nimble.swiftmodule/arm64.swiftmodule</key>
<data>
Yn3aQiLuskjb8JCg2+JAqYVrN/Y=
</data>
<key>Modules/module.modulemap</key>
<data>
HraXvk1VTxnsGdY8oSlKGNkdg60=
</data>
</dict>
<key>rules</key>
<dict>
<key>^</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015 Lukas Kubanek
Copyright © 2015-2021 Lukas Kubanek
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+333 -242
View File
@@ -7,260 +7,276 @@
objects = {
/* Begin PBXBuildFile section */
803F9CD51B92324C002F728F /* OrderedDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 803F9CD21B92324C002F728F /* OrderedDictionary.h */; settings = {ATTRIBUTES = (Public, ); }; };
803F9CD81B9232EE002F728F /* OrderedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 803F9CD71B9232EE002F728F /* OrderedDictionary.swift */; settings = {ASSET_TAGS = (); }; };
803F9CF41B925B1C002F728F /* OrderedDictionary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 803F9CC61B923207002F728F /* OrderedDictionary.framework */; settings = {ASSET_TAGS = (); }; };
803F9CFD1B925B4C002F728F /* OrderedDictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 803F9CFC1B925B4C002F728F /* OrderedDictionaryTests.swift */; settings = {ASSET_TAGS = (); }; };
803F9D001B925BBF002F728F /* Nimble.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 803F9CE91B925AE5002F728F /* Nimble.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
803F9D011B925BE9002F728F /* Nimble.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 803F9CE91B925AE5002F728F /* Nimble.framework */; };
8060976B1B92F2D200DB20CF /* OrderedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 803F9CD71B9232EE002F728F /* OrderedDictionary.swift */; };
8060976C1B92F2D900DB20CF /* OrderedDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 803F9CD21B92324C002F728F /* OrderedDictionary.h */; settings = {ATTRIBUTES = (Public, ); }; };
806097761B92F44F00DB20CF /* OrderedDictionary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 806097631B92F20400DB20CF /* OrderedDictionary.framework */; settings = {ASSET_TAGS = (); }; };
8060977C1B92F4A000DB20CF /* OrderedDictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 803F9CFC1B925B4C002F728F /* OrderedDictionaryTests.swift */; };
806097801B92F4F000DB20CF /* Nimble.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8060977F1B92F4F000DB20CF /* Nimble.framework */; settings = {ASSET_TAGS = (); }; };
806097821B92F4FC00DB20CF /* Nimble.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8060977F1B92F4F000DB20CF /* Nimble.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
8048C8AB22D8911B0086B88B /* OrderedDictionary+Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8048C8AA22D8911B0086B88B /* OrderedDictionary+Deprecated.swift */; };
8048C8AC22D8911B0086B88B /* OrderedDictionary+Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8048C8AA22D8911B0086B88B /* OrderedDictionary+Deprecated.swift */; };
8055B0421E201C5D009DC3EE /* OrderedDictionary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8055B0381E201C5D009DC3EE /* OrderedDictionary.framework */; };
80A203A11F3F483700622481 /* OrderedDictionary+Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80A203A01F3F483700622481 /* OrderedDictionary+Codable.swift */; };
80A203A21F3F4C1F00622481 /* OrderedDictionary+Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80A203A01F3F483700622481 /* OrderedDictionary+Codable.swift */; };
80B28EA01E201EC9007E3A77 /* OrderedDictionary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80B28E971E201EC8007E3A77 /* OrderedDictionary.framework */; };
80BE579A252B278D00F85D45 /* XCTUnwrapShim.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BE5799252B278D00F85D45 /* XCTUnwrapShim.swift */; };
80BE579B252B278D00F85D45 /* XCTUnwrapShim.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BE5799252B278D00F85D45 /* XCTUnwrapShim.swift */; };
80BE57A5252B3F6000F85D45 /* SubscriptAmbiguityTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BE57A4252B3F6000F85D45 /* SubscriptAmbiguityTests.swift */; };
80BE57A6252B3F6000F85D45 /* SubscriptAmbiguityTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BE57A4252B3F6000F85D45 /* SubscriptAmbiguityTests.swift */; };
80BE57D4252BAB9400F85D45 /* OrderedDictionarySlice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BE57D3252BAB9400F85D45 /* OrderedDictionarySlice.swift */; };
80BE57D5252BAB9400F85D45 /* OrderedDictionarySlice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BE57D3252BAB9400F85D45 /* OrderedDictionarySlice.swift */; };
80BE57DF252BADEE00F85D45 /* Dictionary+OrderedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BE57DE252BADEE00F85D45 /* Dictionary+OrderedDictionary.swift */; };
80BE57E0252BADEE00F85D45 /* Dictionary+OrderedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BE57DE252BADEE00F85D45 /* Dictionary+OrderedDictionary.swift */; };
80BFD01B252B049E002B3C05 /* InitializationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD01A252B049E002B3C05 /* InitializationTests.swift */; };
80BFD01C252B049E002B3C05 /* InitializationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD01A252B049E002B3C05 /* InitializationTests.swift */; };
80BFD02A252B069F002B3C05 /* SortingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD029252B069F002B3C05 /* SortingTests.swift */; };
80BFD02B252B069F002B3C05 /* SortingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD029252B069F002B3C05 /* SortingTests.swift */; };
80BFD031252B06EB002B3C05 /* DescriptionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD030252B06EB002B3C05 /* DescriptionTests.swift */; };
80BFD032252B06EB002B3C05 /* DescriptionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD030252B06EB002B3C05 /* DescriptionTests.swift */; };
80BFD040252B0740002B3C05 /* CodingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD03F252B0740002B3C05 /* CodingTests.swift */; };
80BFD041252B0740002B3C05 /* CodingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD03F252B0740002B3C05 /* CodingTests.swift */; };
80BFD04B252B0951002B3C05 /* CapacityTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD04A252B0951002B3C05 /* CapacityTests.swift */; };
80BFD04C252B0951002B3C05 /* CapacityTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD04A252B0951002B3C05 /* CapacityTests.swift */; };
80BFD052252B09DC002B3C05 /* ReorderingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD051252B09DC002B3C05 /* ReorderingTests.swift */; };
80BFD053252B09DC002B3C05 /* ReorderingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD051252B09DC002B3C05 /* ReorderingTests.swift */; };
80BFD061252B0A7F002B3C05 /* RemovalTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD060252B0A7F002B3C05 /* RemovalTests.swift */; };
80BFD062252B0A7F002B3C05 /* RemovalTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD060252B0A7F002B3C05 /* RemovalTests.swift */; };
80BFD070252B0C16002B3C05 /* AccessTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD06F252B0C16002B3C05 /* AccessTests.swift */; };
80BFD071252B0C16002B3C05 /* AccessTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD06F252B0C16002B3C05 /* AccessTests.swift */; };
80BFD077252B0D94002B3C05 /* MapFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD076252B0D94002B3C05 /* MapFilterTests.swift */; };
80BFD078252B0D94002B3C05 /* MapFilterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD076252B0D94002B3C05 /* MapFilterTests.swift */; };
80BFD07E252B0E19002B3C05 /* UpdatesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD07D252B0E19002B3C05 /* UpdatesTests.swift */; };
80BFD07F252B0E19002B3C05 /* UpdatesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD07D252B0E19002B3C05 /* UpdatesTests.swift */; };
80BFD0A8252B1C96002B3C05 /* InsertionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD0A7252B1C96002B3C05 /* InsertionsTests.swift */; };
80BFD0A9252B1C96002B3C05 /* InsertionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFD0A7252B1C96002B3C05 /* InsertionsTests.swift */; };
80E8E21D1E20301E00395E49 /* OrderedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E8E21C1E20301E00395E49 /* OrderedDictionary.swift */; };
80E8E21F1E20425B00395E49 /* OrderedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E8E21C1E20301E00395E49 /* OrderedDictionary.swift */; };
80E8E2301E2133D100395E49 /* OrderedDictionary+Description.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E8E22F1E2133D100395E49 /* OrderedDictionary+Description.swift */; };
80E8E2311E2133D100395E49 /* OrderedDictionary+Description.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E8E22F1E2133D100395E49 /* OrderedDictionary+Description.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
803F9CF51B925B1C002F728F /* PBXContainerItemProxy */ = {
8055B0431E201C5D009DC3EE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 803F9CBD1B923207002F728F /* Project object */;
containerPortal = 8055B02F1E201C5D009DC3EE /* Project object */;
proxyType = 1;
remoteGlobalIDString = 803F9CC51B923207002F728F;
remoteGlobalIDString = 8055B0371E201C5D009DC3EE;
remoteInfo = OrderedDictionary;
};
806097771B92F44F00DB20CF /* PBXContainerItemProxy */ = {
80B28EA11E201EC9007E3A77 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 803F9CBD1B923207002F728F /* Project object */;
containerPortal = 8055B02F1E201C5D009DC3EE /* Project object */;
proxyType = 1;
remoteGlobalIDString = 806097621B92F20400DB20CF;
remoteGlobalIDString = 80B28E961E201EC8007E3A77;
remoteInfo = "OrderedDictionary-iOS";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
803F9CFF1B925BA2002F728F /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
803F9D001B925BBF002F728F /* Nimble.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
806097811B92F4F500DB20CF /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
806097821B92F4FC00DB20CF /* Nimble.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
803F9CC61B923207002F728F /* OrderedDictionary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OrderedDictionary.framework; sourceTree = BUILT_PRODUCTS_DIR; };
803F9CD21B92324C002F728F /* OrderedDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderedDictionary.h; sourceTree = "<group>"; };
803F9CD41B92324C002F728F /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
803F9CD71B9232EE002F728F /* OrderedDictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderedDictionary.swift; sourceTree = "<group>"; };
803F9CE91B925AE5002F728F /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nimble.framework; path = Carthage/Build/Mac/Nimble.framework; sourceTree = "<group>"; };
803F9CEF1B925B1C002F728F /* OrderedDictionary-OSX-Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OrderedDictionary-OSX-Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
803F9CFC1B925B4C002F728F /* OrderedDictionaryTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderedDictionaryTests.swift; sourceTree = "<group>"; };
803F9CFE1B925B56002F728F /* Info-Tests.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Info-Tests.plist"; path = "Supporting Files/Info-Tests.plist"; sourceTree = SOURCE_ROOT; };
806097631B92F20400DB20CF /* OrderedDictionary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OrderedDictionary.framework; sourceTree = BUILT_PRODUCTS_DIR; };
806097711B92F44F00DB20CF /* OrderedDictionary-iOS-Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OrderedDictionary-iOS-Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
8060977F1B92F4F000DB20CF /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nimble.framework; path = Carthage/Build/iOS/Nimble.framework; sourceTree = "<group>"; };
80F94F181B926A60000A96E7 /* OrderedDictionary.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = OrderedDictionary.playground; sourceTree = "<group>"; };
8048C8AA22D8911B0086B88B /* OrderedDictionary+Deprecated.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OrderedDictionary+Deprecated.swift"; sourceTree = "<group>"; };
8055B0381E201C5D009DC3EE /* OrderedDictionary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OrderedDictionary.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8055B0411E201C5D009DC3EE /* OrderedDictionary_Mac_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OrderedDictionary_Mac_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
80A203A01F3F483700622481 /* OrderedDictionary+Codable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OrderedDictionary+Codable.swift"; sourceTree = "<group>"; };
80B28E971E201EC8007E3A77 /* OrderedDictionary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OrderedDictionary.framework; sourceTree = BUILT_PRODUCTS_DIR; };
80B28E9F1E201EC9007E3A77 /* OrderedDictionary_iOS_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OrderedDictionary_iOS_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
80B28EB41E201F81007E3A77 /* Info-Tests.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-Tests.plist"; sourceTree = "<group>"; };
80B28EB51E201F81007E3A77 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
80BE5799252B278D00F85D45 /* XCTUnwrapShim.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XCTUnwrapShim.swift; sourceTree = "<group>"; };
80BE57A4252B3F6000F85D45 /* SubscriptAmbiguityTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptAmbiguityTests.swift; sourceTree = "<group>"; };
80BE57D3252BAB9400F85D45 /* OrderedDictionarySlice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderedDictionarySlice.swift; sourceTree = "<group>"; };
80BE57DE252BADEE00F85D45 /* Dictionary+OrderedDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Dictionary+OrderedDictionary.swift"; sourceTree = "<group>"; };
80BFD01A252B049E002B3C05 /* InitializationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InitializationTests.swift; sourceTree = "<group>"; };
80BFD029252B069F002B3C05 /* SortingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SortingTests.swift; sourceTree = "<group>"; };
80BFD030252B06EB002B3C05 /* DescriptionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DescriptionTests.swift; sourceTree = "<group>"; };
80BFD03F252B0740002B3C05 /* CodingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodingTests.swift; sourceTree = "<group>"; };
80BFD04A252B0951002B3C05 /* CapacityTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CapacityTests.swift; sourceTree = "<group>"; };
80BFD051252B09DC002B3C05 /* ReorderingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReorderingTests.swift; sourceTree = "<group>"; };
80BFD060252B0A7F002B3C05 /* RemovalTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemovalTests.swift; sourceTree = "<group>"; };
80BFD06F252B0C16002B3C05 /* AccessTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessTests.swift; sourceTree = "<group>"; };
80BFD076252B0D94002B3C05 /* MapFilterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapFilterTests.swift; sourceTree = "<group>"; };
80BFD07D252B0E19002B3C05 /* UpdatesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdatesTests.swift; sourceTree = "<group>"; };
80BFD0A7252B1C96002B3C05 /* InsertionsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InsertionsTests.swift; sourceTree = "<group>"; };
80DE329220F4CAFA0053EDA7 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
80DE329320F4DD910053EDA7 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
80DE329420F4DD910053EDA7 /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = "<group>"; };
80E8E21C1E20301E00395E49 /* OrderedDictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderedDictionary.swift; sourceTree = "<group>"; };
80E8E22F1E2133D100395E49 /* OrderedDictionary+Description.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "OrderedDictionary+Description.swift"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
803F9CC21B923207002F728F /* Frameworks */ = {
8055B0341E201C5D009DC3EE /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
803F9CEC1B925B1C002F728F /* Frameworks */ = {
8055B03E1E201C5D009DC3EE /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
803F9CF41B925B1C002F728F /* OrderedDictionary.framework in Frameworks */,
803F9D011B925BE9002F728F /* Nimble.framework in Frameworks */,
8055B0421E201C5D009DC3EE /* OrderedDictionary.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8060975F1B92F20400DB20CF /* Frameworks */ = {
80B28E931E201EC8007E3A77 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
8060976E1B92F44F00DB20CF /* Frameworks */ = {
80B28E9C1E201EC9007E3A77 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
806097761B92F44F00DB20CF /* OrderedDictionary.framework in Frameworks */,
806097801B92F4F000DB20CF /* Nimble.framework in Frameworks */,
80B28EA01E201EC9007E3A77 /* OrderedDictionary.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
803F9CBC1B923207002F728F = {
8055B02E1E201C5D009DC3EE = {
isa = PBXGroup;
children = (
803F9CD11B92324C002F728F /* Sources */,
80F94F171B926A60000A96E7 /* Playgrounds */,
803F9CFB1B925B4C002F728F /* Tests */,
803F9CD31B92324C002F728F /* Supporting Files */,
803F9CE81B9259F3002F728F /* Frameworks */,
803F9CC71B923207002F728F /* Products */,
80DE329320F4DD910053EDA7 /* README.md */,
80DE329420F4DD910053EDA7 /* LICENSE.md */,
80DE329220F4CAFA0053EDA7 /* Package.swift */,
8055B0521E201D24009DC3EE /* Sources */,
8055B0571E201DF3009DC3EE /* Tests */,
80B28EB31E201F81007E3A77 /* Supporting Files */,
8055B0391E201C5D009DC3EE /* Products */,
);
sourceTree = "<group>";
};
803F9CC71B923207002F728F /* Products */ = {
8055B0391E201C5D009DC3EE /* Products */ = {
isa = PBXGroup;
children = (
803F9CC61B923207002F728F /* OrderedDictionary.framework */,
803F9CEF1B925B1C002F728F /* OrderedDictionary-OSX-Tests.xctest */,
806097631B92F20400DB20CF /* OrderedDictionary.framework */,
806097711B92F44F00DB20CF /* OrderedDictionary-iOS-Tests.xctest */,
8055B0381E201C5D009DC3EE /* OrderedDictionary.framework */,
8055B0411E201C5D009DC3EE /* OrderedDictionary_Mac_Tests.xctest */,
80B28E971E201EC8007E3A77 /* OrderedDictionary.framework */,
80B28E9F1E201EC9007E3A77 /* OrderedDictionary_iOS_Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
803F9CD11B92324C002F728F /* Sources */ = {
8055B0521E201D24009DC3EE /* Sources */ = {
isa = PBXGroup;
children = (
803F9CD21B92324C002F728F /* OrderedDictionary.h */,
803F9CD71B9232EE002F728F /* OrderedDictionary.swift */,
80B7BC2B261A65C100EB2CA2 /* OrderedDictionary */,
);
path = Sources;
sourceTree = "<group>";
};
803F9CD31B92324C002F728F /* Supporting Files */ = {
8055B0571E201DF3009DC3EE /* Tests */ = {
isa = PBXGroup;
children = (
803F9CD41B92324C002F728F /* Info.plist */,
803F9CFE1B925B56002F728F /* Info-Tests.plist */,
);
path = "Supporting Files";
sourceTree = "<group>";
};
803F9CE81B9259F3002F728F /* Frameworks */ = {
isa = PBXGroup;
children = (
8060977D1B92F4D900DB20CF /* OSX */,
8060977E1B92F4DF00DB20CF /* iOS */,
);
name = Frameworks;
sourceTree = "<group>";
};
803F9CFB1B925B4C002F728F /* Tests */ = {
isa = PBXGroup;
children = (
803F9CFC1B925B4C002F728F /* OrderedDictionaryTests.swift */,
80AF1630252A48080065B656 /* OrderedDictionaryTests */,
);
path = Tests;
sourceTree = "<group>";
};
8060977D1B92F4D900DB20CF /* OSX */ = {
80AF1630252A48080065B656 /* OrderedDictionaryTests */ = {
isa = PBXGroup;
children = (
803F9CE91B925AE5002F728F /* Nimble.framework */,
80BFD01A252B049E002B3C05 /* InitializationTests.swift */,
80BFD06F252B0C16002B3C05 /* AccessTests.swift */,
80BFD0A7252B1C96002B3C05 /* InsertionsTests.swift */,
80BFD07D252B0E19002B3C05 /* UpdatesTests.swift */,
80BFD060252B0A7F002B3C05 /* RemovalTests.swift */,
80BE57A4252B3F6000F85D45 /* SubscriptAmbiguityTests.swift */,
80BFD076252B0D94002B3C05 /* MapFilterTests.swift */,
80BFD051252B09DC002B3C05 /* ReorderingTests.swift */,
80BFD029252B069F002B3C05 /* SortingTests.swift */,
80BFD04A252B0951002B3C05 /* CapacityTests.swift */,
80BFD03F252B0740002B3C05 /* CodingTests.swift */,
80BFD030252B06EB002B3C05 /* DescriptionTests.swift */,
80BE5799252B278D00F85D45 /* XCTUnwrapShim.swift */,
);
name = OSX;
path = OrderedDictionaryTests;
sourceTree = "<group>";
};
8060977E1B92F4DF00DB20CF /* iOS */ = {
80B28EB31E201F81007E3A77 /* Supporting Files */ = {
isa = PBXGroup;
children = (
8060977F1B92F4F000DB20CF /* Nimble.framework */,
80B28EB51E201F81007E3A77 /* Info.plist */,
80B28EB41E201F81007E3A77 /* Info-Tests.plist */,
);
name = iOS;
path = "Supporting Files";
sourceTree = "<group>";
};
80F94F171B926A60000A96E7 /* Playgrounds */ = {
80B7BC2B261A65C100EB2CA2 /* OrderedDictionary */ = {
isa = PBXGroup;
children = (
80F94F181B926A60000A96E7 /* OrderedDictionary.playground */,
80E8E21C1E20301E00395E49 /* OrderedDictionary.swift */,
80A203A01F3F483700622481 /* OrderedDictionary+Codable.swift */,
80E8E22F1E2133D100395E49 /* OrderedDictionary+Description.swift */,
8048C8AA22D8911B0086B88B /* OrderedDictionary+Deprecated.swift */,
80BE57D3252BAB9400F85D45 /* OrderedDictionarySlice.swift */,
80BE57DE252BADEE00F85D45 /* Dictionary+OrderedDictionary.swift */,
);
path = Playgrounds;
path = OrderedDictionary;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
803F9CC31B923207002F728F /* Headers */ = {
8055B0351E201C5D009DC3EE /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
803F9CD51B92324C002F728F /* OrderedDictionary.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
806097601B92F20400DB20CF /* Headers */ = {
80B28E941E201EC8007E3A77 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
8060976C1B92F2D900DB20CF /* OrderedDictionary.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
803F9CC51B923207002F728F /* OrderedDictionary-OSX */ = {
8055B0371E201C5D009DC3EE /* OrderedDictionary-Mac */ = {
isa = PBXNativeTarget;
buildConfigurationList = 803F9CCE1B923207002F728F /* Build configuration list for PBXNativeTarget "OrderedDictionary-OSX" */;
buildConfigurationList = 8055B04C1E201C5D009DC3EE /* Build configuration list for PBXNativeTarget "OrderedDictionary-Mac" */;
buildPhases = (
803F9CC11B923207002F728F /* Sources */,
803F9CC21B923207002F728F /* Frameworks */,
803F9CC31B923207002F728F /* Headers */,
803F9CC41B923207002F728F /* Resources */,
8055B0331E201C5D009DC3EE /* Sources */,
8055B0341E201C5D009DC3EE /* Frameworks */,
8055B0351E201C5D009DC3EE /* Headers */,
8055B0361E201C5D009DC3EE /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "OrderedDictionary-OSX";
name = "OrderedDictionary-Mac";
productName = OrderedDictionary;
productReference = 803F9CC61B923207002F728F /* OrderedDictionary.framework */;
productReference = 8055B0381E201C5D009DC3EE /* OrderedDictionary.framework */;
productType = "com.apple.product-type.framework";
};
803F9CEE1B925B1C002F728F /* OrderedDictionary-OSX-Tests */ = {
8055B0401E201C5D009DC3EE /* OrderedDictionary-Mac-Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 803F9CF71B925B1C002F728F /* Build configuration list for PBXNativeTarget "OrderedDictionary-OSX-Tests" */;
buildConfigurationList = 8055B04F1E201C5D009DC3EE /* Build configuration list for PBXNativeTarget "OrderedDictionary-Mac-Tests" */;
buildPhases = (
803F9CEB1B925B1C002F728F /* Sources */,
803F9CEC1B925B1C002F728F /* Frameworks */,
803F9CED1B925B1C002F728F /* Resources */,
803F9CFF1B925BA2002F728F /* CopyFiles */,
8055B03D1E201C5D009DC3EE /* Sources */,
8055B03E1E201C5D009DC3EE /* Frameworks */,
8055B03F1E201C5D009DC3EE /* Resources */,
);
buildRules = (
);
dependencies = (
803F9CF61B925B1C002F728F /* PBXTargetDependency */,
8055B0441E201C5D009DC3EE /* PBXTargetDependency */,
);
name = "OrderedDictionary-OSX-Tests";
name = "OrderedDictionary-Mac-Tests";
productName = OrderedDictionaryTests;
productReference = 803F9CEF1B925B1C002F728F /* OrderedDictionary-OSX-Tests.xctest */;
productReference = 8055B0411E201C5D009DC3EE /* OrderedDictionary_Mac_Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
806097621B92F20400DB20CF /* OrderedDictionary-iOS */ = {
80B28E961E201EC8007E3A77 /* OrderedDictionary-iOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 806097681B92F20400DB20CF /* Build configuration list for PBXNativeTarget "OrderedDictionary-iOS" */;
buildConfigurationList = 80B28EA81E201EC9007E3A77 /* Build configuration list for PBXNativeTarget "OrderedDictionary-iOS" */;
buildPhases = (
8060975E1B92F20400DB20CF /* Sources */,
8060975F1B92F20400DB20CF /* Frameworks */,
806097601B92F20400DB20CF /* Headers */,
806097611B92F20400DB20CF /* Resources */,
80B28E921E201EC8007E3A77 /* Sources */,
80B28E931E201EC8007E3A77 /* Frameworks */,
80B28E941E201EC8007E3A77 /* Headers */,
80B28E951E201EC8007E3A77 /* Resources */,
);
buildRules = (
);
@@ -268,95 +284,103 @@
);
name = "OrderedDictionary-iOS";
productName = "OrderedDictionary-iOS";
productReference = 806097631B92F20400DB20CF /* OrderedDictionary.framework */;
productReference = 80B28E971E201EC8007E3A77 /* OrderedDictionary.framework */;
productType = "com.apple.product-type.framework";
};
806097701B92F44F00DB20CF /* OrderedDictionary-iOS-Tests */ = {
80B28E9E1E201EC9007E3A77 /* OrderedDictionary-iOS-Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 806097791B92F44F00DB20CF /* Build configuration list for PBXNativeTarget "OrderedDictionary-iOS-Tests" */;
buildConfigurationList = 80B28EAB1E201EC9007E3A77 /* Build configuration list for PBXNativeTarget "OrderedDictionary-iOS-Tests" */;
buildPhases = (
8060976D1B92F44F00DB20CF /* Sources */,
8060976E1B92F44F00DB20CF /* Frameworks */,
8060976F1B92F44F00DB20CF /* Resources */,
806097811B92F4F500DB20CF /* CopyFiles */,
80B28E9B1E201EC9007E3A77 /* Sources */,
80B28E9C1E201EC9007E3A77 /* Frameworks */,
80B28E9D1E201EC9007E3A77 /* Resources */,
);
buildRules = (
);
dependencies = (
806097781B92F44F00DB20CF /* PBXTargetDependency */,
80B28EA21E201EC9007E3A77 /* PBXTargetDependency */,
);
name = "OrderedDictionary-iOS-Tests";
productName = "OrderedDictionary-iOS-Tests";
productReference = 806097711B92F44F00DB20CF /* OrderedDictionary-iOS-Tests.xctest */;
productName = "OrderedDictionary-iOSTests";
productReference = 80B28E9F1E201EC9007E3A77 /* OrderedDictionary_iOS_Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
803F9CBD1B923207002F728F /* Project object */ = {
8055B02F1E201C5D009DC3EE /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700;
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 1320;
ORGANIZATIONNAME = "Lukas Kubanek";
TargetAttributes = {
803F9CC51B923207002F728F = {
CreatedOnToolsVersion = 7.0;
8055B0371E201C5D009DC3EE = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
803F9CEE1B925B1C002F728F = {
CreatedOnToolsVersion = 7.0;
8055B0401E201C5D009DC3EE = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
806097621B92F20400DB20CF = {
CreatedOnToolsVersion = 7.0;
80B28E961E201EC8007E3A77 = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
806097701B92F44F00DB20CF = {
CreatedOnToolsVersion = 7.0;
80B28E9E1E201EC9007E3A77 = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 803F9CC01B923207002F728F /* Build configuration list for PBXProject "OrderedDictionary" */;
buildConfigurationList = 8055B0321E201C5D009DC3EE /* Build configuration list for PBXProject "OrderedDictionary" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 803F9CBC1B923207002F728F;
productRefGroup = 803F9CC71B923207002F728F /* Products */;
mainGroup = 8055B02E1E201C5D009DC3EE;
productRefGroup = 8055B0391E201C5D009DC3EE /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
803F9CC51B923207002F728F /* OrderedDictionary-OSX */,
803F9CEE1B925B1C002F728F /* OrderedDictionary-OSX-Tests */,
806097621B92F20400DB20CF /* OrderedDictionary-iOS */,
806097701B92F44F00DB20CF /* OrderedDictionary-iOS-Tests */,
8055B0371E201C5D009DC3EE /* OrderedDictionary-Mac */,
8055B0401E201C5D009DC3EE /* OrderedDictionary-Mac-Tests */,
80B28E961E201EC8007E3A77 /* OrderedDictionary-iOS */,
80B28E9E1E201EC9007E3A77 /* OrderedDictionary-iOS-Tests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
803F9CC41B923207002F728F /* Resources */ = {
8055B0361E201C5D009DC3EE /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
803F9CED1B925B1C002F728F /* Resources */ = {
8055B03F1E201C5D009DC3EE /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
806097611B92F20400DB20CF /* Resources */ = {
80B28E951E201EC8007E3A77 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
8060976F1B92F44F00DB20CF /* Resources */ = {
80B28E9D1E201EC9007E3A77 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -366,71 +390,120 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
803F9CC11B923207002F728F /* Sources */ = {
8055B0331E201C5D009DC3EE /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
803F9CD81B9232EE002F728F /* OrderedDictionary.swift in Sources */,
8048C8AB22D8911B0086B88B /* OrderedDictionary+Deprecated.swift in Sources */,
80E8E2301E2133D100395E49 /* OrderedDictionary+Description.swift in Sources */,
80E8E21D1E20301E00395E49 /* OrderedDictionary.swift in Sources */,
80BE57D4252BAB9400F85D45 /* OrderedDictionarySlice.swift in Sources */,
80A203A11F3F483700622481 /* OrderedDictionary+Codable.swift in Sources */,
80BE57DF252BADEE00F85D45 /* Dictionary+OrderedDictionary.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
803F9CEB1B925B1C002F728F /* Sources */ = {
8055B03D1E201C5D009DC3EE /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
803F9CFD1B925B4C002F728F /* OrderedDictionaryTests.swift in Sources */,
80BFD061252B0A7F002B3C05 /* RemovalTests.swift in Sources */,
80BFD031252B06EB002B3C05 /* DescriptionTests.swift in Sources */,
80BFD077252B0D94002B3C05 /* MapFilterTests.swift in Sources */,
80BFD070252B0C16002B3C05 /* AccessTests.swift in Sources */,
80BFD052252B09DC002B3C05 /* ReorderingTests.swift in Sources */,
80BFD04B252B0951002B3C05 /* CapacityTests.swift in Sources */,
80BFD02A252B069F002B3C05 /* SortingTests.swift in Sources */,
80BFD07E252B0E19002B3C05 /* UpdatesTests.swift in Sources */,
80BFD0A8252B1C96002B3C05 /* InsertionsTests.swift in Sources */,
80BFD040252B0740002B3C05 /* CodingTests.swift in Sources */,
80BE57A5252B3F6000F85D45 /* SubscriptAmbiguityTests.swift in Sources */,
80BFD01B252B049E002B3C05 /* InitializationTests.swift in Sources */,
80BE579A252B278D00F85D45 /* XCTUnwrapShim.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8060975E1B92F20400DB20CF /* Sources */ = {
80B28E921E201EC8007E3A77 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8060976B1B92F2D200DB20CF /* OrderedDictionary.swift in Sources */,
8048C8AC22D8911B0086B88B /* OrderedDictionary+Deprecated.swift in Sources */,
80E8E2311E2133D100395E49 /* OrderedDictionary+Description.swift in Sources */,
80E8E21F1E20425B00395E49 /* OrderedDictionary.swift in Sources */,
80BE57D5252BAB9400F85D45 /* OrderedDictionarySlice.swift in Sources */,
80A203A21F3F4C1F00622481 /* OrderedDictionary+Codable.swift in Sources */,
80BE57E0252BADEE00F85D45 /* Dictionary+OrderedDictionary.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8060976D1B92F44F00DB20CF /* Sources */ = {
80B28E9B1E201EC9007E3A77 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8060977C1B92F4A000DB20CF /* OrderedDictionaryTests.swift in Sources */,
80BFD062252B0A7F002B3C05 /* RemovalTests.swift in Sources */,
80BFD032252B06EB002B3C05 /* DescriptionTests.swift in Sources */,
80BFD078252B0D94002B3C05 /* MapFilterTests.swift in Sources */,
80BFD071252B0C16002B3C05 /* AccessTests.swift in Sources */,
80BFD053252B09DC002B3C05 /* ReorderingTests.swift in Sources */,
80BFD04C252B0951002B3C05 /* CapacityTests.swift in Sources */,
80BFD02B252B069F002B3C05 /* SortingTests.swift in Sources */,
80BFD07F252B0E19002B3C05 /* UpdatesTests.swift in Sources */,
80BFD0A9252B1C96002B3C05 /* InsertionsTests.swift in Sources */,
80BFD041252B0740002B3C05 /* CodingTests.swift in Sources */,
80BE57A6252B3F6000F85D45 /* SubscriptAmbiguityTests.swift in Sources */,
80BFD01C252B049E002B3C05 /* InitializationTests.swift in Sources */,
80BE579B252B278D00F85D45 /* XCTUnwrapShim.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
803F9CF61B925B1C002F728F /* PBXTargetDependency */ = {
8055B0441E201C5D009DC3EE /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 803F9CC51B923207002F728F /* OrderedDictionary-OSX */;
targetProxy = 803F9CF51B925B1C002F728F /* PBXContainerItemProxy */;
target = 8055B0371E201C5D009DC3EE /* OrderedDictionary-Mac */;
targetProxy = 8055B0431E201C5D009DC3EE /* PBXContainerItemProxy */;
};
806097781B92F44F00DB20CF /* PBXTargetDependency */ = {
80B28EA21E201EC9007E3A77 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 806097621B92F20400DB20CF /* OrderedDictionary-iOS */;
targetProxy = 806097771B92F44F00DB20CF /* PBXContainerItemProxy */;
target = 80B28E961E201EC8007E3A77 /* OrderedDictionary-iOS */;
targetProxy = 80B28EA11E201EC9007E3A77 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
803F9CCC1B923207002F728F /* Debug */ = {
8055B04A1E201C5D009DC3EE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
@@ -450,33 +523,52 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
803F9CCD1B923207002F728F /* Release */ = {
8055B04B1E201C5D009DC3EE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
@@ -490,95 +582,95 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
803F9CCF1B923207002F728F /* Debug */ = {
8055B04D1E201C5D009DC3EE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
);
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = "Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 4.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lukaskubanek.OrderedDictionary;
PRODUCT_NAME = OrderedDictionary;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
803F9CD01B923207002F728F /* Release */ = {
8055B04E1E201C5D009DC3EE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
);
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = "Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 4.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lukaskubanek.OrderedDictionary;
PRODUCT_NAME = OrderedDictionary;
SKIP_INSTALL = YES;
};
name = Release;
};
803F9CF81B925B1C002F728F /* Debug */ = {
8055B0501E201C5D009DC3EE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
);
INFOPLIST_FILE = "Supporting Files/Info-Tests.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lukaskubanek.OrderedDictionaryTests;
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
};
name = Debug;
};
803F9CF91B925B1C002F728F /* Release */ = {
8055B0511E201C5D009DC3EE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
);
INFOPLIST_FILE = "Supporting Files/Info-Tests.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lukaskubanek.OrderedDictionaryTests;
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
};
name = Release;
};
806097691B92F20400DB20CF /* Debug */ = {
80B28EA91E201EC9007E3A77 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -586,6 +678,7 @@
INFOPLIST_FILE = "Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 4.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lukaskubanek.OrderedDictionary;
PRODUCT_NAME = OrderedDictionary;
SDKROOT = iphoneos;
@@ -594,10 +687,13 @@
};
name = Debug;
};
8060976A1B92F20400DB20CF /* Release */ = {
80B28EAA1E201EC9007E3A77 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -605,6 +701,7 @@
INFOPLIST_FILE = "Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 4.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.lukaskubanek.OrderedDictionary;
PRODUCT_NAME = OrderedDictionary;
SDKROOT = iphoneos;
@@ -614,34 +711,26 @@
};
name = Release;
};
8060977A1B92F44F00DB20CF /* Debug */ = {
80B28EAC1E201EC9007E3A77 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
INFOPLIST_FILE = "Supporting Files/Info-Tests.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.lukaskubanek.OrderedDictionary-iOS-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_BUNDLE_IDENTIFIER = "com.lukaskubanek.OrderedDictionary-iOSTests";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
};
name = Debug;
};
8060977B1B92F44F00DB20CF /* Release */ = {
80B28EAD1E201EC9007E3A77 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
INFOPLIST_FILE = "Supporting Files/Info-Tests.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.lukaskubanek.OrderedDictionary-iOS-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_BUNDLE_IDENTIFIER = "com.lukaskubanek.OrderedDictionary-iOSTests";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
@@ -650,50 +739,52 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
803F9CC01B923207002F728F /* Build configuration list for PBXProject "OrderedDictionary" */ = {
8055B0321E201C5D009DC3EE /* Build configuration list for PBXProject "OrderedDictionary" */ = {
isa = XCConfigurationList;
buildConfigurations = (
803F9CCC1B923207002F728F /* Debug */,
803F9CCD1B923207002F728F /* Release */,
8055B04A1E201C5D009DC3EE /* Debug */,
8055B04B1E201C5D009DC3EE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
803F9CCE1B923207002F728F /* Build configuration list for PBXNativeTarget "OrderedDictionary-OSX" */ = {
8055B04C1E201C5D009DC3EE /* Build configuration list for PBXNativeTarget "OrderedDictionary-Mac" */ = {
isa = XCConfigurationList;
buildConfigurations = (
803F9CCF1B923207002F728F /* Debug */,
803F9CD01B923207002F728F /* Release */,
8055B04D1E201C5D009DC3EE /* Debug */,
8055B04E1E201C5D009DC3EE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
803F9CF71B925B1C002F728F /* Build configuration list for PBXNativeTarget "OrderedDictionary-OSX-Tests" */ = {
8055B04F1E201C5D009DC3EE /* Build configuration list for PBXNativeTarget "OrderedDictionary-Mac-Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
803F9CF81B925B1C002F728F /* Debug */,
803F9CF91B925B1C002F728F /* Release */,
8055B0501E201C5D009DC3EE /* Debug */,
8055B0511E201C5D009DC3EE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
806097681B92F20400DB20CF /* Build configuration list for PBXNativeTarget "OrderedDictionary-iOS" */ = {
80B28EA81E201EC9007E3A77 /* Build configuration list for PBXNativeTarget "OrderedDictionary-iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
806097691B92F20400DB20CF /* Debug */,
8060976A1B92F20400DB20CF /* Release */,
80B28EA91E201EC9007E3A77 /* Debug */,
80B28EAA1E201EC9007E3A77 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
806097791B92F44F00DB20CF /* Build configuration list for PBXNativeTarget "OrderedDictionary-iOS-Tests" */ = {
80B28EAB1E201EC9007E3A77 /* Build configuration list for PBXNativeTarget "OrderedDictionary-iOS-Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8060977A1B92F44F00DB20CF /* Debug */,
8060977B1B92F44F00DB20CF /* Release */,
80B28EAC1E201EC9007E3A77 /* Debug */,
80B28EAD1E201EC9007E3A77 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 803F9CBD1B923207002F728F /* Project object */;
rootObject = 8055B02F1E201C5D009DC3EE /* Project object */;
}
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -14,9 +14,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "803F9CC51B923207002F728F"
BlueprintIdentifier = "8055B0371E201C5D009DC3EE"
BuildableName = "OrderedDictionary.framework"
BlueprintName = "OrderedDictionary-OSX"
BlueprintName = "OrderedDictionary-Mac"
ReferencedContainer = "container:OrderedDictionary.xcodeproj">
</BuildableReference>
</BuildActionEntry>
@@ -33,24 +33,13 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "803F9CEE1B925B1C002F728F"
BuildableName = "OrderedDictionary-OSX-Tests.xctest"
BlueprintName = "OrderedDictionary-OSX-Tests"
BlueprintIdentifier = "8055B0401E201C5D009DC3EE"
BuildableName = "OrderedDictionary_Mac_Tests.xctest"
BlueprintName = "OrderedDictionary-Mac-Tests"
ReferencedContainer = "container:OrderedDictionary.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "803F9CC51B923207002F728F"
BuildableName = "OrderedDictionary.framework"
BlueprintName = "OrderedDictionary-OSX"
ReferencedContainer = "container:OrderedDictionary.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@@ -65,14 +54,12 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "803F9CC51B923207002F728F"
BlueprintIdentifier = "8055B0371E201C5D009DC3EE"
BuildableName = "OrderedDictionary.framework"
BlueprintName = "OrderedDictionary-OSX"
BlueprintName = "OrderedDictionary-Mac"
ReferencedContainer = "container:OrderedDictionary.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
@@ -83,9 +70,9 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "803F9CC51B923207002F728F"
BlueprintIdentifier = "8055B0371E201C5D009DC3EE"
BuildableName = "OrderedDictionary.framework"
BlueprintName = "OrderedDictionary-OSX"
BlueprintName = "OrderedDictionary-Mac"
ReferencedContainer = "container:OrderedDictionary.xcodeproj">
</BuildableReference>
</MacroExpansion>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -14,7 +14,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "806097621B92F20400DB20CF"
BlueprintIdentifier = "80B28E961E201EC8007E3A77"
BuildableName = "OrderedDictionary.framework"
BlueprintName = "OrderedDictionary-iOS"
ReferencedContainer = "container:OrderedDictionary.xcodeproj">
@@ -26,31 +26,19 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "806097701B92F44F00DB20CF"
BuildableName = "OrderedDictionary-iOS-Tests.xctest"
BlueprintIdentifier = "80B28E9E1E201EC9007E3A77"
BuildableName = "OrderedDictionary_iOS_Tests.xctest"
BlueprintName = "OrderedDictionary-iOS-Tests"
ReferencedContainer = "container:OrderedDictionary.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "806097621B92F20400DB20CF"
BuildableName = "OrderedDictionary.framework"
BlueprintName = "OrderedDictionary-iOS"
ReferencedContainer = "container:OrderedDictionary.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@@ -65,14 +53,12 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "806097621B92F20400DB20CF"
BlueprintIdentifier = "80B28E961E201EC8007E3A77"
BuildableName = "OrderedDictionary.framework"
BlueprintName = "OrderedDictionary-iOS"
ReferencedContainer = "container:OrderedDictionary.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
@@ -83,7 +69,7 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "806097621B92F20400DB20CF"
BlueprintIdentifier = "80B28E961E201EC8007E3A77"
BuildableName = "OrderedDictionary.framework"
BlueprintName = "OrderedDictionary-iOS"
ReferencedContainer = "container:OrderedDictionary.xcodeproj">
+24
View File
@@ -0,0 +1,24 @@
// swift-tools-version:5.0
import PackageDescription
let package = Package(
name: "OrderedDictionary",
products: [
.library(
name: "OrderedDictionary",
targets: ["OrderedDictionary"]
)
],
dependencies: [],
targets: [
.target(
name: "OrderedDictionary",
dependencies: []
),
.testTarget(
name: "OrderedDictionaryTests",
dependencies: ["OrderedDictionary"]
)
]
)
@@ -1,65 +0,0 @@
import OrderedDictionary
////
// Initialize an ordered dictionary using an array of key-value pairs
////
var orderedDictionary: OrderedDictionary<String, Int> = [
("A", 1),
("B", 2),
("C", 3),
("D", 4)
]
print(orderedDictionary) // => [A: 1, B: 2, C: 3, D: 4]
////
// Loop through the contents
////
for (index, (key, value)) in orderedDictionary.enumerate() {
print("\(index): (\(key): \(value))")
}
// => 0: (A: 1)
// => 1: (B: 2)
// => 2: (C: 3)
// => 3: (D: 4)
////
// Modify the values by setting the value for key
////
orderedDictionary["A"] = 100
orderedDictionary["E"] = 5
orderedDictionary["B"] = nil
orderedDictionary.updateValue(42, forKey: "D")
print(orderedDictionary) // => [A: 100, C: 3, D: 42, E: 5]
print(orderedDictionary["A"]) // => Optional(100)
print(orderedDictionary["B"]) // => nil
print(orderedDictionary["C"]) // => Optional(3)
print(orderedDictionary["D"]) // => Optional(42)
print(orderedDictionary["E"]) // => Optional(5)
////
// Modify the values by setting the element for index
////
orderedDictionary[2] = ("F", 235)
orderedDictionary.updateElement(("K", 12), atIndex: 1)
orderedDictionary.removeAtIndex(0)
print(orderedDictionary) // => [K: 12, F: 235, E: 5]
print(orderedDictionary[0]) // => ("K", 12)
print(orderedDictionary[1]) // => ("F", 235)
print(orderedDictionary[2]) // => ("E", 5)
// print(orderedDictionary[3]) // => fatal error
print(orderedDictionary.indexForKey("K")) // => Optional(0)
print(orderedDictionary.indexForKey("F")) // => Optional(1)
print(orderedDictionary.indexForKey("E")) // => Optional(2)
print(orderedDictionary.indexForKey("A")) // => nil
print(orderedDictionary.indexForKey("C")) // => nil
@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='5.0' target-platform='osx' requires-full-environment='true'>
<timeline fileName='timeline.xctimeline'/>
</playground>
+65 -105
View File
@@ -1,126 +1,86 @@
# OrderedDictionary
[![][image-1]][1] [![][image-2]][2] [![][image-3]][3] ![][image-4] [![][image-5]][4] [![][image-6]][5]
<p align="left">
<a href="https://github.com/lukaskubanek/OrderedDictionary/releases">
<img src="https://img.shields.io/github/release/lukaskubanek/OrderedDictionary/all.svg?style=flat-square">
</a>
<a href="https://developer.apple.com/swift">
<img src="https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat-square" alt="Swift 5.0">
</a>
<a href="https://swift.org/package-manager">
<img src="https://img.shields.io/badge/SPM-compatible-brightgreen.svg?style=flat-square" alt="Swift Package Manager">
</a>
<a href="https://github.com/Carthage/Carthage">
<img src="https://img.shields.io/badge/Carthage-compatible-brightgreen.svg?style=flat-square" alt="Carthage">
</a>
<a href="LICENSE.md">
<img src="https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat-square" alt="License: MIT">
</a>
<a href="https://twitter.com/lukaskubanek">
<img src="https://img.shields.io/badge/contact-@lukaskubanek-olive.svg?style=flat-square" alt="Twitter: @lukaskubanek">
</a>
</p>
This is a lightweight implementation of an ordered dictionary data structure in Swift packed into a µframework.
OrderedDictionary is a lightweight implementation of an ordered dictionary data structure in Swift.
`OrderedDictionary` is an immutable generic collection which combines the features of `Dictionary` and `Array`. Like `Dictionary` it stores key-value pairs and maps the keys to values. Additionally these pairs are sorted by zero-based integer index like in `Array`. The `OrderedDictionary` provides similar APIs to the collections from the Swift standard library and allows accessing the content by keys or indexes.
The `OrderedDictionary<Key: Hashable, Value>` struct is a generic collection that combines the features of the `Dictionary` and `Array` data structures from the Swift standard library. Like `Dictionary`, it stores key-value pairs with each key being unique and maps each key to an associated value. Like `Array`, it stores those pairs sorted and accessible by a zero-based integer index.
Internally `OrderedDictionary` uses a backing store composed of an instance of `Dictionary` for storing the key-value pairs and an instance of `Array` for managing the ordered keys.
`OrderedDictionary` provides similar APIs to collections available in the Swift standard library like accessing contents by keys or indices, inserting and removing elements, iterating, sorting, transforming, filtering, etc.
Internally, `OrderedDictionary` uses backing storage composed of a `Dictionary` for storing the key-value pairs and an `Array` for managing the ordered keys. This is certainly not the most performant implementation one can achieve, but it gets its job done while reusing most functionality from the Swift standard library.
## Requirements
- Swift 2.0
- Xcode 7.0 beta 6+
- iOS 8.0+ / OS X 10.10+
- Swift 5.0 or later
- Xcode 11 or later
- iOS 8 or later / macOS 10.10 or later
*For support of older Swift versions, please refer to older versions of this library. For Swift 4.2, use version 3.x, and for Swift 4.0-4.1, use version 2.x.*
*The requirements for Xcode and OS versions only apply when the library is integrated as a framework or via the Xcode project.*
## Installation
The easiest way to integrate `OrderedDictionary` to your project is to use [Carthage][6]. Add following line to your `Cartfile`:
### Swift Package Manager
```
github "lukaskubanek/OrderedDictionary" ~> 0.1
```
Then drag the `OrderedDictionary.xcodeproj` or the `OrderedDictionary.framework` into your project/workspace and link against the `OrderedDictionary.framework`.
Finally make sure the framework gets copied into your application bundle.
## Example Usage
To install OrderedDictionary using the [Swift Package Manager](https://swift.org/package-manager/), add it as a dependency into your `Package.swift` file:
```swift
import OrderedDictionary
////
// Initialize an ordered dictionary using an array of key-value pairs
////
var orderedDictionary: OrderedDictionary<String, Int> = [
("A", 1),
("B", 2),
("C", 3),
("D", 4)
]
print(orderedDictionary) // => [A: 1, B: 2, C: 3, D: 4]
////
// Loop through the contents
////
for (index, (key, value)) in orderedDictionary.enumerate() {
print("\(index): (\(key): \(value))")
}
// => 0: (A: 1)
// => 1: (B: 2)
// => 2: (C: 3)
// => 3: (D: 4)
////
// Modify the values by setting the value for key
////
orderedDictionary["A"] = 100
orderedDictionary["E"] = 5
orderedDictionary["B"] = nil
orderedDictionary.updateValue(42, forKey: "D")
print(orderedDictionary) // => [A: 100, C: 3, D: 42, E: 5]
print(orderedDictionary["A"]) // => Optional(100)
print(orderedDictionary["B"]) // => nil
print(orderedDictionary["C"]) // => Optional(3)
print(orderedDictionary["D"]) // => Optional(42)
print(orderedDictionary["E"]) // => Optional(5)
////
// Modify the values by setting the element for index
////
orderedDictionary[2] = ("F", 235)
orderedDictionary.updateElement(("K", 12), atIndex: 1)
orderedDictionary.removeAtIndex(0)
print(orderedDictionary) // => [K: 12, F: 235, E: 5]
print(orderedDictionary[0]) // => ("K", 12)
print(orderedDictionary[1]) // => ("F", 235)
print(orderedDictionary[2]) // => ("E", 5)
// print(orderedDictionary[3]) // => fatal error
print(orderedDictionary.indexForKey("K")) // => Optional(0)
print(orderedDictionary.indexForKey("F")) // => Optional(1)
print(orderedDictionary.indexForKey("E")) // => Optional(2)
print(orderedDictionary.indexForKey("A")) // => nil
print(orderedDictionary.indexForKey("C")) // => nil
let package = Package(
...
dependencies: [
.package(url: "https://github.com/lukaskubanek/OrderedDictionary.git", from: "4.0.0")
],
...
)
```
## Author
### Carthage
Lukas Kubanek // [lukaskubanek.com][11] // [@kubanekl][12]
To install OrderedDictionary using [Carthage](https://github.com/Carthage/Carthage), add it as a dependency into your `Cartfile`:
## License
```plain
github "lukaskubanek/OrderedDictionary" ~> 4.0
```
`OrderedDictionary` is released under the [MIT License][13].
Then drag either the `OrderedDictionary.xcodeproj` or the `OrderedDictionary.framework` into your Xcode project/workspace and link your target against the `OrderedDictionary.framework`. Make sure that the framework [gets copied](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) to your application bundle.
[1]: https://travis-ci.org/lukaskubanek/OrderedDictionary
[2]: https://github.com/lukaskubanek/OrderedDictionary/releases
[3]: https://developer.apple.com/swift/
[4]: https://github.com/Carthage/Carthage
[5]: LICENSE.md
[6]: https://github.com/Carthage/Carthage/
[7]: https://developer.apple.com/swift/
[8]: https://github.com/lukaskubanek/OrderedDictionary/releases
[9]: https://developer.apple.com/swift/
[10]: https://github.com/Carthage/Carthage
[11]: http://lukaskubanek.com
[12]: https://twitter.com/kubanekl
[13]: LICENSE.md
### Git Submodules
[image-1]: https://img.shields.io/travis/lukaskubanek/OrderedDictionary.svg?style=flat-square
[image-2]: https://img.shields.io/github/release/lukaskubanek/OrderedDictionary.svg?style=flat-square
[image-3]: https://img.shields.io/badge/Swift-2.0_(7b6)-orange.svg?style=flat-square
[image-4]: https://img.shields.io/badge/platform-OS_X%20&_iOS-yellowgreen.svg?style=flat-square
[image-5]: https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat-square "Carthage compatible"
[image-6]: https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat-square "License"
You can also install OrderedDictionary via [Git submodules](http://git-scm.com/book/en/v2/Git-Tools-Submodules) and integrate the project `OrderedDictionary.xcodeproj` from the submodule directly into your Xcode workspace.
### Note About CocoaPods
Although there has been a high demand for [CocoaPods](https://cocoapods.org) support, this distribution method won't be officially supported by this library. If you really want to integrate this library via CocoaPods, you can create and maintain a custom podspec (see the last section of [this post](https://guides.cocoapods.org/syntax/podfile.html#pod)).
## Usage & Docs
For the explanation of the API of `OrderedDictionary` and examples on how to use this data structure, please refer to the [documentation comments](Sources/OrderedDictionary/OrderedDictionary.swift) or the [comprehensive test suite](Tests/OrderedDictionaryTests).
## Changelog
To view the changelog, refer to GitHub's [releases page](https://github.com/lukaskubanek/OrderedDictionary/releases). If you're upgrading from version 3.x, you might want to check out the list of changes made in [version 4.0](https://github.com/lukaskubanek/OrderedDictionary/releases/tag/v4.0.0).
## Credits
OrderedDictionary was built by [@lukaskubanek](https://twitter.com/lukaskubanek), the founder and developer of [Diagrams](https://diagrams.app), a native diagram editor for Mac. This data structure is being used extensively for powering Diagrams' data model.
-10
View File
@@ -1,10 +0,0 @@
//
// OrderedDictionary.h
// OrderedDictionary
//
// Created by Lukas Kubanek on 29/08/15.
// Copyright © 2015 Lukas Kubanek. All rights reserved.
//
extern double OrderedDictionaryVersionNumber;
extern const unsigned char OrderedDictionaryVersionString[];
-178
View File
@@ -1,178 +0,0 @@
//
// OrderedDictionary.swift
// OrderedDictionary
//
// Created by Lukas Kubanek on 29/08/15.
// Copyright © 2015 Lukas Kubanek. All rights reserved.
//
/// The `OrderedDictionary` is a collection which combines the features of `Dictionary` and `Array`.
/// It maps keys to values and additionally sorts the key-value pairs by zero-based integer index.
public struct OrderedDictionary<Key: Hashable, Value>: CollectionType, ArrayLiteralConvertible, CustomStringConvertible {
// MARK: - Initialization
public init() {
self.orderedKeys = []
self.keysToValues = [:]
}
public init(elements: [Element]) {
self.init()
for element in elements {
self[element.0] = element.1
}
}
public init(arrayLiteral elements: Element...) {
self.init(elements: elements)
}
// MARK: - Type Aliases
public typealias Element = (Key, Value)
public typealias Index = Int
// MARK: - Managing Content Using Keys
public subscript(key: Key) -> Value? {
get {
return keysToValues[key]
}
set(newValue) {
if let newValue = newValue {
updateValue(newValue, forKey: key)
} else {
removeValueForKey(key)
}
}
}
public func containsKey(key: Key) -> Bool {
return orderedKeys.contains(key)
}
public mutating func updateValue(value: Value, forKey key: Key) -> Value? {
if orderedKeys.contains(key) {
guard let currentValue = keysToValues[key] else { fatalError("Inconsistency error occured in OrderedDictionary.") }
keysToValues[key] = value
return currentValue
} else {
orderedKeys.append(key)
keysToValues[key] = value
return nil
}
}
public mutating func removeValueForKey(key: Key) -> Value? {
if let index = orderedKeys.indexOf(key) {
orderedKeys.removeAtIndex(index)
guard let currentValue = keysToValues[key] else { fatalError("Inconsistency error occured in OrderedDictionary.") }
keysToValues[key] = nil
return currentValue
} else {
return nil
}
}
public mutating func removeAll(keepCapacity keepCapacity: Bool = true) {
orderedKeys.removeAll(keepCapacity: keepCapacity)
keysToValues.removeAll(keepCapacity: keepCapacity)
}
// MARK: - Managing Content Using Indexes
public subscript(index: Index) -> Element {
get {
if let element = elementAtIndex(index) {
return element
} else {
fatalError("Index out of bounds in OrderedDictionary.")
}
}
set(newValue) {
updateElement(newValue, atIndex: index)
}
}
public func indexForKey(key: Key) -> Index? {
return orderedKeys.indexOf(key)
}
public func elementAtIndex(index: Index) -> Element? {
guard orderedKeys.indices.contains(index) else { return nil }
let key = orderedKeys[index]
guard let value = self.keysToValues[key] else { fatalError("Inconsistency error occured in OrderedDictionary.") }
return (key, value)
}
public mutating func updateElement(element: Element, atIndex index: Index) -> Element? {
// TODO: Handle index out of range
let currentElement = elementAtIndex(index)
if currentElement != nil {
keysToValues.removeValueForKey(element.0)
}
let (newKey, newValue) = (element.0, element.1)
orderedKeys[index] = newKey
keysToValues[newKey] = newValue
return currentElement
}
public mutating func removeAtIndex(index: Index) -> Element? {
if let element = elementAtIndex(index) {
orderedKeys.removeAtIndex(index)
keysToValues.removeValueForKey(element.0)
return element
} else {
return nil
}
}
// MARK: - Description
public var description: String {
let content = map({ "\($0.0): \($0.1)" }).joinWithSeparator(", ")
return "[\(content)]"
}
// MARK: - Backing Store
private var orderedKeys: [Key]
private var keysToValues: [Key: Value]
// MARK: - SequenceType & Indexable Conformance
public func generate() -> AnyGenerator<Element> {
var nextIndex = 0
let lastIndex = self.count
return anyGenerator {
guard nextIndex < lastIndex else { return nil }
let nextKey = self.orderedKeys[nextIndex]
guard let nextValue = self.keysToValues[nextKey] else { fatalError("Inconsistency error occured in OrderedDictionary.") }
let element = (nextKey, nextValue)
nextIndex++
return element
}
}
public var startIndex: Index { return orderedKeys.startIndex }
public var endIndex: Index { return orderedKeys.endIndex }
}
public func == <Key: Equatable, Value: Equatable>(lhs: OrderedDictionary<Key, Value>, rhs: OrderedDictionary<Key, Value>) -> Bool {
return lhs.orderedKeys == rhs.orderedKeys && lhs.keysToValues == rhs.keysToValues
}
@@ -0,0 +1,20 @@
extension Dictionary {
/// Returns an ordered dictionary containing the key-value pairs from the dictionary, sorted
/// using the given sort function.
///
/// - Parameters:
/// - areInIncreasingOrder: The sort function which compares the key-value pairs.
/// - Returns: The ordered dictionary.
///
/// - SeeAlso: `OrderedDictionary.init(unsorted:areInIncreasingOrder:)`
public func sorted(
by areInIncreasingOrder: (Element, Element) throws -> Bool
) rethrows -> OrderedDictionary<Key, Value> {
return try OrderedDictionary(
unsorted: self,
areInIncreasingOrder: areInIncreasingOrder
)
}
}
@@ -0,0 +1,49 @@
extension OrderedDictionary: Encodable where Key: Encodable, Value: Encodable {
/// Encodes the contents of this ordered dictionary into the given encoder.
public func encode(to encoder: Encoder) throws {
// Encode the ordered dictionary as an array of alternating key-value pairs.
var container = encoder.unkeyedContainer()
for (key, value) in self {
try container.encode(key)
try container.encode(value)
}
}
}
extension OrderedDictionary: Decodable where Key: Decodable, Value: Decodable {
/// Creates a new ordered dictionary by decoding from the given decoder.
public init(from decoder: Decoder) throws {
// Decode the ordered dictionary from an array of alternating key-value pairs.
self.init()
var container = try decoder.unkeyedContainer()
while !container.isAtEnd {
let key = try container.decode(Key.self)
guard !container.isAtEnd else { throw DecodingError.unkeyedContainerReachedEndBeforeValue(decoder.codingPath) }
let value = try container.decode(Value.self)
self[key] = value
}
}
}
extension DecodingError {
fileprivate static func unkeyedContainerReachedEndBeforeValue(
_ codingPath: [CodingKey]
) -> DecodingError {
return DecodingError.dataCorrupted(
DecodingError.Context(
codingPath: codingPath,
debugDescription: "Unkeyed container reached end before value in key-value pair."
)
)
}
}
@@ -0,0 +1,81 @@
extension OrderedDictionary {
// ============================================================================ //
// MARK: - Initialization
// ============================================================================ //
@available(*, deprecated, message: "Please use init(values:uniquelyKeyedBy:).", renamed: "init(values:uniquelyKeyedBy:)")
public init<S: Sequence>(
values: S,
keyedBy extractKey: (Value) -> Key
) where S.Element == Value {
self.init(values: values, uniquelyKeyedBy: extractKey)
}
@available(*, deprecated, message: "Please use init(values:uniquelyKeyedBy:).", renamed: "init(values:uniquelyKeyedBy:)")
public init(
values: [Value],
keyedBy keyPath: KeyPath<Value, Key>
) {
self.init(values: values, uniquelyKeyedBy: keyPath)
}
@available(*, deprecated, message: "Please use init(uniqueKeysWithValues:).", renamed: "init(uniqueKeysWithValues:)")
public init<S: Sequence>(_ elements: S) where S.Element == Element {
self.init(uniqueKeysWithValues: elements)
}
// ============================================================================ //
// MARK: - Insertion Checks
// ============================================================================ //
/// Checks whether the given key-value pair can be inserted into to ordered dictionary
/// by validating the presence of the key.
///
/// - Parameters:
/// - newElement: The key-value pair to be inserted into the ordered dictionary.
/// - Returns: `true` if the key-value pair can be safely inserted; otherwise, `false`.
///
/// - SeeAlso: `canInsert(key:)`
/// - SeeAlso: `canInsert(at:)`
@available(*, deprecated, message: "Use canInsert(key:) with the element's key instead.")
public func canInsert(_ newElement: Element) -> Bool {
return canInsert(key: newElement.key)
}
// ============================================================================ //
// MARK: - Moving Elements
// ============================================================================ //
/// Moves an existing key-value pair specified by the given key to the new index by removing
/// it from its original index first and inserting it at the new index. If the movement is
/// actually performed, the previous index of the key-value pair is returned. Otherwise, `nil`
/// is returned.
///
/// - Parameters:
/// - key: The key specifying the key-value pair to move.
/// - newIndex: The new index the key-value pair should be moved to.
/// - Returns: The previous index of the key-value pair if it was sucessfully moved.
@available(*, deprecated, message: "Since the concrete behavior of the element movement highly depends on concrete use cases, its official support will be dropped in the future. Please use the public API for modeling a move operation instead.")
@discardableResult
public mutating func moveElement(forKey key: Key, to newIndex: Index) -> Index? {
// Load the previous index and return nil if the index is not found.
guard let previousIndex = index(forKey: key) else { return nil }
// If the previous and new indices match, treat it as if the movement was already
// performed.
guard previousIndex != newIndex else { return previousIndex }
// Remove the value for the key at its original index.
let value = removeValue(forKey: key)!
// Validate the new index.
precondition(canInsert(at: newIndex), "Cannot move to invalid index in OrderedDictionary")
// Insert the element at the new index.
insert((key: key, value: value), at: newIndex)
return previousIndex
}
}
@@ -0,0 +1,50 @@
extension OrderedDictionary: CustomStringConvertible {
/// A textual representation of the ordered dictionary.
public var description: String {
return makeDescription(debug: false)
}
}
extension OrderedDictionary: CustomDebugStringConvertible {
/// A textual representation of the ordered dictionary, suitable for debugging.
public var debugDescription: String {
return makeDescription(debug: true)
}
}
extension OrderedDictionary {
fileprivate func makeDescription(debug: Bool) -> String {
// The implementation of the description is inspired by zwaldowski's implementation of the
// ordered dictionary. See https://bit.ly/2RiWfJu
if isEmpty { return "[:]" }
let printFunction: (Any, inout String) -> () = {
if debug {
return { debugPrint($0, separator: "", terminator: "", to: &$1) }
} else {
return { print($0, separator: "", terminator: "", to: &$1) }
}
}()
let descriptionForItem: (Any) -> String = { item in
var description = ""
printFunction(item, &description)
return description
}
let bodyComponents = map { element in
return descriptionForItem(element.key) + ": " + descriptionForItem(element.value)
}
let body = bodyComponents.joined(separator: ", ")
return "[\(body)]"
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,105 @@
public struct OrderedDictionarySlice<Key: Hashable, Value>: RandomAccessCollection, MutableCollection {
// ============================================================================ //
// MARK: - Type Aliases
// ============================================================================ //
/// The type of the underlying ordered dictionary.
public typealias Base = OrderedDictionary<Key, Value>
/// The type of the contiguous subrange of the ordered dictionary's elements.
public typealias SubSequence = Self
// ============================================================================ //
// MARK: - Initialization
// ============================================================================ //
public init(base: Base, bounds: Base.Indices) {
self.base = base
self.startIndex = bounds.lowerBound
self.endIndex = bounds.upperBound
}
// ============================================================================ //
// MARK: - Base
// ============================================================================ //
/// The underlying ordered dictionary.
public private(set) var base: Base
// ============================================================================ //
// MARK: - Indices
// ============================================================================ //
/// The start index.
public let startIndex: Base.Index
/// The end index.
public let endIndex: Base.Index
// ============================================================================ //
// MARK: - Subscripts
// ============================================================================ //
public subscript(
position: Base.Index
) -> Base.Element {
get {
base[position]
}
set(newElement) {
base[position] = newElement
}
}
public subscript(
bounds: Range<Int>
) -> OrderedDictionarySlice<Key, Value> {
get {
base[bounds]
}
set(newElements) {
base[bounds] = newElements
}
}
// ============================================================================ //
// MARK: - Reordering Methods Overloads
// ============================================================================ //
public mutating func sort(
by areInIncreasingOrder: (Base.Element, Base.Element) throws -> Bool
) rethrows {
try base._sort(
in: indices,
by: areInIncreasingOrder
)
}
public mutating func reverse() {
base._reverse(in: indices)
}
public mutating func shuffle<T>(
using generator: inout T
) where T: RandomNumberGenerator {
base._shuffle(
in: indices,
using: &generator
)
}
public mutating func partition(
by belongsInSecondPartition: (Base.Element) throws -> Bool
) rethrows -> Index {
return try base._partition(
in: indices,
by: belongsInSecondPartition
)
}
public mutating func swapAt(_ i: Base.Index, _ j: Base.Index) {
base.swapAt(i, j)
}
}
+2 -2
View File
@@ -15,13 +15,13 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.1</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 Lukas Kubanek. All rights reserved.</string>
<string>Copyright © 2015-2021 Lukas Kubanek. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
+8
View File
@@ -0,0 +1,8 @@
import XCTest
import OrderedDictionaryTests
var tests = [XCTestCaseEntry]()
tests += OrderedDictionaryTests.__allTests()
XCTMain(tests)
-177
View File
@@ -1,177 +0,0 @@
//
// OrderedDictionaryTests.swift
// OrderedDictionaryTests
//
// Created by Lukas Kubanek on 29/08/15.
// Copyright © 2015 Lukas Kubanek. All rights reserved.
//
import XCTest
import Nimble
import OrderedDictionary
class OrderedDictionaryTests: XCTestCase {
var orderedDictionary: OrderedDictionary<String, Int>!
override func setUp() {
orderedDictionary = [
("A", 1),
("B", 2),
("C", 3)
]
}
// MARK: - Content
func testInitializedContent() {
expect(self.orderedDictionary.count) == 3
expect(self.orderedDictionary["A"]) == 1
expect(self.orderedDictionary.indexForKey("A")) == 0
expect(self.orderedDictionary.containsKey("A")) == true
expect(self.orderedDictionary["B"]) == 2
expect(self.orderedDictionary.indexForKey("B")) == 1
expect(self.orderedDictionary.containsKey("B")) == true
expect(self.orderedDictionary["C"]) == 3
expect(self.orderedDictionary.indexForKey("C")) == 2
expect(self.orderedDictionary.containsKey("C")) == true
}
func testInitializationUsingPairs() {
let elements = [
("A", 1),
("B", 2),
("C", 3)
]
expect(OrderedDictionary(elements: elements) == self.orderedDictionary).to(beTrue())
}
func testElementsGenerator() {
for entry in self.orderedDictionary.enumerate() {
expect(self.orderedDictionary[entry.index].0) == entry.element.0
expect(self.orderedDictionary[entry.index].1) == entry.element.1
}
}
// MARK: - Key-based Modifications
func testKeyBasedSubscript() {
self.orderedDictionary["A"] = 5
self.orderedDictionary["D"] = 10
self.orderedDictionary["B"] = nil
expect(self.orderedDictionary.count) == 3
expect(self.orderedDictionary["A"]) == 5
expect(self.orderedDictionary.indexForKey("A")) == 0
expect(self.orderedDictionary.containsKey("A")) == true
expect(self.orderedDictionary["B"]).to(beNil())
expect(self.orderedDictionary.indexForKey("B")).to(beNil())
expect(self.orderedDictionary.containsKey("B")) == false
expect(self.orderedDictionary["C"]) == 3
expect(self.orderedDictionary.indexForKey("C")) == 1
expect(self.orderedDictionary.containsKey("C")) == true
expect(self.orderedDictionary["D"]) == 10
expect(self.orderedDictionary.indexForKey("D")) == 2
expect(self.orderedDictionary.containsKey("D")) == true
}
// MARK: - Index-based Modifications
func testIndexBasedSubscriptForRetrievingValues() {
let elementAtIndex0 = self.orderedDictionary[0]
expect(elementAtIndex0.0) == "A"
expect(elementAtIndex0.1) == 1
let elementAtIndex1 = self.orderedDictionary[1]
expect(elementAtIndex1.0) == "B"
expect(elementAtIndex1.1) == 2
let elementAtIndex2 = self.orderedDictionary[2]
expect(elementAtIndex2.0) == "C"
expect(elementAtIndex2.1) == 3
}
func testIndexBasedSubscriptForSettingValues() {
self.orderedDictionary[0] = ("F", 10)
self.orderedDictionary[1] = ("B", 5)
let elementAtIndex0 = self.orderedDictionary[0]
expect(elementAtIndex0.0) == "F"
expect(elementAtIndex0.1) == 10
let elementAtIndex1 = self.orderedDictionary[1]
expect(elementAtIndex1.0) == "B"
expect(elementAtIndex1.1) == 5
let elementAtIndex2 = self.orderedDictionary[2]
expect(elementAtIndex2.0) == "C"
expect(elementAtIndex2.1) == 3
}
func testRetrievingElementAtNonExistentIndex() {
expect(self.orderedDictionary.elementAtIndex(10)).to(beNil())
}
// MARK: - Removal
func testRemoveAll() {
self.orderedDictionary.removeAll()
expect(self.orderedDictionary.count) == 0
}
func testRemovalForKey() {
let removedValue1 = self.orderedDictionary.removeValueForKey("A")
let removedValue2 = self.orderedDictionary.removeValueForKey("K")
expect(removedValue1) == 1
expect(removedValue2).to(beNil())
expect(self.orderedDictionary.count) == 2
expect(self.orderedDictionary["A"]).to(beNil())
expect(self.orderedDictionary.indexForKey("A")).to(beNil())
expect(self.orderedDictionary["B"]) == 2
expect(self.orderedDictionary.indexForKey("B")) == 0
expect(self.orderedDictionary["C"]) == 3
expect(self.orderedDictionary.indexForKey("C")) == 1
}
func testRemovalAtIndex() {
let removedElement1 = self.orderedDictionary.removeAtIndex(1)
let removedElement2 = self.orderedDictionary.removeAtIndex(0)
let removedElement3 = self.orderedDictionary.removeAtIndex(5)
expect(removedElement1?.0) == "B"
expect(removedElement1?.1) == 2
expect(removedElement2?.0) == "A"
expect(removedElement2?.1) == 1
expect(removedElement3).to(beNil())
expect(self.orderedDictionary.count) == 1
let elementAtIndex0 = self.orderedDictionary[0]
expect(elementAtIndex0.0) == "C"
expect(elementAtIndex0.1) == 3
}
// MARK: - Description
func testDescription() {
expect(self.orderedDictionary.description) == "[A: 1, B: 2, C: 3]"
}
}
@@ -0,0 +1,106 @@
import Foundation
import OrderedDictionary
import XCTest
class AccessTests: XCTestCase {
func testAccessBasic() {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
XCTAssertEqual(orderedDictionary.count, 3)
XCTAssertFalse(orderedDictionary.isEmpty)
XCTAssertEqual(orderedDictionary.indices, 0..<3)
XCTAssertEqual(orderedDictionary.startIndex, 0)
XCTAssertEqual(orderedDictionary.endIndex, 3)
XCTAssertEqual(orderedDictionary[0].key, "a")
XCTAssertEqual(orderedDictionary[1].key, "b")
XCTAssertEqual(orderedDictionary[2].key, "c")
XCTAssertTrue(orderedDictionary.containsKey("a"))
XCTAssertTrue(orderedDictionary.containsKey("b"))
XCTAssertTrue(orderedDictionary.containsKey("c"))
XCTAssertEqual(orderedDictionary["a"], 1)
XCTAssertEqual(orderedDictionary["b"], 2)
XCTAssertEqual(orderedDictionary["c"], 3)
XCTAssertEqual(orderedDictionary.value(forKey: "a"), 1)
XCTAssertEqual(orderedDictionary.value(forKey: "b"), 2)
XCTAssertEqual(orderedDictionary.value(forKey: "c"), 3)
XCTAssertEqual(orderedDictionary.index(forKey: "a"), 0)
XCTAssertEqual(orderedDictionary.index(forKey: "b"), 1)
XCTAssertEqual(orderedDictionary.index(forKey: "c"), 2)
XCTAssertNotNil(orderedDictionary.elementAt(0))
XCTAssertNotNil(orderedDictionary.elementAt(1))
XCTAssertNotNil(orderedDictionary.elementAt(2))
}
func testAccessSlice() {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
let slice = orderedDictionary[2..<4]
XCTAssertEqual(slice.count, 2)
XCTAssertFalse(slice.isEmpty)
XCTAssertEqual(slice.indices, 2..<4)
XCTAssertEqual(slice.startIndex, 2)
XCTAssertEqual(slice.endIndex, 4)
XCTAssertEqual(orderedDictionary[2].key, "c")
XCTAssertEqual(orderedDictionary[3].key, "d")
}
func testAccessOrderedKeys() {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
XCTAssertEqual(
orderedDictionary.orderedKeys,
["a", "b", "c"]
)
}
func testAccessOrderedValues() {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
XCTAssertEqual(
Array(orderedDictionary.orderedValues),
[1, 2, 3]
)
}
func testAccessElementAtInvalidIndex() {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
XCTAssertNil(orderedDictionary.elementAt(-1))
XCTAssertNil(orderedDictionary.elementAt(3))
}
func testAccessUnsortedDictionary() {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
XCTAssertEqual(
orderedDictionary.unorderedDictionary,
["a": 1, "b": 2, "c": 3]
)
}
func testIteratorInForLoop() {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
var keys = [String]()
var values = [Int]()
for (key, value) in orderedDictionary {
keys.append(key)
values.append(value)
}
XCTAssertEqual(keys, ["a", "b", "c"])
XCTAssertEqual(values, [1, 2, 3])
}
}
@@ -0,0 +1,43 @@
import Foundation
import OrderedDictionary
import XCTest
class CapacityTests: XCTestCase {
func testCapacityReservationViaInit() {
let orderedDictionary = OrderedDictionary<String, Int>(minimumCapacity: 10)
XCTAssertGreaterThanOrEqual(orderedDictionary.capacity, 10)
}
func testCapacityReservationViaMethod() {
var orderedDictionary = OrderedDictionary<String, Int>()
XCTAssertEqual(orderedDictionary.capacity, 0)
orderedDictionary.reserveCapacity(10)
XCTAssertGreaterThanOrEqual(orderedDictionary.capacity, 10)
XCTAssertLessThan(orderedDictionary.capacity, 20)
orderedDictionary.reserveCapacity(20)
XCTAssertGreaterThanOrEqual(orderedDictionary.capacity, 20)
}
func testCapacityGrowForElementInsertion() {
var orderedDictionary = OrderedDictionary<String, Int>()
XCTAssertEqual(orderedDictionary.capacity, 0)
orderedDictionary["a"] = 1
XCTAssertEqual(orderedDictionary.capacity, 1)
orderedDictionary["b"] = 2
orderedDictionary["a"] = 3
XCTAssertEqual(orderedDictionary.capacity, 2)
}
}
@@ -0,0 +1,40 @@
import Foundation
import OrderedDictionary
import XCTest
class CodingTests: XCTestCase {
func testEncodingAndDecodingViaJSON() throws {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let jsonEncoder = JSONEncoder()
let data = try jsonEncoder.encode(orderedDictionary)
let actualString = String(data: data, encoding: .utf8)
let expectedString = "[\"a\",1,\"b\",2,\"c\",3]"
XCTAssertEqual(actualString, expectedString)
let jsonDecoder = JSONDecoder()
let actual = try jsonDecoder.decode(OrderedDictionary<String, Int>.self, from: data)
let expected = orderedDictionary
XCTAssertEqual(actual, expected)
}
func testEncodingAndDecodingViaPropertyList() throws {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let plistEncoder = PropertyListEncoder()
let data = try plistEncoder.encode(orderedDictionary)
let plistDecoder = PropertyListDecoder()
let actual = try plistDecoder.decode(OrderedDictionary<String, Int>.self, from: data)
let expected = orderedDictionary
XCTAssertEqual(actual, expected)
}
}
@@ -0,0 +1,49 @@
import Foundation
import OrderedDictionary
import XCTest
struct DescribedValue: CustomStringConvertible, CustomDebugStringConvertible {
init(_ value: Int) { self.value = value }
let value: Int
var description: String { return "\(value)" }
var debugDescription: String { return "debug(\(value))" }
}
class DescriptionTests: XCTestCase {
func testEmptyDescription() {
let orderedDictionary = OrderedDictionary<String, DescribedValue>()
XCTAssertEqual(orderedDictionary.description, "[:]")
}
func testDescription() {
let orderedDictionary: OrderedDictionary = [
"a": DescribedValue(1),
"b": DescribedValue(2),
"c": DescribedValue(3)
]
XCTAssertEqual(orderedDictionary.description, "[a: 1, b: 2, c: 3]")
}
func testEmptyDebugDescription() {
let orderedDictionary = OrderedDictionary<String, DescribedValue>()
XCTAssertEqual(orderedDictionary.debugDescription, "[:]")
}
func testDebugDescription() {
let orderedDictionary: OrderedDictionary = [
"a": DescribedValue(1),
"b": DescribedValue(2),
"c": DescribedValue(3)
]
XCTAssertEqual(
orderedDictionary.debugDescription,
"[\"a\": debug(1), \"b\": debug(2), \"c\": debug(3)]"
)
}
}
@@ -0,0 +1,92 @@
import Foundation
import OrderedDictionary
import XCTest
class InitializationTests: XCTestCase {
func testInitializationFromArrayLiteral() {
let actual: OrderedDictionary = [
("a", 1),
("b", 2),
("c", 3)
]
let expected = OrderedDictionary(uniqueKeysWithValues: [
(key: "a", value: 1),
(key: "b", value: 2),
(key: "c", value: 3)
])
XCTAssertEqual(actual, expected)
}
func testInitializationFromDictionaryLiteral() {
let actual: OrderedDictionary = [
"a": 1,
"b": 2,
"c": 3
]
let expected = OrderedDictionary(uniqueKeysWithValues: [
(key: "a", value: 1),
(key: "b", value: 2),
(key: "c", value: 3)
])
XCTAssertEqual(actual, expected)
}
func testInitializationFromValuesAndKeyProviderClosure() {
let actual = OrderedDictionary(
values: [1, 2, 3],
uniquelyKeyedBy: { String($0) }
)
let expected = OrderedDictionary(uniqueKeysWithValues: [
(key: "1", value: 1),
(key: "2", value: 2),
(key: "3", value: 3)
])
XCTAssertEqual(actual, expected)
}
func testInitializationFromValuesAndKeyPath() {
let actual = OrderedDictionary(
values: ["a", "b", "c"],
uniquelyKeyedBy: \.self
)
let expected = OrderedDictionary(uniqueKeysWithValues: [
(key: "a", value: "a"),
(key: "b", value: "b"),
(key: "c", value: "c")
])
XCTAssertEqual(actual, expected)
}
func testInitializationFromUnsortedDictionaryAndSortFunction() {
let actual = OrderedDictionary(
unsorted: [
2: "foo",
1: "bar",
4: "baz",
5: "bat",
3: "bam"
],
areInIncreasingOrder: { $0.key < $1.key }
)
let expected = OrderedDictionary(uniqueKeysWithValues: [
(key: 1, value: "bar"),
(key: 2, value: "foo"),
(key: 3, value: "bam"),
(key: 4, value: "baz"),
(key: 5, value: "bat")
])
XCTAssertEqual(actual, expected)
}
}
@@ -0,0 +1,61 @@
import Foundation
import OrderedDictionary
import XCTest
class InsertionsTests: XCTestCase {
// ============================================================================ //
// MARK: - Index-based Insertion
// ============================================================================ //
func testIndexBasedInsertion_uniqueKey_startIndex() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let newElement = (key: "d", value: 4)
orderedDictionary.insert(newElement, at: 0)
XCTAssertEqual(orderedDictionary, ["d": 4, "a": 1, "b": 2, "c": 3])
}
func testIndexBasedInsertion_uniqueKey_middleIndex() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let newElement = (key: "d", value: 4)
orderedDictionary.insert(newElement, at: 2)
XCTAssertEqual(orderedDictionary, ["a": 1, "b": 2, "d": 4, "c": 3])
}
func testIndexBasedInsertion_uniqueKey_endIndex() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let newElement = (key: "d", value: 4)
orderedDictionary.insert(newElement, at: 3)
XCTAssertEqual(orderedDictionary, ["a": 1, "b": 2, "c": 3, "d": 4])
}
func testIndexBasedInsertion_duplicateKey() {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
XCTAssertFalse(orderedDictionary.canInsert(key: "a"))
XCTAssertTrue(orderedDictionary.canInsert(key: "d"))
}
func testIndexBasedInsertion_invalidIndex() {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
XCTAssertFalse(orderedDictionary.canInsert(at: -1))
XCTAssertFalse(orderedDictionary.canInsert(at: 4))
}
// ============================================================================ //
// MARK: - Key-based Insertion
// ============================================================================ //
func testKeyBasedInsertion() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
orderedDictionary["d"] = 4
XCTAssertEqual(orderedDictionary, ["a": 1, "b": 2, "c": 3, "d": 4])
}
}
@@ -0,0 +1,34 @@
import Foundation
import OrderedDictionary
import XCTest
class MapFilterTests: XCTestCase {
func testMapValues() {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
XCTAssertEqual(
orderedDictionary.mapValues { String($0) },
["a": "1", "b": "2", "c": "3", "d": "4"]
)
}
func testCompactMapValues() {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
XCTAssertEqual(
orderedDictionary.compactMapValues { $0.isMultiple(of: 2) ? String($0) : nil },
["b": "2", "d": "4"]
)
}
func testFilter() {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
XCTAssertEqual(
orderedDictionary.filter { $0.value.isMultiple(of: 2) },
["b": 2, "d": 4]
)
}
}
@@ -0,0 +1,152 @@
import Foundation
import OrderedDictionary
import XCTest
class RemovalTests: XCTestCase {
// ============================================================================ //
// MARK: - Key-based Removal Via removeValue(forKey:)
// ============================================================================ //
func testKeyBasedRemoval_viaMethod_existingKey() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let value = orderedDictionary.removeValue(forKey: "b")
XCTAssertEqual(value, 2)
XCTAssertEqual(orderedDictionary, ["a": 1, "c": 3])
}
func testKeyBasedRemoval_viaMethod_invalidKey() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let value = orderedDictionary.removeValue(forKey: "d")
XCTAssertNil(value)
XCTAssertEqual(orderedDictionary, ["a": 1, "b": 2, "c": 3])
}
// ============================================================================ //
// MARK: - Key-based Removal Via subscript(key:)
// ============================================================================ //
func testKeyBasedRemoval_viaSubscript_existingKey() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
orderedDictionary["b"] = nil
XCTAssertEqual(orderedDictionary, ["a": 1, "c": 3])
}
func testKeyBasedRemoval_viaSubscript_invalidKey() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
orderedDictionary["d"] = nil
XCTAssertEqual(orderedDictionary, ["a": 1, "b": 2, "c": 3])
}
// ============================================================================ //
// MARK: - Index-based Removal Via Method
// ============================================================================ //
func testIndexBasedRemoval_viaMethod_validIndex() throws {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let (key, value) = try XCTUnwrap(orderedDictionary.remove(at: 2))
XCTAssertEqual(key, "c")
XCTAssertEqual(value, 3)
XCTAssertEqual(orderedDictionary, ["a": 1, "b": 2])
}
func testIndexBasedRemoval_viaMethod_invalidIndex() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let element = orderedDictionary.remove(at: 5)
XCTAssertNil(element)
XCTAssertEqual(orderedDictionary, ["a": 1, "b": 2, "c": 3])
}
// ============================================================================ //
// MARK: - Remove All
// ============================================================================ //
func testRemoveAll() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
orderedDictionary.removeAll()
XCTAssertEqual(orderedDictionary, [])
}
// ============================================================================ //
// MARK: - Pop First & Last
// ============================================================================ //
func testPopFirstEmpty() {
var orderedDictionary: OrderedDictionary<String, Int> = []
let first = orderedDictionary.popFirst()
XCTAssertNil(first)
}
func testPopFirstNonEmpty() throws {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
let first = try XCTUnwrap(orderedDictionary.popFirst())
XCTAssertEqual(first.key, "a")
XCTAssertEqual(first.value, 1)
XCTAssertEqual(orderedDictionary, ["b": 2, "c": 3, "d": 4])
}
func testPopLastEmpty() {
var orderedDictionary: OrderedDictionary<String, Int> = []
let last = orderedDictionary.popLast()
XCTAssertNil(last)
}
func testPopLastNonEmpty() throws {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
let last = try XCTUnwrap(orderedDictionary.popLast())
XCTAssertEqual(last.key, "d")
XCTAssertEqual(last.value, 4)
XCTAssertEqual(orderedDictionary, ["a": 1, "b": 2, "c": 3])
}
// ============================================================================ //
// MARK: - Removal First & Last
// ============================================================================ //
func testRemoveFirstNonEmpty() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
let first = orderedDictionary.removeFirst()
XCTAssertEqual(first.key, "a")
XCTAssertEqual(first.value, 1)
XCTAssertEqual(orderedDictionary, ["b": 2, "c": 3, "d": 4])
}
func testRemoveLastNonEmpty() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
let last = orderedDictionary.removeLast()
XCTAssertEqual(last.key, "d")
XCTAssertEqual(last.value, 4)
XCTAssertEqual(orderedDictionary, ["a": 1, "b": 2, "c": 3])
}
}
@@ -0,0 +1,85 @@
import Foundation
import OrderedDictionary
import XCTest
class ReorderingTests: XCTestCase {
// ============================================================================ //
// MARK: - Reversal
// ============================================================================ //
func testReversal() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
orderedDictionary.reverse()
XCTAssertEqual(orderedDictionary, ["d": 4, "c": 3, "b": 2, "a": 1])
}
func testReversal_throughSlice() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
orderedDictionary[1..<3].reverse()
XCTAssertEqual(orderedDictionary, ["a": 1, "c": 3, "b": 2, "d": 4])
}
// ============================================================================ //
// MARK: - Partitioning
// ============================================================================ //
func testPartitioning() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
let index = orderedDictionary.partition(by: { $0.value.isMultiple(of: 2) })
XCTAssertEqual(index, 2)
XCTAssertEqual(orderedDictionary, ["a": 1, "c": 3, "b": 2, "d": 4])
}
func testPartitioning_throughSlice() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
let index = orderedDictionary[0..<3].partition(by: { !$0.value.isMultiple(of: 2) })
XCTAssertEqual(index, 1)
XCTAssertEqual(orderedDictionary, ["b": 2, "a": 1, "c": 3, "d": 4])
}
// ============================================================================ //
// MARK: - Swapping
// ============================================================================ //
func testSwapAtDifferentIndices() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
orderedDictionary.swapAt(1, 3)
XCTAssertEqual(orderedDictionary, ["a": 1, "d": 4, "c": 3, "b": 2])
}
func testSwapAtSameIndex() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
orderedDictionary.swapAt(0, 0)
XCTAssertEqual(orderedDictionary, ["a": 1, "b": 2, "c": 3, "d": 4])
}
func testSwapAtDifferentIndices_throughSlice() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
orderedDictionary[1..<4].swapAt(1, 3)
XCTAssertEqual(orderedDictionary, ["a": 1, "d": 4, "c": 3, "b": 2])
}
func testSwapAtSameIndex_throughSlice() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3, "d": 4]
orderedDictionary[0..<1].swapAt(0, 0)
XCTAssertEqual(orderedDictionary, ["a": 1, "b": 2, "c": 3, "d": 4])
}
}
@@ -0,0 +1,83 @@
import Foundation
import OrderedDictionary
import XCTest
func sortByValuesAndKeys<Key: Comparable, Value: Comparable>(
element1: (key: Key, value: Value),
element2: (key: Key, value: Value)
) -> Bool {
if element1.value != element2.value {
return element1.value < element2.value
} else {
return element1.key < element2.key
}
}
class SortingTests: XCTestCase {
// ============================================================================ //
// MARK: - Mutating Sort
// ============================================================================ //
func testMutatingSort() {
var orderedDictionary: OrderedDictionary<String, Int> = ["e": 4, "g": 3, "a": 3, "d": 1, "b": 4]
orderedDictionary.sort(by: sortByValuesAndKeys)
XCTAssertEqual(
orderedDictionary,
["d": 1, "a": 3, "g": 3, "b": 4, "e": 4]
)
}
func testMutatingSort_throughSlice() {
var orderedDictionary: OrderedDictionary<String, Int> = ["e": 4, "g": 3, "a": 3, "d": 1, "b": 4]
orderedDictionary[2..<5].sort(by: sortByValuesAndKeys)
XCTAssertEqual(
orderedDictionary,
["e": 4, "g": 3, "d": 1, "a": 3, "b": 4]
)
}
// ============================================================================ //
// MARK: - Non-mutating Sort
// ============================================================================ //
func testSortingWithoutMutation() {
let orderedDictionary: OrderedDictionary<String, Int> = ["e": 4, "g": 3, "a": 3, "d": 1, "b": 4]
XCTAssertEqual(
orderedDictionary.sorted(by: sortByValuesAndKeys),
["d": 1, "a": 3, "g": 3, "b": 4, "e": 4]
)
}
// ============================================================================ //
// MARK: - Sorting Unsorted Dictionary
// ============================================================================ //
func testSortingUnsortedDictionary() {
let dictionary = [
2: "foo",
1: "bar",
4: "baz",
5: "bat",
3: "bam"
]
let actual = dictionary.sorted { $0.key < $1.key }
let expected: OrderedDictionary<Int, String> = [
1: "bar",
2: "foo",
3: "bam",
4: "baz",
5: "bat"
]
XCTAssertEqual(actual, expected)
}
}
@@ -0,0 +1,35 @@
import Foundation
import OrderedDictionary
import XCTest
// See #49
class SubscriptAmbiguityTests: XCTestCase {
func testAccess() {
let orderedDictionary: OrderedDictionary<Int, String> = [1: "a", 2: "b", 3: "c"]
let valueForKey = orderedDictionary[1] as String?
let elementAtIndex = orderedDictionary[1] as (key: Int, value: String)
XCTAssertEqual(valueForKey, "a")
XCTAssertEqual(elementAtIndex.key, 2)
XCTAssertEqual(elementAtIndex.value, "b")
}
func testIndexBasedUpdate() {
var orderedDictionary: OrderedDictionary<Int, String> = [1: "a", 2: "b", 3: "c"]
orderedDictionary[1] = (key: 2, value: "x")
XCTAssertEqual(orderedDictionary, [1: "a", 2: "x", 3: "c"])
}
func testKeyBasedUpdate() {
var orderedDictionary: OrderedDictionary<Int, String> = [1: "a", 2: "b", 3: "c"]
orderedDictionary[1] = "x"
XCTAssertEqual(orderedDictionary, [1: "x", 2: "b", 3: "c"])
}
}
@@ -0,0 +1,124 @@
import Foundation
import OrderedDictionary
import XCTest
class UpdatesTests: XCTestCase {
// ============================================================================ //
// MARK: - Index-based Updates Via update(_:at:)
// ============================================================================ //
func testIndexBasedUpdate_viaMethod_sameKey() throws {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let newElement = (key: "b", value: 0)
let previousElement = try XCTUnwrap(orderedDictionary.update(newElement, at: 1))
XCTAssertEqual(orderedDictionary, ["a": 1, "b": 0, "c": 3])
XCTAssertEqual(previousElement.key, "b")
XCTAssertEqual(previousElement.value, 2)
}
func testIndexBasedUpdate_viaMethod_newUniqueKey() throws {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let newElement = (key: "d", value: 0)
let previousElement = try XCTUnwrap(orderedDictionary.update(newElement, at: 1))
XCTAssertEqual(orderedDictionary, ["a": 1, "d": 0, "c": 3])
XCTAssertEqual(previousElement.key, "b")
XCTAssertEqual(previousElement.value, 2)
}
func testIndexBasedUpdate_viaMethod_duplicateKey() {
let orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let element = (key: "a", value: 42)
XCTAssertTrue(orderedDictionary.canUpdate(element, at: 0))
XCTAssertFalse(orderedDictionary.canUpdate(element, at: 1))
XCTAssertFalse(orderedDictionary.canUpdate(element, at: 2))
}
// ============================================================================ //
// MARK: - Index-based Updates Via subscript(position:)
// ============================================================================ //
func testIndexBasedUpdate_viaSubscriptSingle_sameKey() throws {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
orderedDictionary[1] = (key: "b", value: 0)
XCTAssertEqual(orderedDictionary, ["a": 1, "b": 0, "c": 3])
}
func testIndexBasedUpdate_viaSubscriptSingle_newUniqueKey() throws {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
orderedDictionary[1] = (key: "d", value: 0)
XCTAssertEqual(orderedDictionary, ["a": 1, "d": 0, "c": 3])
}
// ============================================================================ //
// MARK: - Index-based Updates Via subscript(bounds:)
// ============================================================================ //
func testIndexBasedUpdate_viaSubscriptMultiple_newUniqueKeys() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let sliceOrderedDictionary: OrderedDictionary<String, Int> = ["d": 0, "e": 0]
let slice = sliceOrderedDictionary[0..<2]
orderedDictionary[1..<3] = slice
XCTAssertEqual(orderedDictionary, ["a": 1, "d": 0, "e": 0])
}
func testIndexBasedUpdate_viaSubscriptMultiple_sameKeys() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let sliceOrderedDictionary: OrderedDictionary<String, Int> = ["c": 0, "b": 0]
let slice = sliceOrderedDictionary[0..<2]
orderedDictionary[1..<3] = slice
XCTAssertEqual(orderedDictionary, ["a": 1, "c": 0, "b": 0])
}
func testIndexBasedUpdate_viaSubscriptMultiple_mixedKeys() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
let sliceOrderedDictionary: OrderedDictionary<String, Int> = ["d": 0, "c": 0]
let slice = sliceOrderedDictionary[0..<2]
orderedDictionary[1..<3] = slice
XCTAssertEqual(orderedDictionary, ["a": 1, "d": 0, "c": 0])
}
// ============================================================================ //
// MARK: - Key-based Updates
// ============================================================================ //
func testKeyBasedUpdate() {
var orderedDictionary: OrderedDictionary<String, Int> = ["a": 1, "b": 2, "c": 3]
// Update
orderedDictionary["a"] = 5
XCTAssertEqual(orderedDictionary, ["a": 5, "b": 2, "c": 3])
// Insertion
orderedDictionary["d"] = 10
XCTAssertEqual(orderedDictionary, ["a": 5, "b": 2, "c": 3, "d": 10])
XCTAssertTrue(orderedDictionary.containsKey("d"))
// Removal
orderedDictionary["b"] = nil
XCTAssertEqual(orderedDictionary, ["a": 5, "c": 3, "d": 10])
XCTAssertFalse(orderedDictionary.containsKey("b"))
}
}
@@ -0,0 +1,18 @@
// https://github.com/realm/SwiftLint/pull/2965
// https://bugs.swift.org/browse/SR-11501
#if compiler(<5.1) || (SWIFT_PACKAGE && os(macOS))
internal enum UnwrapError: Error {
case missingValue
}
internal func XCTUnwrap<T>(
_ expression: @autoclosure () throws -> T?,
_ message: @autoclosure () -> String = ""
) throws -> T {
if let value = try expression() {
return value
} else {
throw UnwrapError.missingValue
}
}
#endif
@@ -0,0 +1,183 @@
#if !canImport(ObjectiveC)
import XCTest
extension AccessTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__AccessTests = [
("testAccessBasic", testAccessBasic),
("testAccessElementAtInvalidIndex", testAccessElementAtInvalidIndex),
("testAccessOrderedKeys", testAccessOrderedKeys),
("testAccessOrderedValues", testAccessOrderedValues),
("testAccessSlice", testAccessSlice),
("testAccessUnsortedDictionary", testAccessUnsortedDictionary),
("testIteratorInForLoop", testIteratorInForLoop),
]
}
extension CapacityTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__CapacityTests = [
("testCapacityGrowForElementInsertion", testCapacityGrowForElementInsertion),
("testCapacityReservationViaInit", testCapacityReservationViaInit),
("testCapacityReservationViaMethod", testCapacityReservationViaMethod),
]
}
extension CodingTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__CodingTests = [
("testEncodingAndDecodingViaJSON", testEncodingAndDecodingViaJSON),
("testEncodingAndDecodingViaPropertyList", testEncodingAndDecodingViaPropertyList),
]
}
extension DescriptionTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__DescriptionTests = [
("testDebugDescription", testDebugDescription),
("testDescription", testDescription),
("testEmptyDebugDescription", testEmptyDebugDescription),
("testEmptyDescription", testEmptyDescription),
]
}
extension InitializationTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__InitializationTests = [
("testInitializationFromArrayLiteral", testInitializationFromArrayLiteral),
("testInitializationFromDictionaryLiteral", testInitializationFromDictionaryLiteral),
("testInitializationFromUnsortedDictionaryAndSortFunction", testInitializationFromUnsortedDictionaryAndSortFunction),
("testInitializationFromValuesAndKeyPath", testInitializationFromValuesAndKeyPath),
("testInitializationFromValuesAndKeyProviderClosure", testInitializationFromValuesAndKeyProviderClosure),
]
}
extension InsertionsTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__InsertionsTests = [
("testIndexBasedInsertion_duplicateKey", testIndexBasedInsertion_duplicateKey),
("testIndexBasedInsertion_invalidIndex", testIndexBasedInsertion_invalidIndex),
("testIndexBasedInsertion_uniqueKey_endIndex", testIndexBasedInsertion_uniqueKey_endIndex),
("testIndexBasedInsertion_uniqueKey_middleIndex", testIndexBasedInsertion_uniqueKey_middleIndex),
("testIndexBasedInsertion_uniqueKey_startIndex", testIndexBasedInsertion_uniqueKey_startIndex),
("testKeyBasedInsertion", testKeyBasedInsertion),
]
}
extension MapFilterTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__MapFilterTests = [
("testCompactMapValues", testCompactMapValues),
("testFilter", testFilter),
("testMapValues", testMapValues),
]
}
extension RemovalTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__RemovalTests = [
("testIndexBasedRemoval_viaMethod_invalidIndex", testIndexBasedRemoval_viaMethod_invalidIndex),
("testIndexBasedRemoval_viaMethod_validIndex", testIndexBasedRemoval_viaMethod_validIndex),
("testKeyBasedRemoval_viaMethod_existingKey", testKeyBasedRemoval_viaMethod_existingKey),
("testKeyBasedRemoval_viaMethod_invalidKey", testKeyBasedRemoval_viaMethod_invalidKey),
("testKeyBasedRemoval_viaSubscript_existingKey", testKeyBasedRemoval_viaSubscript_existingKey),
("testKeyBasedRemoval_viaSubscript_invalidKey", testKeyBasedRemoval_viaSubscript_invalidKey),
("testPopFirstEmpty", testPopFirstEmpty),
("testPopFirstNonEmpty", testPopFirstNonEmpty),
("testPopLastEmpty", testPopLastEmpty),
("testPopLastNonEmpty", testPopLastNonEmpty),
("testRemoveAll", testRemoveAll),
("testRemoveFirstNonEmpty", testRemoveFirstNonEmpty),
("testRemoveLastNonEmpty", testRemoveLastNonEmpty),
]
}
extension ReorderingTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__ReorderingTests = [
("testPartitioning", testPartitioning),
("testPartitioning_throughSlice", testPartitioning_throughSlice),
("testReversal", testReversal),
("testReversal_throughSlice", testReversal_throughSlice),
("testSwapAtDifferentIndices", testSwapAtDifferentIndices),
("testSwapAtDifferentIndices_throughSlice", testSwapAtDifferentIndices_throughSlice),
("testSwapAtSameIndex", testSwapAtSameIndex),
("testSwapAtSameIndex_throughSlice", testSwapAtSameIndex_throughSlice),
]
}
extension SortingTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__SortingTests = [
("testMutatingSort", testMutatingSort),
("testMutatingSort_throughSlice", testMutatingSort_throughSlice),
("testSortingUnsortedDictionary", testSortingUnsortedDictionary),
("testSortingWithoutMutation", testSortingWithoutMutation),
]
}
extension SubscriptAmbiguityTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__SubscriptAmbiguityTests = [
("testAccess", testAccess),
("testIndexBasedUpdate", testIndexBasedUpdate),
("testKeyBasedUpdate", testKeyBasedUpdate),
]
}
extension UpdatesTests {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__UpdatesTests = [
("testIndexBasedUpdate_viaMethod_duplicateKey", testIndexBasedUpdate_viaMethod_duplicateKey),
("testIndexBasedUpdate_viaMethod_newUniqueKey", testIndexBasedUpdate_viaMethod_newUniqueKey),
("testIndexBasedUpdate_viaMethod_sameKey", testIndexBasedUpdate_viaMethod_sameKey),
("testIndexBasedUpdate_viaSubscriptMultiple_mixedKeys", testIndexBasedUpdate_viaSubscriptMultiple_mixedKeys),
("testIndexBasedUpdate_viaSubscriptMultiple_newUniqueKeys", testIndexBasedUpdate_viaSubscriptMultiple_newUniqueKeys),
("testIndexBasedUpdate_viaSubscriptMultiple_sameKeys", testIndexBasedUpdate_viaSubscriptMultiple_sameKeys),
("testIndexBasedUpdate_viaSubscriptSingle_newUniqueKey", testIndexBasedUpdate_viaSubscriptSingle_newUniqueKey),
("testIndexBasedUpdate_viaSubscriptSingle_sameKey", testIndexBasedUpdate_viaSubscriptSingle_sameKey),
("testKeyBasedUpdate", testKeyBasedUpdate),
]
}
public func __allTests() -> [XCTestCaseEntry] {
return [
testCase(AccessTests.__allTests__AccessTests),
testCase(CapacityTests.__allTests__CapacityTests),
testCase(CodingTests.__allTests__CodingTests),
testCase(DescriptionTests.__allTests__DescriptionTests),
testCase(InitializationTests.__allTests__InitializationTests),
testCase(InsertionsTests.__allTests__InsertionsTests),
testCase(MapFilterTests.__allTests__MapFilterTests),
testCase(RemovalTests.__allTests__RemovalTests),
testCase(ReorderingTests.__allTests__ReorderingTests),
testCase(SortingTests.__allTests__SortingTests),
testCase(SubscriptAmbiguityTests.__allTests__SubscriptAmbiguityTests),
testCase(UpdatesTests.__allTests__UpdatesTests),
]
}
#endif