'Test that a whole measure rest can be encoded using <forward>.
A whole measure rest is usually encoded as a <note> with a duration
equal to that of a whole measure. An alternative encoding is to
use the <forward> element to advance the time cursor to a duration
equal to that of a whole measure. This implies a whole measure rest
when there are no <note> elements in this measure.'

def test_whole_measure_rest_forward(self):

    ns = musicxml_reader.musicxml_file_to_sequence_proto(self.whole_measure_rest_forward_filename)
    expected_ns = common_testing_lib.parse_test_proto(music_pb2.NoteSequence, '\n                                ticks_per_quarter:    220\n                                time_signatures    {\n                                        numerator:    4\n                                        denominator:    4\n                                }\n                                time_signatures    {\n                                        time:    6.0\n                                        numerator:    2\n                                        denominator:    4\n                                }\n                                key_signatures    {\n                                }\n                                tempos    {\n                                        qpm:    120\n                                }\n                                notes    {\n                                        pitch:    72\n                                        velocity:    64\n                                        end_time:    2.0\n                                        numerator:    1\n                                        denominator:    1\n                                        voice:    1\n                                }\n                                notes    {\n                                        pitch:    72\n                                        velocity:    64\n                                        start_time:    4.0\n                                        end_time:    6.0\n                                        numerator:    1\n                                        denominator:    1\n                                        voice:    1\n                                }\n                                notes    {\n                                        pitch:    60\n                                        velocity:    64\n                                        start_time:    6.0\n                                        end_time:    7.0\n                                        numerator:    1\n                                        denominator:    2\n                                        voice:    1\n                                }\n                                notes    {\n                                        pitch:    60\n                                        velocity:    64\n                                        start_time:    8.0\n                                        end_time:    9.0\n                                        numerator:    1\n                                        denominator:    2\n                                        voice:    1\n                                }\n                                total_time:    9.0\n                                part_infos    {\n                                        name:    "Flute"\n                                }\n                                source_info    {\n                                        source_type:    SCORE_BASED\n                                        encoding_type:    MUSIC_XML\n                                        parser:    MAGENTA_MUSIC_XML\n                                }\n                                ')
    self.assertProtoEquals(expected_ns, ns)
