Sha256: 1768afbd909ee156d4f45e60781de591928349a88b37094e2e35652107828d42
Contents?: true
Size: 1.02 KB
Versions: 325
Compression:
Stored size: 1.02 KB
Contents
import XCTest @testable import PerfectNumbers class PerfectNumbersTests: XCTestCase { func testPerfect() { let numberClassifier = NumberClassifier(number: 6) XCTAssertEqual([.perfect], [numberClassifier.classification]) } func testPerfectAgain() { let numberClassifier = NumberClassifier(number: 28) XCTAssertEqual([.perfect], [numberClassifier.classification]) } func testDeficient() { let numberClassifier = NumberClassifier(number: 13) XCTAssertEqual([.deficient], [numberClassifier.classification]) } func testAbundant() { let numberClassifier = NumberClassifier(number: 12) XCTAssertEqual([.abundant], [numberClassifier.classification]) } static var allTests: [(String, (PerfectNumbersTests) -> () throws -> Void)] { return [ ("testPerfect", testPerfect), ("testPerfectAgain", testPerfectAgain), ("testDeficient", testDeficient), ("testAbundant", testAbundant), ] } }
Version data entries
325 entries across 325 versions & 1 rubygems