Commit f565edaf authored by Ola Nilsson's avatar Ola Nilsson Committed by Jorgen Schäfer

Extract super-struct buttercup-suite-or-spec

parent 47dd72c9
...@@ -661,37 +661,31 @@ See also `buttercup-define-matcher'." ...@@ -661,37 +661,31 @@ See also `buttercup-define-matcher'."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Suite and spec data structures ;;; Suite and spec data structures
(cl-defstruct buttercup-suite (cl-defstruct buttercup-suite-or-spec
;; The name of this specific suite ;; The name of this specific suite
description description
;; Any children of this suite, both suites and specs
children
;; The parent of this suite, another suite ;; The parent of this suite, another suite
parent parent
;; One of: passed failed pending
(status 'passed)
failure-description
failure-stack
)
(cl-defstruct (buttercup-suite (:include buttercup-suite-or-spec))
;; Any children of this suite, both suites and specs
children
;; Closure to run before and after each spec in this suite and its ;; Closure to run before and after each spec in this suite and its
;; children ;; children
before-each before-each
after-each after-each
;; Likewise, but before and after all specs. ;; Likewise, but before and after all specs.
before-all before-all
after-all after-all)
;; These are set if there are errors in after-all.
;; One of: passed failed pending
(status 'passed)
failure-description
failure-stack)
(cl-defstruct buttercup-spec (cl-defstruct (buttercup-spec (:include buttercup-suite-or-spec))
;; The description of the it form this was generated from
description
;; The suite this spec is a member of
parent
;; The closure to run for this spec ;; The closure to run for this spec
function function)
;; One of: passed failed pending
(status 'passed)
failure-description
failure-stack)
(defun buttercup-suite-add-child (parent child) (defun buttercup-suite-add-child (parent child)
"Add a CHILD suite to a PARENT suite." "Add a CHILD suite to a PARENT suite."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment