data SchemaCompat
The environment with schema(old: "…") as old of a test contract yields (D-7070).
Example:
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, |
Методы
roundtrip | (x: &T) -> TNew writer -> old reader -> old writer -> new reader (D-7071). |
Определено в: std/core/testing.oxl:375