mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 21:13:39 +00:00
compiler: add some more slice tests
This commit is contained in:
committed by
Ron Evans
parent
71d1b70ab7
commit
2709d38d63
Vendored
+16
@@ -7,3 +7,19 @@ func sliceLen(ints []int) int {
|
||||
func sliceCap(ints []int) int {
|
||||
return cap(ints)
|
||||
}
|
||||
|
||||
func sliceElement(ints []int, index int) int {
|
||||
return ints[index]
|
||||
}
|
||||
|
||||
func sliceAppendValues(ints []int) []int {
|
||||
return append(ints, 1, 2, 3)
|
||||
}
|
||||
|
||||
func sliceAppendSlice(ints, added []int) []int {
|
||||
return append(ints, added...)
|
||||
}
|
||||
|
||||
func sliceCopy(dst, src []int) int {
|
||||
return copy(dst, src)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user