aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/spec/aedifex
diff options
context:
space:
mode:
authorEduardo Julian2021-07-15 00:45:15 -0400
committerEduardo Julian2021-07-15 00:45:15 -0400
commit0abd5bd3c0e38e352e9ba38268e04e1c858ab01e (patch)
treefe0af9e70413e9fc4f3848e0642920fca501c626 /stdlib/source/spec/aedifex
parent89ca40f2f101b2b38187eab5cf905371cd47eb57 (diff)
Re-named "spec" hierarchy to "specification".
Diffstat (limited to 'stdlib/source/spec/aedifex')
-rw-r--r--stdlib/source/spec/aedifex/repository.lux57
1 files changed, 0 insertions, 57 deletions
diff --git a/stdlib/source/spec/aedifex/repository.lux b/stdlib/source/spec/aedifex/repository.lux
deleted file mode 100644
index de9a05fde..000000000
--- a/stdlib/source/spec/aedifex/repository.lux
+++ /dev/null
@@ -1,57 +0,0 @@
-(.module:
- [library
- [lux #*
- ["_" test (#+ Test)]
- [abstract
- [monad (#+ do)]]
- [control
- ["." try (#+ Try)]
- [concurrency
- ["." promise (#+ Promise)]]]
- [data
- ["." binary
- ["_#" \\test]]]
- [math
- ["." random]]]]
- [\\program
- ["." /
- ["#." remote]
- ["/#" // #_
- ["#." artifact (#+ Artifact)
- ["#/." extension]]]]]
- [\\test
- ["_." // #_
- ["#." artifact]]])
-
-(def: #export (spec valid_artifact invalid_artifact subject)
- (-> Artifact Artifact (/.Repository Promise) Test)
- (do random.monad
- [expected (_binary.random 100)]
- (wrap ($_ _.and'
- (do promise.monad
- [#let [good_uri (/remote.uri (get@ #//artifact.version valid_artifact) valid_artifact //artifact/extension.lux_library)]
- good_upload! (\ subject upload good_uri expected)
- good_download! (\ subject download good_uri)
-
- #let [bad_uri (/remote.uri (get@ #//artifact.version invalid_artifact) invalid_artifact //artifact/extension.lux_library)]
- bad_upload! (\ subject upload bad_uri expected)
- bad_download! (\ subject download bad_uri)]
- (_.cover' [/.Repository]
- (let [successfull_flow!
- (case [good_upload! good_download!]
- [(#try.Success _) (#try.Success actual)]
- (\ binary.equivalence = expected actual)
-
- _
- false)
-
- failed_flow!
- (case [bad_upload! bad_download!]
- [(#try.Failure _) (#try.Failure _)]
- true
-
- _
- false)]
- (and successfull_flow!
- failed_flow!))))
- ))))