change reflect.CopyArray into a method on ArrayValue called CopyFrom

R=rsc
DELTA=16  (12 added, 0 deleted, 4 changed)
OCL=23242
CL=23242
This commit is contained in:
Rob Pike 2009-01-21 15:45:54 -08:00
parent e1e158a90c
commit c5f99ccbdd
3 changed files with 15 additions and 3 deletions

View file

@ -308,7 +308,7 @@ func TestCopyArray(t *testing.T) {
}
}
for tocopy := 1; tocopy <= 7; tocopy++ {
CopyArray(vb.(PtrValue).Sub(), va.(PtrValue).Sub(), tocopy);
vb.(PtrValue).Sub().(ArrayValue).CopyFrom(va.(PtrValue).Sub(), tocopy);
for i := 0; i < tocopy; i++ {
if a[i] != b[i] {
t.Errorf("1 tocopy=%d a[%d]=%d, b[%d]=%d",