Skip to content

Commit

Permalink
Merge pull request #296 from acecilia/feature/swift-package-manager
Browse files Browse the repository at this point in the history
Added full support for the swift package manager
  • Loading branch information
k0nserv authored Dec 5, 2019
2 parents 9cfbd12 + 1a6c155 commit 4010938
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
29 changes: 18 additions & 11 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
// Copyright 2016 Skyscanner Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
// on an "AS IS" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
// swift-tools-version:5.1

import PackageDescription

let package = Package(
name: "SkyFloatingLabelTextField"
name: "SkyFloatingLabelTextField",
platforms: [.iOS("8.0")],
products: [
.library(name: "SkyFloatingLabelTextField", targets: ["SkyFloatingLabelTextField"])
],
targets: [
.target(
name: "SkyFloatingLabelTextField",
path: "Sources"
),
.testTarget(
name: "SkyFloatingLabelTextFieldTests",
dependencies: ["SkyFloatingLabelTextField"],
path: "SkyFloatingLabelTextField/SkyFloatingLabelTextFieldTests"
),
],
swiftLanguageVersions: [.v4_2]
)
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@ class SkyFloatingLabelTextFieldWithIconTests: XCTestCase {
}

func test_whenSettingIconImage_thenImageAppliedToIconImageView() {
// given
let customImage = UIImage()

// when
floatingLabelTextFieldWithIcon.iconImage = #imageLiteral(resourceName: "SkyScannerIcon")
floatingLabelTextFieldWithIcon.iconImage = customImage

// then
XCTAssertEqual(floatingLabelTextFieldWithIcon.iconImageView.image, #imageLiteral(resourceName: "SkyScannerIcon"))
XCTAssertEqual(floatingLabelTextFieldWithIcon.iconImageView.image, customImage)
}

func test_whenSettingIconColor_thenColorAppliedToIconLabel() {
Expand Down

0 comments on commit 4010938

Please sign in to comment.