Skip to content

Commit

Permalink
update: support on swift5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wzxha committed Apr 8, 2019
1 parent c316201 commit 6c39e65
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
11 changes: 6 additions & 5 deletions Sdifft.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
LastUpgradeCheck = 9999;
TargetAttributes = {
"Sdifft::SdifftTests" = {
LastSwiftMigration = 1000;
LastSwiftMigration = 1020;
};
};
};
Expand All @@ -201,6 +201,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = OBJ_5;
Expand Down Expand Up @@ -295,7 +296,7 @@
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGET_NAME = Sdifft;
};
name = Debug;
Expand All @@ -320,7 +321,7 @@
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGET_NAME = Sdifft;
};
name = Release;
Expand Down Expand Up @@ -392,7 +393,7 @@
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGET_NAME = SdifftTests;
};
name = Debug;
Expand All @@ -411,7 +412,7 @@
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGET_NAME = SdifftTests;
};
name = Release;
Expand Down
8 changes: 4 additions & 4 deletions Tests/SdifftTests/NSAttributedString+DiffTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ extension NSAttributedString {

class NSAttributedStringDiffTests: XCTestCase {
let insertAttributes: [NSAttributedString.Key: Any] = [
.backgroundColor: UIColor.green
.backgroundColor: Color.green
]

let deleteAttributes: [NSAttributedString.Key: Any] = [
.backgroundColor: UIColor.red,
.backgroundColor: Color.red,
.strikethroughStyle: NSUnderlineStyle.single.rawValue,
.strikethroughColor: UIColor.red,
.strikethroughColor: Color.red,
.baselineOffset: 0
]

let sameAttributes: [NSAttributedString.Key: Any] = [
.foregroundColor: UIColor.black
.foregroundColor: Color.black
]

func testAttributedString() {
Expand Down

0 comments on commit 6c39e65

Please sign in to comment.