Starting a new macro for comparing fields.

This will help us assert that all fields are tested and that only expected fields are present.
This commit is contained in:
Tom Alexander
2023-10-06 13:08:15 -04:00
parent e686666ea0
commit d06e4de7b0
4 changed files with 71 additions and 0 deletions

View File

@@ -13,6 +13,8 @@ use super::util::get_property_boolean;
use super::util::get_property_numeric;
use super::util::get_property_quoted_string;
use super::util::get_property_unquoted_atom;
use crate::compare::elisp_fact::EmacsField;
use crate::compare::macros::compare_properties;
use crate::types::AngleLink;
use crate::types::AstNode;
use crate::types::BabelCall;
@@ -2688,6 +2690,9 @@ fn compare_code<'b, 's>(
));
}
let foo: Result<Option<(DiffStatus, Option<String>)>, Box<dyn std::error::Error>> =
compare_properties!(emacs, EmacsField::Required(":value"));
Ok(DiffResult {
status: this_status,
name: rust.get_elisp_name(),