use std::fs;
use std::path::Path;
use crate::test_support::{assert_ladder, rung_files};
const SRC: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/src");
const LADDER: &[&[&str]] = &[&["storage"], &["relation"], &["read"]];
#[test]
fn every_rung_names_only_the_rungs_beneath_it() {
assert_ladder(Path::new(SRC), LADDER);
}
#[test]
fn no_rung_names_a_stream_operator() {
for rung in LADDER.concat() {
for f in rung_files(Path::new(SRC), rung) {
let text = fs::read_to_string(&f).unwrap();
assert!(!text.contains("stream::"), "{} names gnitz_zset::stream", f.display());
}
}
}