fn oxlProvideSet
provide T = value in a test (§18.2, D-6107): replaces the value of the provide number index of the program until the test ends.
Example:
provide Duration = 30s
fn timeout() -> Duration => 30s
test "a provided value is replaced in a test" {
provide Duration = 1s
assert_eq(timeout(), 30s)
}@intrinsic("test.provideSet") pub(api) fn oxlProvideSet<T>(index: i64, value: T)Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
index | i64 |
value | T |
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/testing.oxl:321