tuples for positive assert

This commit is contained in:
elvis
2025-12-15 21:07:55 +01:00
parent e983e778eb
commit e80bb5b20a
10 changed files with 6944 additions and 101 deletions

View File

@ -138,6 +138,8 @@ impl fmt::Debug for Unary {
| Self::Length => write!(f, ".length"),
| Self::ToStr => write!(f, ".tostr"),
| Self::ToEl => write!(f, ".toel"),
| Self::First => write!(f, ".first"),
| Self::Second => write!(f, ".second"),
| Self::Qualifier(q) => write!(f, ".{q:?}"),
}
}
@ -256,6 +258,7 @@ impl fmt::Debug for Binary {
| Self::Min => write!(f, "min"),
| Self::Max => write!(f, "max"),
| Self::CommonSubStr => write!(f, "commonsubstr"),
| Self::Tuple => write!(f, "tuple"),
}
}
}
@ -266,6 +269,7 @@ impl fmt::Debug for AssertReturnValue {
| Self::Boolean(b) => write!(f, "{b:?}"),
| Self::Integer(i) => write!(f, "{i:?}"),
| Self::String(s) => write!(f, r#""{s:?}""#),
| Self::Tuple((t1, t2)) => write!(f, "({t1:?}, {t2:?})"),
| Self::Label(l) => write!(f, "{{debug: {l:?}}}"),
| Self::Set(set) => write!(f, "{{debug: {set:?}}}"),
| Self::Element(el) => write!(f, "{{debug: {el:?}}}"),
@ -287,6 +291,7 @@ impl fmt::Debug for AssertionTypes {
| Self::Boolean => write!(f, "boolean"),
| Self::Integer => write!(f, "integer"),
| Self::String => write!(f, "string"),
| Self::Tuple((t1, t2)) => write!(f, "({t1:?}, {t2:?})"),
| Self::Label => write!(f, "label"),
| Self::Set => write!(f, "set"),
| Self::Element => write!(f, "element"),
@ -514,6 +519,8 @@ impl PrintableWithTranslator for Unary {
| Self::Length => write!(f, ".length"),
| Self::ToStr => write!(f, ".tostr"),
| Self::ToEl => write!(f, ".toel"),
| Self::First => write!(f, ".first"),
| Self::Second => write!(f, ".second"),
| Self::Qualifier(q) => {
write!(f, ".{}", Formatter::from(translator, q))
},
@ -624,6 +631,12 @@ impl PrintableWithTranslator for AssertReturnValue {
| Self::Boolean(b) => write!(f, "{b}"),
| Self::Integer(i) => write!(f, "{i}"),
| Self::String(s) => write!(f, r#""{s}""#),
| Self::Tuple((t1, t2)) => write!(
f,
"({}, {})",
Formatter::from(translator, &**t1),
Formatter::from(translator, &**t2)
),
| Self::Label(l) => write!(f, "{}", Formatter::from(translator, l)),
| Self::Set(set) => {
write!(f, "{}", Formatter::from(translator, set))