OxL Reference

fn oxlTestSchema

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

Example:

oxl✓ checked in 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>

Since. 1.0.0-beta

Parameters

NameType
oldstr

Returns

stream<SchemaCompat>

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/testing.oxl:413

See also