Skip to content

Commit

Permalink
Fix non-deterministic test
Browse files Browse the repository at this point in the history
  • Loading branch information
zix99 committed Jun 7, 2024
1 parent a6fcbd0 commit 44f65bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/heatmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ func TestHeatmapLinear(t *testing.T) {
out, eout, err := testCommandCapture(heatmapCommand(), `--snapshot -m "(.+) (.+)" -e "{$ {1} {2}}" testdata/heat.txt`)
assert.NoError(t, err)
assert.Empty(t, eout)
assert.Equal(t, " - 0 2 1 4 2 6 3 9 4\n a..\nx -22\ny 224\nz 9--\nMatched: 10 / 10 (R: 3; C: 3)\n39 B (0 B/s) \n", out)
assert.Contains(t, out, " - 0 2 1 4 2 6 3 9 4\n a..\nx -22\ny 224\nz 9--\nMatched: 10 / 10 (R: 3; C: 3)\n39 B (0 B/s)")
}

func TestHeatmapLog2(t *testing.T) {
out, eout, err := testCommandCapture(heatmapCommand(), `--snapshot -m "(.+) (.+)" -e "{$ {1} {2}}" --scale log2 testdata/heat.txt`)
assert.NoError(t, err)
assert.Empty(t, eout)
assert.Equal(t, " - 1 4 2 7 3 9 4\n a..\nx ---\ny --4\nz 9--\nMatched: 10 / 10 (R: 3; C: 3)\n39 B (0 B/s) \n", out)
assert.Contains(t, out, " - 1 4 2 7 3 9 4\n a..\nx ---\ny --4\nz 9--\nMatched: 10 / 10 (R: 3; C: 3)\n39 B (0 B/s)")
}

0 comments on commit 44f65bd

Please sign in to comment.