ucal-core 0.2.0

Universe Calendar core: absolute time in Planck ticks, base-5 tier grid, profile UC-1
Documentation
//! Compile-fail tests required by §21.3.
//!
//! Assertions 3 and 11 are not testable at runtime by construction: they say that
//! certain programs must not *exist*. `trybuild` compiles each case and asserts it
//! fails with the expected diagnostic, so a refactor that quietly re-opens the
//! path — say by adding a `From<SignedWindow> for Delta` — turns into a test
//! failure rather than a silent loss of the guarantee.

#[test]
fn rule_q3_and_rule_p_are_enforced_by_the_type_system() {
    let t = trybuild::TestCases::new();
    // Rule Q.3 — metadata cannot reach arithmetic (§21.3-3).
    t.compile_fail("tests/compile_fail/signed_window_as_operand.rs");
    t.compile_fail("tests/compile_fail/signed_window_into_delta.rs");
    t.compile_fail("tests/compile_fail/signed_window_arithmetic.rs");
    // Rule U — a window cannot silently collapse to an instant.
    t.compile_fail("tests/compile_fail/window_into_instant.rs");
    // Rule T — a stated value cannot be used as a tick-precise one.
    t.compile_fail("tests/compile_fail/stated_is_not_an_instant.rs");
    // Rule P — profiles do not mix (§21.3-11).
    t.compile_fail("tests/compile_fail/cross_profile_arithmetic.rs");
    t.compile_fail("tests/compile_fail/cross_profile_comparison.rs");
}