summaryrefslogtreecommitdiff
path: root/test-suite/tests/elisp-compiler.test
diff options
context:
space:
mode:
authorDaniel Kraft <d@domob.eu>2009-07-18 17:21:55 +0200
committerDaniel Kraft <d@domob.eu>2009-07-18 17:21:55 +0200
commite905e490fae68bd87ec66b35235b02c61cdace40 (patch)
treefcadff521e0f31df67a9bb7d397608f1812dcfdd /test-suite/tests/elisp-compiler.test
parent74c009dadc1e8f580727d2c85bf72ec90e82d15a (diff)
downloadguile-e905e490fae68bd87ec66b35235b02c61cdace40.tar.gz
Implemented eq and equal built-in predicates.
* module/language/elisp/runtime/function-slot.scm: Implement eq and equal. * test-suite/tests/elisp-compiler.test: Test them.
Diffstat (limited to 'test-suite/tests/elisp-compiler.test')
-rw-r--r--test-suite/tests/elisp-compiler.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/test-suite/tests/elisp-compiler.test b/test-suite/tests/elisp-compiler.test
index 677f14dc0..af928c5df 100644
--- a/test-suite/tests/elisp-compiler.test
+++ b/test-suite/tests/elisp-compiler.test
@@ -227,6 +227,23 @@
; Test the built-ins.
; ===================
+(with-test-prefix/compile "Equivalence Predicates"
+
+ (pass-if "equal"
+ (and (equal 2 2) (not (equal 1 2))
+ (equal "abc" "abc") (not (equal "abc" "ABC"))
+ (equal 'abc 'abc) (not (equal 'abc 'def))
+ (equal '(1 2 (3 4) 5) '(1 2 (3 4) 5))
+ (not (equal '(1 2 3 4 5) '(1 2 (3 4) 5)))))
+
+ (pass-if "eq"
+ (progn (setq some-list '(1 2))
+ (setq some-string "abc")
+ (and (eq 2 2) (not (eq 1 2))
+ (eq 'abc 'abc) (not (eq 'abc 'def))
+ (eq some-string some-string) (not (eq some-string "abc"))
+ (eq some-list some-list) (not (eq some-list '(1 2)))))))
+
(with-test-prefix/compile "Number Built-Ins"
(pass-if "floatp"