2019-02-07 08:57:35 -05:00
|
|
|
;; Copyright 2019 the authors.
|
2017-04-27 14:16:57 -07:00
|
|
|
;; This file is part of Hy, which is free software licensed under the Expat
|
|
|
|
;; license. See the LICENSE.
|
|
|
|
|
2019-05-20 14:46:52 -04:00
|
|
|
(import [hy.extra.reserved [names]])
|
2017-03-02 14:49:32 -08:00
|
|
|
|
|
|
|
(defn test-reserved []
|
|
|
|
(assert (is (type (names)) frozenset))
|
|
|
|
(assert (in "and" (names)))
|
2019-05-20 14:46:52 -04:00
|
|
|
(assert (in "False" (names)))
|
2017-03-02 14:49:32 -08:00
|
|
|
(assert (in "pass" (names)))
|
|
|
|
(assert (in "class" (names)))
|
|
|
|
(assert (in "defclass" (names)))
|
|
|
|
(assert (in "->" (names)))
|
|
|
|
(assert (in "keyword?" (names)))
|
|
|
|
(assert (not-in "foo" (names)))
|
|
|
|
(assert (not-in "hy" (names))))
|