Update tests to compile again.

This commit is contained in:
Tom Alexander
2023-08-24 17:15:24 -04:00
parent 3348807a05
commit e84e2b5147
8 changed files with 71 additions and 100 deletions

View File

@@ -144,11 +144,10 @@ mod tests {
#[test]
fn plain_text_radio_target() {
let input = "foo bar baz";
let input = OrgSource::new("foo bar baz");
let radio_target_match = vec![Object::PlainText(PlainText { source: "bar" })];
let initial_context: ContextTree<'_, '_> = ContextTree::new();
let document_context = initial_context
.with_additional_node(ContextElement::DocumentRoot(input))
.with_additional_node(ContextElement::RadioTarget(vec![&radio_target_match]));
let paragraph_matcher = parser_with_context!(element(true))(&document_context);
let (remaining, first_paragraph) = paragraph_matcher(input).expect("Parse first paragraph");
@@ -173,14 +172,13 @@ mod tests {
#[test]
fn bold_radio_target() {
let input = "foo *bar* baz";
let input = OrgSource::new("foo *bar* baz");
let radio_target_match = vec![Object::Bold(Bold {
source: "*bar*",
children: vec![Object::PlainText(PlainText { source: "bar" })],
})];
let initial_context: ContextTree<'_, '_> = ContextTree::new();
let document_context = initial_context
.with_additional_node(ContextElement::DocumentRoot(input))
.with_additional_node(ContextElement::RadioTarget(vec![&radio_target_match]));
let paragraph_matcher = parser_with_context!(element(true))(&document_context);
let (remaining, first_paragraph) =