/* scales_tests.pl Author: Gimenez, Christian. Copyright (C) 2025 Gimenez, Christian This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . 2025-10-12 */ :- module(scales_tests, [ ]). /** scale_tests: @author Christian Gimenez @license GPLv3 */ :- use_module(library(music/scales)). :- begin_tests(scales, []). test(scale_major) :- scale(major, c, [c, d, e, f, g, a, b, c]). test(scale_minor) :- scale(minor, a, [a, b, c, d, e, f, g, a]). test(tonic) :- tonic([c, d, e, f, g, a, b, c], R), R = c. test(supertonic) :- supertonic([c, d, e, f, g, a, b, c], R), R = d. test(mediant) :- mediant([c, d, e, f, g, a, b, c], R), R = e. test(subdominant) :- subdominant([c, d, e, f, g, a, b, c], R), R = f. test(dominant) :- dominant([c, d, e, f, g, a, b, c], R), R = g. test(submediant) :- submediant([c, d, e, f, g, a, b, c], R), R = a. test(leading) :- leading([c, d, e, f, g, a, b, c], R), R = b. test(arpeggio_major) :- arpeggio(major, c, R), R = [c, e, g]. test(arpeggio_minor) :- arpeggio(minor, a, R), R = [a, c, e]. :- end_tests(scales).