TestExpression returns a TestRunnerOption which configures a policy file, expression file, or raw expression for testing
(value string)
| 434 | // TestExpression returns a TestRunnerOption which configures a policy file, expression file, or raw expression |
| 435 | // for testing |
| 436 | func TestExpression(value string) TestRunnerOption { |
| 437 | return func(tr *TestRunner) (*TestRunner, error) { |
| 438 | if value != "" { |
| 439 | tr.Expressions = append(tr.Expressions, |
| 440 | &compiler.CompiledExpression{Path: value}, |
| 441 | &compiler.FileExpression{Path: value}, |
| 442 | &compiler.RawExpression{Value: value}, |
| 443 | ) |
| 444 | } |
| 445 | return tr, nil |
| 446 | } |
| 447 | } |
| 448 | |
| 449 | // TestCompiler returns a TestRunnerOption which configures the test runner with |
| 450 | // a compiler created using the set of compiler options. |
no outgoing calls
no test coverage detected