void TestInstrumentChange::testChange() { Score* score = test_pre("change"); Measure* m = score->firstMeasure()->nextMeasure(); Segment* s = m->first(Segment::Type::ChordRest); InstrumentChange* ic = static_cast<InstrumentChange*>(s->annotations()[0]); Instrument* ni = score->staff(1)->part()->instr(); ic->setInstrument(*ni); score->startCmd(); ic->setText("Instrument Oboe"); score->undo(new ChangeInstrument(ic, ic->instrument())); score->endCmd(); score->doLayout(); test_post(score, "change"); }