Sha256: a871e2b0b1f6a2c719eb50b202baa23d72bd61b850307c599646e9bad7fa31ee
Contents?: true
Size: 1.68 KB
Versions: 188
Compression:
Stored size: 1.68 KB
Contents
import XCTest @testable import ScrabbleScore class ScrabbleScoreTests: XCTestCase { func testEmptyWordScoresZero() { XCTAssertEqual( 0, Scrabble("").score) } func testWhitespaceScoresZero() { XCTAssertEqual( 0, Scrabble(" \t\n").score) } func testNilScoresZero() { XCTAssertEqual( 0, Scrabble(nil).score) } func testScoresVeryShortWord() { XCTAssertEqual( 1, Scrabble("a").score) } func testScoresOtherVeryShortWord() { XCTAssertEqual( 4, Scrabble("f").score) } func testSimpleWordScoresTheNumberOfLetters() { XCTAssertEqual( 6, Scrabble("street").score) } func testComplicatedWordScoresMore() { XCTAssertEqual( 22, Scrabble("quirky").score) } func testScoresAreCaseInsensitive() { XCTAssertEqual( 41, Scrabble("OXYPHENBUTAZONE").score) } func testScoringUtility() { XCTAssertEqual( 13, Scrabble.score("alacrity")) } static var allTests: [(String, (ScrabbleScoreTests) -> () throws -> Void)] { return [ ("testEmptyWordScoresZero", testEmptyWordScoresZero), ("testWhitespaceScoresZero", testWhitespaceScoresZero), ("testNilScoresZero", testNilScoresZero), ("testScoresVeryShortWord", testScoresVeryShortWord), ("testScoresOtherVeryShortWord", testScoresOtherVeryShortWord), ("testSimpleWordScoresTheNumberOfLetters", testSimpleWordScoresTheNumberOfLetters), ("testComplicatedWordScoresMore", testComplicatedWordScoresMore), ("testScoresAreCaseInsensitive", testScoresAreCaseInsensitive), ("testScoringUtility", testScoringUtility), ] } }
Version data entries
188 entries across 188 versions & 1 rubygems