chore: tweak fragments and tests

This commit is contained in:
Jonathan Kelley committed 2022-11-22 19:59:56 -08:00
1 parent 0e5a59f9ed
commit 4bfd936e12
9 files changed
+638 -539

No files matched your search

+20 -2
View File
@@ -8,9 +8,9 @@ pub struct Mutations<'a> {
}
impl<'a> Mutations<'a> {
pub fn new(subtree: usize) -> Self {
pub fn new() -> Self {
Self {
subtree,
subtree: 0,
edits: Vec::new(),
template_mutations: Vec::new(),
}
@@ -88,6 +88,24 @@ pub enum Mutation<'a> {
path: &'static [u8],
},
/// Insert a number of nodes after a given node.
InsertAfter {
/// The ID of the node to insert after.
id: ElementId,
/// The ids of the nodes to insert after the target node.
m: usize,
},
/// Insert a number of nodes before a given node.
InsertBefore {
/// The ID of the node to insert before.
id: ElementId,
/// The ids of the nodes to insert before the target node.
m: usize,
},
SaveTemplate {
name: &'static str,
m: usize,