mirror of
https://github.com/martinvonz/jj.git
synced 2024-10-24 15:43:12 +00:00
conflicts: add test of higher-arity conflict simplificaton changing diffs
It's a bit weird to simplify a conflict like `A B->C D->E C->F` to `A B->E D->F` because it changes which diffs are in the conflict, but that's what we currently do. Let's have a test for that. We actually already have tests showing how `A B->C D->A` gets simplified to `C B->D`, but those are less obviously weird because when rendered as `removes = [B], adds = [C, D]`, it doesn't look that different from the reverse.
This commit is contained in:
parent
e1b4fde5b3
commit
8f75a8236a
1 changed files with 6 additions and 0 deletions
|
@ -688,6 +688,12 @@ mod tests {
|
|||
assert_eq!(c(&[0, 1], &[2, 3, 2]).simplify(), c(&[0, 1], &[2, 3, 2]));
|
||||
assert_eq!(c(&[0, 1], &[2, 3, 3]).simplify(), c(&[0, 1], &[2, 3, 3]));
|
||||
assert_eq!(c(&[0, 1], &[2, 3, 4]).simplify(), c(&[0, 1], &[2, 3, 4]));
|
||||
// TODO: we should probably not change the diffs around like this (e.g. 1->5
|
||||
// before and 1->4 after)
|
||||
assert_eq!(
|
||||
c(&[0, 1, 2], &[3, 4, 5, 0]).simplify(),
|
||||
c(&[1, 2], &[3, 4, 5])
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue