Qualify determines whether the test-only qualifier is present on the input object.
(vars Activation, obj any)
| 288 | |
| 289 | // Qualify determines whether the test-only qualifier is present on the input object. |
| 290 | func (q *testOnlyQualifier) Qualify(vars Activation, obj any) (any, error) { |
| 291 | out, present, err := q.ConstantQualifier.QualifyIfPresent(vars, obj, true) |
| 292 | if err != nil { |
| 293 | return nil, err |
| 294 | } |
| 295 | if unk, isUnk := out.(*types.Unknown); isUnk { |
| 296 | return unk, nil |
| 297 | } |
| 298 | return present, nil |
| 299 | } |
| 300 | |
| 301 | // QualifyIfPresent returns whether the target field in the test-only expression is present. |
| 302 | func (q *testOnlyQualifier) QualifyIfPresent(vars Activation, obj any, presenceOnly bool) (any, bool, error) { |
nothing calls this directly
no test coverage detected