From 1a6c155e65ccc6e9c304f48f9602c71003862ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81s=20Cecilia=20Luque?= Date: Sun, 1 Sep 2019 15:40:37 +0200 Subject: [PATCH] Added full support for the swift package manager --- Package.swift | 29 ++++++++++++------- ...yFloatingLabelTextFieldWithIconTests.swift | 7 +++-- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/Package.swift b/Package.swift index 33f7e03..ca8434a 100644 --- a/Package.swift +++ b/Package.swift @@ -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] ) diff --git a/SkyFloatingLabelTextField/SkyFloatingLabelTextFieldTests/SkyFloatingLabelTextFieldWithIconTests.swift b/SkyFloatingLabelTextField/SkyFloatingLabelTextFieldTests/SkyFloatingLabelTextFieldWithIconTests.swift index 3e13abe..bbfeec7 100644 --- a/SkyFloatingLabelTextField/SkyFloatingLabelTextFieldTests/SkyFloatingLabelTextFieldWithIconTests.swift +++ b/SkyFloatingLabelTextField/SkyFloatingLabelTextFieldTests/SkyFloatingLabelTextFieldWithIconTests.swift @@ -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() {