Cache the compiler versions

This commit is contained in:
Omar Abdulla
2025-08-18 06:34:26 +03:00
parent a7ce202a6b
commit 84026f9aee
16 changed files with 322 additions and 214 deletions
+8 -1
View File
@@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
use revive_dt_common::macros::define_wrapper_type;
use revive_dt_common::{macros::define_wrapper_type, types::Mode};
use crate::{
input::{Expected, Step},
@@ -60,6 +60,13 @@ impl Case {
}
})
}
pub fn solc_modes(&self) -> Vec<Mode> {
match &self.modes {
Some(modes) => ParsedMode::many_to_modes(modes.iter()).collect(),
None => Mode::all().collect(),
}
}
}
define_wrapper_type!(
+2 -2
View File
@@ -223,7 +223,7 @@ mod tests {
for (actual, expected) in strings {
let parsed = ParsedMode::from_str(actual)
.expect(format!("Failed to parse mode string '{actual}'").as_str());
.unwrap_or_else(|_| panic!("Failed to parse mode string '{actual}'"));
assert_eq!(
expected,
parsed.to_string(),
@@ -249,7 +249,7 @@ mod tests {
for (actual, expected) in strings {
let parsed = ParsedMode::from_str(actual)
.expect(format!("Failed to parse mode string '{actual}'").as_str());
.unwrap_or_else(|_| panic!("Failed to parse mode string '{actual}'"));
let expected_set: HashSet<_> = expected.into_iter().map(|s| s.to_owned()).collect();
let actual_set: HashSet<_> = parsed.to_modes().map(|m| m.to_string()).collect();