From 6686c6d693acd340094370889a8381e793e76933 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Sat, 30 Jul 2022 07:16:08 -0700 Subject: fix(wpcarro/emacs): Use should macro in maybe.el tests More fixes along the way Change-Id: I6b62eb0545981c2792d6c70089fe81324ba2dbf0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6010 Reviewed-by: wpcarro Autosubmit: wpcarro Tested-by: BuildkiteCI --- users/wpcarro/emacs/pkgs/maybe/tests.el | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/users/wpcarro/emacs/pkgs/maybe/tests.el b/users/wpcarro/emacs/pkgs/maybe/tests.el index 775bb6b7ac..c0463cc65a 100644 --- a/users/wpcarro/emacs/pkgs/maybe/tests.el +++ b/users/wpcarro/emacs/pkgs/maybe/tests.el @@ -9,20 +9,17 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (ert-deftest maybe-nil? () - (and - (maybe-nil? nil) - (not (maybe-nil? t)))) + (should (maybe-nil? nil)) + (should (not (maybe-nil? t)))) (ert-deftest maybe-some? () - (and - (maybe-some? '(1 2 3)) - (not (maybe-some? nil)))) + (should (maybe-some? '(1 2 3))) + (should (not (maybe-some? nil)))) (ert-deftest maybe-default () - (and - (string= "some" (maybe-default "some" nil)) - (= 10 (maybe-default 1 10)))) + (should (string= "some" (maybe-default "some" nil))) + (should (= 10 (maybe-default 1 10)))) (ert-deftest maybe-map () - (eq nil (maybe-map (lambda (x) (* x 2)) nil)) - (= 4 (maybe-map (lambda (x) (* x 2)) 2))) + (should (eq nil (maybe-map (lambda (x) (* x 2)) nil))) + (should (= 4 (maybe-map (lambda (x) (* x 2)) 2)))) -- cgit 1.4.1