Insta snaps

This commit is contained in:
Andras Schmelczer 2024-11-16 22:52:40 +00:00
parent 952d269fda
commit 9747ed3d1e
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
8 changed files with 106 additions and 0 deletions

View file

@ -0,0 +1,10 @@
---
source: sync_lib/src/operations/operation.rs
expression: "Operation::create_delete(0, -1)"
snapshot_kind: text
---
Err(
NegativeOperationIndexError(
"Length -1 is negative",
),
)

View file

@ -0,0 +1,10 @@
---
source: sync_lib/src/operations/operation.rs
expression: "Operation::create_delete(-1, -1)"
snapshot_kind: text
---
Err(
NegativeOperationIndexError(
"Index -1 is negative",
),
)

View file

@ -0,0 +1,10 @@
---
source: sync_lib/src/operations/operation.rs
expression: "Operation::create_insert(0, \"hi\").unwrap().unwrap().with_index(-1)"
snapshot_kind: text
---
Err(
NegativeOperationIndexError(
"Index -1 is negative",
),
)

View file

@ -0,0 +1,10 @@
---
source: sync_lib/src/operations/operation.rs
expression: "Operation::create_insert(1, \"hi\").unwrap().unwrap().with_shifted_index(-2)"
snapshot_kind: text
---
Err(
NegativeOperationIndexError(
"Index -1 is negative",
),
)

View file

@ -0,0 +1,10 @@
---
source: sync_lib/src/operations/operation.rs
expression: "Operation::create_insert(-1, \"hi\")"
snapshot_kind: text
---
Err(
NegativeOperationIndexError(
"Index -1 is negative",
),
)

View file

@ -0,0 +1,37 @@
---
source: sync_lib/src/operations/operation_sequence.rs
expression: operations
snapshot_kind: text
---
OperationSequence {
operations: [
Delete {
index: 0,
deleted_character_count: 5,
},
Insert {
index: 0,
text: "Hello,",
},
Delete {
index: 7,
deleted_character_count: 5,
},
Insert {
index: 7,
text: "my friend",
},
Insert {
index: 29,
text: " doing",
},
Delete {
index: 36,
deleted_character_count: 6,
},
Insert {
index: 36,
text: " Albert",
},
],
}

View file

@ -0,0 +1,11 @@
---
source: sync_lib/src/operations/operation_sequence.rs
expression: result
snapshot_kind: text
---
Err(
DiffTooLarge {
diff_ratio: 0.73333335,
diff_ratio_limit: 0.1,
},
)

View file

@ -0,0 +1,8 @@
---
source: sync_lib/src/operations/operation_sequence.rs
expression: operations
snapshot_kind: text
---
OperationSequence {
operations: [],
}