aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen')
-rw-r--r--test/codegen/strings.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/codegen/strings.go b/test/codegen/strings.go
index a2c2fc0a62..94512f5cd3 100644
--- a/test/codegen/strings.go
+++ b/test/codegen/strings.go
@@ -14,6 +14,11 @@ func CountRunes(s string) int { // Issue #24923
return len([]rune(s))
}
+func CountBytes(s []byte) int {
+ // amd64:-`.*runtime.slicebytetostring`
+ return len(string(s))
+}
+
func ToByteSlice() []byte { // Issue #24698
// amd64:`LEAQ\ttype:\[3\]uint8`
// amd64:`CALL\truntime\.newobject`