aboutsummaryrefslogtreecommitdiff
path: root/licentia/source/test/licentia.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-09-12 15:39:55 -0400
committerEduardo Julian2021-09-12 15:39:55 -0400
commit2dbbaaec93a53f8dd0b96a0028b9cf125c9066cd (patch)
tree14bc8b5abe09b46ef005c3ff7cf132f1d98ddf0d /licentia/source/test/licentia.lux
parentdda05bca0956af5e5b3875c4cc36e61aa04772e4 (diff)
Re-named \ => # && \\ => ##
Diffstat (limited to 'licentia/source/test/licentia.lux')
-rw-r--r--licentia/source/test/licentia.lux40
1 files changed, 20 insertions, 20 deletions
diff --git a/licentia/source/test/licentia.lux b/licentia/source/test/licentia.lux
index e297f92e0..40e0f5677 100644
--- a/licentia/source/test/licentia.lux
+++ b/licentia/source/test/licentia.lux
@@ -7,16 +7,16 @@
[monad {"+" [do]}]]
[control
["[0]" io]
- ["[0]" maybe ("[1]\[0]" functor)]]
+ ["[0]" maybe ("[1]#[0]" functor)]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]
+ ["[0]" bit ("[1]#[0]" equivalence)]
["[0]" text]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[math
["[0]" random {"+" [Random]}]
[number
- ["n" nat ("[1]\[0]" interval)]]]]]
+ ["n" nat ("[1]#[0]" interval)]]]]]
[\\program
["[0]" output]
["[0]" license {"+" [Identification
@@ -47,10 +47,10 @@
(def: period
(Random (Period Nat))
(do [! random.monad]
- [start (random.filter (|>> (n.= n\top) not)
+ [start (random.filter (|>> (n.= n#top) not)
random.nat)
- #let [wiggle_room (n.- start n\top)]
- end (\ ! each
+ #let [wiggle_room (n.- start n#top)]
+ end (# ! each
(|>> (n.% wiggle_room) (n.max 1))
random.nat)]
(wrap [time.#start start
@@ -109,7 +109,7 @@
(def: (variable_list max_size gen_element)
(All (_ a) (-> Nat (Random a) (Random (List a))))
(do [! random.monad]
- [amount (\ ! each (n.% (n.max 1 max_size))
+ [amount (# ! each (n.% (n.max 1 max_size))
random.nat)]
(random.list amount gen_element)))
@@ -185,10 +185,10 @@
(_.test "Litigation conditions are present."
(present? liability.litigation))
(_.test "Liability acceptance conditions may be present."
- (bit\= (value@ license.#can_accept? liability)
+ (bit#= (value@ license.#can_accept? liability)
(present? liability.can_accept)))
(_.test "Liability acceptance conditions may be present."
- (bit\= (value@ license.#disclaim_high_risk? liability)
+ (bit#= (value@ license.#disclaim_high_risk? liability)
(present? liability.disclaim_high_risk)))
))
@@ -207,13 +207,13 @@
(Concern Commercial)
($_ _.and
(_.test "Non-commercial clause is present."
- (bit\= (not (value@ license.#can_sell? commercial))
+ (bit#= (not (value@ license.#can_sell? commercial))
(present? commercial.cannot_sell)))
(_.test "Contributor credit condition is present."
- (bit\= (value@ license.#require_contributor_credit? commercial)
+ (bit#= (value@ license.#require_contributor_credit? commercial)
(present? commercial.require_contributor_attribution)))
(_.test "Anti-endorsement condition is present."
- (bit\= (not (value@ license.#allow_contributor_endorsement? commercial))
+ (bit#= (not (value@ license.#allow_contributor_endorsement? commercial))
(present? commercial.disallow_contributor_endorsement)))
))
@@ -221,11 +221,11 @@
(Concern Extension)
($_ _.and
(_.test "The license is viral."
- (bit\= (value@ license.#same_license? extension)
+ (bit#= (value@ license.#same_license? extension)
(and (list.every? present? extension.sharing_requirement)
(list.every? present? extension.license_conflict_resolution))))
(_.test "Extensions must be distinguishable from the original work."
- (bit\= (value@ license.#must_be_distinguishable? extension)
+ (bit#= (value@ license.#must_be_distinguishable? extension)
(present? extension.distinctness_requirement)))
(_.test "The community must be notified of new extensions."
(case (value@ license.#notification_period extension)
@@ -235,7 +235,7 @@
{.#None}
true))
(_.test "Must describe modifications."
- (bit\= (value@ license.#must_describe_modifications? extension)
+ (bit#= (value@ license.#must_describe_modifications? extension)
(present? extension.description_requirement)))
))
@@ -247,14 +247,14 @@
(_.test "The attribution phrase is present."
(|> attribution
(value@ license.#phrase)
- (maybe\each present?)
+ (maybe#each present?)
(maybe.default true)))
(_.test "The attribution URL is present."
(present? (value@ license.#url attribution)))
(_.test "The attribution image is present."
(|> attribution
(value@ license.#image)
- (maybe\each present?)
+ (maybe#each present?)
(maybe.default true)))
))
@@ -279,7 +279,7 @@
(Concern Addendum)
($_ _.and
(_.test "Commons clause"
- (bit\= (value@ license.#commons_clause? value)
+ (bit#= (value@ license.#commons_clause? value)
(present? addendum.commons_clause)))
))
@@ -315,7 +315,7 @@
bit.yes)
every_entity_is_mentioned? (|> black_list
(value@ license.#entities)
- (list\each black_list.entity)
+ (list#each black_list.entity)
(list.every? present?))]
(and black_list_is_justified?
every_entity_is_mentioned?)))