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)С версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
index | i64 |
value | T |
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/testing.oxl:321