source: project/release/4/symbol-utils/trunk/tests/symbol-utils-test.scm @ 35750

Last change on this file since 35750 was 35750, checked in by Kon Lovett, 2 years ago

add keyword->...

File size: 1.4 KB
Line 
1;;;;
2
3(use test)
4
5(use symbol-utils)
6
7(test 'foo (keyword->symbol #:foo))
8(test "foo" (symbol->string (keyword->uninterned-symbol #:foo)))
9
10(test #:foo (symbol->keyword 'foo))
11
12(test-assert (unbound-value? (unbound-value)))
13
14(test-assert (symbol-value symbol->keyword #f))
15
16(test-assert (unspecified? (unspecified-value)))
17
18(test-assert (symbol-printname=? 'foo 'foo))
19(test-assert (not (symbol-printname=? 'foo 'bar)))
20(test-assert (symbol-printname=? '##sys#list->string '##sys#list->string))
21(test-assert (not (symbol-printname=? '##sys#list->string 'list->string)))
22
23(test-assert (not (symbol-printname<? 'foo 'foo)))
24(test-assert (symbol-printname<? 'bar 'foo))
25(test-assert (not (symbol-printname<? '##sys#list->string '##sys#list->string)))
26(test-assert (symbol-printname<? 'list->string '##sys#list->string))
27
28(test 3 (symbol-printname-length 'foo))
29
30(test 3 (max-symbol-printname-length '(a abc ab)))
31
32(test '##foo#bar (make-qualified-symbol "foo" 'bar))
33
34(test-assert (qualified-symbol? '##sys#list->string))
35(test-assert (not (qualified-symbol? 'sym)))
36
37(test "##sys#list->string" (symbol->qualified-string '##sys#list->string))
38(test "list->string" (symbol->qualified-string 'list->string))
39
40(test-assert (interned-symbol? 'foo))
41(test-assert (not (interned-symbol? (gensym))))
42
43(test-assert (not (interned-symbol? (make-qualified-uninterned-symbol "bar" 'foo))))
44
45(test-exit)
Note: See TracBrowser for help on using the repository browser.