Skip to content

Commit

Permalink
test(intervals): add test cases for isCompound, simplified getters
Browse files Browse the repository at this point in the history
  • Loading branch information
albertms10 committed Apr 10, 2023
1 parent 69b829f commit 518c356
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/src/interval/intervals_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,25 @@ void main() {
expect(Intervals.thirteenth.isPerfect, isFalse);
});
});

group('.isCompound', () {
test('should return whether this Intervals enum item is compound', () {
expect(Intervals.unison.isCompound, isFalse);
expect(Intervals.fifth.isCompound, isFalse);
expect(Intervals.octave.isCompound, isFalse);
expect(Intervals.ninth.isCompound, isTrue);
expect(Intervals.thirteenth.isCompound, isTrue);
});
});

group('.simplified', () {
test('should return the simplified Intervals enum item', () {
expect(Intervals.second.simplified, Intervals.second);
expect(Intervals.fourth.simplified, Intervals.fourth);
expect(Intervals.octave.simplified, Intervals.octave);
expect(Intervals.tenth.simplified, Intervals.third);
expect(Intervals.thirteenth.simplified, Intervals.sixth);
});
});
});
}

0 comments on commit 518c356

Please sign in to comment.