Skip to content

Commit

Permalink
tests were built around that previous bug in gif processing, fixed that
Browse files Browse the repository at this point in the history
  • Loading branch information
crckrberries committed May 9, 2024
1 parent f70915b commit a60d33b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,20 @@ mod tests {
fn test_delta_compression() {
let correct = [
Frame {
commands: [].to_vec(),
commands: [
"PX 0 0 000000ff\n",
"PX 0 1 000000ff\n",
"PX 0 2 000000ff\n",
"PX 0 3 000000ff\n",
"PX 0 4 000000ff\n",
"PX 0 5 000000ff\n",
"PX 0 6 000000ff\n",
"PX 0 7 000000ff\n",
"PX 0 8 000000ff\n",
"PX 0 9 000000ff\n",
]
.map(|x| x.to_string())
.to_vec(),
delay: 100,
},
Frame {
Expand Down Expand Up @@ -171,6 +184,8 @@ mod tests {
let gif = read_gif("src/test/deltatest.gif");
let cmds = process_gif(gif, [1, 10], [0, 0]);

dbg!(&cmds);

assert_eq!(cmds, correct)
}
}

0 comments on commit a60d33b

Please sign in to comment.