extern crate macrohelper;
use macrohelper::{MacroInput,HashTag};
fn main() {
let dut = r"
#[get]
pub struct Thing {
a: i64
}
";
let help = MacroInput::from_str(dut).expect("simple_struct.rs failed to parse");
assert!( help.attr.len() == 1);
assert!( help.attr[0].is_word());
assert_eq!( help.attr[0].get_name().unwrap(), "get");
assert_eq!( help.id, "Thing");
assert!( help.body.is_struct() );
let body = help.body.get_struct().unwrap();
assert!( body.is_norm());
let fields = body.get_fields().unwrap();
assert_eq!( fields.len(), 1 );
assert_eq!( fields[0].get_name().unwrap(), "a");
}