v0.0.295 added generic base-conversion algorithm
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m4s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m4s
This commit is contained in:
@@ -14,6 +14,20 @@ func AssertEqual[T comparable](t *testing.T, actual T, expected T) {
|
||||
}
|
||||
}
|
||||
|
||||
func AssertArrayEqual[T comparable](t *testing.T, actual []T, expected []T) {
|
||||
t.Helper()
|
||||
if len(actual) != len(expected) {
|
||||
t.Errorf("values differ: Actual: '%v', Expected: '%v' (len %d <> %d)", actual, expected, len(actual), len(expected))
|
||||
return
|
||||
}
|
||||
for i := 0; i < len(actual); i++ {
|
||||
if actual[i] != expected[i] {
|
||||
t.Errorf("values differ: Actual: '%v', Expected: '%v' (at index %d)", actual, expected, i)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func AssertNotEqual[T comparable](t *testing.T, actual T, expected T) {
|
||||
t.Helper()
|
||||
if actual == expected {
|
||||
|
Reference in New Issue
Block a user