fix: Compare lowercase component IDs
- This was failing. Make this more lenient so the user can specify component id in the test file in a non-case-sensitive manner. - Also switched around a wrong token order which was causing a failure (not sure we care about token order but we may in the future? Python didn't care...)
This commit is contained in:
@@ -28,8 +28,8 @@ impl ProtocolComponentExpectation {
|
||||
pub fn compare(&self, other: &ProtocolComponent, colorize_output: bool) -> Option<String> {
|
||||
let mut diffs = Vec::new();
|
||||
|
||||
// Compare id
|
||||
if self.id != other.id {
|
||||
// Compare id (case-insensitive)
|
||||
if self.id.to_lowercase() != other.id.to_lowercase() {
|
||||
let diff = self.format_diff("id", &self.id, &other.id, colorize_output);
|
||||
diffs.push(format!("Field 'id' mismatch for {}:\n{}", self.id, diff));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user