Skip to content

Commit

Permalink
Merge pull request #74 from seedco/dm-swift-5
Browse files Browse the repository at this point in the history
Update to Swift 5
  • Loading branch information
mckaskle authored Nov 4, 2019
2 parents 2410e84 + 3f8899d commit 4746834
Show file tree
Hide file tree
Showing 156 changed files with 3,356 additions and 1,550 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build-and-test:

macos:
xcode: 9.3.1
xcode: 11.1.0

steps:
- checkout
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# [Unreleased]
# [0.6.0]
## Changed
- Update to Swift 5.0 ([@mckaskle])

# [0.5.0]

Expand Down Expand Up @@ -34,11 +37,13 @@

## Fixed

[Unreleased]: https://github.com/seedco/formalist/compare/0.5.0...HEAD
[Unreleased]: https://github.com/seedco/formalist/compare/0.6.0...HEAD
[0.6.0]: https://github.com/seedco/formalist/compare/0.5.0...0.6.0
[0.5.0]: https://github.com/seedco/formalist/compare/0.4.1...0.5.0
[0.4.1]: https://github.com/seedco/formalist/compare/0.4.0...0.5.0
[0.4.0]: https://github.com/seedco/formalist/compare/0.3.3...0.4.0

[@klaaspieter]: https://github.com/klaaspieter
[@lsavino]: https://github.com/lsavino
[@mckaskle]: https://github.com/mckaskle
[@vikmeup]: https://github.com/vikmeup
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "seedco/stackviewcontroller" ~> 0.4
github "seedco/stackviewcontroller" ~> 0.5
2 changes: 1 addition & 1 deletion Cartfile.private
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "facebookarchive/ios-snapshot-test-case"
github "uber/ios-snapshot-test-case"
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "facebookarchive/ios-snapshot-test-case" "2.1.4"
github "seedco/stackviewcontroller" "0.4.1"
github "seedco/stackviewcontroller" "0.5.0"
github "uber/ios-snapshot-test-case" "6.2.0"
73 changes: 73 additions & 0 deletions Carthage/Checkouts/ios-snapshot-test-case/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -1
ConstructorInitializerIndentWidth: 4

AlignAfterOpenBracket: true
AlignEscapedNewlinesLeft: true
AlignOperands: false
AlignTrailingComments: true

AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortLoopsOnASingleLine: true

AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakTemplateDeclarations: false
AlwaysBreakBeforeMultilineStrings: false

BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false

BinPackArguments: true
BinPackParameters: true
ColumnLimit: 0
ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerAlignment: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
MaxEmptyLinesToKeep: 2
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: Inner
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
ObjCBlockIndentWidth: 4
PenaltyBreakBeforeFirstCallParameter: 10000
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Right
SpacesBeforeTrailingComments: 1
Cpp11BracedListStyle: true
Standard: Auto
IndentWidth: 4
TabWidth: 8
UseTab: Never
BreakBeforeBraces: Linux

SpacesInParentheses: false
SpacesInSquareBrackets: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterCStyleCast: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true

ContinuationIndentWidth: 4
CommentPragmas: '^ IWYU pragma:'
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens: ControlStatements
DisableFormat: false
ObjCDontBreakBeforeNestedBlockParam: true
...
5 changes: 4 additions & 1 deletion Carthage/Checkouts/ios-snapshot-test-case/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ DerivedData
.idea/
*.hmap
*.xccheckout
Pods
Pods
FBSnapshotTestCaseDemo/FBSnapshotTestCaseDemoTests/FailedSnapshotImages
iOSSnapshotTestCaseCarthageDemo/Carthage/Checkouts
iOSSnapshotTestCaseCarthageDemo/Carthage/Build
6 changes: 3 additions & 3 deletions Carthage/Checkouts/ios-snapshot-test-case/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: objective-c
osx_image: xcode8
osx_image: xcode11.1
before_script:
- gem install cocoapods -v 1.0.0 --no-ri --no-rdoc
- gem install cocoapods -v 1.8.3 --no-document
script:
./build.sh
travis_wait 30 ./build.sh
76 changes: 71 additions & 5 deletions Carthage/Checkouts/ios-snapshot-test-case/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,75 @@

All notable changes to this project will be documented in this file.

## 6.2.0

