/* A::A testbed */

#![feature(macro_metavar_expr)]
#![allow(unused_variables)]
#![allow(non_snake_case)]

use sav::{A, mkA};

fn main() {
    let a = mkA!['a', 'b', 'c'];
    let b = a.clone();
    println!("{}", a[0]);

    let L = 4;
    let mut c = A::A::empty(L);
    for i in 0..L {
        unsafe {
            c.set_nocpy(i, i + 1);
        }
    }

    let drp = mkA![1, 2, 3, 4];
    let drp = drp.drop(2);
    let exp = mkA![3, 4];
    println!("{drp} == {exp}");
    assert_eq!(drp, exp);

    let cut = mkA![1, 2, 3, 4, 5, 6, 7, 8, 9];
    let cut = cut.cutC(3);
    println!("{cut:?}\n{cut}\n0:{}\n1:{}\n2:{}", cut[0], cut[1], cut[2]);
}
