aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/world/file.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-07-26 21:23:27 -0400
committerEduardo Julian2019-07-26 21:23:27 -0400
commita0889b2ee76c1ae7a9a5bbe2eec9f051b4f341e4 (patch)
tree08df3db7f8fffad6360a476d20db1d40b36c85cb /stdlib/source/test/lux/world/file.lux
parent78fd01f7e6688448bbd710336d4d7b1c35ae058a (diff)
No more "n/"-prefixed functions.
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/world/file.lux17
1 files changed, 9 insertions, 8 deletions
diff --git a/stdlib/source/test/lux/world/file.lux b/stdlib/source/test/lux/world/file.lux
index 91f7ba0be..d13a024e7 100644
--- a/stdlib/source/test/lux/world/file.lux
+++ b/stdlib/source/test/lux/world/file.lux
@@ -15,6 +15,7 @@
["." binary (#+ Binary)]
["." text]
[number
+ ["n" nat]
["i" int]]
[collection
["." list]]]
@@ -68,7 +69,7 @@
Test
(<| (_.context (%.name (name-of /._)))
(do r.monad
- [file-size (|> r.nat (:: @ map (|>> (n/% 100) (n/max 10))))
+ [file-size (|> r.nat (:: @ map (|>> (n.% 100) (n.max 10))))
dataL (_binary.binary file-size)
dataR (_binary.binary file-size)
new-modified (|> r.int (:: @ map (|>> i.abs
@@ -86,7 +87,7 @@
_ (!.use (:: file over-write) dataL)
read-size (!.use (:: file size) [])
_ (!.use (:: file delete) [])]
- (wrap (n/= file-size read-size))))]
+ (wrap (n.= file-size read-size))))]
(_.assert "Can read file size."
(try.default #0 result))))
(wrap (do promise.monad
@@ -99,7 +100,7 @@
content (!.use (:: file content) [])
read-size (!.use (:: file size) [])
_ (!.use (:: file delete) [])]
- (wrap (and (n/= (n/* 2 file-size) read-size)
+ (wrap (and (n.= (n.* 2 file-size) read-size)
(:: binary.equivalence =
dataL
(try.assume (binary.slice 0 (dec file-size) content)))
@@ -135,7 +136,7 @@
read-size (!.use (:: file size) [])
_ (!.use (:: file delete) [])
_ (!.use (:: dir discard) [])]
- (wrap (n/= file-size read-size))))]
+ (wrap (n.= file-size read-size))))]
(_.assert "Can create files inside of directories."
(try.default #0 result))))
(wrap (do promise.monad
@@ -156,10 +157,10 @@
_ (!.use (:: file delete) [])
_ (!.use (:: inner-dir discard) [])
_ (!.use (:: dir discard) [])]
- (wrap (and (and (n/= 0 (list.size pre-files))
- (n/= 0 (list.size pre-directories)))
- (and (n/= 1 (list.size post-files))
- (n/= 1 (list.size post-directories)))))))]
+ (wrap (and (and (n.= 0 (list.size pre-files))
+ (n.= 0 (list.size pre-directories)))
+ (and (n.= 1 (list.size post-files))
+ (n.= 1 (list.size post-directories)))))))]
(_.assert "Can list files/directories inside a directory."
(try.default #0 result))))
(wrap (do promise.monad