temporal: unit testing more like unit testing
But still not really.
This commit is contained in:
parent
01b8187cd3
commit
733d59c65b
@ -63,23 +63,34 @@ TempoMapCutBufferTest::pasteTest()
|
||||
(void) tmap->set_tempo (Tempo (180, 4), BBT_Argument (31, 1, 0));
|
||||
(void) tmap->set_meter (Meter (5, 4), BBT_Argument (32, 1, 0));
|
||||
|
||||
TempoMapCutBuffer* cb = tmap->cut (timepos_t::from_superclock (tmap->superclock_at (BBT_Argument (8, 1, 0))),
|
||||
timepos_t::from_superclock (tmap->superclock_at (BBT_Argument (31, 1, 0))),
|
||||
false);
|
||||
TempoMapCutBuffer* cb = tmap->copy (timepos_t::from_superclock (tmap->superclock_at (BBT_Argument (8, 1, 0))),
|
||||
timepos_t::from_superclock (tmap->superclock_at (BBT_Argument (31, 1, 0))));
|
||||
|
||||
TempoMap* new_map = new TempoMap (Tempo (120, 4), Meter (7, 8));
|
||||
|
||||
#if 0
|
||||
std::cerr << "\n\nCut Buffer:\n";
|
||||
cb->dump (std::cerr);
|
||||
|
||||
std::cerr << "Before paste\n";
|
||||
new_map->dump (std::cerr);
|
||||
#endif
|
||||
|
||||
new_map->paste (*cb, timepos_t::from_superclock (tmap->superclock_at (BBT_Argument (6, 1, 0))),
|
||||
false);
|
||||
|
||||
#if 0
|
||||
std::cerr << "After paste\n";
|
||||
new_map->dump (std::cerr);
|
||||
#endif
|
||||
|
||||
Meter nmm (new_map->meter_at (BBT_Argument (21,7,34)));
|
||||
Tempo nmt (new_map->tempo_at (BBT_Argument (21,7,34)));
|
||||
Meter omm (tmap->meter_at (BBT_Argument (21,7,34)));
|
||||
Tempo omt (tmap->tempo_at (BBT_Argument (21,7,34)));
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL (nmm, omm);
|
||||
CPPUNIT_ASSERT_EQUAL (omt, nmt);
|
||||
|
||||
delete new_map;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user