aboutsummaryrefslogtreecommitdiff
path: root/licentia
diff options
context:
space:
mode:
authorEduardo Julian2022-07-28 17:39:01 -0400
committerEduardo Julian2022-07-28 17:39:01 -0400
commita4b64bf1cdf47160b6b615d2c6493039abfd7a94 (patch)
tree3fe8c149d9cad89bbf067c736d196260203d1a01 /licentia
parenta4847190df926d35f7ece97da50a2a8b1462a24f (diff)
Extracted unit-testing machinery into its own module.
Diffstat (limited to 'licentia')
-rw-r--r--licentia/source/test/licentia.lux86
1 files changed, 43 insertions, 43 deletions
diff --git a/licentia/source/test/licentia.lux b/licentia/source/test/licentia.lux
index fe5829e74..6b6230347 100644
--- a/licentia/source/test/licentia.lux
+++ b/licentia/source/test/licentia.lux
@@ -158,36 +158,36 @@
(def (about_grant present? termination)
(Concern Termination)
(all _.and
- (_.property "Copyright grant is present."
+ (_.test "Copyright grant is present."
(present? grant.copyright))
- (_.property "Patent grant is present."
+ (_.test "Patent grant is present."
(present? (grant.patent (the license.#patent_retaliation? termination))))
- (_.property "Effective date for the grants is present."
+ (_.test "Effective date for the grants is present."
(present? grant.date))
- (_.property "Patent grant is present."
+ (_.test "Patent grant is present."
(present? (grant.termination (the license.#termination_period termination)
(the license.#grace_period termination))))
- (_.property "The termination period is accurately conveyed."
+ (_.test "The termination period is accurately conveyed."
(present? (grant.grant_restoration_clause (the license.#termination_period termination))))
- (_.property "The grace period is accurately conveyed."
+ (_.test "The grace period is accurately conveyed."
(present? (grant.grace_period_clause (the license.#grace_period termination))))
- (_.property "The grants are not retro-actively terminated."
+ (_.test "The grants are not retro-actively terminated."
(present? grant.no_retroactive_termination))
))
(def (about_liability present? liability)
(Concern Liability)
(all _.and
- (_.property "Warranty liability disclaimer is present."
+ (_.test "Warranty liability disclaimer is present."
(present? liability.warranty))
- (_.property "Limitation of liability is present."
+ (_.test "Limitation of liability is present."
(present? liability.limitation))
- (_.property "Litigation conditions are present."
+ (_.test "Litigation conditions are present."
(present? liability.litigation))
- (_.property "Liability acceptance conditions may be present."
+ (_.test "Liability acceptance conditions may be present."
(bit#= (the license.#can_accept? liability)
(present? liability.can_accept)))
- (_.property "Liability acceptance conditions may be present."
+ (_.test "Liability acceptance conditions may be present."
(bit#= (the license.#disclaim_high_risk? liability)
(present? liability.disclaim_high_risk)))
))
@@ -195,24 +195,24 @@
(def (about_distribution present? distribution)
(Concern Distribution)
(all _.and
- (_.property "Conditions for source-code distribution are present."
+ (_.test "Conditions for source-code distribution are present."
(present? distribution.source_code_form))
- (_.property "Conditions for object-code distribution are present."
+ (_.test "Conditions for object-code distribution are present."
(present? distribution.object_form))
- (_.property "Conditions for extension distribution are present."
+ (_.test "Conditions for extension distribution are present."
(present? (distribution.extension distribution)))
))
(def (about_commercial present? commercial)
(Concern Commercial)
(all _.and
- (_.property "Non-commercial clause is present."
+ (_.test "Non-commercial clause is present."
(bit#= (not (the license.#can_sell? commercial))
(present? commercial.cannot_sell)))
- (_.property "Contributor credit condition is present."
+ (_.test "Contributor credit condition is present."
(bit#= (the license.#require_contributor_credit? commercial)
(present? commercial.require_contributor_attribution)))
- (_.property "Anti-endorsement condition is present."
+ (_.test "Anti-endorsement condition is present."
(bit#= (not (the license.#allow_contributor_endorsement? commercial))
(present? commercial.disallow_contributor_endorsement)))
))
@@ -220,21 +220,21 @@
(def (about_extension present? extension)
(Concern Extension)
(all _.and
- (_.property "The license is viral."
+ (_.test "The license is viral."
(bit#= (the license.#same_license? extension)
(and (list.every? present? extension.sharing_requirement)
(list.every? present? extension.license_conflict_resolution))))
- (_.property "Extensions must be distinguishable from the original work."
+ (_.test "Extensions must be distinguishable from the original work."
(bit#= (the license.#must_be_distinguishable? extension)
(present? extension.distinctness_requirement)))
- (_.property "The community must be notified of new extensions."
+ (_.test "The community must be notified of new extensions."
(case (the license.#notification_period extension)
{.#Some period}
(present? (extension.notification_requirement period))
{.#None}
true))
- (_.property "Must describe modifications."
+ (_.test "Must describe modifications."
(bit#= (the license.#must_describe_modifications? extension)
(present? extension.description_requirement)))
))
@@ -242,16 +242,16 @@
(def (about_attribution present? attribution)
(Concern Attribution)
(all _.and
- (_.property "The attribution copyright notice is present."
+ (_.test "The attribution copyright notice is present."
(present? (the license.#copyright_notice attribution)))
- (_.property "The attribution phrase is present."
+ (_.test "The attribution phrase is present."
(|> attribution
(the license.#phrase)
(maybe#each present?)
(maybe.default true)))
- (_.property "The attribution URL is present."
+ (_.test "The attribution URL is present."
(present? (the license.#url attribution)))
- (_.property "The attribution image is present."
+ (_.test "The attribution image is present."
(|> attribution
(the license.#image)
(maybe#each present?)
@@ -261,24 +261,24 @@
(def (about_miscellaneous present?)
(-> (-> Text Bit) Test)
(all _.and
- (_.property "License constitutes the entire agreement."
+ (_.test "License constitutes the entire agreement."
(present? miscellaneous.entire_agreement))
- (_.property "Disclaims relationship of parties."
+ (_.test "Disclaims relationship of parties."
(present? miscellaneous.relationship_of_parties))
- (_.property "Explicitly allows independent development."
+ (_.test "Explicitly allows independent development."
(present? miscellaneous.independent_development))
- (_.property "Clarifies consent to breach does not waiver."
+ (_.test "Clarifies consent to breach does not waiver."
(present? miscellaneous.not_waiver))
- (_.property "Provides severability."
+ (_.test "Provides severability."
(present? miscellaneous.severability))
- (_.property "Covers export restrictions."
+ (_.test "Covers export restrictions."
(present? miscellaneous.export_restrictions))
))
(def (about_addendum present? value)
(Concern Addendum)
(all _.and
- (_.property "Commons clause"
+ (_.test "Commons clause"
(bit#= (the license.#commons_clause? value)
(present? addendum.commons_clause)))
))
@@ -292,11 +292,11 @@
(function (_ snippet)
(text.contains? snippet writ)))]]
(all _.and
- (_.property "Copyright notices are present."
+ (_.test "Copyright notices are present."
(list.every? (|>> notice.copyright_holder present?)
(the license.#copyright_holders license)))
- (_.property "Identification is present (if the license is identified)."
+ (_.test "Identification is present (if the license is identified)."
(case (the license.#identification license)
{.#Some identification}
(and (present? (output.identification identification))
@@ -305,7 +305,7 @@
{.#None}
(not (present? miscellaneous.new_versions))))
- (_.property "Black-lists (if wanted by licensor) are explicitly enumerated and justified."
+ (_.test "Black-lists (if wanted by licensor) are explicitly enumerated and justified."
(list.every? (function (_ black_list)
(let [black_list_is_justified? (case (the license.#justification black_list)
{.#Some justification}
@@ -321,22 +321,22 @@
every_entity_is_mentioned?)))
(the license.#black_lists license)))
- (_.property "All definitions are present."
+ (_.test "All definitions are present."
(list.every? (|>> output.definition present?)
definition.all))
- (_.property "Acceptance of the license is demanded."
+ (_.test "Acceptance of the license is demanded."
(present? limitation.acceptance))
(..about_grant present? (the license.#termination license))
- (_.property "All limitations are present."
+ (_.test "All limitations are present."
(present? output.limitation))
- (_.property "All assurances are present."
+ (_.test "All assurances are present."
(present? output.assurance))
- (_.property "The terms of submission are present."
+ (_.test "The terms of submission are present."
(present? submission.contribution))
(..about_liability present? (the license.#liability license))
@@ -352,14 +352,14 @@
(..about_attribution present? attribution)
{.#None}
- (_.property "Attribution is missing."
+ (_.test "Attribution is missing."
bit.yes))
(..about_miscellaneous present?)
(..about_addendum present? (the license.#addendum license))
- (_.property "License ending footer is present."
+ (_.test "License ending footer is present."
(present? notice.end_of_license))
)))