use marine_macro_impl::marine;
use marine_macro_testing_utils::{items_from_file, stream_from_file, to_syn_item};
use std::path::Path;
pub fn test_marine_token_streams<FP, EP>(marine_path: FP, expanded_path: EP) -> bool
where
FP: AsRef<Path>,
EP: AsRef<Path>,
{
let marine_item = stream_from_file(marine_path);
let test_token_stream = quote::quote! { #marine_item };
let marine_token_streams = marine(test_token_stream)
.unwrap_or_else(|e| panic!("failed to apply the marine macro due {}", e));
let expanded_item = items_from_file(expanded_path);
let marine_item = to_syn_item(marine_token_streams);
marine_item == expanded_item
}