| 1 |
From: Guilherme Puida Moreira <[email protected]> |
| 2 |
Date: Sun, 10 Mar 2024 00:37:05 -0300 |
| 3 |
Subject: Fix logic error in failing test case |
| 4 |
Forwarded: https://github.com/tscholl2/siec/pull/3 |
| 5 |
|
| 6 |
The test compares `gotQ` with `expectedT` and `gotT` with `expectedQ`, |
| 7 |
which is not correct. |
| 8 |
--- |
| 9 |
search/search_test.go | 2 +- |
| 10 |
1 file changed, 1 insertion(+), 1 deletion(-) |
| 11 |
|
| 12 |
diff --git a/search/search_test.go b/search/search_test.go |
| 13 |
index d1fd970..c34087a 100644 |
| 14 |
--- a/search/search_test.go |
| 15 |
+++ b/search/search_test.go |
| 16 |
@@ -34,7 +34,7 @@ func Test_nextSiec(t *testing.T) { |
| 17 |
} |
| 18 |
for _, tt := range tests { |
| 19 |
t.Run(tt.name, func(t *testing.T) { |
| 20 |
- gotT, gotQ := nextSiec(tt.args.M) |
| 21 |
+ gotQ, gotT := nextSiec(tt.args.M) |
| 22 |
if !reflect.DeepEqual(gotT, tt.wantT) { |
| 23 |
t.Errorf("nextSiec() gotT = %v, want %v", gotT, tt.wantT) |
| 24 |
} |