This commit is contained in:
parent
749f525f83
commit
b0666841f6
7 changed files with 139 additions and 31 deletions
|
|
@ -74,6 +74,15 @@ int main() {
|
|||
"policy: the rest of the world still sells");
|
||||
Check(SellsTo("us"), "policy: matched on the normalised code, like membership");
|
||||
Check(ZoneFor("US") == Zone::World, "zone: refused countries still classify");
|
||||
// Sanctioned destinations refuse through the same gate, but the two lists
|
||||
// stay distinguishable — the checkout error names the law for one and the
|
||||
// shop's own choice for the other.
|
||||
Check(!SellsTo("RU") && !SellsTo("BY") && !SellsTo("KP"),
|
||||
"sanctions: RU, BY and KP refused");
|
||||
Check(IsSanctioned("RU") && IsSanctioned("BY") && IsSanctioned("KP"),
|
||||
"sanctions: the list knows its members");
|
||||
Check(!IsSanctioned("US") && !IsSanctioned("NL"),
|
||||
"sanctions: the insurance refusal is not a sanctions refusal");
|
||||
|
||||
// ── carrier weight brackets ───────────────────────────────────────
|
||||
// The only shipping prices that exist. A ladder covering 2 kg / 10 kg /
|
||||
|
|
@ -150,6 +159,10 @@ int main() {
|
|||
Check(!CurrencyFor(cc).has_value(),
|
||||
"fx: refused destinations have no display currency", cc);
|
||||
}
|
||||
for (const std::string_view cc : SanctionedCountries()) {
|
||||
Check(!CurrencyFor(cc).has_value(),
|
||||
"fx: sanctioned destinations have no display currency", cc);
|
||||
}
|
||||
|
||||
// ── rates loader ──────────────────────────────────────────────────
|
||||
const Rates r = LoadRates(
|
||||
|
|
|
|||
Loading…
Reference in a new issue