Starting to make result structs.

This commit is contained in:
Tom Alexander
2023-10-08 07:54:21 -04:00
parent 591b5ed382
commit d7e870cba1
2 changed files with 35 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
#![feature(round_char_boundary)]
#![feature(exact_size_is_empty)]
use std::io::Read;
use std::path::Path;
use organic::compare::run_anonymous_compare;
use organic::compare::run_compare_on_file;
@@ -66,14 +67,46 @@ enum TestConfig<'s> {
#[derive(Debug)]
struct TestLayer<'s> {
name: &'s str,
children: Vec<TestConfig<'s>>,
}
#[derive(Debug)]
struct SingleFile<'s> {
file_path: &'s str,
}
#[derive(Debug)]
struct AnonymousFile {
name: String,
}
#[derive(Debug)]
enum TestResult<'s> {
ResultLayer(ResultLayer<'s>),
SingleFileResult(SingleFileResult<'s>),
AnonymousFileResult(AnonymousFileResult),
}
#[derive(Debug)]
struct ResultLayer<'s> {
name: &'s str,
children: Vec<TestResult<'s>>,
}
#[derive(Debug)]
struct SingleFileResult<'s> {
name: &'s str,
}
#[derive(Debug)]
struct AnonymousFile<'s> {
struct AnonymousFileResult {
name: String,
}
impl<'s> SingleFile<'s> {
fn run_test(&self) -> SingleFileResult<'s> {
let result = run_compare_on_file(self.file_path);
// foo
todo!()
}
}