Lines
100 %
Functions
Branches
// Skipped under Miri: these tests compile+run wasm via wasmtime, whose
// Cranelift backend refuses to run under Miri.
#![cfg(not(miri))]
//! PERSIST rows with their Common Lisp values: a DEFUN over a macro replaces
//! it, and a DEFMACRO over a function does too.
#[path = "persist/rows.rs"]
mod persist;
use persist::{Row, assert_pinned, row};
const MACRO: &str = "(defmacro m (x) `(* ,x 2))";
const FUNCTION: &str = "(defun m (x) (list x x))";
fn rows() -> Vec<Row> {
vec![
row("R1", &[MACRO, FUNCTION, "(m (+ 1 2))"]),
row("R2", &[FUNCTION, MACRO, "(m (+ 1 2))"]),
]
}
/// CL: R1 (3 3), R2 6.
const TODAY: &[(&str, &[&str])] = &[("R1", &["m", "m", "(3 3)"]), ("R2", &["m", "m", "6"])];
#[test]
fn every_row_reads_as_common_lisp() {
assert_pinned(&rows(), TODAY);