Tests for types functions

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2023-02-21 20:46:11 -08:00
committed by Anand Krishnamoorthi
parent ae3866b1ab
commit c4ae2d4cc2
5 changed files with 62 additions and 32 deletions
-31
View File
@@ -350,37 +350,6 @@ fn one_yaml() -> Result<()> {
yaml_test(file.as_str())
}
/*
fn run_yaml_tests_in(folder: &str) -> Result<()> {
let mut total = 0;
for entry in WalkDir::new(folder)
.follow_links(true)
.into_iter()
.filter_map(|e| e.ok())
{
let path = entry
.path()
.to_str()
.ok_or_else(|| anyhow!("failed to convert path to utf8 {:?}", entry.path()))?;
if !path.ends_with(".yaml") {
continue;
}
total += 1;
yaml_test(path)?;
}
println!("{} yaml tests passed.", total);
Ok(())
}
#[test]
fn run_yaml_tests() -> Result<()> {
run_yaml_tests_in("tests/interpreter")
}
*/
#[test_resources("tests/interpreter/**/*.yaml")]
fn run(path: &str) {
yaml_test(path).unwrap()