OxL Справочник OxL
РусскийEnglish

fn oxlTestSchema

The environment with schema(old: "...") as old of a test contract yields; the compiler calls it.

Example:

oxl✓ проверяется в CI
data Item {
  id: i64
}

test contract "item schema" with schema(old: "published") as old {
  assert_eq(old.roundtrip(Item{ id: 1 }).id, 1)
}
pub(api) fn oxlTestSchema(old: str) -> stream<SchemaCompat>

С версии. 1.0.0-beta

Параметры

ИмяТип
oldstr

Возвращает

stream<SchemaCompat>

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/core/testing.oxl:413

См. также