unbreak tests
This commit is contained in:
parent
8f47b8e0cf
commit
17f886936d
3 changed files with 30 additions and 6 deletions
automerge-backend/src
|
@ -41,7 +41,7 @@ impl Backend {
|
|||
match change.request_type {
|
||||
ChangeRequestType::Change(ops) => {
|
||||
let diffs = self.op_set.apply_change(Change {
|
||||
actor_id: change.actor_id.clone(),
|
||||
actor_id: change.actor_id,
|
||||
operations: ops,
|
||||
seq: seq,
|
||||
message: change.message,
|
||||
|
@ -136,6 +136,8 @@ mod tests {
|
|||
),
|
||||
conflicts: Vec::new(),
|
||||
}],
|
||||
seq: None,
|
||||
actor: None,
|
||||
},
|
||||
},
|
||||
TestCase {
|
||||
|
@ -180,6 +182,8 @@ mod tests {
|
|||
),
|
||||
conflicts: Vec::new(),
|
||||
}],
|
||||
seq: None,
|
||||
actor: None,
|
||||
},
|
||||
},
|
||||
TestCase {
|
||||
|
@ -235,6 +239,8 @@ mod tests {
|
|||
datatype: None,
|
||||
}],
|
||||
}],
|
||||
seq: None,
|
||||
actor: None,
|
||||
},
|
||||
},
|
||||
TestCase {
|
||||
|
@ -276,6 +282,8 @@ mod tests {
|
|||
),
|
||||
conflicts: Vec::new(),
|
||||
}],
|
||||
seq: None,
|
||||
actor: None,
|
||||
},
|
||||
},
|
||||
TestCase {
|
||||
|
@ -336,6 +344,8 @@ mod tests {
|
|||
conflicts: Vec::new(),
|
||||
},
|
||||
],
|
||||
seq: None,
|
||||
actor: None,
|
||||
},
|
||||
},
|
||||
TestCase {
|
||||
|
@ -402,6 +412,8 @@ mod tests {
|
|||
conflicts: Vec::new()
|
||||
}
|
||||
],
|
||||
seq: None,
|
||||
actor: None,
|
||||
},
|
||||
},
|
||||
TestCase {
|
||||
|
@ -459,7 +471,9 @@ mod tests {
|
|||
None,
|
||||
),
|
||||
conflicts: Vec::new(),
|
||||
}]
|
||||
}],
|
||||
seq: None,
|
||||
actor: None,
|
||||
}
|
||||
},
|
||||
TestCase {
|
||||
|
@ -513,7 +527,9 @@ mod tests {
|
|||
0
|
||||
),
|
||||
conflicts: Vec::new(),
|
||||
}]
|
||||
}],
|
||||
seq: None,
|
||||
actor: None,
|
||||
}
|
||||
},
|
||||
TestCase {
|
||||
|
@ -563,7 +579,9 @@ mod tests {
|
|||
SequenceType::List,
|
||||
),
|
||||
conflicts: Vec::new(),
|
||||
}]
|
||||
}],
|
||||
seq: None,
|
||||
actor: None,
|
||||
}
|
||||
}
|
||||
];
|
||||
|
|
|
@ -26,7 +26,7 @@ pub struct InvalidElementID(pub String);
|
|||
|
||||
impl fmt::Display for InvalidElementID {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}", self)
|
||||
write!(f, "{:?}", self)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,6 @@ impl Error for InvalidChangeRequest {}
|
|||
|
||||
impl fmt::Display for InvalidChangeRequest {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}", self)
|
||||
write!(f, "{:?}", self)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,9 @@ pub struct OpSet {
|
|||
pub actor_histories: ActorHistories,
|
||||
queue: Vec<Change>,
|
||||
pub clock: Clock,
|
||||
undo_pos: u32,
|
||||
undo_stack: Vec<Operation>,
|
||||
redo_stack: Vec<Operation>,
|
||||
state: Value,
|
||||
}
|
||||
|
||||
|
@ -47,6 +50,9 @@ impl OpSet {
|
|||
queue: Vec::new(),
|
||||
clock: Clock::empty(),
|
||||
state: Value::Map(HashMap::new()),
|
||||
undo_pos: 0,
|
||||
undo_stack: vec![],
|
||||
redo_stack: vec![],
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue