%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/emacs-lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/emacs-lisp/ert.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\312\313\314\315\316\317\320\321&\210\322\323\324\325\326DD\327\330\331%\210\332\333\334\335\320\313%\210\332\336\337\340\320\313%\207" [require cl-lib button debug backtrace easymenu ewoc find-func help pp custom-declare-group ert nil "ERT, the Emacs Lisp regression testing tool." :prefix "ert-" :group lisp custom-declare-variable ert-batch-backtrace-right-margin funcall function #[0 "\300\207" [70] 1] "Maximum length of lines in ERT backtraces in batch mode.\nUse nil for no limit (caution: backtrace lines can be very long)." :type (choice (const :tag "No truncation" nil) integer) custom-declare-face ert-test-result-expected ((((class color) (background light)) :background "green1") (((class color) (background dark)) :background "green3")) "Face used for expected results in the ERT results buffer." ert-test-result-unexpected ((((class color) (background light)) :background "red1") (((class color) (background dark)) :background "red3")) "Face used for unexpected results in the ERT results buffer."] 8) #@386 Return t if A and B have similar structure and contents. This is like `equal-including-properties' except that it compares the property values of text properties structurally (by recursing) rather than with `eq'. Perhaps this is what `equal-including-properties' should do in the first place; see Emacs bug 6581 at URL `https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6581'. (fn A B) (defalias 'ert-equal-including-properties #[514 "\300\"?\207" [ert--explain-equal-including-properties] 5 (#$ . 1556)]) #@67 compiler-macro for inlining `ert-test-p'. (fn CL-WHOLE-ARG CL-X) (defalias 'ert-test-p--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block ert-test-p (and (memq (type-of cl-x) cl-struct-ert-test-tags) t)) nil] 9 (#$ . 2069)]) (put 'ert-test-p 'compiler-macro 'ert-test-p--cmacro) #@13 (fn CL-X) (defalias 'ert-test-p #[257 "\301!>\205 \302\207" [cl-struct-ert-test-tags type-of t] 3 (#$ . 2391)]) (byte-code "\300\301\302\303#\304\305\306\301#\207" [function-put ert-test-p side-effect-free error-free put ert-test cl-deftype-satisfies] 5) #@70 compiler-macro for inlining `ert-test-name'. (fn CL-WHOLE-ARG CL-X) (defalias 'ert-test-name--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block ert-test-name (progn (or (ert-test-p cl-x) (signal 'wrong-type-argument (list 'ert-test cl-x))) (aref cl-x 1))) nil] 9 (#$ . 2657)]) (put 'ert-test-name 'compiler-macro 'ert-test-name--cmacro) #@58 Access slot "name" of `ert-test' struct CL-X. (fn CL-X) (defalias 'ert-test-name #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-ert-test-tags type-of signal wrong-type-argument ert-test 1] 5 (#$ . 3037)]) (byte-code "\300\301\302\303#\300\207" [function-put ert-test-name side-effect-free t] 4) #@79 compiler-macro for inlining `ert-test-documentation'. (fn CL-WHOLE-ARG CL-X) (defalias 'ert-test-documentation--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block ert-test-documentation (progn (or (ert-test-p cl-x) (signal 'wrong-type-argument (list 'ert-test cl-x))) (aref cl-x 2))) nil] 9 (#$ . 3359)]) (put 'ert-test-documentation 'compiler-macro 'ert-test-documentation--cmacro) #@67 Access slot "documentation" of `ert-test' struct CL-X. (fn CL-X) (defalias 'ert-test-documentation #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-ert-test-tags type-of signal wrong-type-argument ert-test 2] 5 (#$ . 3784)]) (byte-code "\300\301\302\303#\300\207" [function-put ert-test-documentation side-effect-free t] 4) #@70 compiler-macro for inlining `ert-test-body'. (fn CL-WHOLE-ARG CL-X) (defalias 'ert-test-body--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block ert-test-body (progn (or (ert-test-p cl-x) (signal 'wrong-type-argument (list 'ert-test cl-x))) (aref cl-x 3))) nil] 9 (#$ . 4133)]) (put 'ert-test-body 'compiler-macro 'ert-test-body--cmacro) #@58 Access slot "body" of `ert-test' struct CL-X. (fn CL-X) (defalias 'ert-test-body #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-ert-test-tags type-of signal wrong-type-argument ert-test 3] 5 (#$ . 4513)]) (byte-code "\300\301\302\303#\300\207" [function-put ert-test-body side-effect-free t] 4) #@84 compiler-macro for inlining `ert-test-most-recent-result'. (fn CL-WHOLE-ARG CL-X) (defalias 'ert-test-most-recent-result--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block ert-test-most-recent-result (progn (or (ert-test-p cl-x) (signal 'wrong-type-argument (list 'ert-test cl-x))) (aref cl-x 4))) nil] 9 (#$ . 4835)]) (put 'ert-test-most-recent-result 'compiler-macro 'ert-test-most-recent-result--cmacro) #@72 Access slot "most-recent-result" of `ert-test' struct CL-X. (fn CL-X) (defalias 'ert-test-most-recent-result #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-ert-test-tags type-of signal wrong-type-argument ert-test 4] 5 (#$ . 5285)]) (byte-code "\300\301\302\303#\300\207" [function-put ert-test-most-recent-result side-effect-free t] 4) #@86 compiler-macro for inlining `ert-test-expected-result-type'. (fn CL-WHOLE-ARG CL-X) (defalias 'ert-test-expected-result-type--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block ert-test-expected-result-type (progn (or (ert-test-p cl-x) (signal 'wrong-type-argument (list 'ert-test cl-x))) (aref cl-x 5))) nil] 9 (#$ . 5649)]) (put 'ert-test-expected-result-type 'compiler-macro 'ert-test-expected-result-type--cmacro) #@74 Access slot "expected-result-type" of `ert-test' struct CL-X. (fn CL-X) (defalias 'ert-test-expected-result-type #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-ert-test-tags type-of signal wrong-type-argument ert-test 5] 5 (#$ . 6109)]) (byte-code "\300\301\302\303#\300\207" [function-put ert-test-expected-result-type side-effect-free t] 4) #@70 compiler-macro for inlining `ert-test-tags'. (fn CL-WHOLE-ARG CL-X) (defalias 'ert-test-tags--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block ert-test-tags (progn (or (ert-test-p cl-x) (signal 'wrong-type-argument (list 'ert-test cl-x))) (aref cl-x 6))) nil] 9 (#$ . 6479)]) (put 'ert-test-tags 'compiler-macro 'ert-test-tags--cmacro) #@58 Access slot "tags" of `ert-test' struct CL-X. (fn CL-X) (defalias 'ert-test-tags #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-ert-test-tags type-of signal wrong-type-argument ert-test 6] 5 (#$ . 6859)]) (byte-code "\300\301\302\303#\304\305\306\"\207" [function-put ert-test-tags side-effect-free t defalias copy-ert-test copy-sequence] 4) #@145 compiler-macro for inlining `make-ert-test'. (fn CL-WHOLE &cl-quote &key NAME DOCUMENTATION BODY MOST-RECENT-RESULT EXPECTED-RESULT-TYPE TAGS) (defalias 'make-ert-test--cmacro #[385 "\300\301\"A@\300\302\"A@\300\303\"\206 \304A@\300\305\"A@\300\306\"\206$ \307A@\300\310\"\206/ \311A@\211\203^ \211@\312>\203F \211AA\262\2023 \313>A@\203U \314\262\2023 \315\316@\"\210\2023 \210\317\320\321\314\314&\207" [plist-member :name :documentation :body (nil (cl-assert nil)) :most-recent-result :expected-result-type (nil ':passed) :tags (nil 'nil) (:name :documentation :body :most-recent-result :expected-result-type :tags :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:name :documentation :body :most-recent-result :expected-result-type :tags)" cl--defsubst-expand (name documentation body most-recent-result expected-result-type tags) (cl-block make-ert-test (record 'ert-test name documentation body most-recent-result expected-result-type tags))] 20 (#$ . 7229)]) (put 'make-ert-test 'compiler-macro 'make-ert-test--cmacro) #@125 Constructor for objects of type `ert-test'. (fn &key NAME DOCUMENTATION BODY MOST-RECENT-RESULT EXPECTED-RESULT-TYPE TAGS) (defalias 'make-ert-test #[128 "\300\301\"A@\300\302\"A@\300\303\"\206 \304\305\304!\210\304DA@\300\306\"A@\300\307\"\206* \310A@\300\311\"\2065 \312A@\211\203d \211@\313>\203L \211AA\262\2029 \314>A@\203[ \304\262\2029 \315\316@\"\210\2029 \210\317\320&\207" [plist-member :name :documentation :body nil cl--assertion-failed :most-recent-result :expected-result-type (nil :passed) :tags (nil nil) (:name :documentation :body :most-recent-result :expected-result-type :tags :allow-other-keys) :allow-other-keys error "Keyword argument %s not one of (:name :documentation :body :most-recent-result :expected-result-type :tags)" record ert-test] 15 (#$ . 8324)]) (cl-struct-define 'ert-test nil 'cl-structure-object 'record nil '((cl-tag-slot) (name nil) (documentation nil) (body (cl-assert nil)) (most-recent-result nil) (expected-result-type ':passed) (tags 'nil)) 'cl-struct-ert-test-tags 'ert-test t) #@53 Return non-nil if SYMBOL names a test. (fn SYMBOL) (defalias 'ert-test-boundp #[257 "\211\300N\205 \301\207" [ert--test t] 3 (#$ . 9386)]) #@79 If SYMBOL names a test, return that. Signal an error otherwise. (fn SYMBOL) (defalias 'ert-get-test #[257 "\300!\204 \301\302\"\210\211\303N\207" [ert-test-boundp error "No test named `%S'" ert--test] 4 (#$ . 9533)]) #@86 Make SYMBOL name the test DEFINITION, and return DEFINITION. (fn SYMBOL DEFINITION) (defalias 'ert-set-test #[514 "\300=\203\n \301\302!\210\303\304#\210\207" [nil error "Attempt to define a test named nil" define-symbol-prop ert--test] 6 (#$ . 9761)]) #@56 Make SYMBOL name no test. Return SYMBOL. (fn SYMBOL) (defalias 'ert-make-test-unbound #[257 "\300\301\"\210\207" [cl-remprop ert--test] 4 (#$ . 10024)]) #@377 Split KEYS-AND-BODY into keyword-and-value pairs and the remaining body. KEYS-AND-BODY should have the form of a property list, with the exception that only keywords are permitted as keys and that the tail -- the body -- is a list of forms that does not start with a keyword. Returns a two-element list containing the keys-and-values plist and the body. (fn KEYS-AND-BODY) (defalias 'ert--parse-keys-and-body #[257 "\300\301\242!\2039 \211A\262\242:\204 \302\303#\210\304\"\203) \305\306#\210\211\211A\262\242BB\262\210\202 \237\262\300\211\211:\203c @\262\211A\262\242\262B\262B\262A\262\202A \211\237\266\204D\207" [nil keywordp error "Value expected after keyword %S in %S" assoc warn "Keyword %S appears more than once in %S"] 9 (#$ . 10187)]) #@721 Define NAME (a symbol) as a test. BODY is evaluated as a `progn' when the test is run. It should signal a condition on failure or just return if the test passes. `should', `should-not', `should-error' and `skip-unless' are useful for assertions in BODY. Use `ert' to run tests interactively. Tests that are expected to fail can be marked as such using :expected-result. See `ert-test-result-type-p' for a description of valid values for RESULT-TYPE. Macros in BODY are expanded when the test is defined, not when it is run. If a macro (possibly with side effects) is to be tested, it has to be wrapped in `(eval (quote ...))'. (fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \='(TAG...)] BODY...) (defalias 'ert-deftest '(macro . #[385 "\211\203 \211A\262\242\202 \300\301\302GD\"\211\203\"