mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +00:00
reflect: uncomment TestAppend and fix a bug it found
This commit is contained in:
@@ -874,8 +874,6 @@ var appendTests = []struct {
|
||||
{make([]int, 2, 4), []int{22, 33, 44}},
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
func TestAppend(t *testing.T) {
|
||||
for i, test := range appendTests {
|
||||
origLen, extraLen := len(test.orig), len(test.extra)
|
||||
@@ -935,8 +933,6 @@ func TestAppend(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
func TestCopy(t *testing.T) {
|
||||
a := []int{1, 2, 3, 4, 10, 9, 8, 7}
|
||||
b := []int{11, 22, 33, 44, 1010, 99, 88, 77, 66, 55, 44}
|
||||
|
||||
@@ -1666,6 +1666,7 @@ func (v *Value) extendSlice(n int) {
|
||||
cap: ncap,
|
||||
}
|
||||
|
||||
v.flags = valueFlagExported
|
||||
v.value = (unsafe.Pointer)(&newslice)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user