22#include <cxxtest/TestSuite.h>
48 TS_ASSERT_EQUALS(
testMicro->Pinvertupdown, 0);
49 TS_ASSERT_EQUALS(
testMicro->Pinvertupdowncenter, 60);
50 TS_ASSERT_EQUALS(
testMicro->getoctavesize(), 12);
53 TS_ASSERT_EQUALS(
testMicro->PAfreq, 440.0f);
54 TS_ASSERT_EQUALS(
testMicro->Pscaleshift, 64);
55 TS_ASSERT_EQUALS(
testMicro->Pfirstkey, 0);
56 TS_ASSERT_EQUALS(
testMicro->Plastkey, 127);
57 TS_ASSERT_EQUALS(
testMicro->Pmiddlenote, 60);
58 TS_ASSERT_EQUALS(
testMicro->Pmapsize, 12);
59 TS_ASSERT_EQUALS(
testMicro->Pmappingenabled, 0);
60 TS_ASSERT_EQUALS(
testMicro->Pglobalfinedetune, 64);
62 TS_ASSERT_EQUALS(
string((
const char *)
testMicro->Pname),
"12tET");
63 TS_ASSERT_EQUALS(
string(
65 "Equal Temperament 12 notes per octave");
67 for(
int i = 0;
i < 128; ++
i)
70 TS_ASSERT_DELTA(
testMicro->getnotefreq(19, 0), 24.4997f, 0.0001f);
78 xml.beginbranch(
"Dummy");
81 xml.beginbranch(
"MICROTONAL");
86 char *tmp = xml.getXMLdata();
90 strcpy((
char *)other.
Pname,
"Myname");
94 TS_ASSERT(xml.enterbranch(
"Dummy"));
95 TS_ASSERT(xml.enterbranch(
"MICROTONAL"));
100 char *tmpo = xml.getXMLdata();
102 TS_ASSERT(!strcmp(tmp, tmpo));
111 void _testTextToMapping() {
113 const char *mapping[12] =
114 {
"0",
"x",
"1",
"x",
"2",
"3",
"x",
"4",
"x",
"5",
"x",
"6"};
122 void _testTextToTunings() {
124 const char *tuning[7] =
125 {
"9/8",
"5/4",
"4/3",
"3/2",
"5/3",
"15/8",
"2/1"};
126 const int numTunings = 7;
SYNTH_T * synth
Definition LocalZynAddSubFx.cpp:47
SYNTH_T * synth
Definition MicrotonalTest.h:29
Definition Microtonal.h:37
unsigned char * Pname
Definition Microtonal.h:105
unsigned char Penabled
Definition Microtonal.h:57
void getfromXML(XMLwrapper *xml)
Definition Microtonal.cpp:602
Definition MicrotonalTest.h:34
void testXML()
Definition MicrotonalTest.h:74
Microtonal * testMicro
Definition MicrotonalTest.h:135
void setUp()
Definition MicrotonalTest.h:36
void testinit()
Definition MicrotonalTest.h:47
void tearDown()
Definition MicrotonalTest.h:41
register unsigned i
Definition inflate.c:1575
Definition juce_Uuid.h:141