Skip to content

Commit

Permalink
limit test to wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
Zxilly committed Jul 17, 2024
1 parent 90bdd83 commit c2568b1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
21 changes: 21 additions & 0 deletions src/bytes/bytes_js_wasm_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright 2024 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build js && wasm

package bytes_test

import (
"bytes"
"testing"
)

func TestIssue65571(t *testing.T) {
b := make([]byte, 1<<31+1)
b[1<<31] = 1
i := bytes.IndexByte(b, 1)
if i != 1<<31 {
t.Errorf("IndexByte(b, 1) = %d; want %d", i, 1<<31)
}
}
9 changes: 0 additions & 9 deletions src/bytes/bytes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2278,12 +2278,3 @@ func TestClone(t *testing.T) {
}
}
}

func TestIssue65571(t *testing.T) {
b := make([]byte, 1<<31+1)
b[1<<31] = 1
i := IndexByte(b, 1)
if i != 1<<31 {
t.Errorf("IndexByte(b, 1) = %d; want %d", i, 1<<31)
}
}

0 comments on commit c2568b1

Please sign in to comment.