aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-03-02 22:05:52 -0300
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-03-02 22:05:52 -0300
commitf92331a692f604cab5552cd5876609e52e49139b (patch)
treecb85d534961e03c588c3debc46320254dd0655ee
parent8ff5999ab30a285f223ae63bef748120a8387ca7 (diff)
Convert tests from vectors to lists
-rw-r--r--test/test-printing.el24
-rw-r--r--test/test-search.el8
2 files changed, 15 insertions, 17 deletions
diff --git a/test/test-printing.el b/test/test-printing.el
index 850edd8..1ce7967 100644
--- a/test/test-printing.el
+++ b/test/test-printing.el
@@ -127,30 +127,30 @@ after being run through `sx-tag--format'."
'((owner . 1) (not-owner . "me"))))
(should
(equal object '((owner . 1) (not-owner . "me")))))
- (let ((object (list (cons 'comments [something]))))
+ (let ((object '((comments . (something)))))
(should
(equal (sx--add-comment-to-object "comment" object)
- '((comments . [something "comment"]))))
+ '((comments . (something "comment")))))
(should
- (equal object '((comments . [something "comment"])))))
- (let ((object (list (cons 'not-comments [something]))))
+ (equal object '((comments . (something "comment"))))))
+ (let ((object '((not-comments . (something)))))
(should
(equal (sx--add-comment-to-object "comment" object)
- '((comments . ["comment"]) (not-comments . [something]))))
+ '((comments . ("comment")) (not-comments . (something)))))
(should
- (equal object '((comments . ["comment"]) (not-comments . [something])))))
- (let ((object (list (cons 'not-answers [something]))))
+ (equal object '((comments . ("comment")) (not-comments . (something))))))
+ (let ((object '((not-answers (something)))))
(should
(equal (sx--add-answer-to-question-object "answer" object)
- '((answers . ["answer"]) (not-answers . [something]))))
+ '((answers . ("answer")) (not-answers . (something)))))
(should
- (equal object '((answers . ["answer"]) (not-answers . [something])))))
- (let ((object (list (cons 'answers [something]))))
+ (equal object '((answers . ("answer")) (not-answers . (something))))))
+ (let ((object '((answers (something)))))
(should
(equal (sx--add-answer-to-question-object "answer" object)
- '((answers . [something "answer"]))))
+ '((answers . (something "answer")))))
(should
- (equal object '((answers . [something "answer"]))))))
+ (equal object '((answers . (something "answer")))))))
;;; question-mode
diff --git a/test/test-search.el b/test/test-search.el
index 72f0846..a8cf971 100644
--- a/test/test-search.el
+++ b/test/test-search.el
@@ -15,16 +15,14 @@
"Test bogus search returns empty vector"
(test-with-bogus-string query
(should
- (equal
- []
- (sx-search-get-questions "emacs" 1 query)))))
+ (not (sx-search-get-questions "emacs" 1 query)))))
(ert-deftest test-search-invalid ()
"Test invalid search"
(should-error
;; @todo: test the interactive call
(sx-search
- "emacs" nil nil ["emacs"])))
+ "emacs" nil nil '("emacs"))))
(ert-deftest test-search-full-page ()
"Test retrieval of the full search page"
@@ -49,5 +47,5 @@
(member "org-agenda" .tags)))))
(sx-search-get-questions
"emacs" 1 nil "org-mode"
- ["org-export" "org-agenda"]))))
+ '("org-export" "org-agenda")))))