26 lines
1000 B
Plaintext
26 lines
1000 B
Plaintext
// Regression checks for comma-separated creature geography.
|
|
#import "/setup/analysis/creature_common_metrics.typ": (
|
|
calamity-type-representation, calamity-types, canonical-calamity,
|
|
creature-region-pairs, creature-regions,
|
|
)
|
|
|
|
#let paired = (region: "Treorst, Steingrund", subregion: "Mellior, Einvor")
|
|
#assert.eq(creature-regions(paired), ("Treorst", "Steingrund"))
|
|
#assert.eq(creature-region-pairs(paired), (
|
|
(region: "Treorst", subregion: "Mellior"),
|
|
(region: "Steingrund", subregion: "Einvor"),
|
|
))
|
|
|
|
#let shared = (region: "Treorst, Steingrund", subregion: "Frontière")
|
|
#assert.eq(creature-region-pairs(shared), (
|
|
(region: "Treorst", subregion: "Frontière"),
|
|
(region: "Steingrund", subregion: "Frontière"),
|
|
))
|
|
|
|
#assert.eq(canonical-calamity("Röc"), "Roc")
|
|
#assert.eq(canonical-calamity("Yenouï"), "Yenuï")
|
|
#assert.eq(calamity-types.len(), 13)
|
|
#assert.eq(calamity-type-representation.find(item => item.label == "Kraken").count, 0)
|
|
|
|
[Creature geography and calamity taxonomy: OK]
|