FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pixie/tests/pixie/tests/test-docs.pxi at master · pixie-lang/pixie · GitHub
pixie-lang
/
pixie
Public
Notifications
You must be signed in to change notification settings
Fork
127
Star
2.4k
Code
Issues
46
Pull requests
9
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
pixie
/
tests
/
pixie
/
tests
/
test-docs.pxi
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (20 loc) · 769 Bytes
Breadcrumbs
pixie
/
tests
/
pixie
/
tests
/
test-docs.pxi
Copy path
File metadata and controls
24 lines (20 loc) · 769 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(ns pixie.tests.test
-
docs
(require pixie.test :
as
t))
; validate the examples
in
the docs by checking whether the included
; results match the actual results you get by evaluating the examples.
(defn check
-
examples [ns]
(let [ns (the
-
ns ns)
syms (keys (ns
-
map
ns))]
(doseq [sym syms]
(let [meta (meta @(resolve
-
in
ns sym))
examples (get meta :examples)]
(doseq [example examples]
(
if
(contains? example
2
)
(t
/
assert
=
(
eval
(read
-
string (first example)))
(third example))
(
eval
(read
-
string (first example)))))))))
(t
/
deftest test
-
stdlib
-
docs
(check
-
examples
'
pixie.stdlib))
(t
/
deftest test
-
string
-
docs
(load
-
ns
'
pixie.string)
(check
-
examples
'
pixie.string))
Back
|
FazBrowse Home
|
New Git URL