Mercurial > hg > xemacs-beta
comparison tests/automated/byte-compiler-tests.el @ 4855:189fb67ca31a
Create Assert-eq, Assert-equal, etc.
These are equivalent to (Assert (eq ...)) but display both the actual value
and the expected value of the comparison.
Use them throughout the test suite.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Thu, 14 Jan 2010 02:18:03 -0600 |
parents | 3d3049ae1304 |
children | 0f66906b6e37 |
comparison
equal
deleted
inserted
replaced
4854:95c4ced5c07c | 4855:189fb67ca31a |
---|---|
90 (Check-Error-Message | 90 (Check-Error-Message |
91 error "`let' bindings can have only one value-form" | 91 error "`let' bindings can have only one value-form" |
92 (eval '(let* ((x 1 2)) 3))) | 92 (eval '(let* ((x 1 2)) 3))) |
93 | 93 |
94 (defmacro before-and-after-compile-equal (&rest form) | 94 (defmacro before-and-after-compile-equal (&rest form) |
95 `(Assert (equal (funcall (quote (lambda () ,@form))) | 95 `(Assert-equal (funcall (quote (lambda () ,@form))) |
96 (funcall (byte-compile (quote (lambda () ,@form))))))) | 96 (funcall (byte-compile (quote (lambda () ,@form)))))) |
97 | 97 |
98 (defvar simplyamarker (point-min-marker)) | 98 (defvar simplyamarker (point-min-marker)) |
99 | 99 |
100 ;; The byte optimizer must be careful with +/- with a single argument. | 100 ;; The byte optimizer must be careful with +/- with a single argument. |
101 | 101 |