Cotton code
32 lines · 1.0 KB · RustRaw
//! The wire strings, pinned. These reach the file, the MCP surface and the//! app, so a rename is a migration rather than a refactor.use super::*;#[test]fn the_memory_statuses_are_the_typescripts_own() {    assert_eq!(        MemoryStatus::ALL.map(|s| s.as_str()),        ["active", "archived"]    );    for status in MemoryStatus::ALL {        assert_eq!(MemoryStatus::parse(status.as_str()), Some(status));    }    assert_eq!(MemoryStatus::parse("draft"), None);}#[test]fn the_memory_origin_kinds_are_the_typescripts_own() {    assert_eq!(MemoryOriginKind::ALL.map(|k| k.as_str()), ["user", "agent"]);    for kind in MemoryOriginKind::ALL {        assert_eq!(MemoryOriginKind::parse(kind.as_str()), Some(kind));    }    assert_eq!(MemoryOriginKind::parse("system"), None);}// RULE: The current memory format never reads the retired proposed status.#[test]fn proposed_memory_status_is_not_a_current_format() {    assert_eq!(MemoryStatus::parse("proposed"), None);    assert!(serde_json::from_str::<MemoryStatus>("\"proposed\"").is_err());}