1
0
forked from alex-eg/sex

move basic and semen tests to groups

This commit is contained in:
2025-10-21 21:23:12 +03:00
committed by Pavel Kulyov
parent 45d9199c27
commit 3d11426165
2 changed files with 61 additions and 67 deletions

View File

@@ -1,6 +1,6 @@
(test-begin "basic")
(test-group "basic"
;;; unkebabify
;; unkebabify
(test '- (unkebabify '-))
(test '-- (unkebabify '--))
(test '-> (unkebabify '->))
@@ -11,25 +11,21 @@
(test '_this_->_member_ (unkebabify '-this-->-member-))
(test '__->>> (unkebabify '--->>>))
;;; atom-to-fmt-c
;; atom-to-fmt-c
(test '%fun (atom-to-fmt-c 'fn))
(test '%prototype (atom-to-fmt-c 'prototype))
(test '%var (atom-to-fmt-c 'var))
(test '%block-begin (atom-to-fmt-c 'begin))
(test '%define (atom-to-fmt-c 'define))
(test '%pointer (atom-to-fmt-c 'pointer))
(test '%array (atom-to-fmt-c 'array))
(test 'vector-ref (atom-to-fmt-c '¤))
(test '%include (atom-to-fmt-c 'include))
(test '%cast (atom-to-fmt-c 'cast))
;;; c89 stuff
;; c89 stuff
(test 'int (atom-to-fmt-c 'bool))
(test 1 (atom-to-fmt-c 'true))
(test 0 (atom-to-fmt-c 'false))
;;; make-field-access
;; make-field-access
(test 'a.b (make-field-access '(.b a)))
(test 'a.b.c (make-field-access '(.c a.b)))
(test-end)
(test 'a.b.c (make-field-access '(.c a.b))))

View File

@@ -8,7 +8,7 @@
'(pub fn float sum ((int a) (int b))
(return (cast float (+ a b)))))
(test-begin "semen")
(test-group "semen"
(test-assert (sex-fn? print-str-fn))
(test #f (sex-fn-public? print-str-fn))
(test 'void (sex-fn-return-type print-str-fn))
@@ -53,6 +53,4 @@
(test '((fn void foo ((int a) (int b))
(return (+ a (* 10 b)))))
(semen-process sex-code-macro)))
(test-end)
(semen-process sex-code-macro))))