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

data SchemaCompat

The environment with schema(old: "…") as old of a test contract yields (D-7070).

Example:

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

test contract "schema is compatible" with schema(old: "published") as old {
  let p = Person{ id: 1, name: "ann" }
  assert_eq(old.roundtrip(p), p)
}
pub(api) data SchemaCompat

С версии. 1.0.0-beta

Поля

pub(api) old: str

The old schema as written in the test: a version, published or a path.

Методы

roundtrip(x: &T) -> T
New writer -> old reader -> old writer -> new reader (D-7071).

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

См. также