aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/parser.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-09-05 03:25:28 -0400
committerEduardo Julian2021-09-05 03:25:28 -0400
commit54c0e9c7397908eeddf5fbed9b193e25648fb253 (patch)
tree2c6441fb4ab583f4fbdfb13d89cbac69f3f8ba7c /stdlib/source/test/aedifex/parser.lux
parent3435766132d3d434622eecae5fb80f5db33bcab4 (diff)
De-taggification | part 3
Diffstat (limited to 'stdlib/source/test/aedifex/parser.lux')
-rw-r--r--stdlib/source/test/aedifex/parser.lux69
1 files changed, 21 insertions, 48 deletions
diff --git a/stdlib/source/test/aedifex/parser.lux b/stdlib/source/test/aedifex/parser.lux
index 7d15e6dda..cb72c3726 100644
--- a/stdlib/source/test/aedifex/parser.lux
+++ b/stdlib/source/test/aedifex/parser.lux
@@ -66,61 +66,34 @@
(-> //.Profile //.Profile)
(revised@ #//.repositories (set.has //.default_repository)))
-(def: single_profile
- Test
- (do random.monad
- [expected @profile.random]
- (_.test "Single profile."
- (|> expected
- //format.profile
- list
- (<code>.result /.project)
- (case> (#try.Success actual)
- (|> expected
- ..with_default_sources
- ..with_default_repository
- (//project.project //.default)
- (\ //project.equivalence = actual))
-
- (#try.Failure error)
- false)))))
-
(def: (with_empty_profile project)
(-> Project Project)
(if (dictionary.empty? project)
(//project.project //.default (\ //.monoid identity))
project))
-(def: multiple_profiles
- Test
- (do random.monad
- [expected ..random]
- (_.test "Multiple profiles."
- (|> expected
- //format.project
- list
- (<code>.result /.project)
- (case> (#try.Success actual)
- (|> expected
- ..with_empty_profile
- dictionary.entries
- (list\each (function (_ [name profile])
- [name (|> profile
- ..with_default_sources
- ..with_default_repository)]))
- (dictionary.of_list text.hash)
- (\ //project.equivalence = actual))
-
- (#try.Failure error)
- false)))))
-
(def: .public test
Test
(<| (_.covering /._)
(_.covering //format._)
- (_.for [/.project
- //format.Format //format.profile //format.project]
- ($_ _.and
- ..single_profile
- ..multiple_profiles
- ))))
+ (do random.monad
+ [expected ..random]
+ (_.cover [/.project
+ //format.Format //format.project]
+ (|> expected
+ //format.project
+ list
+ (<code>.result /.project)
+ (case> (#try.Success actual)
+ (|> expected
+ ..with_empty_profile
+ dictionary.entries
+ (list\each (function (_ [name profile])
+ [name (|> profile
+ ..with_default_sources
+ ..with_default_repository)]))
+ (dictionary.of_list text.hash)
+ (\ //project.equivalence = actual))
+
+ (#try.Failure error)
+ false))))))