Refactor the input handling logic (#48)

* Add support for wrapper types

* Move `FilesWithExtensionIterator` to `core::common`

* Remove unneeded use of two `HashMap`s

* Make metadata structs more typed

* Impl new_from for wrapper types

* Implement the new input handling logic

* Fix edge-case in input handling

* Ignore macro doc comment tests

* Correct comment

* Fix edge-case in deployment order
This commit is contained in:
Omar
2025-07-21 12:01:52 +03:00
committed by GitHub
parent 2259942363
commit a9970eb2bb
13 changed files with 1160 additions and 513 deletions
+7 -1
View File
@@ -1,6 +1,6 @@
use serde::Deserialize;
use crate::{input::Input, mode::Mode};
use crate::{define_wrapper_type, input::Input, mode::Mode};
#[derive(Debug, Default, Deserialize, Clone, Eq, PartialEq)]
pub struct Case {
@@ -10,3 +10,9 @@ pub struct Case {
pub inputs: Vec<Input>,
pub group: Option<String>,
}
define_wrapper_type!(
/// A wrapper type for the index of test cases found in metadata file.
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
CaseIdx(usize);
);