aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2014-11-01 19:25:18 -0400
committerSean Allred <code@seanallred.com>2014-11-01 19:28:18 -0400
commit58ac7ce7c587a5dcb876bffde0aca72b6469cd86 (patch)
treea9e6b68f00f122221f487d1c4d94a3e3ab47ee54 /test
parented05bfa3f27043d00690323b991284442bda1b90 (diff)
More readable test cases; whitespace
Diffstat (limited to 'test')
-rw-r--r--test/tests.el46
1 files changed, 20 insertions, 26 deletions
diff --git a/test/tests.el b/test/tests.el
index 01d501c..ac40cea 100644
--- a/test/tests.el
+++ b/test/tests.el
@@ -3,17 +3,17 @@
(mapatoms
(lambda (symbol)
(if (string-prefix-p "stack-" (symbol-name symbol))
- (unintern symbol)))))
+ (unintern symbol)))))
(defun stack-test-sample-data (method &optional directory)
(with-current-buffer
(find-file-noselect
(concat "data-samples/"
- (when directory (concat directory "/"))
- method ".el"))
+ (when directory (concat directory "/"))
+ method ".el"))
(eval (read (if (string-equal "" (buffer-string))
- "'no-value"
- (buffer-string))))))
+ "'no-value"
+ (buffer-string))))))
(setq stack-test-data-questions
(stack-test-sample-data "questions")
@@ -47,28 +47,22 @@
(should
(equal
'((1 . t) (2 . [1 2]) (3))
- (stack-core-filter-data '((0 . 3)
- (1 . t)
- (a . five)
- (2 . [1 2])
- ("5" . bop)
- (3)
- (p . 4))
+ (stack-core-filter-data '((0 . 3) (1 . t) (a . five) (2 . [1 2])
+ ("5" . bop) (3) (p . 4))
'(1 2 3))))
;; complex
(should
(equal
- '((1 . [a b c]) (2 . [((a . 1) (c . 3)) ((a . 4) (c . 6))]) (3 . peach))
+ '((1 . [a b c])
+ (2 . [((a . 1) (c . 3))
+ ((a . 4) (c . 6))])
+ (3 . peach))
(stack-core-filter-data '((1 . [a b c])
- (2 . [((a . 1)
- (b . 2)
- (c . 3))
- ((a . 4)
- (b . 5)
- (c . 6))])
- (3 . peach)
- (4 . banana))
- '(1 (2 a c) 3))))
+ (2 . [((a . 1) (b . 2) (c . 3))
+ ((a . 4) (b . 5) (c . 6))])
+ (3 . peach)
+ (4 . banana))
+ '(1 (2 a c) 3))))
;; vector
(should
@@ -77,10 +71,10 @@
((1 . a) (2 . b) (3 . c))
nil ((1 . alpha) (2 . beta))]
(stack-core-filter-data [((1 . 2) (2 . 3) (3 . 4))
- ((1 . a) (2 . b) (3 . c) (5 . seven))
- ((should-not-go))
- ((1 . alpha) (2 . beta))]
- '(1 2 3)))))
+ ((1 . a) (2 . b) (3 . c) (5 . seven))
+ ((should-not-go))
+ ((1 . alpha) (2 . beta))]
+ '(1 2 3)))))
(ert-deftest test-tree-member ()
"`stack-core-filter-data--item-in-tree'"