- Fixed issue where images without the screen scale in the file name were failing. ([#100](https://github.com/uber/ios-snapshot-test-case/pull/100))
- Add convenience FBSnapshotVerifyViewController() function for Swift users ([#101](https://github.com/uber/ios-snapshot-test-case/pull/101))
- Updated for Xcode 11.1 and Swift 5.1.

## 6.1.0

- Added support for Xcode 9 attachments. ([#86](https://github.com/uber/ios-snapshot-test-case/pull/86))
- Updated the default suffixes to only contain the currently targetted architecture. ([#87](https://github.com/uber/ios-snapshot-test-case/pull/87))
- Use [UIGraphicsImageRenderer](https://developer.apple.com/documentation/uikit/uigraphicsimagerenderer) to generate the image for a UIView instead of a custom graphics context ([#95](https://github.com/uber/ios-snapshot-test-case/pull/95))
- Use the main screen instead of the key window to calculate the correct size in tests that do not have a host application. ([#79](https://github.com/uber/ios-snapshot-test-case/pull/79))
- Display the correct error message when tests are run in record mode. ([#65](https://github.com/uber/ios-snapshot-test-case/pull/65))
- Updated for Xcode 10.2.1 and Swift 5.0.1.

## 6.0.3

- This is a compatibility release for Swift 5 — we're building the Carthage pre–compiled framework with Xcode 10.2 and the Swift 5 compiler. If you haven't updated to Xcode 10.2, you don't need to worry about this version.

## 6.0.2

- Update for Swift 5 compiler.

## 6.0.0

- We deleted the `agnosticOptions` and `deviceAgnostic` properties. We didn't want to do this initially but we thought it was good to make a clean break from the old properties that had incorrect naming, as well as adding a new property (`fileNameOptions`) that includes screen scale as an option, so users of the library can choose to omit the screen scale from their file names.
- Deployment Target set to iOS 10.0. For our own sanity, we only want to support three major versions of iOS at a time. If you need to support iOS 8 and/or 9, you need to use version 5.0 of the library.

## 5.0.2

- Adds the ability to allow color changes for pixels. You can now set a 'pixel tolerance', which is a percentage for how much of a shift from any given color you allow on a per pixel basis. This can be useful for Xcode upgrades, when you change the iOS version (Base SDK) you use in your Simulator, or even to allow tests to run on multiple iOS versions at the same time. It can be used with `FBSnapshotVerifyViewWithPixelOptions` and `FBSnapshotVerifyLayerWithPixelOptions` (Thanks to @JerryTheIntern).

## 4.0.0

- Adds the ability to override the folder name where snapshots are going to be saved for each test class.
- Support for library test bundles.
- Support for setting `IMAGE_DIFF_DIR` using preprocessor or a property on `FBSnapshotTestController`.
- Formatted the project using clang-format to escape two space indentation hell.
- Added nullability annotations to the entire project to improve portability with Swift and the clang analyzer.
- Deprecated `deviceAgnostic` in favour of `agnosticOptions`.
- Remove dead Swift code in `SwiftSupport.swift`

Apologies for the churn in this version. We realised after we had merged #14 that we broke semantic versioning with `3.1.0` so we unpublished that podspec and then merged all of the breaking changes we had on the backlog that were pressing.

## 3.0.0

- Project has been relicensed to MIT via the original project and Facebook's PATENTS file has been removed with their blessing. Thank you Facebook!
- Deployment Target is now iOS 8.1, Base SDK is 11.2.
- Updated for CocoaPods 1.4.0.

## 2.2.0

- Added ability to have more fine–grained control over snapshot file names using deviceAgnostic with a new flag 'agnosticOptions'.
- Updated for Xcode 9.2 and Swift 4.
- Fixed a bug where the bounds of a snapshot would be incorrect after UIAppearance triggers a change in the intrinsic content size of the UIView being snapshotted.

## 2.1.6

- Fixes to podspec

## 2.1.5

- Project transferred to Uber; license changed from BSD to MIT
- Swift 3.1 support
- Fixed broken FB_REFERENCE_IMAGE_DIR preprocessor macro

## 2.1.4

- Swift 3 suppport (#194)
- Swift 3 support (#194)
- Replace big macro with Objective-C method for easier debugging (#180)

## 2.1.3
Expand Down Expand Up @@ -32,7 +98,7 @@ All notable changes to this project will be documented in this file.
- Added optional tolerance parameter on Swift (#145)
- Added images to comparison errors (#146)
- Fixed build for Xcode 7.3 (#152)

## 2.0.7

- Change FBSnapshotTestController from private to public (#129)
Expand All @@ -59,8 +125,8 @@ All notable changes to this project will be documented in this file.

## 2.0.2

- Fix for retina comparisons (#96)
- Fix for retina comparisons (#96)

## 2.0.1

- Allow usage of Objective-C subspec only, for projects supporting iOS 7 (#93) (Thanks to @x2on)
Expand All @@ -76,6 +142,6 @@ All notable changes to this project will be documented in this file.

## 1.8.0

- The default directories for snapshots images are now **ReferenceImages_32** (32bit) and **ReferenceImages_64** (64bit) and the suffix depends on the architecture when the test is running. (#77)
- The default directories for snapshots images are now **ReferenceImages_32** (32bit) and **ReferenceImages_64** (64bit) and the suffix depends on the architecture when the test is running. (#77)
- If a test fails for a given suffix, it will try to load and compare all other suffixes before failing.
- Added assertion on setRecordMode. (#76)
Loading

0 comments on commit 4746834

Please sign in to comment.