mirror of
https://github.com/loro-dev/loro.git
synced 2025-01-22 04:45:46 +00:00
test: record a failed mov list undo
This commit is contained in:
parent
2110a4e33a
commit
92553a2df5
1 changed files with 622 additions and 1 deletions
|
@ -13456,11 +13456,632 @@ fn shallow_fuzz_26() {
|
|||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mov_list_undo() {
|
||||
test_multi_sites_with_gc(
|
||||
5,
|
||||
vec![FuzzTarget::All],
|
||||
&mut [
|
||||
SyncAll,
|
||||
Handle {
|
||||
site: 0,
|
||||
target: 49,
|
||||
container: 22,
|
||||
action: Generic(GenericAction {
|
||||
value: Container(MovableList),
|
||||
bool: false,
|
||||
key: 4294938768,
|
||||
pos: 2097991952006905855,
|
||||
length: 10416835838496021789,
|
||||
prop: 2097865012311789712,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 29,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(488447261),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 394849716870429,
|
||||
length: 80252379242241280,
|
||||
prop: 18446743006680516361,
|
||||
}),
|
||||
},
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
Undo {
|
||||
site: 127,
|
||||
op_len: 2139062143,
|
||||
},
|
||||
Handle {
|
||||
site: 7,
|
||||
target: 7,
|
||||
container: 7,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(117901063),
|
||||
bool: true,
|
||||
key: 117901063,
|
||||
pos: 506381209866536711,
|
||||
length: 506381209866536711,
|
||||
prop: 506381209866536711,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 7,
|
||||
target: 7,
|
||||
container: 7,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(7),
|
||||
bool: false,
|
||||
key: 922746880,
|
||||
pos: 506381209866536711,
|
||||
length: 290208427752752903,
|
||||
prop: 506381209866536711,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 7,
|
||||
target: 249,
|
||||
container: 240,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-185273337),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 2097865012304223517,
|
||||
length: 3474305256856826420,
|
||||
prop: 2097865012304230198,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 25,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-1869574000),
|
||||
bool: false,
|
||||
key: 488447261,
|
||||
pos: 2097865012157422877,
|
||||
length: 2097865012304223517,
|
||||
prop: 2097865012304223517,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 0,
|
||||
target: 0,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-1138913271),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 2097865012304223517,
|
||||
length: 2097865012304223517,
|
||||
prop: 2097865012304223517,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 29,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: Container(Text),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 2097865012304223517,
|
||||
length: 2097865012304223517,
|
||||
prop: 2097865012304223517,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 29,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: Container(Unknown(255)),
|
||||
bool: true,
|
||||
key: 0,
|
||||
pos: 13474770085092589312,
|
||||
length: 10416835838496021789,
|
||||
prop: 2097865861723289232,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 29,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(488447261),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 394849716870429,
|
||||
length: 10378828040806145280,
|
||||
prop: 18446743004382043421,
|
||||
}),
|
||||
},
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
Handle {
|
||||
site: 0,
|
||||
target: 0,
|
||||
container: 0,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(150994944),
|
||||
bool: true,
|
||||
key: 4294967295,
|
||||
pos: 18446744073709551615,
|
||||
length: 18446744073709551615,
|
||||
prop: 18446744073709551615,
|
||||
}),
|
||||
},
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
Undo {
|
||||
site: 127,
|
||||
op_len: 2139062143,
|
||||
},
|
||||
Handle {
|
||||
site: 7,
|
||||
target: 7,
|
||||
container: 7,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(117901063),
|
||||
bool: true,
|
||||
key: 654771975,
|
||||
pos: 506381209866536711,
|
||||
length: 506381209866536711,
|
||||
prop: 506381209866536711,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 7,
|
||||
target: 7,
|
||||
container: 7,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(7),
|
||||
bool: false,
|
||||
key: 922746880,
|
||||
pos: 506381209866536711,
|
||||
length: 290208427752752903,
|
||||
prop: 506381209866536711,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 7,
|
||||
target: 249,
|
||||
container: 240,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-185273100),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 2097865012304223517,
|
||||
length: 3474305256856826420,
|
||||
prop: 2097865012304230198,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 25,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-1869574000),
|
||||
bool: false,
|
||||
key: 488447261,
|
||||
pos: 2097865012153228573,
|
||||
length: 2097865012304223517,
|
||||
prop: 2097865012304223517,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 0,
|
||||
target: 0,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-1138913271),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 2097865012304223517,
|
||||
length: 2097865012304223517,
|
||||
prop: 2097865012304223517,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 7,
|
||||
target: 249,
|
||||
container: 240,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-185273337),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 2097865012304223517,
|
||||
length: 3474305256856826420,
|
||||
prop: 2097865012304230198,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 25,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-1869574000),
|
||||
bool: false,
|
||||
key: 488447261,
|
||||
pos: 2097865012157422877,
|
||||
length: 2097865012304223517,
|
||||
prop: 2097865012304223517,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 0,
|
||||
target: 0,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-1138913271),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 2097865012304223517,
|
||||
length: 2097865012304223517,
|
||||
prop: 2097865012304223517,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 29,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: Container(Text),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 2097865012304223517,
|
||||
length: 2097865012304223517,
|
||||
prop: 2097865012304223517,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 29,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: Container(Unknown(255)),
|
||||
bool: true,
|
||||
key: 0,
|
||||
pos: 13474770085092589312,
|
||||
length: 10416835838496021789,
|
||||
prop: 2097865012311789712,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 29,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(488447261),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 394849716870429,
|
||||
length: 10378828040806145280,
|
||||
prop: 18446743004382043421,
|
||||
}),
|
||||
},
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
Handle {
|
||||
site: 0,
|
||||
target: 0,
|
||||
container: 0,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(150994944),
|
||||
bool: true,
|
||||
key: 4294967295,
|
||||
pos: 18446744073709551615,
|
||||
length: 18446744073709551615,
|
||||
prop: 18446744073709551615,
|
||||
}),
|
||||
},
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
Undo {
|
||||
site: 127,
|
||||
op_len: 2139062143,
|
||||
},
|
||||
Handle {
|
||||
site: 7,
|
||||
target: 7,
|
||||
container: 7,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(117901063),
|
||||
bool: true,
|
||||
key: 117901063,
|
||||
pos: 506381209866536711,
|
||||
length: 506381209866536711,
|
||||
prop: 506381209866536711,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 7,
|
||||
target: 7,
|
||||
container: 7,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(7),
|
||||
bool: false,
|
||||
key: 922746880,
|
||||
pos: 506381209866536711,
|
||||
length: 290208427752752903,
|
||||
prop: 506381209866536711,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 7,
|
||||
target: 249,
|
||||
container: 240,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-185273100),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 2097865012304223517,
|
||||
length: 3474305256856826420,
|
||||
prop: 2097865012304230198,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 25,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-1869574000),
|
||||
bool: false,
|
||||
key: 488447261,
|
||||
pos: 2097865012153228573,
|
||||
length: 2097865012304223517,
|
||||
prop: 2097865012304223517,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 0,
|
||||
target: 0,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-1138913271),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 2097865012304223517,
|
||||
length: 2097865012304223517,
|
||||
prop: 2097865012304223517,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 29,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: Container(Text),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 2097865012304223517,
|
||||
length: 2097865012304223517,
|
||||
prop: 2097865012304223517,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 29,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: Container(Unknown(255)),
|
||||
bool: true,
|
||||
key: 0,
|
||||
pos: 13474770085092589312,
|
||||
length: 18446744073709486369,
|
||||
prop: 2089670231998729471,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 144,
|
||||
target: 144,
|
||||
container: 144,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(488447261),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 18374403900856671517,
|
||||
length: 15987178339521527808,
|
||||
prop: 11791512336840195838,
|
||||
}),
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 147,
|
||||
op_len: 2475922323,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 147,
|
||||
op_len: 2475922323,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 147,
|
||||
op_len: 2475922323,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 147,
|
||||
op_len: 2475922323,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 147,
|
||||
op_len: 2475922323,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 147,
|
||||
op_len: 2475922323,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 147,
|
||||
op_len: 2475922323,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 147,
|
||||
op_len: 2475922323,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 147,
|
||||
op_len: 2475922323,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 155,
|
||||
op_len: 4292972707,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 147,
|
||||
op_len: 2475922323,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 147,
|
||||
op_len: 2475922323,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 147,
|
||||
op_len: 2475922323,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 107,
|
||||
op_len: 3784352616,
|
||||
},
|
||||
Handle {
|
||||
site: 0,
|
||||
target: 0,
|
||||
container: 0,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-1157627904),
|
||||
bool: true,
|
||||
key: 4280548865,
|
||||
pos: 18446744073709551615,
|
||||
length: 18446744073709551615,
|
||||
prop: 18446744073709551615,
|
||||
}),
|
||||
},
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
SyncAll,
|
||||
Undo {
|
||||
site: 127,
|
||||
op_len: 2139062143,
|
||||
},
|
||||
Handle {
|
||||
site: 7,
|
||||
target: 7,
|
||||
container: 7,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(117901063),
|
||||
bool: true,
|
||||
key: 117901063,
|
||||
pos: 506381209866536711,
|
||||
length: 506381209866536711,
|
||||
prop: 506381209866536711,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 7,
|
||||
target: 7,
|
||||
container: 7,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(7),
|
||||
bool: false,
|
||||
key: 872415232,
|
||||
pos: 506381209866536711,
|
||||
length: 290208427752752903,
|
||||
prop: 506381209866536711,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 7,
|
||||
target: 249,
|
||||
container: 240,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-185273100),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 2097865012304223517,
|
||||
length: 3474305256856826420,
|
||||
prop: 2097865012304230198,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 25,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(-1869574000),
|
||||
bool: false,
|
||||
key: 488447261,
|
||||
pos: 2097865012157422877,
|
||||
length: 2097865093908602141,
|
||||
prop: 2097865020894158109,
|
||||
}),
|
||||
},
|
||||
Undo {
|
||||
site: 1,
|
||||
op_len: 488439808,
|
||||
},
|
||||
SyncAllUndo {
|
||||
site: 29,
|
||||
op_len: 488447420,
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 29,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(488447261),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 394849716870429,
|
||||
length: 10378828040806145280,
|
||||
prop: 2097865014241169552,
|
||||
}),
|
||||
},
|
||||
Handle {
|
||||
site: 29,
|
||||
target: 29,
|
||||
container: 29,
|
||||
action: Generic(GenericAction {
|
||||
value: I32(488447261),
|
||||
bool: true,
|
||||
key: 488447261,
|
||||
pos: 2097865012304223517,
|
||||
length: 648831832197766436,
|
||||
prop: 72057594035933328,
|
||||
}),
|
||||
},
|
||||
],
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn minify() {
|
||||
minify_error(
|
||||
5,
|
||||
|n, actions| test_multi_sites_with_gc(n, vec![FuzzTarget::All], actions),
|
||||
|n, actions| test_multi_sites(n, vec![FuzzTarget::All], actions),
|
||||
|_, actions| actions.to_vec(),
|
||||
vec![],
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue