Skip to content

Commit

Permalink
std: fix outdated code
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Oct 23, 2024
1 parent 578ea85 commit 5bbe6f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion std/hash/fnv/fnv_test.jule
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fn testCase(t: &testing::T, mut h: hash::Hash, &cases: []case) {
continue
}
actual := h.Sum(nil)
if !fastbytes::Equal(c.out, actual) {
if str(c.out) != str(actual) {
t.Errorf("hash({}) = {} want {}", c.input, actual, c.out)
}
}
Expand Down
4 changes: 2 additions & 2 deletions std/unicode/utf8/test/utf8_test.jule
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ fn testEncodeRune(t: &testing::T) {
b := []byte(m.s)
n := utf8::EncodeRune(s, m.r)
b1 := s[0:n]
if !fastbytes::Equal(b, b1) {
if str(b) != str(b1) {
t.Errorf("EncodeRune({}) = {} want {}", m.r, b1, b)
}
}
Expand Down Expand Up @@ -272,7 +272,7 @@ fn testNegativeRune(t: &testing::T) {
errorbuf = errorbuf[0:utf8::EncodeRune(errorbuf, utf8::RuneError)]
mut buf := make([]byte, utf8::UTFMax)
buf = buf[0:utf8::EncodeRune(buf, -1)]
if !fastbytes::Equal(buf, errorbuf) {
if str(buf) != str(errorbuf) {
t.Errorf("incorrect encoding [{}] for -1; expected [{}]", buf, errorbuf)
}
}
Expand Down

0 comments on commit 5bbe6f1

Please sign in to comment.