I've noticed this difference between the repository version of
byte-compiler-tests and my own:
Index: byte-compiler-tests.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/tests/automated/Attic/byte-compiler-tests.el,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 byte-compiler-tests.el
--- byte-compiler-tests.el 1999/05/10 07:13:46 1.1.2.2
+++ byte-compiler-tests.el 1999/12/20 00:18:32
@@ -91,3 +91,32 @@
error "`let' bindings can have only one value-form"
(eval '(let* ((x 1 2)) 3)))
+(defmacro before-and-after-compile-equal (&rest form)
+ `(Assert (equal (funcall (quote (lambda () ,@form)))
+ (funcall (byte-compile (quote (lambda () ,@form)))))))
+
+(defvar simplyamarker (point-min-marker))
+
+;; The byte optimizer must be careful with +/- with a single argument.
+
+(before-and-after-compile-equal (+))
+(before-and-after-compile-equal (+ 2 2))
+(before-and-after-compile-equal (+ 2 1))
+(before-and-after-compile-equal (+ 1 2))
+;; (+ 1) is OK. but (+1) signals an error.
+(before-and-after-compile-equal (+ 1))
+(before-and-after-compile-equal (+ simplyamarker 1))
+;; The optimization (+ m) --> m is invalid when m is a marker.
+(before-and-after-compile-equal (+ simplyamarker))
+;; Same tests for minus.
+(before-and-after-compile-equal (-))
+(before-and-after-compile-equal (- 2 2))
+(before-and-after-compile-equal (- 2 1))
+(before-and-after-compile-equal (- 1 2))
+(before-and-after-compile-equal (- 1))
+(before-and-after-compile-equal (- simplyamarker 1))
+(before-and-after-compile-equal (- simplyamarker))
+
+
+
+
I'm sure I didn't write the additional code -- I patched it from a
message on xemacs-beta, which might have come from Jan. Does anyone
remember what these tests were supposed to do, and why they weren't
applied?