diff options
Diffstat (limited to 'licentia/source/test')
-rw-r--r-- | licentia/source/test/licentia.lux | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/licentia/source/test/licentia.lux b/licentia/source/test/licentia.lux index b6a151822..e721d58f1 100644 --- a/licentia/source/test/licentia.lux +++ b/licentia/source/test/licentia.lux @@ -1,48 +1,48 @@ (.using - [library - [lux "*" - [program {"+" program:}] - ["_" test {"+" Test}] - [abstract - [monad {"+" do}]] - [control - ["[0]" io] - ["[0]" maybe ("[1]#[0]" functor)]] - [data - ["[0]" bit ("[1]#[0]" equivalence)] - ["[0]" text] - [collection - ["[0]" list ("[1]#[0]" functor)]]] - [math - ["[0]" random {"+" Random}] - [number - ["n" nat ("[1]#[0]" interval)]]]]] - [\\program - ["[0]" output] - ["[0]" license {"+" Identification - Termination - Liability - Distribution - Commercial - Extension - Entity Black_List - URL Attribution - Addendum - License} - ["[0]" time {"+" Period}] - ["[0]" copyright] - ["[0]" notice] - ["[0]" definition] - ["[0]" grant] - ["[0]" limitation] - ["[0]" submission] - ["[0]" liability] - ["[0]" distribution] - ["[0]" commercial] - ["[0]" extension] - ["[0]" miscellaneous] - ["[0]" black_list] - ["[0]" addendum]]]) + [library + [lux "*" + [program {"+" program:}] + ["_" test {"+" Test}] + [abstract + [monad {"+" do}]] + [control + ["[0]" io] + ["[0]" maybe ("[1]#[0]" functor)]] + [data + ["[0]" bit ("[1]#[0]" equivalence)] + ["[0]" text] + [collection + ["[0]" list ("[1]#[0]" functor)]]] + [math + ["[0]" random {"+" Random}] + [number + ["n" nat ("[1]#[0]" interval)]]]]] + [\\program + ["[0]" output] + ["[0]" license {"+" Identification + Termination + Liability + Distribution + Commercial + Extension + Entity Black_List + URL Attribution + Addendum + License} + ["[0]" time {"+" Period}] + ["[0]" copyright] + ["[0]" notice] + ["[0]" definition] + ["[0]" grant] + ["[0]" limitation] + ["[0]" submission] + ["[0]" liability] + ["[0]" distribution] + ["[0]" commercial] + ["[0]" extension] + ["[0]" miscellaneous] + ["[0]" black_list] + ["[0]" addendum]]]) (def: period (Random (Period Nat)) @@ -161,16 +161,16 @@ (_.test "Copyright grant is present." (present? grant.copyright)) (_.test "Patent grant is present." - (present? (grant.patent (value@ license.#patent_retaliation? termination)))) + (present? (grant.patent (the license.#patent_retaliation? termination)))) (_.test "Effective date for the grants is present." (present? grant.date)) (_.test "Patent grant is present." - (present? (grant.termination (value@ license.#termination_period termination) - (value@ license.#grace_period termination)))) + (present? (grant.termination (the license.#termination_period termination) + (the license.#grace_period termination)))) (_.test "The termination period is accurately conveyed." - (present? (grant.grant_restoration_clause (value@ license.#termination_period termination)))) + (present? (grant.grant_restoration_clause (the license.#termination_period termination)))) (_.test "The grace period is accurately conveyed." - (present? (grant.grace_period_clause (value@ license.#grace_period termination)))) + (present? (grant.grace_period_clause (the license.#grace_period termination)))) (_.test "The grants are not retro-actively terminated." (present? grant.no_retroactive_termination)) )) @@ -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#= (the license.#can_accept? liability) (present? liability.can_accept))) (_.test "Liability acceptance conditions may be present." - (bit#= (value@ license.#disclaim_high_risk? liability) + (bit#= (the 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 (the license.#can_sell? commercial)) (present? commercial.cannot_sell))) (_.test "Contributor credit condition is present." - (bit#= (value@ license.#require_contributor_credit? commercial) + (bit#= (the 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 (the license.#allow_contributor_endorsement? commercial)) (present? commercial.disallow_contributor_endorsement))) )) @@ -221,21 +221,21 @@ (Concern Extension) ($_ _.and (_.test "The license is viral." - (bit#= (value@ license.#same_license? extension) + (bit#= (the 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#= (the license.#must_be_distinguishable? extension) (present? extension.distinctness_requirement))) (_.test "The community must be notified of new extensions." - (case (value@ license.#notification_period extension) + (case (the license.#notification_period extension) {.#Some period} (present? (extension.notification_requirement period)) {.#None} true)) (_.test "Must describe modifications." - (bit#= (value@ license.#must_describe_modifications? extension) + (bit#= (the license.#must_describe_modifications? extension) (present? extension.description_requirement))) )) @@ -243,17 +243,17 @@ (Concern Attribution) ($_ _.and (_.test "The attribution copyright notice is present." - (present? (value@ license.#copyright_notice attribution))) + (present? (the license.#copyright_notice attribution))) (_.test "The attribution phrase is present." (|> attribution - (value@ license.#phrase) + (the license.#phrase) (maybe#each present?) (maybe.default true))) (_.test "The attribution URL is present." - (present? (value@ license.#url attribution))) + (present? (the license.#url attribution))) (_.test "The attribution image is present." (|> attribution - (value@ license.#image) + (the license.#image) (maybe#each present?) (maybe.default true))) )) @@ -279,7 +279,7 @@ (Concern Addendum) ($_ _.and (_.test "Commons clause" - (bit#= (value@ license.#commons_clause? value) + (bit#= (the license.#commons_clause? value) (present? addendum.commons_clause))) )) @@ -294,10 +294,10 @@ ($_ _.and (_.test "Copyright notices are present." (list.every? (|>> notice.copyright_holder present?) - (value@ license.#copyright_holders license))) + (the license.#copyright_holders license))) (_.test "Identification is present (if the license is identified)." - (case (value@ license.#identification license) + (case (the license.#identification license) {.#Some identification} (and (present? (output.identification identification)) (present? miscellaneous.new_versions)) @@ -307,19 +307,19 @@ (_.test "Black-lists (if wanted by licensor) are explicitly enumerated and justified." (list.every? (function (_ black_list) - (let [black_list_is_justified? (case (value@ license.#justification black_list) + (let [black_list_is_justified? (case (the license.#justification black_list) {.#Some justification} (present? justification) {.#None} bit.yes) every_entity_is_mentioned? (|> black_list - (value@ license.#entities) + (the license.#entities) (list#each black_list.entity) (list.every? present?))] (and black_list_is_justified? every_entity_is_mentioned?))) - (value@ license.#black_lists license))) + (the license.#black_lists license))) (_.test "All definitions are present." (list.every? (|>> output.definition present?) @@ -328,7 +328,7 @@ (_.test "Acceptance of the license is demanded." (present? limitation.acceptance)) - (..about_grant present? (value@ license.#termination license)) + (..about_grant present? (the license.#termination license)) (_.test "All limitations are present." (present? output.limitation)) @@ -339,15 +339,15 @@ (_.test "The terms of submission are present." (present? submission.contribution)) - (..about_liability present? (value@ license.#liability license)) + (..about_liability present? (the license.#liability license)) - (..about_distribution present? (value@ license.#distribution license)) + (..about_distribution present? (the license.#distribution license)) - (..about_commercial present? (value@ license.#commercial license)) + (..about_commercial present? (the license.#commercial license)) - (..about_extension present? (value@ license.#extension license)) + (..about_extension present? (the license.#extension license)) - (case (value@ license.#attribution license) + (case (the license.#attribution license) {.#Some attribution} (..about_attribution present? attribution) @@ -357,7 +357,7 @@ (..about_miscellaneous present?) - (..about_addendum present? (value@ license.#addendum license)) + (..about_addendum present? (the license.#addendum license)) (_.test "License ending footer is present." (present? notice.end_of_license)) |