package annotation import "testing" func TestAnnotations(t *testing.T) { readOnly := ReadOnly("Read") if readOnly.Title != "Read" || !readOnly.ReadOnlyHint || readOnly.DestructiveHint != nil { t.Errorf("ReadOnly() = %#v", readOnly) } write := Write("Write") if write.Title != "Write" || write.ReadOnlyHint || write.DestructiveHint != nil { t.Errorf("Write() = %#v", write) } destructive := Destructive("Delete") if destructive.Title != "Delete" || destructive.ReadOnlyHint || destructive.DestructiveHint == nil || !*destructive.DestructiveHint { t.Errorf("Destructive() = %#v", destructive) } }