aboutsummaryrefslogtreecommitdiffstats
path: root/prog/any_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-05-01 17:19:27 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-05-02 12:16:06 +0200
commit58da4c35b15200b7279f18ea15bc8644618aae78 (patch)
tree412d59572c980c4eb582d6d0e187eb6ec32345c9 /prog/any_test.go
parentbc734e7ada413654f1b7d948b2a857260a52dd9c (diff)
prog: introduce Field type
Remvoe FieldName from Type and add a separate Field type that holds field name. Use Field for struct fields, union options and syscalls arguments, only these really have names. Reduces size of sys/linux/gen/amd64.go from 5665583 to 5201321 (-8.2%). Allows to not create new type for squashed any pointer. But main advantages will follow, e.g. removing StructDesc, using TypeRef in Arg, etc. Update #1580
Diffstat (limited to 'prog/any_test.go')
-rw-r--r--prog/any_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/prog/any_test.go b/prog/any_test.go
index 968d1624a..e481ef1c1 100644
--- a/prog/any_test.go
+++ b/prog/any_test.go
@@ -61,12 +61,12 @@ func TestSquash(t *testing.T) {
if target.ArgContainsAny(ptrArg) {
t.Fatalf("arg is already squashed")
}
- target.squashPtr(ptrArg, true)
+ target.squashPtr(ptrArg)
if !target.ArgContainsAny(ptrArg) {
t.Fatalf("arg is not squashed")
}
p1 := strings.TrimSpace(string(p.Serialize()))
- target.squashPtr(ptrArg, true)
+ target.squashPtr(ptrArg)
p2 := strings.TrimSpace(string(p.Serialize()))
if p1 != p2 {
t.Fatalf("double squash changed program:\n%v\nvs:\n%v", p1, p2)