emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/buttercup f565eda 157/340: Extract super-struct buttercup-


From: ELPA Syncer
Subject: [nongnu] elpa/buttercup f565eda 157/340: Extract super-struct buttercup-suite-or-spec
Date: Thu, 16 Dec 2021 14:59:24 -0500 (EST)

branch: elpa/buttercup
commit f565edaf82bc413897c4f60c9a0c229d2a6dc4e1
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Jorgen Schäfer <Jorgen.Schaefer@gmail.com>

    Extract super-struct buttercup-suite-or-spec
---
 buttercup.el | 32 +++++++++++++-------------------
 1 file changed, 13 insertions(+), 19 deletions(-)

diff --git a/buttercup.el b/buttercup.el
index f555567..be87a5c 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -661,37 +661,31 @@ See also `buttercup-define-matcher'."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Suite and spec data structures
 
-(cl-defstruct buttercup-suite
+(cl-defstruct buttercup-suite-or-spec
   ;; The name of this specific suite
   description
-  ;; Any children of this suite, both suites and specs
-  children
   ;; The parent of this suite, another suite
   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
   ;; children
   before-each
   after-each
   ;; Likewise, but before and after all specs.
   before-all
-  after-all
-  ;; These are set if there are errors in after-all.
-  ;; One of: passed failed pending
-  (status 'passed)
-  failure-description
-  failure-stack)
+  after-all)
 
-(cl-defstruct buttercup-spec
-  ;; The description of the it form this was generated from
-  description
-  ;; The suite this spec is a member of
-  parent
+(cl-defstruct (buttercup-spec (:include buttercup-suite-or-spec))
   ;; The closure to run for this spec
-  function
-  ;; One of: passed failed pending
-  (status 'passed)
-  failure-description
-  failure-stack)
+  function)
 
 (defun buttercup-suite-add-child (parent child)
   "Add a CHILD suite to a PARENT suite."



reply via email to

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