TestTruncate compares the unrolled TruncateRowNumber() with the original truncateRowNumberSlow() to prevent drift
(t *testing.T)
| 26 | // TestTruncate compares the unrolled TruncateRowNumber() with the original truncateRowNumberSlow() to |
| 27 | // prevent drift |
| 28 | func TestTruncateRowNumber(t *testing.T) { |
| 29 | for i := 0; i <= MaxDefinitionLevel; i++ { |
| 30 | rn := RowNumber{1, 2, 3, 4, 5, 6, 7, 8} |
| 31 | |
| 32 | newR := TruncateRowNumber(i, rn) |
| 33 | oldR := truncateRowNumberSlow(i, rn) |
| 34 | |
| 35 | require.Equal(t, newR, oldR) |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | func TestInvalidDefinitionLevelTruncate(t *testing.T) { |
| 40 | t.Run("TruncateRowNumber -1", func(t *testing.T) { |
nothing calls this directly
no test coverage detected