Basic constructor macro for snippet-mismatch structures.
(make-snippet-mismatch [:input-bytes <input-bytes>] [:expected-bytes <expected-bytes>] [:actual-bytes <actual-bytes>])
This is the usual way to construct snippet-mismatch structures. It simply conses together a structure with the specified fields.
This macro generates a new snippet-mismatch structure from scratch. See also change-snippet-mismatch, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-snippet-mismatch (&rest args) (std::make-aggregate 'snippet-mismatch args '((:input-bytes) (:expected-bytes) (:actual-bytes)) 'make-snippet-mismatch nil))
Function:
(defun snippet-mismatch (input-bytes expected-bytes actual-bytes) (declare (xargs :guard (and (my-byte-listp input-bytes) (my-byte-listp expected-bytes) (my-byte-listp actual-bytes)))) (declare (xargs :guard t)) (let ((__function__ 'snippet-mismatch)) (declare (ignorable __function__)) (b* ((input-bytes (mbe :logic (byte-list-fix input-bytes) :exec input-bytes)) (expected-bytes (mbe :logic (byte-list-fix expected-bytes) :exec expected-bytes)) (actual-bytes (mbe :logic (byte-list-fix actual-bytes) :exec actual-bytes))) (list (cons 'input-bytes input-bytes) (cons 'expected-bytes expected-bytes) (cons 'actual-bytes actual-bytes)))))