aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2018-03-09 14:00:36 -0800
committerJoe Wilm <joe@jwilm.com>2018-06-02 09:56:50 -0700
commit54314380f07f25b22591775931994196c30240ed (patch)
tree2b75d5d62f7f002dfd2bd9518bcf916aa807263f
parentb0f655ac85ab6d86e9e482cbb9035200c6f08d40 (diff)
downloadalacritty-54314380f07f25b22591775931994196c30240ed.tar.gz
alacritty-54314380f07f25b22591775931994196c30240ed.zip
Fix grid scroll tests
-rw-r--r--src/grid/tests.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/grid/tests.rs b/src/grid/tests.rs
index 547fbcf9..107e7103 100644
--- a/src/grid/tests.rs
+++ b/src/grid/tests.rs
@@ -43,11 +43,13 @@ fn scroll_up() {
other[Line(5)][Column(0)] = 7;
other[Line(6)][Column(0)] = 8;
other[Line(7)][Column(0)] = 9;
- other[Line(8)][Column(0)] = 0;
- other[Line(9)][Column(0)] = 1;
+ other[Line(8)][Column(0)] = 0; // should be cleared on scroll; was 0
+ other[Line(9)][Column(0)] = 0; // should be cleared on scroll; was 1
for i in 0..10 {
- assert_eq!(grid[Line(i)][Column(0)], other[Line(i)][Column(0)]);
+ assert_eq!(grid[Line(i)][Column(0)], other[Line(i)][Column(0)],
+ "index={}; actual: {:?}, expected: {:?}",
+ Line(i), grid[Line(i)][Column(0)], other[Line(i)][Column(0)]);
}
}
@@ -69,8 +71,8 @@ fn scroll_down() {
let mut other = Grid::new(Line(10), Column(1), 0, 9);
- other[Line(0)][Column(0)] = 8;
- other[Line(1)][Column(0)] = 9;
+ other[Line(0)][Column(0)] = 0; // Should be cleared upon recycle; was 8
+ other[Line(1)][Column(0)] = 0; // Should be cleared upon recycle; was 9
other[Line(2)][Column(0)] = 0;
other[Line(3)][Column(0)] = 1;
other[Line(4)][Column(0)] = 2;
@@ -81,7 +83,9 @@ fn scroll_down() {
other[Line(9)][Column(0)] = 7;
for i in 0..10 {
- assert_eq!(grid[Line(i)][Column(0)], other[Line(i)][Column(0)]);
+ assert_eq!(grid[Line(i)][Column(0)], other[Line(i)][Column(0)],
+ "index={}; actual: {:?}, expected: {:?}",
+ Line(i), grid[Line(i)][Column(0)], other[Line(i)][Column(0)]);
}
}