- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestUnpackListExprAllocs (0.14 sec)
-
src/cmd/compile/internal/syntax/parser_test.go
} if col := pos.RelCol(); col != test.col { t.Errorf("%s: got col = %d; want %d", test.src, col, test.col) } } } // Test that typical uses of UnpackListExpr don't allocate. func TestUnpackListExprAllocs(t *testing.T) { var x Expr = NewName(Pos{}, "x") allocs := testing.AllocsPerRun(1000, func() { list := UnpackListExpr(x) if len(list) != 1 || list[0] != x { t.Fatalf("unexpected result") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 14 16:30:19 UTC 2024 - 12.2K bytes - Viewed (0)