/*
SPDX-License-Identifier: GPL-3.0-or-later
Copyright © 2024 Mike Robeson [dijksterhuis]
*/

mod helpers;

use helpers::*;
use ot_tools_io::{
    ArrangementFile, BankFile, MarkersFile, OctatrackFileIO, ProjectFile, SampleSettingsFile,
};

#[test]
fn arrangement_blank() {
    let binfile = get_arrange_dirpath().join("blank.work");
    let r = ArrangementFile::from_data_file(&binfile);
    print_and_assert_ok_result(r);
}

#[test]
fn arrangement_full_options() {
    let binfile = get_arrange_dirpath().join("full-options.work");
    let r = ArrangementFile::from_data_file(&binfile);
    print_and_assert_ok_result(r);
}

#[test]
fn arrangement_one_reminder() {
    let binfile = get_arrange_dirpath().join("1-rem-blank-txt.work");
    let r = ArrangementFile::from_data_file(&binfile);
    print_and_assert_ok_result(r);
}

#[test]
fn bank_blank() {
    let binfile = get_blank_proj_dirpath().join("bank01.work");
    let r = BankFile::from_data_file(&binfile);
    print_and_assert_ok_result(r);
}

#[test]
fn project_blank() {
    let binfile = get_blank_proj_dirpath().join("project.work");
    let r = ProjectFile::from_data_file(&binfile);
    print_and_assert_ok_result(r);
}

#[test]
fn markers_blank() {
    let binfile = get_blank_proj_dirpath().join("markers.work");
    let r = MarkersFile::from_data_file(&binfile);
    print_and_assert_ok_result(r);
}

#[test]
fn sample() {
    let binfile = get_samples_dirpath().join("sample.ot");
    let r = SampleSettingsFile::from_data_file(&binfile);
    print_and_assert_ok_result(r);
}
