Skip to content

Commit

Permalink
Add tests for Issue #10
Browse files Browse the repository at this point in the history
  • Loading branch information
Francescu committed Apr 10, 2018
1 parent 7b12928 commit 1c631dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SmileTests/Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ class Tests: XCTestCase {
XCTAssertEqual(Smile.extractEmojis(string: "Find the solos ⌨️ and ⭐️"), "⌨️⭐️")
XCTAssertEqual(Smile.extractEmojis(string: "Find the 👨‍✈️👨‍🏫💂 and 👨‍💻"), "👨‍✈️👨‍🏫💂👨‍💻")
XCTAssertEqual(Smile.extractEmojis(string: "⌚️"), "⌚️")
XCTAssertEqual(Smile.extractEmojis(string: "Hello ⏰⌛️💳 and 🆙."), "⏰⌛️💳🆙")
}

func testRemoveEmoji() {
XCTAssertEqual(Smile.removeEmojis(string: "Find 🔑and🔎"), "Find and")
XCTAssertEqual(Smile.removeEmojis(string: "Remove the 👨‍🏫"), "Remove the ")
XCTAssertEqual(Smile.removeEmojis(string: "🥑🦈🏍🛴🤡🦋🥚🦐🦑👰🇬🇧🎅🤑👍🏿☔️☂️☃️☀️❗️💀☠️⚔️⚖️☁️"), "")
XCTAssertEqual(Smile.removeEmojis(string: "⏰⌛️💳🆙"), "")

// Variation selectors
XCTAssertEqual(Smile.removeEmojis(string: "👨‍✈️⚔️"), "")
Expand Down

0 comments on commit 1c631dd

Please sign in to comment.