const DEMOS: [&str; 1] = [include_str!("../songs/basic/demo_hard_bounce.mml")];
#[test]
fn demos_compile_without_diagnostics() {
for src in DEMOS {
let (song, diags) = pikopiko::synth::compile(src);
assert!(diags.is_empty(), "{diags:?}");
assert_eq!(song.unwrap().synth.name, "basic");
}
}
#[test]
fn demos_encode_to_binary() {
for src in DEMOS {
let (song, _) = pikopiko::synth::compile(src);
let song = song.unwrap();
let bin = pikopiko::export::binary::encode(&song).expect("イベント列バイナリにできる");
assert!(!bin.is_empty());
}
}