emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 17d9d90 5/5: Improve sectioning in bytecomp-tests.el


From: Stefan Kangas
Subject: master 17d9d90 5/5: Improve sectioning in bytecomp-tests.el
Date: Wed, 2 Dec 2020 07:12:11 -0500 (EST)

branch: master
commit 17d9d90ec2affdd816047ce33d84117482b9cbe0
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Improve sectioning in bytecomp-tests.el
    
    * test/lisp/emacs-lisp/bytecomp-tests.el: Add section comments.
    (test-eager-load-macro-expansion)
    (test-eager-load-macro-expansion-eval-and-compile): Move definitions.
---
 test/lisp/emacs-lisp/bytecomp-tests.el | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el 
b/test/lisp/emacs-lisp/bytecomp-tests.el
index d9052da..7ed9021 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -490,6 +490,9 @@ Subtests signal errors if something goes wrong."
       (defun def () (m))))
   (should (equal (funcall 'def) 4)))
 
+
+;;;; Warnings.
+
 (ert-deftest bytecomp-tests--warnings ()
   (with-current-buffer (get-buffer-create "*Compile-Log*")
     (let ((inhibit-read-only t)) (erase-buffer)))
@@ -537,16 +540,6 @@ Subtests signal errors if something goes wrong."
   (bytecomp--with-warning-test "foo.*lacks a prefix"
     '(defvar foo nil)))
 
-(ert-deftest test-eager-load-macro-expansion ()
-  (test-byte-comp-compile-and-load nil
-    '(progn (defmacro abc (arg) 1) (defun def () (abc 2))))
-  (should (equal (funcall 'def) 1)))
-
-(ert-deftest test-eager-load-macro-expansion-eval-and-compile ()
-  (test-byte-comp-compile-and-load nil
-    '(eval-and-compile (defmacro abc (arg) -1) (defun def () (abc 2))))
-  (should (equal (funcall 'def) -1)))
-
 (defmacro bytecomp--define-warning-file-test (file re-warning &optional 
reverse)
   `(ert-deftest ,(intern (format "bytecomp/%s" file)) ()
      :expected-result ,(if reverse :failed :passed)
@@ -598,6 +591,19 @@ Subtests signal errors if something goes wrong."
 (bytecomp--define-warning-file-test "warn-interactive-only.el"
                             "next-line.*interactive use only.*forward-line")
 
+
+;;;; Macro expansion.
+
+(ert-deftest test-eager-load-macro-expansion ()
+  (test-byte-comp-compile-and-load nil
+    '(progn (defmacro abc (arg) 1) (defun def () (abc 2))))
+  (should (equal (funcall 'def) 1)))
+
+(ert-deftest test-eager-load-macro-expansion-eval-and-compile ()
+  (test-byte-comp-compile-and-load nil
+    '(eval-and-compile (defmacro abc (arg) -1) (defun def () (abc 2))))
+  (should (equal (funcall 'def) -1)))
+
 (ert-deftest test-eager-load-macro-expansion-eval-when-compile ()
   ;; Make sure we interpret eval-when-compile forms properly.  CLISP
   ;; and SBCL interpreter eval-when-compile (well, the CL equivalent)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]