commit 76acfa25126342d10a4b9e1fae08c1b09e32d403
parent de65563dc4fe63fb50620a80bd3d20dd93ccc36c
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date: Tue, 27 Sep 2016 21:42:51 +0530
Convert unnecessary macros to functions
Diffstat:
1 file changed, 25 insertions(+), 34 deletions(-)
diff --git a/test/test-helper.el b/test/test-helper.el
@@ -117,43 +117,34 @@ All kinds of dynamic behaviour on buffer are disabled. See
(emojify-with-saved-buffer-state
,@forms)))
-(defmacro emojify-tests-should-be-emojified (point)
+(defun emojify-tests-should-be-emojified (point)
"Assert there is an emoji at POINT."
- `(progn
- (should-not (get-text-property ,point 'point-left))
- (should (get-text-property ,point 'emojified))
- (should (get-text-property ,point 'emojify-display))
- (should (get-text-property ,point 'emojify-buffer))
- (should (get-text-property ,point 'emojify-beginning))
- (should (get-text-property ,point 'emojify-end))
- (should (get-text-property ,point 'emojify-text))
- (should (get-text-property ,point 'display))
- (should (get-text-property ,point 'point-entered))))
-
-(defmacro emojify-tests-should-not-be-emojified (point)
+ (should (get-text-property point 'emojified))
+ (should (get-text-property point 'emojify-display))
+ (should (get-text-property point 'emojify-buffer))
+ (should (get-text-property point 'emojify-beginning))
+ (should (get-text-property point 'emojify-end))
+ (should (get-text-property point 'emojify-text))
+ (should (get-text-property point 'display)))
+
+(defun emojify-tests-should-not-be-emojified (point)
"Assert there is not emoji at POINT."
- `(progn
- (should-not (get-text-property ,point 'point-left))
- (should-not (get-text-property ,point 'emojified))
- (should-not (get-text-property ,point 'emojify-display))
- (should-not (get-text-property ,point 'emojify-buffer))
- (should-not (get-text-property ,point 'emojify-beginning))
- (should-not (get-text-property ,point 'emojify-end))
- (should-not (get-text-property ,point 'emojify-text))
- (should-not (get-text-property ,point 'display))
- (should-not (get-text-property ,point 'point-entered))))
-
-(defmacro emojify-tests-should-be-uncovered (point)
+ (should-not (get-text-property point 'emojified))
+ (should-not (get-text-property point 'emojify-display))
+ (should-not (get-text-property point 'emojify-buffer))
+ (should-not (get-text-property point 'emojify-beginning))
+ (should-not (get-text-property point 'emojify-end))
+ (should-not (get-text-property point 'emojify-text))
+ (should-not (get-text-property point 'display)))
+
+(defun emojify-tests-should-be-uncovered (point)
"Assert the emoji at POINT is uncovered."
- `(progn
- (should (get-text-property ,point 'point-left))
- (should (get-text-property ,point 'emojified))
- (should (get-text-property ,point 'emojify-buffer))
- (should (get-text-property ,point 'emojify-beginning))
- (should (get-text-property ,point 'emojify-end))
- (should (get-text-property ,point 'emojify-text))
- (should-not (get-text-property ,point 'point-entered))
- (should-not (get-text-property ,point 'display))))
+ (should (get-text-property point 'emojified))
+ (should (get-text-property point 'emojify-buffer))
+ (should (get-text-property point 'emojify-beginning))
+ (should (get-text-property point 'emojify-end))
+ (should (get-text-property point 'emojify-text))
+ (should-not (get-text-property point 'display)))
(provide 'test-helper)
;;; test-helper.el ends here