Skip to content

Commit

Permalink
Added Flat Five to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aure committed Apr 11, 2024
1 parent 7f3e770 commit 255aa20
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Tests/TonicTests/ChordTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,17 @@ class ChordTests: XCTestCase {

XCTAssertEqual(Chord.Asus2.description, "Asus2")
XCTAssertEqual(Chord.Bsus2.description, "Bsus2")

XCTAssertEqual(Chord.Bsus2.description, "Bsus2")
}


func testFlatFive() {
let notes: [Int8] = [60, 64, 66]
let pitchSet = PitchSet(pitches: notes.map { Pitch($0) } )
let cb5 = Chord.getRankedChords(from: pitchSet)
XCTAssertEqual(cb5.map { $0.description }, ["C♭5"])
}

func testC7() {
XCTAssertEqual(Chord(.C, type: .dominantSeventh).description, "C7")
let notes: [Int8] = [60, 67, 70, 76]
Expand Down

0 comments on commit 255aa20

Please sign in to comment.