From bb6577cbf5a12c9ae40e6ee86c84dfbbf6aa0e29 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Sun, 22 Nov 2015 16:42:57 +0000 Subject: [PATCH 01/24] [MNY-25]: Renames _CurrencyType to ISOCurrencyType --- Money/Shared/Autogenerated.swift | 598 +++++++++++++++---------------- Money/Shared/Currency.swift | 18 +- Supporting Files/Generate.swift | 2 +- 3 files changed, 309 insertions(+), 309 deletions(-) diff --git a/Money/Shared/Autogenerated.swift b/Money/Shared/Autogenerated.swift index 4887ccd..a5337f8 100644 --- a/Money/Shared/Autogenerated.swift +++ b/Money/Shared/Autogenerated.swift @@ -29,1497 +29,1497 @@ extension Currency { /// Currency ADP - public final class ADP: Currency.Base, _CurrencyType { + public final class ADP: Currency.Base, ISOCurrencyType { public static var sharedInstance = ADP(code: "ADP") } /// Currency AED - public final class AED: Currency.Base, _CurrencyType { + public final class AED: Currency.Base, ISOCurrencyType { public static var sharedInstance = AED(code: "AED") } /// Currency AFA - public final class AFA: Currency.Base, _CurrencyType { + public final class AFA: Currency.Base, ISOCurrencyType { public static var sharedInstance = AFA(code: "AFA") } /// Currency AFN - public final class AFN: Currency.Base, _CurrencyType { + public final class AFN: Currency.Base, ISOCurrencyType { public static var sharedInstance = AFN(code: "AFN") } /// Currency ALK - public final class ALK: Currency.Base, _CurrencyType { + public final class ALK: Currency.Base, ISOCurrencyType { public static var sharedInstance = ALK(code: "ALK") } /// Currency ALL - public final class ALL: Currency.Base, _CurrencyType { + public final class ALL: Currency.Base, ISOCurrencyType { public static var sharedInstance = ALL(code: "ALL") } /// Currency AMD - public final class AMD: Currency.Base, _CurrencyType { + public final class AMD: Currency.Base, ISOCurrencyType { public static var sharedInstance = AMD(code: "AMD") } /// Currency ANG - public final class ANG: Currency.Base, _CurrencyType { + public final class ANG: Currency.Base, ISOCurrencyType { public static var sharedInstance = ANG(code: "ANG") } /// Currency AOA - public final class AOA: Currency.Base, _CurrencyType { + public final class AOA: Currency.Base, ISOCurrencyType { public static var sharedInstance = AOA(code: "AOA") } /// Currency AOK - public final class AOK: Currency.Base, _CurrencyType { + public final class AOK: Currency.Base, ISOCurrencyType { public static var sharedInstance = AOK(code: "AOK") } /// Currency AON - public final class AON: Currency.Base, _CurrencyType { + public final class AON: Currency.Base, ISOCurrencyType { public static var sharedInstance = AON(code: "AON") } /// Currency AOR - public final class AOR: Currency.Base, _CurrencyType { + public final class AOR: Currency.Base, ISOCurrencyType { public static var sharedInstance = AOR(code: "AOR") } /// Currency ARA - public final class ARA: Currency.Base, _CurrencyType { + public final class ARA: Currency.Base, ISOCurrencyType { public static var sharedInstance = ARA(code: "ARA") } /// Currency ARL - public final class ARL: Currency.Base, _CurrencyType { + public final class ARL: Currency.Base, ISOCurrencyType { public static var sharedInstance = ARL(code: "ARL") } /// Currency ARM - public final class ARM: Currency.Base, _CurrencyType { + public final class ARM: Currency.Base, ISOCurrencyType { public static var sharedInstance = ARM(code: "ARM") } /// Currency ARP - public final class ARP: Currency.Base, _CurrencyType { + public final class ARP: Currency.Base, ISOCurrencyType { public static var sharedInstance = ARP(code: "ARP") } /// Currency ARS - public final class ARS: Currency.Base, _CurrencyType { + public final class ARS: Currency.Base, ISOCurrencyType { public static var sharedInstance = ARS(code: "ARS") } /// Currency ATS - public final class ATS: Currency.Base, _CurrencyType { + public final class ATS: Currency.Base, ISOCurrencyType { public static var sharedInstance = ATS(code: "ATS") } /// Currency AUD - public final class AUD: Currency.Base, _CurrencyType { + public final class AUD: Currency.Base, ISOCurrencyType { public static var sharedInstance = AUD(code: "AUD") } /// Currency AWG - public final class AWG: Currency.Base, _CurrencyType { + public final class AWG: Currency.Base, ISOCurrencyType { public static var sharedInstance = AWG(code: "AWG") } /// Currency AZM - public final class AZM: Currency.Base, _CurrencyType { + public final class AZM: Currency.Base, ISOCurrencyType { public static var sharedInstance = AZM(code: "AZM") } /// Currency AZN - public final class AZN: Currency.Base, _CurrencyType { + public final class AZN: Currency.Base, ISOCurrencyType { public static var sharedInstance = AZN(code: "AZN") } /// Currency BAD - public final class BAD: Currency.Base, _CurrencyType { + public final class BAD: Currency.Base, ISOCurrencyType { public static var sharedInstance = BAD(code: "BAD") } /// Currency BAM - public final class BAM: Currency.Base, _CurrencyType { + public final class BAM: Currency.Base, ISOCurrencyType { public static var sharedInstance = BAM(code: "BAM") } /// Currency BAN - public final class BAN: Currency.Base, _CurrencyType { + public final class BAN: Currency.Base, ISOCurrencyType { public static var sharedInstance = BAN(code: "BAN") } /// Currency BBD - public final class BBD: Currency.Base, _CurrencyType { + public final class BBD: Currency.Base, ISOCurrencyType { public static var sharedInstance = BBD(code: "BBD") } /// Currency BDT - public final class BDT: Currency.Base, _CurrencyType { + public final class BDT: Currency.Base, ISOCurrencyType { public static var sharedInstance = BDT(code: "BDT") } /// Currency BEC - public final class BEC: Currency.Base, _CurrencyType { + public final class BEC: Currency.Base, ISOCurrencyType { public static var sharedInstance = BEC(code: "BEC") } /// Currency BEF - public final class BEF: Currency.Base, _CurrencyType { + public final class BEF: Currency.Base, ISOCurrencyType { public static var sharedInstance = BEF(code: "BEF") } /// Currency BEL - public final class BEL: Currency.Base, _CurrencyType { + public final class BEL: Currency.Base, ISOCurrencyType { public static var sharedInstance = BEL(code: "BEL") } /// Currency BGL - public final class BGL: Currency.Base, _CurrencyType { + public final class BGL: Currency.Base, ISOCurrencyType { public static var sharedInstance = BGL(code: "BGL") } /// Currency BGM - public final class BGM: Currency.Base, _CurrencyType { + public final class BGM: Currency.Base, ISOCurrencyType { public static var sharedInstance = BGM(code: "BGM") } /// Currency BGN - public final class BGN: Currency.Base, _CurrencyType { + public final class BGN: Currency.Base, ISOCurrencyType { public static var sharedInstance = BGN(code: "BGN") } /// Currency BGO - public final class BGO: Currency.Base, _CurrencyType { + public final class BGO: Currency.Base, ISOCurrencyType { public static var sharedInstance = BGO(code: "BGO") } /// Currency BHD - public final class BHD: Currency.Base, _CurrencyType { + public final class BHD: Currency.Base, ISOCurrencyType { public static var sharedInstance = BHD(code: "BHD") } /// Currency BIF - public final class BIF: Currency.Base, _CurrencyType { + public final class BIF: Currency.Base, ISOCurrencyType { public static var sharedInstance = BIF(code: "BIF") } /// Currency BMD - public final class BMD: Currency.Base, _CurrencyType { + public final class BMD: Currency.Base, ISOCurrencyType { public static var sharedInstance = BMD(code: "BMD") } /// Currency BND - public final class BND: Currency.Base, _CurrencyType { + public final class BND: Currency.Base, ISOCurrencyType { public static var sharedInstance = BND(code: "BND") } /// Currency BOB - public final class BOB: Currency.Base, _CurrencyType { + public final class BOB: Currency.Base, ISOCurrencyType { public static var sharedInstance = BOB(code: "BOB") } /// Currency BOL - public final class BOL: Currency.Base, _CurrencyType { + public final class BOL: Currency.Base, ISOCurrencyType { public static var sharedInstance = BOL(code: "BOL") } /// Currency BOP - public final class BOP: Currency.Base, _CurrencyType { + public final class BOP: Currency.Base, ISOCurrencyType { public static var sharedInstance = BOP(code: "BOP") } /// Currency BOV - public final class BOV: Currency.Base, _CurrencyType { + public final class BOV: Currency.Base, ISOCurrencyType { public static var sharedInstance = BOV(code: "BOV") } /// Currency BRB - public final class BRB: Currency.Base, _CurrencyType { + public final class BRB: Currency.Base, ISOCurrencyType { public static var sharedInstance = BRB(code: "BRB") } /// Currency BRC - public final class BRC: Currency.Base, _CurrencyType { + public final class BRC: Currency.Base, ISOCurrencyType { public static var sharedInstance = BRC(code: "BRC") } /// Currency BRE - public final class BRE: Currency.Base, _CurrencyType { + public final class BRE: Currency.Base, ISOCurrencyType { public static var sharedInstance = BRE(code: "BRE") } /// Currency BRL - public final class BRL: Currency.Base, _CurrencyType { + public final class BRL: Currency.Base, ISOCurrencyType { public static var sharedInstance = BRL(code: "BRL") } /// Currency BRN - public final class BRN: Currency.Base, _CurrencyType { + public final class BRN: Currency.Base, ISOCurrencyType { public static var sharedInstance = BRN(code: "BRN") } /// Currency BRR - public final class BRR: Currency.Base, _CurrencyType { + public final class BRR: Currency.Base, ISOCurrencyType { public static var sharedInstance = BRR(code: "BRR") } /// Currency BRZ - public final class BRZ: Currency.Base, _CurrencyType { + public final class BRZ: Currency.Base, ISOCurrencyType { public static var sharedInstance = BRZ(code: "BRZ") } /// Currency BSD - public final class BSD: Currency.Base, _CurrencyType { + public final class BSD: Currency.Base, ISOCurrencyType { public static var sharedInstance = BSD(code: "BSD") } /// Currency BTN - public final class BTN: Currency.Base, _CurrencyType { + public final class BTN: Currency.Base, ISOCurrencyType { public static var sharedInstance = BTN(code: "BTN") } /// Currency BUK - public final class BUK: Currency.Base, _CurrencyType { + public final class BUK: Currency.Base, ISOCurrencyType { public static var sharedInstance = BUK(code: "BUK") } /// Currency BWP - public final class BWP: Currency.Base, _CurrencyType { + public final class BWP: Currency.Base, ISOCurrencyType { public static var sharedInstance = BWP(code: "BWP") } /// Currency BYB - public final class BYB: Currency.Base, _CurrencyType { + public final class BYB: Currency.Base, ISOCurrencyType { public static var sharedInstance = BYB(code: "BYB") } /// Currency BYR - public final class BYR: Currency.Base, _CurrencyType { + public final class BYR: Currency.Base, ISOCurrencyType { public static var sharedInstance = BYR(code: "BYR") } /// Currency BZD - public final class BZD: Currency.Base, _CurrencyType { + public final class BZD: Currency.Base, ISOCurrencyType { public static var sharedInstance = BZD(code: "BZD") } /// Currency CAD - public final class CAD: Currency.Base, _CurrencyType { + public final class CAD: Currency.Base, ISOCurrencyType { public static var sharedInstance = CAD(code: "CAD") } /// Currency CDF - public final class CDF: Currency.Base, _CurrencyType { + public final class CDF: Currency.Base, ISOCurrencyType { public static var sharedInstance = CDF(code: "CDF") } /// Currency CHE - public final class CHE: Currency.Base, _CurrencyType { + public final class CHE: Currency.Base, ISOCurrencyType { public static var sharedInstance = CHE(code: "CHE") } /// Currency CHF - public final class CHF: Currency.Base, _CurrencyType { + public final class CHF: Currency.Base, ISOCurrencyType { public static var sharedInstance = CHF(code: "CHF") } /// Currency CHW - public final class CHW: Currency.Base, _CurrencyType { + public final class CHW: Currency.Base, ISOCurrencyType { public static var sharedInstance = CHW(code: "CHW") } /// Currency CLE - public final class CLE: Currency.Base, _CurrencyType { + public final class CLE: Currency.Base, ISOCurrencyType { public static var sharedInstance = CLE(code: "CLE") } /// Currency CLF - public final class CLF: Currency.Base, _CurrencyType { + public final class CLF: Currency.Base, ISOCurrencyType { public static var sharedInstance = CLF(code: "CLF") } /// Currency CLP - public final class CLP: Currency.Base, _CurrencyType { + public final class CLP: Currency.Base, ISOCurrencyType { public static var sharedInstance = CLP(code: "CLP") } /// Currency CNX - public final class CNX: Currency.Base, _CurrencyType { + public final class CNX: Currency.Base, ISOCurrencyType { public static var sharedInstance = CNX(code: "CNX") } /// Currency CNY - public final class CNY: Currency.Base, _CurrencyType { + public final class CNY: Currency.Base, ISOCurrencyType { public static var sharedInstance = CNY(code: "CNY") } /// Currency COP - public final class COP: Currency.Base, _CurrencyType { + public final class COP: Currency.Base, ISOCurrencyType { public static var sharedInstance = COP(code: "COP") } /// Currency COU - public final class COU: Currency.Base, _CurrencyType { + public final class COU: Currency.Base, ISOCurrencyType { public static var sharedInstance = COU(code: "COU") } /// Currency CRC - public final class CRC: Currency.Base, _CurrencyType { + public final class CRC: Currency.Base, ISOCurrencyType { public static var sharedInstance = CRC(code: "CRC") } /// Currency CSD - public final class CSD: Currency.Base, _CurrencyType { + public final class CSD: Currency.Base, ISOCurrencyType { public static var sharedInstance = CSD(code: "CSD") } /// Currency CSK - public final class CSK: Currency.Base, _CurrencyType { + public final class CSK: Currency.Base, ISOCurrencyType { public static var sharedInstance = CSK(code: "CSK") } /// Currency CUC - public final class CUC: Currency.Base, _CurrencyType { + public final class CUC: Currency.Base, ISOCurrencyType { public static var sharedInstance = CUC(code: "CUC") } /// Currency CUP - public final class CUP: Currency.Base, _CurrencyType { + public final class CUP: Currency.Base, ISOCurrencyType { public static var sharedInstance = CUP(code: "CUP") } /// Currency CVE - public final class CVE: Currency.Base, _CurrencyType { + public final class CVE: Currency.Base, ISOCurrencyType { public static var sharedInstance = CVE(code: "CVE") } /// Currency CYP - public final class CYP: Currency.Base, _CurrencyType { + public final class CYP: Currency.Base, ISOCurrencyType { public static var sharedInstance = CYP(code: "CYP") } /// Currency CZK - public final class CZK: Currency.Base, _CurrencyType { + public final class CZK: Currency.Base, ISOCurrencyType { public static var sharedInstance = CZK(code: "CZK") } /// Currency DDM - public final class DDM: Currency.Base, _CurrencyType { + public final class DDM: Currency.Base, ISOCurrencyType { public static var sharedInstance = DDM(code: "DDM") } /// Currency DEM - public final class DEM: Currency.Base, _CurrencyType { + public final class DEM: Currency.Base, ISOCurrencyType { public static var sharedInstance = DEM(code: "DEM") } /// Currency DJF - public final class DJF: Currency.Base, _CurrencyType { + public final class DJF: Currency.Base, ISOCurrencyType { public static var sharedInstance = DJF(code: "DJF") } /// Currency DKK - public final class DKK: Currency.Base, _CurrencyType { + public final class DKK: Currency.Base, ISOCurrencyType { public static var sharedInstance = DKK(code: "DKK") } /// Currency DOP - public final class DOP: Currency.Base, _CurrencyType { + public final class DOP: Currency.Base, ISOCurrencyType { public static var sharedInstance = DOP(code: "DOP") } /// Currency DZD - public final class DZD: Currency.Base, _CurrencyType { + public final class DZD: Currency.Base, ISOCurrencyType { public static var sharedInstance = DZD(code: "DZD") } /// Currency ECS - public final class ECS: Currency.Base, _CurrencyType { + public final class ECS: Currency.Base, ISOCurrencyType { public static var sharedInstance = ECS(code: "ECS") } /// Currency ECV - public final class ECV: Currency.Base, _CurrencyType { + public final class ECV: Currency.Base, ISOCurrencyType { public static var sharedInstance = ECV(code: "ECV") } /// Currency EEK - public final class EEK: Currency.Base, _CurrencyType { + public final class EEK: Currency.Base, ISOCurrencyType { public static var sharedInstance = EEK(code: "EEK") } /// Currency EGP - public final class EGP: Currency.Base, _CurrencyType { + public final class EGP: Currency.Base, ISOCurrencyType { public static var sharedInstance = EGP(code: "EGP") } /// Currency EQE - public final class EQE: Currency.Base, _CurrencyType { + public final class EQE: Currency.Base, ISOCurrencyType { public static var sharedInstance = EQE(code: "EQE") } /// Currency ERN - public final class ERN: Currency.Base, _CurrencyType { + public final class ERN: Currency.Base, ISOCurrencyType { public static var sharedInstance = ERN(code: "ERN") } /// Currency ESA - public final class ESA: Currency.Base, _CurrencyType { + public final class ESA: Currency.Base, ISOCurrencyType { public static var sharedInstance = ESA(code: "ESA") } /// Currency ESB - public final class ESB: Currency.Base, _CurrencyType { + public final class ESB: Currency.Base, ISOCurrencyType { public static var sharedInstance = ESB(code: "ESB") } /// Currency ESP - public final class ESP: Currency.Base, _CurrencyType { + public final class ESP: Currency.Base, ISOCurrencyType { public static var sharedInstance = ESP(code: "ESP") } /// Currency ETB - public final class ETB: Currency.Base, _CurrencyType { + public final class ETB: Currency.Base, ISOCurrencyType { public static var sharedInstance = ETB(code: "ETB") } /// Currency EUR - public final class EUR: Currency.Base, _CurrencyType { + public final class EUR: Currency.Base, ISOCurrencyType { public static var sharedInstance = EUR(code: "EUR") } /// Currency FIM - public final class FIM: Currency.Base, _CurrencyType { + public final class FIM: Currency.Base, ISOCurrencyType { public static var sharedInstance = FIM(code: "FIM") } /// Currency FJD - public final class FJD: Currency.Base, _CurrencyType { + public final class FJD: Currency.Base, ISOCurrencyType { public static var sharedInstance = FJD(code: "FJD") } /// Currency FKP - public final class FKP: Currency.Base, _CurrencyType { + public final class FKP: Currency.Base, ISOCurrencyType { public static var sharedInstance = FKP(code: "FKP") } /// Currency FRF - public final class FRF: Currency.Base, _CurrencyType { + public final class FRF: Currency.Base, ISOCurrencyType { public static var sharedInstance = FRF(code: "FRF") } /// Currency GBP - public final class GBP: Currency.Base, _CurrencyType { + public final class GBP: Currency.Base, ISOCurrencyType { public static var sharedInstance = GBP(code: "GBP") } /// Currency GEK - public final class GEK: Currency.Base, _CurrencyType { + public final class GEK: Currency.Base, ISOCurrencyType { public static var sharedInstance = GEK(code: "GEK") } /// Currency GEL - public final class GEL: Currency.Base, _CurrencyType { + public final class GEL: Currency.Base, ISOCurrencyType { public static var sharedInstance = GEL(code: "GEL") } /// Currency GHC - public final class GHC: Currency.Base, _CurrencyType { + public final class GHC: Currency.Base, ISOCurrencyType { public static var sharedInstance = GHC(code: "GHC") } /// Currency GHS - public final class GHS: Currency.Base, _CurrencyType { + public final class GHS: Currency.Base, ISOCurrencyType { public static var sharedInstance = GHS(code: "GHS") } /// Currency GIP - public final class GIP: Currency.Base, _CurrencyType { + public final class GIP: Currency.Base, ISOCurrencyType { public static var sharedInstance = GIP(code: "GIP") } /// Currency GMD - public final class GMD: Currency.Base, _CurrencyType { + public final class GMD: Currency.Base, ISOCurrencyType { public static var sharedInstance = GMD(code: "GMD") } /// Currency GNF - public final class GNF: Currency.Base, _CurrencyType { + public final class GNF: Currency.Base, ISOCurrencyType { public static var sharedInstance = GNF(code: "GNF") } /// Currency GNS - public final class GNS: Currency.Base, _CurrencyType { + public final class GNS: Currency.Base, ISOCurrencyType { public static var sharedInstance = GNS(code: "GNS") } /// Currency GQE - public final class GQE: Currency.Base, _CurrencyType { + public final class GQE: Currency.Base, ISOCurrencyType { public static var sharedInstance = GQE(code: "GQE") } /// Currency GRD - public final class GRD: Currency.Base, _CurrencyType { + public final class GRD: Currency.Base, ISOCurrencyType { public static var sharedInstance = GRD(code: "GRD") } /// Currency GTQ - public final class GTQ: Currency.Base, _CurrencyType { + public final class GTQ: Currency.Base, ISOCurrencyType { public static var sharedInstance = GTQ(code: "GTQ") } /// Currency GWE - public final class GWE: Currency.Base, _CurrencyType { + public final class GWE: Currency.Base, ISOCurrencyType { public static var sharedInstance = GWE(code: "GWE") } /// Currency GWP - public final class GWP: Currency.Base, _CurrencyType { + public final class GWP: Currency.Base, ISOCurrencyType { public static var sharedInstance = GWP(code: "GWP") } /// Currency GYD - public final class GYD: Currency.Base, _CurrencyType { + public final class GYD: Currency.Base, ISOCurrencyType { public static var sharedInstance = GYD(code: "GYD") } /// Currency HKD - public final class HKD: Currency.Base, _CurrencyType { + public final class HKD: Currency.Base, ISOCurrencyType { public static var sharedInstance = HKD(code: "HKD") } /// Currency HNL - public final class HNL: Currency.Base, _CurrencyType { + public final class HNL: Currency.Base, ISOCurrencyType { public static var sharedInstance = HNL(code: "HNL") } /// Currency HRD - public final class HRD: Currency.Base, _CurrencyType { + public final class HRD: Currency.Base, ISOCurrencyType { public static var sharedInstance = HRD(code: "HRD") } /// Currency HRK - public final class HRK: Currency.Base, _CurrencyType { + public final class HRK: Currency.Base, ISOCurrencyType { public static var sharedInstance = HRK(code: "HRK") } /// Currency HTG - public final class HTG: Currency.Base, _CurrencyType { + public final class HTG: Currency.Base, ISOCurrencyType { public static var sharedInstance = HTG(code: "HTG") } /// Currency HUF - public final class HUF: Currency.Base, _CurrencyType { + public final class HUF: Currency.Base, ISOCurrencyType { public static var sharedInstance = HUF(code: "HUF") } /// Currency IDR - public final class IDR: Currency.Base, _CurrencyType { + public final class IDR: Currency.Base, ISOCurrencyType { public static var sharedInstance = IDR(code: "IDR") } /// Currency IEP - public final class IEP: Currency.Base, _CurrencyType { + public final class IEP: Currency.Base, ISOCurrencyType { public static var sharedInstance = IEP(code: "IEP") } /// Currency ILP - public final class ILP: Currency.Base, _CurrencyType { + public final class ILP: Currency.Base, ISOCurrencyType { public static var sharedInstance = ILP(code: "ILP") } /// Currency ILR - public final class ILR: Currency.Base, _CurrencyType { + public final class ILR: Currency.Base, ISOCurrencyType { public static var sharedInstance = ILR(code: "ILR") } /// Currency ILS - public final class ILS: Currency.Base, _CurrencyType { + public final class ILS: Currency.Base, ISOCurrencyType { public static var sharedInstance = ILS(code: "ILS") } /// Currency INR - public final class INR: Currency.Base, _CurrencyType { + public final class INR: Currency.Base, ISOCurrencyType { public static var sharedInstance = INR(code: "INR") } /// Currency IQD - public final class IQD: Currency.Base, _CurrencyType { + public final class IQD: Currency.Base, ISOCurrencyType { public static var sharedInstance = IQD(code: "IQD") } /// Currency IRR - public final class IRR: Currency.Base, _CurrencyType { + public final class IRR: Currency.Base, ISOCurrencyType { public static var sharedInstance = IRR(code: "IRR") } /// Currency ISJ - public final class ISJ: Currency.Base, _CurrencyType { + public final class ISJ: Currency.Base, ISOCurrencyType { public static var sharedInstance = ISJ(code: "ISJ") } /// Currency ISK - public final class ISK: Currency.Base, _CurrencyType { + public final class ISK: Currency.Base, ISOCurrencyType { public static var sharedInstance = ISK(code: "ISK") } /// Currency ITL - public final class ITL: Currency.Base, _CurrencyType { + public final class ITL: Currency.Base, ISOCurrencyType { public static var sharedInstance = ITL(code: "ITL") } /// Currency JMD - public final class JMD: Currency.Base, _CurrencyType { + public final class JMD: Currency.Base, ISOCurrencyType { public static var sharedInstance = JMD(code: "JMD") } /// Currency JOD - public final class JOD: Currency.Base, _CurrencyType { + public final class JOD: Currency.Base, ISOCurrencyType { public static var sharedInstance = JOD(code: "JOD") } /// Currency JPY - public final class JPY: Currency.Base, _CurrencyType { + public final class JPY: Currency.Base, ISOCurrencyType { public static var sharedInstance = JPY(code: "JPY") } /// Currency KES - public final class KES: Currency.Base, _CurrencyType { + public final class KES: Currency.Base, ISOCurrencyType { public static var sharedInstance = KES(code: "KES") } /// Currency KGS - public final class KGS: Currency.Base, _CurrencyType { + public final class KGS: Currency.Base, ISOCurrencyType { public static var sharedInstance = KGS(code: "KGS") } /// Currency KHR - public final class KHR: Currency.Base, _CurrencyType { + public final class KHR: Currency.Base, ISOCurrencyType { public static var sharedInstance = KHR(code: "KHR") } /// Currency KMF - public final class KMF: Currency.Base, _CurrencyType { + public final class KMF: Currency.Base, ISOCurrencyType { public static var sharedInstance = KMF(code: "KMF") } /// Currency KPW - public final class KPW: Currency.Base, _CurrencyType { + public final class KPW: Currency.Base, ISOCurrencyType { public static var sharedInstance = KPW(code: "KPW") } /// Currency KRH - public final class KRH: Currency.Base, _CurrencyType { + public final class KRH: Currency.Base, ISOCurrencyType { public static var sharedInstance = KRH(code: "KRH") } /// Currency KRO - public final class KRO: Currency.Base, _CurrencyType { + public final class KRO: Currency.Base, ISOCurrencyType { public static var sharedInstance = KRO(code: "KRO") } /// Currency KRW - public final class KRW: Currency.Base, _CurrencyType { + public final class KRW: Currency.Base, ISOCurrencyType { public static var sharedInstance = KRW(code: "KRW") } /// Currency KWD - public final class KWD: Currency.Base, _CurrencyType { + public final class KWD: Currency.Base, ISOCurrencyType { public static var sharedInstance = KWD(code: "KWD") } /// Currency KYD - public final class KYD: Currency.Base, _CurrencyType { + public final class KYD: Currency.Base, ISOCurrencyType { public static var sharedInstance = KYD(code: "KYD") } /// Currency KZT - public final class KZT: Currency.Base, _CurrencyType { + public final class KZT: Currency.Base, ISOCurrencyType { public static var sharedInstance = KZT(code: "KZT") } /// Currency LAK - public final class LAK: Currency.Base, _CurrencyType { + public final class LAK: Currency.Base, ISOCurrencyType { public static var sharedInstance = LAK(code: "LAK") } /// Currency LBP - public final class LBP: Currency.Base, _CurrencyType { + public final class LBP: Currency.Base, ISOCurrencyType { public static var sharedInstance = LBP(code: "LBP") } /// Currency LKR - public final class LKR: Currency.Base, _CurrencyType { + public final class LKR: Currency.Base, ISOCurrencyType { public static var sharedInstance = LKR(code: "LKR") } /// Currency LRD - public final class LRD: Currency.Base, _CurrencyType { + public final class LRD: Currency.Base, ISOCurrencyType { public static var sharedInstance = LRD(code: "LRD") } /// Currency LSL - public final class LSL: Currency.Base, _CurrencyType { + public final class LSL: Currency.Base, ISOCurrencyType { public static var sharedInstance = LSL(code: "LSL") } /// Currency LSM - public final class LSM: Currency.Base, _CurrencyType { + public final class LSM: Currency.Base, ISOCurrencyType { public static var sharedInstance = LSM(code: "LSM") } /// Currency LTL - public final class LTL: Currency.Base, _CurrencyType { + public final class LTL: Currency.Base, ISOCurrencyType { public static var sharedInstance = LTL(code: "LTL") } /// Currency LTT - public final class LTT: Currency.Base, _CurrencyType { + public final class LTT: Currency.Base, ISOCurrencyType { public static var sharedInstance = LTT(code: "LTT") } /// Currency LUC - public final class LUC: Currency.Base, _CurrencyType { + public final class LUC: Currency.Base, ISOCurrencyType { public static var sharedInstance = LUC(code: "LUC") } /// Currency LUF - public final class LUF: Currency.Base, _CurrencyType { + public final class LUF: Currency.Base, ISOCurrencyType { public static var sharedInstance = LUF(code: "LUF") } /// Currency LUL - public final class LUL: Currency.Base, _CurrencyType { + public final class LUL: Currency.Base, ISOCurrencyType { public static var sharedInstance = LUL(code: "LUL") } /// Currency LVL - public final class LVL: Currency.Base, _CurrencyType { + public final class LVL: Currency.Base, ISOCurrencyType { public static var sharedInstance = LVL(code: "LVL") } /// Currency LVR - public final class LVR: Currency.Base, _CurrencyType { + public final class LVR: Currency.Base, ISOCurrencyType { public static var sharedInstance = LVR(code: "LVR") } /// Currency LYD - public final class LYD: Currency.Base, _CurrencyType { + public final class LYD: Currency.Base, ISOCurrencyType { public static var sharedInstance = LYD(code: "LYD") } /// Currency MAD - public final class MAD: Currency.Base, _CurrencyType { + public final class MAD: Currency.Base, ISOCurrencyType { public static var sharedInstance = MAD(code: "MAD") } /// Currency MAF - public final class MAF: Currency.Base, _CurrencyType { + public final class MAF: Currency.Base, ISOCurrencyType { public static var sharedInstance = MAF(code: "MAF") } /// Currency MCF - public final class MCF: Currency.Base, _CurrencyType { + public final class MCF: Currency.Base, ISOCurrencyType { public static var sharedInstance = MCF(code: "MCF") } /// Currency MDC - public final class MDC: Currency.Base, _CurrencyType { + public final class MDC: Currency.Base, ISOCurrencyType { public static var sharedInstance = MDC(code: "MDC") } /// Currency MDL - public final class MDL: Currency.Base, _CurrencyType { + public final class MDL: Currency.Base, ISOCurrencyType { public static var sharedInstance = MDL(code: "MDL") } /// Currency MGA - public final class MGA: Currency.Base, _CurrencyType { + public final class MGA: Currency.Base, ISOCurrencyType { public static var sharedInstance = MGA(code: "MGA") } /// Currency MGF - public final class MGF: Currency.Base, _CurrencyType { + public final class MGF: Currency.Base, ISOCurrencyType { public static var sharedInstance = MGF(code: "MGF") } /// Currency MKD - public final class MKD: Currency.Base, _CurrencyType { + public final class MKD: Currency.Base, ISOCurrencyType { public static var sharedInstance = MKD(code: "MKD") } /// Currency MKN - public final class MKN: Currency.Base, _CurrencyType { + public final class MKN: Currency.Base, ISOCurrencyType { public static var sharedInstance = MKN(code: "MKN") } /// Currency MLF - public final class MLF: Currency.Base, _CurrencyType { + public final class MLF: Currency.Base, ISOCurrencyType { public static var sharedInstance = MLF(code: "MLF") } /// Currency MMK - public final class MMK: Currency.Base, _CurrencyType { + public final class MMK: Currency.Base, ISOCurrencyType { public static var sharedInstance = MMK(code: "MMK") } /// Currency MNT - public final class MNT: Currency.Base, _CurrencyType { + public final class MNT: Currency.Base, ISOCurrencyType { public static var sharedInstance = MNT(code: "MNT") } /// Currency MOP - public final class MOP: Currency.Base, _CurrencyType { + public final class MOP: Currency.Base, ISOCurrencyType { public static var sharedInstance = MOP(code: "MOP") } /// Currency MRO - public final class MRO: Currency.Base, _CurrencyType { + public final class MRO: Currency.Base, ISOCurrencyType { public static var sharedInstance = MRO(code: "MRO") } /// Currency MTL - public final class MTL: Currency.Base, _CurrencyType { + public final class MTL: Currency.Base, ISOCurrencyType { public static var sharedInstance = MTL(code: "MTL") } /// Currency MTP - public final class MTP: Currency.Base, _CurrencyType { + public final class MTP: Currency.Base, ISOCurrencyType { public static var sharedInstance = MTP(code: "MTP") } /// Currency MUR - public final class MUR: Currency.Base, _CurrencyType { + public final class MUR: Currency.Base, ISOCurrencyType { public static var sharedInstance = MUR(code: "MUR") } /// Currency MVP - public final class MVP: Currency.Base, _CurrencyType { + public final class MVP: Currency.Base, ISOCurrencyType { public static var sharedInstance = MVP(code: "MVP") } /// Currency MVR - public final class MVR: Currency.Base, _CurrencyType { + public final class MVR: Currency.Base, ISOCurrencyType { public static var sharedInstance = MVR(code: "MVR") } /// Currency MWK - public final class MWK: Currency.Base, _CurrencyType { + public final class MWK: Currency.Base, ISOCurrencyType { public static var sharedInstance = MWK(code: "MWK") } /// Currency MXN - public final class MXN: Currency.Base, _CurrencyType { + public final class MXN: Currency.Base, ISOCurrencyType { public static var sharedInstance = MXN(code: "MXN") } /// Currency MXP - public final class MXP: Currency.Base, _CurrencyType { + public final class MXP: Currency.Base, ISOCurrencyType { public static var sharedInstance = MXP(code: "MXP") } /// Currency MXV - public final class MXV: Currency.Base, _CurrencyType { + public final class MXV: Currency.Base, ISOCurrencyType { public static var sharedInstance = MXV(code: "MXV") } /// Currency MYR - public final class MYR: Currency.Base, _CurrencyType { + public final class MYR: Currency.Base, ISOCurrencyType { public static var sharedInstance = MYR(code: "MYR") } /// Currency MZE - public final class MZE: Currency.Base, _CurrencyType { + public final class MZE: Currency.Base, ISOCurrencyType { public static var sharedInstance = MZE(code: "MZE") } /// Currency MZM - public final class MZM: Currency.Base, _CurrencyType { + public final class MZM: Currency.Base, ISOCurrencyType { public static var sharedInstance = MZM(code: "MZM") } /// Currency MZN - public final class MZN: Currency.Base, _CurrencyType { + public final class MZN: Currency.Base, ISOCurrencyType { public static var sharedInstance = MZN(code: "MZN") } /// Currency NAD - public final class NAD: Currency.Base, _CurrencyType { + public final class NAD: Currency.Base, ISOCurrencyType { public static var sharedInstance = NAD(code: "NAD") } /// Currency NGN - public final class NGN: Currency.Base, _CurrencyType { + public final class NGN: Currency.Base, ISOCurrencyType { public static var sharedInstance = NGN(code: "NGN") } /// Currency NIC - public final class NIC: Currency.Base, _CurrencyType { + public final class NIC: Currency.Base, ISOCurrencyType { public static var sharedInstance = NIC(code: "NIC") } /// Currency NIO - public final class NIO: Currency.Base, _CurrencyType { + public final class NIO: Currency.Base, ISOCurrencyType { public static var sharedInstance = NIO(code: "NIO") } /// Currency NLG - public final class NLG: Currency.Base, _CurrencyType { + public final class NLG: Currency.Base, ISOCurrencyType { public static var sharedInstance = NLG(code: "NLG") } /// Currency NOK - public final class NOK: Currency.Base, _CurrencyType { + public final class NOK: Currency.Base, ISOCurrencyType { public static var sharedInstance = NOK(code: "NOK") } /// Currency NPR - public final class NPR: Currency.Base, _CurrencyType { + public final class NPR: Currency.Base, ISOCurrencyType { public static var sharedInstance = NPR(code: "NPR") } /// Currency NZD - public final class NZD: Currency.Base, _CurrencyType { + public final class NZD: Currency.Base, ISOCurrencyType { public static var sharedInstance = NZD(code: "NZD") } /// Currency OMR - public final class OMR: Currency.Base, _CurrencyType { + public final class OMR: Currency.Base, ISOCurrencyType { public static var sharedInstance = OMR(code: "OMR") } /// Currency PAB - public final class PAB: Currency.Base, _CurrencyType { + public final class PAB: Currency.Base, ISOCurrencyType { public static var sharedInstance = PAB(code: "PAB") } /// Currency PEI - public final class PEI: Currency.Base, _CurrencyType { + public final class PEI: Currency.Base, ISOCurrencyType { public static var sharedInstance = PEI(code: "PEI") } /// Currency PEN - public final class PEN: Currency.Base, _CurrencyType { + public final class PEN: Currency.Base, ISOCurrencyType { public static var sharedInstance = PEN(code: "PEN") } /// Currency PES - public final class PES: Currency.Base, _CurrencyType { + public final class PES: Currency.Base, ISOCurrencyType { public static var sharedInstance = PES(code: "PES") } /// Currency PGK - public final class PGK: Currency.Base, _CurrencyType { + public final class PGK: Currency.Base, ISOCurrencyType { public static var sharedInstance = PGK(code: "PGK") } /// Currency PHP - public final class PHP: Currency.Base, _CurrencyType { + public final class PHP: Currency.Base, ISOCurrencyType { public static var sharedInstance = PHP(code: "PHP") } /// Currency PKR - public final class PKR: Currency.Base, _CurrencyType { + public final class PKR: Currency.Base, ISOCurrencyType { public static var sharedInstance = PKR(code: "PKR") } /// Currency PLN - public final class PLN: Currency.Base, _CurrencyType { + public final class PLN: Currency.Base, ISOCurrencyType { public static var sharedInstance = PLN(code: "PLN") } /// Currency PLZ - public final class PLZ: Currency.Base, _CurrencyType { + public final class PLZ: Currency.Base, ISOCurrencyType { public static var sharedInstance = PLZ(code: "PLZ") } /// Currency PTE - public final class PTE: Currency.Base, _CurrencyType { + public final class PTE: Currency.Base, ISOCurrencyType { public static var sharedInstance = PTE(code: "PTE") } /// Currency PYG - public final class PYG: Currency.Base, _CurrencyType { + public final class PYG: Currency.Base, ISOCurrencyType { public static var sharedInstance = PYG(code: "PYG") } /// Currency QAR - public final class QAR: Currency.Base, _CurrencyType { + public final class QAR: Currency.Base, ISOCurrencyType { public static var sharedInstance = QAR(code: "QAR") } /// Currency RHD - public final class RHD: Currency.Base, _CurrencyType { + public final class RHD: Currency.Base, ISOCurrencyType { public static var sharedInstance = RHD(code: "RHD") } /// Currency ROL - public final class ROL: Currency.Base, _CurrencyType { + public final class ROL: Currency.Base, ISOCurrencyType { public static var sharedInstance = ROL(code: "ROL") } /// Currency RON - public final class RON: Currency.Base, _CurrencyType { + public final class RON: Currency.Base, ISOCurrencyType { public static var sharedInstance = RON(code: "RON") } /// Currency RSD - public final class RSD: Currency.Base, _CurrencyType { + public final class RSD: Currency.Base, ISOCurrencyType { public static var sharedInstance = RSD(code: "RSD") } /// Currency RUB - public final class RUB: Currency.Base, _CurrencyType { + public final class RUB: Currency.Base, ISOCurrencyType { public static var sharedInstance = RUB(code: "RUB") } /// Currency RUR - public final class RUR: Currency.Base, _CurrencyType { + public final class RUR: Currency.Base, ISOCurrencyType { public static var sharedInstance = RUR(code: "RUR") } /// Currency RWF - public final class RWF: Currency.Base, _CurrencyType { + public final class RWF: Currency.Base, ISOCurrencyType { public static var sharedInstance = RWF(code: "RWF") } /// Currency SAR - public final class SAR: Currency.Base, _CurrencyType { + public final class SAR: Currency.Base, ISOCurrencyType { public static var sharedInstance = SAR(code: "SAR") } /// Currency SBD - public final class SBD: Currency.Base, _CurrencyType { + public final class SBD: Currency.Base, ISOCurrencyType { public static var sharedInstance = SBD(code: "SBD") } /// Currency SCR - public final class SCR: Currency.Base, _CurrencyType { + public final class SCR: Currency.Base, ISOCurrencyType { public static var sharedInstance = SCR(code: "SCR") } /// Currency SDD - public final class SDD: Currency.Base, _CurrencyType { + public final class SDD: Currency.Base, ISOCurrencyType { public static var sharedInstance = SDD(code: "SDD") } /// Currency SDG - public final class SDG: Currency.Base, _CurrencyType { + public final class SDG: Currency.Base, ISOCurrencyType { public static var sharedInstance = SDG(code: "SDG") } /// Currency SDP - public final class SDP: Currency.Base, _CurrencyType { + public final class SDP: Currency.Base, ISOCurrencyType { public static var sharedInstance = SDP(code: "SDP") } /// Currency SEK - public final class SEK: Currency.Base, _CurrencyType { + public final class SEK: Currency.Base, ISOCurrencyType { public static var sharedInstance = SEK(code: "SEK") } /// Currency SGD - public final class SGD: Currency.Base, _CurrencyType { + public final class SGD: Currency.Base, ISOCurrencyType { public static var sharedInstance = SGD(code: "SGD") } /// Currency SHP - public final class SHP: Currency.Base, _CurrencyType { + public final class SHP: Currency.Base, ISOCurrencyType { public static var sharedInstance = SHP(code: "SHP") } /// Currency SIT - public final class SIT: Currency.Base, _CurrencyType { + public final class SIT: Currency.Base, ISOCurrencyType { public static var sharedInstance = SIT(code: "SIT") } /// Currency SKK - public final class SKK: Currency.Base, _CurrencyType { + public final class SKK: Currency.Base, ISOCurrencyType { public static var sharedInstance = SKK(code: "SKK") } /// Currency SLL - public final class SLL: Currency.Base, _CurrencyType { + public final class SLL: Currency.Base, ISOCurrencyType { public static var sharedInstance = SLL(code: "SLL") } /// Currency SOS - public final class SOS: Currency.Base, _CurrencyType { + public final class SOS: Currency.Base, ISOCurrencyType { public static var sharedInstance = SOS(code: "SOS") } /// Currency SRD - public final class SRD: Currency.Base, _CurrencyType { + public final class SRD: Currency.Base, ISOCurrencyType { public static var sharedInstance = SRD(code: "SRD") } /// Currency SRG - public final class SRG: Currency.Base, _CurrencyType { + public final class SRG: Currency.Base, ISOCurrencyType { public static var sharedInstance = SRG(code: "SRG") } /// Currency SSP - public final class SSP: Currency.Base, _CurrencyType { + public final class SSP: Currency.Base, ISOCurrencyType { public static var sharedInstance = SSP(code: "SSP") } /// Currency STD - public final class STD: Currency.Base, _CurrencyType { + public final class STD: Currency.Base, ISOCurrencyType { public static var sharedInstance = STD(code: "STD") } /// Currency SUR - public final class SUR: Currency.Base, _CurrencyType { + public final class SUR: Currency.Base, ISOCurrencyType { public static var sharedInstance = SUR(code: "SUR") } /// Currency SVC - public final class SVC: Currency.Base, _CurrencyType { + public final class SVC: Currency.Base, ISOCurrencyType { public static var sharedInstance = SVC(code: "SVC") } /// Currency SYP - public final class SYP: Currency.Base, _CurrencyType { + public final class SYP: Currency.Base, ISOCurrencyType { public static var sharedInstance = SYP(code: "SYP") } /// Currency SZL - public final class SZL: Currency.Base, _CurrencyType { + public final class SZL: Currency.Base, ISOCurrencyType { public static var sharedInstance = SZL(code: "SZL") } /// Currency THB - public final class THB: Currency.Base, _CurrencyType { + public final class THB: Currency.Base, ISOCurrencyType { public static var sharedInstance = THB(code: "THB") } /// Currency TJR - public final class TJR: Currency.Base, _CurrencyType { + public final class TJR: Currency.Base, ISOCurrencyType { public static var sharedInstance = TJR(code: "TJR") } /// Currency TJS - public final class TJS: Currency.Base, _CurrencyType { + public final class TJS: Currency.Base, ISOCurrencyType { public static var sharedInstance = TJS(code: "TJS") } /// Currency TMM - public final class TMM: Currency.Base, _CurrencyType { + public final class TMM: Currency.Base, ISOCurrencyType { public static var sharedInstance = TMM(code: "TMM") } /// Currency TMT - public final class TMT: Currency.Base, _CurrencyType { + public final class TMT: Currency.Base, ISOCurrencyType { public static var sharedInstance = TMT(code: "TMT") } /// Currency TND - public final class TND: Currency.Base, _CurrencyType { + public final class TND: Currency.Base, ISOCurrencyType { public static var sharedInstance = TND(code: "TND") } /// Currency TOP - public final class TOP: Currency.Base, _CurrencyType { + public final class TOP: Currency.Base, ISOCurrencyType { public static var sharedInstance = TOP(code: "TOP") } /// Currency TPE - public final class TPE: Currency.Base, _CurrencyType { + public final class TPE: Currency.Base, ISOCurrencyType { public static var sharedInstance = TPE(code: "TPE") } /// Currency TRL - public final class TRL: Currency.Base, _CurrencyType { + public final class TRL: Currency.Base, ISOCurrencyType { public static var sharedInstance = TRL(code: "TRL") } /// Currency TRY - public final class TRY: Currency.Base, _CurrencyType { + public final class TRY: Currency.Base, ISOCurrencyType { public static var sharedInstance = TRY(code: "TRY") } /// Currency TTD - public final class TTD: Currency.Base, _CurrencyType { + public final class TTD: Currency.Base, ISOCurrencyType { public static var sharedInstance = TTD(code: "TTD") } /// Currency TWD - public final class TWD: Currency.Base, _CurrencyType { + public final class TWD: Currency.Base, ISOCurrencyType { public static var sharedInstance = TWD(code: "TWD") } /// Currency TZS - public final class TZS: Currency.Base, _CurrencyType { + public final class TZS: Currency.Base, ISOCurrencyType { public static var sharedInstance = TZS(code: "TZS") } /// Currency UAH - public final class UAH: Currency.Base, _CurrencyType { + public final class UAH: Currency.Base, ISOCurrencyType { public static var sharedInstance = UAH(code: "UAH") } /// Currency UAK - public final class UAK: Currency.Base, _CurrencyType { + public final class UAK: Currency.Base, ISOCurrencyType { public static var sharedInstance = UAK(code: "UAK") } /// Currency UGS - public final class UGS: Currency.Base, _CurrencyType { + public final class UGS: Currency.Base, ISOCurrencyType { public static var sharedInstance = UGS(code: "UGS") } /// Currency UGX - public final class UGX: Currency.Base, _CurrencyType { + public final class UGX: Currency.Base, ISOCurrencyType { public static var sharedInstance = UGX(code: "UGX") } /// Currency USD - public final class USD: Currency.Base, _CurrencyType { + public final class USD: Currency.Base, ISOCurrencyType { public static var sharedInstance = USD(code: "USD") } /// Currency USN - public final class USN: Currency.Base, _CurrencyType { + public final class USN: Currency.Base, ISOCurrencyType { public static var sharedInstance = USN(code: "USN") } /// Currency USS - public final class USS: Currency.Base, _CurrencyType { + public final class USS: Currency.Base, ISOCurrencyType { public static var sharedInstance = USS(code: "USS") } /// Currency UYI - public final class UYI: Currency.Base, _CurrencyType { + public final class UYI: Currency.Base, ISOCurrencyType { public static var sharedInstance = UYI(code: "UYI") } /// Currency UYP - public final class UYP: Currency.Base, _CurrencyType { + public final class UYP: Currency.Base, ISOCurrencyType { public static var sharedInstance = UYP(code: "UYP") } /// Currency UYU - public final class UYU: Currency.Base, _CurrencyType { + public final class UYU: Currency.Base, ISOCurrencyType { public static var sharedInstance = UYU(code: "UYU") } /// Currency UZS - public final class UZS: Currency.Base, _CurrencyType { + public final class UZS: Currency.Base, ISOCurrencyType { public static var sharedInstance = UZS(code: "UZS") } /// Currency VEB - public final class VEB: Currency.Base, _CurrencyType { + public final class VEB: Currency.Base, ISOCurrencyType { public static var sharedInstance = VEB(code: "VEB") } /// Currency VEF - public final class VEF: Currency.Base, _CurrencyType { + public final class VEF: Currency.Base, ISOCurrencyType { public static var sharedInstance = VEF(code: "VEF") } /// Currency VND - public final class VND: Currency.Base, _CurrencyType { + public final class VND: Currency.Base, ISOCurrencyType { public static var sharedInstance = VND(code: "VND") } /// Currency VNN - public final class VNN: Currency.Base, _CurrencyType { + public final class VNN: Currency.Base, ISOCurrencyType { public static var sharedInstance = VNN(code: "VNN") } /// Currency VUV - public final class VUV: Currency.Base, _CurrencyType { + public final class VUV: Currency.Base, ISOCurrencyType { public static var sharedInstance = VUV(code: "VUV") } /// Currency WST - public final class WST: Currency.Base, _CurrencyType { + public final class WST: Currency.Base, ISOCurrencyType { public static var sharedInstance = WST(code: "WST") } /// Currency XAF - public final class XAF: Currency.Base, _CurrencyType { + public final class XAF: Currency.Base, ISOCurrencyType { public static var sharedInstance = XAF(code: "XAF") } /// Currency XAG - public final class XAG: Currency.Base, _CurrencyType { + public final class XAG: Currency.Base, ISOCurrencyType { public static var sharedInstance = XAG(code: "XAG") } /// Currency XAU - public final class XAU: Currency.Base, _CurrencyType { + public final class XAU: Currency.Base, ISOCurrencyType { public static var sharedInstance = XAU(code: "XAU") } /// Currency XBA - public final class XBA: Currency.Base, _CurrencyType { + public final class XBA: Currency.Base, ISOCurrencyType { public static var sharedInstance = XBA(code: "XBA") } /// Currency XBB - public final class XBB: Currency.Base, _CurrencyType { + public final class XBB: Currency.Base, ISOCurrencyType { public static var sharedInstance = XBB(code: "XBB") } /// Currency XBC - public final class XBC: Currency.Base, _CurrencyType { + public final class XBC: Currency.Base, ISOCurrencyType { public static var sharedInstance = XBC(code: "XBC") } /// Currency XBD - public final class XBD: Currency.Base, _CurrencyType { + public final class XBD: Currency.Base, ISOCurrencyType { public static var sharedInstance = XBD(code: "XBD") } /// Currency XCD - public final class XCD: Currency.Base, _CurrencyType { + public final class XCD: Currency.Base, ISOCurrencyType { public static var sharedInstance = XCD(code: "XCD") } /// Currency XDR - public final class XDR: Currency.Base, _CurrencyType { + public final class XDR: Currency.Base, ISOCurrencyType { public static var sharedInstance = XDR(code: "XDR") } /// Currency XEU - public final class XEU: Currency.Base, _CurrencyType { + public final class XEU: Currency.Base, ISOCurrencyType { public static var sharedInstance = XEU(code: "XEU") } /// Currency XFO - public final class XFO: Currency.Base, _CurrencyType { + public final class XFO: Currency.Base, ISOCurrencyType { public static var sharedInstance = XFO(code: "XFO") } /// Currency XFU - public final class XFU: Currency.Base, _CurrencyType { + public final class XFU: Currency.Base, ISOCurrencyType { public static var sharedInstance = XFU(code: "XFU") } /// Currency XOF - public final class XOF: Currency.Base, _CurrencyType { + public final class XOF: Currency.Base, ISOCurrencyType { public static var sharedInstance = XOF(code: "XOF") } /// Currency XPD - public final class XPD: Currency.Base, _CurrencyType { + public final class XPD: Currency.Base, ISOCurrencyType { public static var sharedInstance = XPD(code: "XPD") } /// Currency XPF - public final class XPF: Currency.Base, _CurrencyType { + public final class XPF: Currency.Base, ISOCurrencyType { public static var sharedInstance = XPF(code: "XPF") } /// Currency XPT - public final class XPT: Currency.Base, _CurrencyType { + public final class XPT: Currency.Base, ISOCurrencyType { public static var sharedInstance = XPT(code: "XPT") } /// Currency XRE - public final class XRE: Currency.Base, _CurrencyType { + public final class XRE: Currency.Base, ISOCurrencyType { public static var sharedInstance = XRE(code: "XRE") } /// Currency XSU - public final class XSU: Currency.Base, _CurrencyType { + public final class XSU: Currency.Base, ISOCurrencyType { public static var sharedInstance = XSU(code: "XSU") } /// Currency XTS - public final class XTS: Currency.Base, _CurrencyType { + public final class XTS: Currency.Base, ISOCurrencyType { public static var sharedInstance = XTS(code: "XTS") } /// Currency XUA - public final class XUA: Currency.Base, _CurrencyType { + public final class XUA: Currency.Base, ISOCurrencyType { public static var sharedInstance = XUA(code: "XUA") } /// Currency XXX - public final class XXX: Currency.Base, _CurrencyType { + public final class XXX: Currency.Base, ISOCurrencyType { public static var sharedInstance = XXX(code: "XXX") } /// Currency YDD - public final class YDD: Currency.Base, _CurrencyType { + public final class YDD: Currency.Base, ISOCurrencyType { public static var sharedInstance = YDD(code: "YDD") } /// Currency YER - public final class YER: Currency.Base, _CurrencyType { + public final class YER: Currency.Base, ISOCurrencyType { public static var sharedInstance = YER(code: "YER") } /// Currency YUD - public final class YUD: Currency.Base, _CurrencyType { + public final class YUD: Currency.Base, ISOCurrencyType { public static var sharedInstance = YUD(code: "YUD") } /// Currency YUM - public final class YUM: Currency.Base, _CurrencyType { + public final class YUM: Currency.Base, ISOCurrencyType { public static var sharedInstance = YUM(code: "YUM") } /// Currency YUN - public final class YUN: Currency.Base, _CurrencyType { + public final class YUN: Currency.Base, ISOCurrencyType { public static var sharedInstance = YUN(code: "YUN") } /// Currency YUR - public final class YUR: Currency.Base, _CurrencyType { + public final class YUR: Currency.Base, ISOCurrencyType { public static var sharedInstance = YUR(code: "YUR") } /// Currency ZAL - public final class ZAL: Currency.Base, _CurrencyType { + public final class ZAL: Currency.Base, ISOCurrencyType { public static var sharedInstance = ZAL(code: "ZAL") } /// Currency ZAR - public final class ZAR: Currency.Base, _CurrencyType { + public final class ZAR: Currency.Base, ISOCurrencyType { public static var sharedInstance = ZAR(code: "ZAR") } /// Currency ZMK - public final class ZMK: Currency.Base, _CurrencyType { + public final class ZMK: Currency.Base, ISOCurrencyType { public static var sharedInstance = ZMK(code: "ZMK") } /// Currency ZMW - public final class ZMW: Currency.Base, _CurrencyType { + public final class ZMW: Currency.Base, ISOCurrencyType { public static var sharedInstance = ZMW(code: "ZMW") } /// Currency ZRN - public final class ZRN: Currency.Base, _CurrencyType { + public final class ZRN: Currency.Base, ISOCurrencyType { public static var sharedInstance = ZRN(code: "ZRN") } /// Currency ZRZ - public final class ZRZ: Currency.Base, _CurrencyType { + public final class ZRZ: Currency.Base, ISOCurrencyType { public static var sharedInstance = ZRZ(code: "ZRZ") } /// Currency ZWL - public final class ZWL: Currency.Base, _CurrencyType { + public final class ZWL: Currency.Base, ISOCurrencyType { public static var sharedInstance = ZWL(code: "ZWL") } /// Currency ZWR - public final class ZWR: Currency.Base, _CurrencyType { + public final class ZWR: Currency.Base, ISOCurrencyType { public static var sharedInstance = ZWR(code: "ZWR") } /// Currency ZWD - public final class ZWD: Currency.Base, _CurrencyType { + public final class ZWD: Currency.Base, ISOCurrencyType { public static var sharedInstance = ZWD(code: "ZWD") } } diff --git a/Money/Shared/Currency.swift b/Money/Shared/Currency.swift index 9f4a534..bfb5a46 100644 --- a/Money/Shared/Currency.swift +++ b/Money/Shared/Currency.swift @@ -76,11 +76,15 @@ public extension CurrencyType { } } +// MARK: - Crypto Currencies + +public protocol CryptoCurrencyType: CurrencyType { } + /** - `_CurrencyType` is a refinement of `CurrencyType` so that - autogenerated currencies can be created. + `ISOCurrencyType` is a refinement of `CurrencyType` so that + the ISO currencies can be autogenerated. */ -public protocol _CurrencyType: CurrencyType { +public protocol ISOCurrencyType: CurrencyType { static var sharedInstance: Self { get } @@ -89,7 +93,7 @@ public protocol _CurrencyType: CurrencyType { var _formatter: NSNumberFormatter { get } } -public extension _CurrencyType { +public extension ISOCurrencyType { /// The currency code static var code: String { @@ -154,14 +158,10 @@ public struct Currency { `Currency.Local` is a `BaseCurrency` subclass which represents the device's current currency, using `NSLocale.currentLocale()`. */ - public final class Local: Currency.Base, _CurrencyType { + public final class Local: Currency.Base, ISOCurrencyType { public static var sharedInstance = Local(locale: NSLocale.currentLocale()) } } -// MARK: - Crypto Currencies - -public protocol CryptoCurrencyType: CurrencyType { } - diff --git a/Supporting Files/Generate.swift b/Supporting Files/Generate.swift index 25af364..91f0372 100755 --- a/Supporting Files/Generate.swift +++ b/Supporting Files/Generate.swift @@ -58,7 +58,7 @@ func createCurrencyTypes(line: Writer) { for code in NSLocale.ISOCurrencyCodes() { line("") line(" /// Currency \(code)") - line(" public final class \(code): Currency.Base, _CurrencyType {") + line(" public final class \(code): Currency.Base, ISOCurrencyType {") line(" public static var sharedInstance = \(code)(code: \"\(code)\")") line(" }") } From e8e1535bd1aa53389574887830f5839bc7b3af0e Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Sun, 22 Nov 2015 16:43:53 +0000 Subject: [PATCH 02/24] [MNY-25]: Adds formattedForLanguageId extension --- Money/Shared/Money.swift | 68 +++++++++++++++++++++++------------ Tests/Shared/MoneyTests.swift | 62 +++++++++++++++++++++++++++----- 2 files changed, 99 insertions(+), 31 deletions(-) diff --git a/Money/Shared/Money.swift b/Money/Shared/Money.swift index ea11e21..dfaac00 100644 --- a/Money/Shared/Money.swift +++ b/Money/Shared/Money.swift @@ -53,8 +53,45 @@ public protocol MoneyType: DecimalNumberType, ValueCoding { // MARK: - MoneyType Extension +public extension MoneyType { + + /** + + ### Formatted String + + This function will format the Money type into a string suitable + for the current localization. It accepts an parameter for the + style `NSNumberFormatterStyle`. Note that iOS 9 and OS X 10.11 + added new styles which are relevant for currency. + + These are `.CurrencyISOCodeStyle`, `.CurrencyPluralStyle`, and + `.CurrencyAccountingStyle`. + */ + func formattedWithStyle(style: NSNumberFormatterStyle) -> String { + return Currency.formatter.formattedStringWithStyle(style)(decimal) + } +} + +public extension MoneyType where Currency: ISOCurrencyType { + + /** + + ### Localized Formatted String + + This function will format the Money into a string suitable + for the provided language identifier. + */ + func formattedForLanguageId(languageId: String, style: NSNumberFormatterStyle = .CurrencyStyle) -> String { + let formatter: NSNumberFormatter = Currency.formatter.copy() as! NSNumberFormatter + formatter.locale = NSLocale(localeIdentifier: NSLocale.canonicalLocaleIdentifierFromString(languageId)) + formatter.currencyCode = Currency.code + return formatter.formattedStringWithStyle(style)(decimal) + } +} + public extension MoneyType where DecimalStorageType == NSDecimalNumber { + /// Convenience access to the "amount" as an NSDecimalNumber. var amount: DecimalStorageType { return storage } @@ -233,11 +270,6 @@ public func <(lhs: _Money, rhs: _Money) -> Bool { return lhs.decimal < rhs.decimal } -// MARK: - Consumption Types - -/// The current locale money -public typealias Money = _Money - // MARK: - CustomStringConvertible extension _Money: CustomStringConvertible { @@ -247,23 +279,7 @@ extension _Money: CustomStringConvertible { NSNumberFormatterStyle.CurrencyStyle. */ public var description: String { - return formatted(.CurrencyStyle) - } - - /** - - ### Localized Formatted String - - This function will format the Money type into a string suitable - for the current localization. It accepts an parameter for the - style `NSNumberFormatterStyle`. Note that iOS 9 and OS X 10.11 - added new styles which are relevant for currency. - - These are `.CurrencyISOCodeStyle`, `.CurrencyPluralStyle`, and - `.CurrencyAccountingStyle`. - */ - public func formatted(style: NSNumberFormatterStyle) -> String { - return C.formatter.formattedStringWithStyle(style)(decimal) + return formattedWithStyle(.CurrencyStyle) } } @@ -292,4 +308,10 @@ public final class _MoneyCoder: NSObject, NSCoding, CodingType public func encodeWithCoder(aCoder: NSCoder) { aCoder.encodeObject(value.decimal.encoded, forKey: "decimal") } -} \ No newline at end of file +} + + +// MARK: - Consumption Types + +/// The current locale money +public typealias Money = _Money diff --git a/Tests/Shared/MoneyTests.swift b/Tests/Shared/MoneyTests.swift index f7867eb..1926cbe 100644 --- a/Tests/Shared/MoneyTests.swift +++ b/Tests/Shared/MoneyTests.swift @@ -21,9 +21,28 @@ class MoneyTestHelper { } } -class MoneyInitializerTests: XCTestCase { +class MoneyTests: XCTestCase { var money: Money! + var gbp: GBP! + var usd: USD! + var cad: CAD! + var aud: AUD! + var eur: EUR! + var jpy: JPY! + + override func tearDown() { + super.tearDown() + money = nil + gbp = nil + usd = nil + cad = nil + eur = nil + jpy = nil + } +} + +class MoneyInitializerTests: MoneyTests { func test__money_initialize_with__nothing() { money = Money() @@ -223,14 +242,23 @@ class MoneyDivisionTests: XCTestCase { } } -class MoneyDescriptionTests: XCTestCase { +class MoneyDescriptionTests: MoneyTests { - let gbp: GBP = 100 - let usd: USD = 99 - let cad: CAD = 102.01 - let aud: AUD = 99.999 - let eur: EUR = 249.499 - let jpy: JPY = 319.500002 + override func setUp() { + super.setUp() + gbp = 100 + usd = 99 + cad = 102.01 + aud = 99.999 + eur = 249.499 + jpy = 319.500002 + } + + /// These tests all assume en_GB language settings + + func test__language_setting_is_en_US_or_en_GB() { + XCTAssertTrue(["en_GB", "en_US"].contains(NSLocale.currentLocale().localeIdentifier)) + } func test__gbp_description() { XCTAssertEqual(Currency.GBP.code, "GBP") @@ -276,6 +304,24 @@ class MoneyDescriptionTests: XCTestCase { } } +class MoneyFormattingTests: MoneyTests { + + override func setUp() { + super.setUp() + gbp = 100 + usd = 99 + cad = 102.01 + aud = 99.999 + eur = 249.499 + jpy = 32_000 + } + + func test__formatted_for_es_ES() { + let formatted = gbp.formattedForLanguageId("es_ES") + XCTAssertEqual(formatted, "100,00 GBP") + } +} + class MoneyValueCodingTests: XCTestCase { var money: Money! From 76c3f1538570f3adfe0a704d11863fd2b584827f Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Sun, 22 Nov 2015 20:22:29 +0000 Subject: [PATCH 03/24] [MNY-24]: Adds Locale type --- Money.xcodeproj/project.pbxproj | 10 + Money/Shared/Autogenerated.swift | 2135 ++++++++++++++++++++++++++++++ Money/Shared/Locale.swift | 32 + Money/Shared/Money.swift | 6 +- Supporting Files/Generate.swift | 257 ++++ Tests/Shared/MoneyTests.swift | 15 + 6 files changed, 2454 insertions(+), 1 deletion(-) create mode 100644 Money/Shared/Locale.swift diff --git a/Money.xcodeproj/project.pbxproj b/Money.xcodeproj/project.pbxproj index 22ba9f9..419e38f 100644 --- a/Money.xcodeproj/project.pbxproj +++ b/Money.xcodeproj/project.pbxproj @@ -24,6 +24,10 @@ 65579F8C1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579F8B1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift */; }; 65579F8D1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579F8B1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift */; }; 65579F8E1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579F8B1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift */; }; + 65579FB61C0228EB00C3F8C7 /* Locale.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579FB51C0228EB00C3F8C7 /* Locale.swift */; }; + 65579FB71C0228EB00C3F8C7 /* Locale.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579FB51C0228EB00C3F8C7 /* Locale.swift */; }; + 65579FB81C0228EB00C3F8C7 /* Locale.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579FB51C0228EB00C3F8C7 /* Locale.swift */; }; + 65579FB91C0228EB00C3F8C7 /* Locale.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579FB51C0228EB00C3F8C7 /* Locale.swift */; }; 6557F4C71BEB7F32003CD2BF /* ValueCoding.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6557F4C61BEB7F32003CD2BF /* ValueCoding.framework */; }; 6557F4C91BEB7F3D003CD2BF /* ValueCoding.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6557F4C81BEB7F3D003CD2BF /* ValueCoding.framework */; }; 6557F4CB1BEB7F46003CD2BF /* ValueCoding.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6557F4CA1BEB7F46003CD2BF /* ValueCoding.framework */; }; @@ -191,6 +195,7 @@ /* Begin PBXFileReference section */ 65579F8B1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DecimalNumberTypeTests.swift; sourceTree = ""; }; + 65579FB51C0228EB00C3F8C7 /* Locale.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Locale.swift; sourceTree = ""; }; 6557F4C61BEB7F32003CD2BF /* ValueCoding.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ValueCoding.framework; path = Carthage/Build/iOS/ValueCoding.framework; sourceTree = ""; }; 6557F4C81BEB7F3D003CD2BF /* ValueCoding.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ValueCoding.framework; path = Carthage/Build/watchOS/ValueCoding.framework; sourceTree = ""; }; 6557F4CA1BEB7F46003CD2BF /* ValueCoding.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ValueCoding.framework; path = Carthage/Build/tvOS/ValueCoding.framework; sourceTree = ""; }; @@ -443,6 +448,7 @@ children = ( 65DEE3271BFA0F370043A718 /* Autogenerated.swift */, 65DEE3281BFA0F370043A718 /* Currency.swift */, + 65579FB51C0228EB00C3F8C7 /* Locale.swift */, 65DEE3331BFA0F370043A718 /* Money.swift */, 65DEE3341BFA0F370043A718 /* Support.swift */, 65DEE3291BFA0F370043A718 /* Decimal */, @@ -849,6 +855,7 @@ buildActionMask = 2147483647; files = ( 65DEE3651BFA0F370043A718 /* Support.swift in Sources */, + 65579FB61C0228EB00C3F8C7 /* Locale.swift in Sources */, 65DEE3451BFA0F370043A718 /* DecimalNumberType.swift in Sources */, 65DEE3491BFA0F370043A718 /* NSDecimalExtensions.swift in Sources */, 65DEE34D1BFA0F370043A718 /* NSDecimalNumberExtensions.swift in Sources */, @@ -892,6 +899,7 @@ 65DEE3421BFA0F370043A718 /* Decimal.swift in Sources */, 65DEE33E1BFA0F370043A718 /* Currency.swift in Sources */, 65DEE3621BFA0F370043A718 /* Money.swift in Sources */, + 65579FB71C0228EB00C3F8C7 /* Locale.swift in Sources */, 65DEE33A1BFA0F370043A718 /* Autogenerated.swift in Sources */, 65DEE3561BFA0F370043A718 /* FX.swift in Sources */, 65DEE35E1BFA0F370043A718 /* Yahoo.swift in Sources */, @@ -911,6 +919,7 @@ 65DEE3431BFA0F370043A718 /* Decimal.swift in Sources */, 65DEE33F1BFA0F370043A718 /* Currency.swift in Sources */, 65DEE3631BFA0F370043A718 /* Money.swift in Sources */, + 65579FB81C0228EB00C3F8C7 /* Locale.swift in Sources */, 65DEE33B1BFA0F370043A718 /* Autogenerated.swift in Sources */, 65DEE3571BFA0F370043A718 /* FX.swift in Sources */, 65DEE35F1BFA0F370043A718 /* Yahoo.swift in Sources */, @@ -946,6 +955,7 @@ 65DEE3441BFA0F370043A718 /* Decimal.swift in Sources */, 65DEE3401BFA0F370043A718 /* Currency.swift in Sources */, 65DEE3641BFA0F370043A718 /* Money.swift in Sources */, + 65579FB91C0228EB00C3F8C7 /* Locale.swift in Sources */, 65DEE33C1BFA0F370043A718 /* Autogenerated.swift in Sources */, 65DEE3581BFA0F370043A718 /* FX.swift in Sources */, 65DEE3601BFA0F370043A718 /* Yahoo.swift in Sources */, diff --git a/Money/Shared/Autogenerated.swift b/Money/Shared/Autogenerated.swift index a5337f8..f6f4b2f 100644 --- a/Money/Shared/Autogenerated.swift +++ b/Money/Shared/Autogenerated.swift @@ -2123,3 +2123,2138 @@ public typealias ZWL = _Money public typealias ZWR = _Money /// ZWD Money public typealias ZWD = _Money + + +// MARK: - Country Types + +public enum EnglishSpeakingCountry: CountryType { + case World + case Europe + case Andorra + case AntiguaBarbuda + case Anguilla + case Albania + case AmericanSamoa + case Austria + case Australia + case BosniaHerzegovina + case Barbados + case Belgium + case Bermuda + case Bahamas + case Botswana + case Belize + case Canada + case CocosKeelingIslands + case Switzerland + case CookIslands + case Cameroon + case ChristmasIsland + case Cyprus + case CzechRepublic + case Germany + case DiegoGarcia + case Denmark + case Dominica + case Estonia + case Eritrea + case Spain + case Finland + case Fiji + case FalklandIslands + case Micronesia + case France + case UnitedKingdom + case Grenada + case Guernsey + case Ghana + case Gibraltar + case Gambia + case Greece + case Guam + case Guyana + case HongKongSarChina + case Croatia + case Hungary + case Ireland + case Israel + case IsleOfMan + case India + case BritishIndianOceanTerritory + case Iceland + case Italy + case Jersey + case Jamaica + case Kenya + case Kiribati + case StKittsNevis + case CaymanIslands + case StLucia + case Liberia + case Lesotho + case Lithuania + case Luxembourg + case Latvia + case Montenegro + case Madagascar + case MarshallIslands + case MacauSarChina + case NorthernMarianaIslands + case Montserrat + case Malta + case Mauritius + case Malawi + case Malaysia + case Namibia + case NorfolkIsland + case Nigeria + case Netherlands + case Norway + case Nauru + case Niue + case NewZealand + case PapuaNewGuinea + case Philippines + case Pakistan + case Poland + case PitcairnIslands + case PuertoRico + case Portugal + case Palau + case Romania + case Russia + case Rwanda + case SolomonIslands + case Seychelles + case Sudan + case Sweden + case Singapore + case StHelena + case Slovenia + case Slovakia + case SierraLeone + case SouthSudan + case SintMaarten + case Swaziland + case TurksCaicosIslands + case Tokelau + case Tonga + case Turkey + case TrinidadTobago + case Tuvalu + case Tanzania + case Uganda + case USOutlyingIslands + case UnitedStates + case StVincentGrenadines + case BritishVirginIslands + case USVirginIslands + case Vanuatu + case Samoa + case SouthAfrica + case Zambia + case Zimbabwe + + public var countryIdentifier: String { + switch self { + case .World: + return "001" + case .Europe: + return "150" + case .Andorra: + return "AD" + case .AntiguaBarbuda: + return "AG" + case .Anguilla: + return "AI" + case .Albania: + return "AL" + case .AmericanSamoa: + return "AS" + case .Austria: + return "AT" + case .Australia: + return "AU" + case .BosniaHerzegovina: + return "BA" + case .Barbados: + return "BB" + case .Belgium: + return "BE" + case .Bermuda: + return "BM" + case .Bahamas: + return "BS" + case .Botswana: + return "BW" + case .Belize: + return "BZ" + case .Canada: + return "CA" + case .CocosKeelingIslands: + return "CC" + case .Switzerland: + return "CH" + case .CookIslands: + return "CK" + case .Cameroon: + return "CM" + case .ChristmasIsland: + return "CX" + case .Cyprus: + return "CY" + case .CzechRepublic: + return "CZ" + case .Germany: + return "DE" + case .DiegoGarcia: + return "DG" + case .Denmark: + return "DK" + case .Dominica: + return "DM" + case .Estonia: + return "EE" + case .Eritrea: + return "ER" + case .Spain: + return "ES" + case .Finland: + return "FI" + case .Fiji: + return "FJ" + case .FalklandIslands: + return "FK" + case .Micronesia: + return "FM" + case .France: + return "FR" + case .UnitedKingdom: + return "GB" + case .Grenada: + return "GD" + case .Guernsey: + return "GG" + case .Ghana: + return "GH" + case .Gibraltar: + return "GI" + case .Gambia: + return "GM" + case .Greece: + return "GR" + case .Guam: + return "GU" + case .Guyana: + return "GY" + case .HongKongSarChina: + return "HK" + case .Croatia: + return "HR" + case .Hungary: + return "HU" + case .Ireland: + return "IE" + case .Israel: + return "IL" + case .IsleOfMan: + return "IM" + case .India: + return "IN" + case .BritishIndianOceanTerritory: + return "IO" + case .Iceland: + return "IS" + case .Italy: + return "IT" + case .Jersey: + return "JE" + case .Jamaica: + return "JM" + case .Kenya: + return "KE" + case .Kiribati: + return "KI" + case .StKittsNevis: + return "KN" + case .CaymanIslands: + return "KY" + case .StLucia: + return "LC" + case .Liberia: + return "LR" + case .Lesotho: + return "LS" + case .Lithuania: + return "LT" + case .Luxembourg: + return "LU" + case .Latvia: + return "LV" + case .Montenegro: + return "ME" + case .Madagascar: + return "MG" + case .MarshallIslands: + return "MH" + case .MacauSarChina: + return "MO" + case .NorthernMarianaIslands: + return "MP" + case .Montserrat: + return "MS" + case .Malta: + return "MT" + case .Mauritius: + return "MU" + case .Malawi: + return "MW" + case .Malaysia: + return "MY" + case .Namibia: + return "NA" + case .NorfolkIsland: + return "NF" + case .Nigeria: + return "NG" + case .Netherlands: + return "NL" + case .Norway: + return "NO" + case .Nauru: + return "NR" + case .Niue: + return "NU" + case .NewZealand: + return "NZ" + case .PapuaNewGuinea: + return "PG" + case .Philippines: + return "PH" + case .Pakistan: + return "PK" + case .Poland: + return "PL" + case .PitcairnIslands: + return "PN" + case .PuertoRico: + return "PR" + case .Portugal: + return "PT" + case .Palau: + return "PW" + case .Romania: + return "RO" + case .Russia: + return "RU" + case .Rwanda: + return "RW" + case .SolomonIslands: + return "SB" + case .Seychelles: + return "SC" + case .Sudan: + return "SD" + case .Sweden: + return "SE" + case .Singapore: + return "SG" + case .StHelena: + return "SH" + case .Slovenia: + return "SI" + case .Slovakia: + return "SK" + case .SierraLeone: + return "SL" + case .SouthSudan: + return "SS" + case .SintMaarten: + return "SX" + case .Swaziland: + return "SZ" + case .TurksCaicosIslands: + return "TC" + case .Tokelau: + return "TK" + case .Tonga: + return "TO" + case .Turkey: + return "TR" + case .TrinidadTobago: + return "TT" + case .Tuvalu: + return "TV" + case .Tanzania: + return "TZ" + case .Uganda: + return "UG" + case .USOutlyingIslands: + return "UM" + case .UnitedStates: + return "US" + case .StVincentGrenadines: + return "VC" + case .BritishVirginIslands: + return "VG" + case .USVirginIslands: + return "VI" + case .Vanuatu: + return "VU" + case .Samoa: + return "WS" + case .SouthAfrica: + return "ZA" + case .Zambia: + return "ZM" + case .Zimbabwe: + return "ZW" + } + } +} + +public enum FrenchSpeakingCountry: CountryType { + case Belgium + case BurkinaFaso + case Burundi + case Benin + case StBarthélemy + case Canada + case CongoKinshasa + case CentralAfricanRepublic + case CongoBrazzaville + case Switzerland + case CôteDivoire + case Cameroon + case Djibouti + case Algeria + case France + case Gabon + case FrenchGuiana + case Guinea + case Guadeloupe + case EquatorialGuinea + case Haiti + case Comoros + case Luxembourg + case Morocco + case Monaco + case StMartin + case Madagascar + case Mali + case Martinique + case Mauritania + case Mauritius + case NewCaledonia + case Niger + case FrenchPolynesia + case StPierreMiquelon + case Réunion + case Rwanda + case Seychelles + case Senegal + case Syria + case Chad + case Togo + case Tunisia + case Vanuatu + case WallisFutuna + case Mayotte + + public var countryIdentifier: String { + switch self { + case .Belgium: + return "BE" + case .BurkinaFaso: + return "BF" + case .Burundi: + return "BI" + case .Benin: + return "BJ" + case .StBarthélemy: + return "BL" + case .Canada: + return "CA" + case .CongoKinshasa: + return "CD" + case .CentralAfricanRepublic: + return "CF" + case .CongoBrazzaville: + return "CG" + case .Switzerland: + return "CH" + case .CôteDivoire: + return "CI" + case .Cameroon: + return "CM" + case .Djibouti: + return "DJ" + case .Algeria: + return "DZ" + case .France: + return "FR" + case .Gabon: + return "GA" + case .FrenchGuiana: + return "GF" + case .Guinea: + return "GN" + case .Guadeloupe: + return "GP" + case .EquatorialGuinea: + return "GQ" + case .Haiti: + return "HT" + case .Comoros: + return "KM" + case .Luxembourg: + return "LU" + case .Morocco: + return "MA" + case .Monaco: + return "MC" + case .StMartin: + return "MF" + case .Madagascar: + return "MG" + case .Mali: + return "ML" + case .Martinique: + return "MQ" + case .Mauritania: + return "MR" + case .Mauritius: + return "MU" + case .NewCaledonia: + return "NC" + case .Niger: + return "NE" + case .FrenchPolynesia: + return "PF" + case .StPierreMiquelon: + return "PM" + case .Réunion: + return "RE" + case .Rwanda: + return "RW" + case .Seychelles: + return "SC" + case .Senegal: + return "SN" + case .Syria: + return "SY" + case .Chad: + return "TD" + case .Togo: + return "TG" + case .Tunisia: + return "TN" + case .Vanuatu: + return "VU" + case .WallisFutuna: + return "WF" + case .Mayotte: + return "YT" + } + } +} + +public enum ArabicSpeakingCountry: CountryType { + case World + case UnitedArabEmirates + case Bahrain + case Djibouti + case Algeria + case Egypt + case WesternSahara + case Eritrea + case Israel + case Iraq + case Jordan + case Comoros + case Kuwait + case Lebanon + case Libya + case Morocco + case Mauritania + case Oman + case PalestinianTerritories + case Qatar + case SaudiArabia + case Sudan + case Somalia + case SouthSudan + case Syria + case Chad + case Tunisia + case Yemen + + public var countryIdentifier: String { + switch self { + case .World: + return "001" + case .UnitedArabEmirates: + return "AE" + case .Bahrain: + return "BH" + case .Djibouti: + return "DJ" + case .Algeria: + return "DZ" + case .Egypt: + return "EG" + case .WesternSahara: + return "EH" + case .Eritrea: + return "ER" + case .Israel: + return "IL" + case .Iraq: + return "IQ" + case .Jordan: + return "JO" + case .Comoros: + return "KM" + case .Kuwait: + return "KW" + case .Lebanon: + return "LB" + case .Libya: + return "LY" + case .Morocco: + return "MA" + case .Mauritania: + return "MR" + case .Oman: + return "OM" + case .PalestinianTerritories: + return "PS" + case .Qatar: + return "QA" + case .SaudiArabia: + return "SA" + case .Sudan: + return "SD" + case .Somalia: + return "SO" + case .SouthSudan: + return "SS" + case .Syria: + return "SY" + case .Chad: + return "TD" + case .Tunisia: + return "TN" + case .Yemen: + return "YE" + } + } +} + +public enum SpanishSpeakingCountry: CountryType { + case LatinAmerica + case Argentina + case Bolivia + case Chile + case Colombia + case CostaRica + case Cuba + case DominicanRepublic + case CeutaMelilla + case Ecuador + case Spain + case EquatorialGuinea + case Guatemala + case Honduras + case CanaryIslands + case Mexico + case Nicaragua + case Panama + case Peru + case Philippines + case PuertoRico + case Paraguay + case ElSalvador + case UnitedStates + case Uruguay + case Venezuela + + public var countryIdentifier: String { + switch self { + case .LatinAmerica: + return "419" + case .Argentina: + return "AR" + case .Bolivia: + return "BO" + case .Chile: + return "CL" + case .Colombia: + return "CO" + case .CostaRica: + return "CR" + case .Cuba: + return "CU" + case .DominicanRepublic: + return "DO" + case .CeutaMelilla: + return "EA" + case .Ecuador: + return "EC" + case .Spain: + return "ES" + case .EquatorialGuinea: + return "GQ" + case .Guatemala: + return "GT" + case .Honduras: + return "HN" + case .CanaryIslands: + return "IC" + case .Mexico: + return "MX" + case .Nicaragua: + return "NI" + case .Panama: + return "PA" + case .Peru: + return "PE" + case .Philippines: + return "PH" + case .PuertoRico: + return "PR" + case .Paraguay: + return "PY" + case .ElSalvador: + return "SV" + case .UnitedStates: + return "US" + case .Uruguay: + return "UY" + case .Venezuela: + return "VE" + } + } +} + +public enum PortugueseSpeakingCountry: CountryType { + case Angola + case Brazil + case CapeVerde + case GuineaBissau + case MacauSarChina + case Mozambique + case Portugal + case SãoToméPríncipe + case TimorLeste + + public var countryIdentifier: String { + switch self { + case .Angola: + return "AO" + case .Brazil: + return "BR" + case .CapeVerde: + return "CV" + case .GuineaBissau: + return "GW" + case .MacauSarChina: + return "MO" + case .Mozambique: + return "MZ" + case .Portugal: + return "PT" + case .SãoToméPríncipe: + return "ST" + case .TimorLeste: + return "TL" + } + } +} + +public enum DutchSpeakingCountry: CountryType { + case Aruba + case Belgium + case CaribbeanNetherlands + case Curaçao + case Netherlands + case Suriname + case SintMaarten + + public var countryIdentifier: String { + switch self { + case .Aruba: + return "AW" + case .Belgium: + return "BE" + case .CaribbeanNetherlands: + return "BQ" + case .Curaçao: + return "CW" + case .Netherlands: + return "NL" + case .Suriname: + return "SR" + case .SintMaarten: + return "SX" + } + } +} + +public enum RussianSpeakingCountry: CountryType { + case Belarus + case Kyrgyzstan + case Kazakhstan + case Moldova + case Russia + case Ukraine + + public var countryIdentifier: String { + switch self { + case .Belarus: + return "BY" + case .Kyrgyzstan: + return "KG" + case .Kazakhstan: + return "KZ" + case .Moldova: + return "MD" + case .Russia: + return "RU" + case .Ukraine: + return "UA" + } + } +} + +public enum GermanSpeakingCountry: CountryType { + case Austria + case Belgium + case Switzerland + case Germany + case Liechtenstein + case Luxembourg + + public var countryIdentifier: String { + switch self { + case .Austria: + return "AT" + case .Belgium: + return "BE" + case .Switzerland: + return "CH" + case .Germany: + return "DE" + case .Liechtenstein: + return "LI" + case .Luxembourg: + return "LU" + } + } +} + +public enum ChineseSpeakingCountry: CountryType { + case China + case HongKongSarChina + case MacauSarChina + case Singapore + case Taiwan + + public var countryIdentifier: String { + switch self { + case .China: + return "CN" + case .HongKongSarChina: + return "HK" + case .MacauSarChina: + return "MO" + case .Singapore: + return "SG" + case .Taiwan: + return "TW" + } + } +} + +public enum FulahSpeakingCountry: CountryType { + case Cameroon + case Guinea + case Mauritania + case Senegal + + public var countryIdentifier: String { + switch self { + case .Cameroon: + return "CM" + case .Guinea: + return "GN" + case .Mauritania: + return "MR" + case .Senegal: + return "SN" + } + } +} + +public enum CatalanSpeakingCountry: CountryType { + case Andorra + case Spain + case France + case Italy + + public var countryIdentifier: String { + switch self { + case .Andorra: + return "AD" + case .Spain: + return "ES" + case .France: + return "FR" + case .Italy: + return "IT" + } + } +} + +public enum SerbianSpeakingCountry: CountryType { + case BosniaHerzegovina + case Montenegro + case Serbia + case Kosovo + + public var countryIdentifier: String { + switch self { + case .BosniaHerzegovina: + return "BA" + case .Montenegro: + return "ME" + case .Serbia: + return "RS" + case .Kosovo: + return "XK" + } + } +} + +public enum SomaliSpeakingCountry: CountryType { + case Djibouti + case Ethiopia + case Kenya + case Somalia + + public var countryIdentifier: String { + switch self { + case .Djibouti: + return "DJ" + case .Ethiopia: + return "ET" + case .Kenya: + return "KE" + case .Somalia: + return "SO" + } + } +} + +public enum TamilSpeakingCountry: CountryType { + case India + case SriLanka + case Malaysia + case Singapore + + public var countryIdentifier: String { + switch self { + case .India: + return "IN" + case .SriLanka: + return "LK" + case .Malaysia: + return "MY" + case .Singapore: + return "SG" + } + } +} + +public enum LingalaSpeakingCountry: CountryType { + case Angola + case CongoKinshasa + case CentralAfricanRepublic + case CongoBrazzaville + + public var countryIdentifier: String { + switch self { + case .Angola: + return "AO" + case .CongoKinshasa: + return "CD" + case .CentralAfricanRepublic: + return "CF" + case .CongoBrazzaville: + return "CG" + } + } +} + +public enum SwahiliSpeakingCountry: CountryType { + case CongoKinshasa + case Kenya + case Tanzania + case Uganda + + public var countryIdentifier: String { + switch self { + case .CongoKinshasa: + return "CD" + case .Kenya: + return "KE" + case .Tanzania: + return "TZ" + case .Uganda: + return "UG" + } + } +} + +public enum NorthernSamiSpeakingCountry: CountryType { + case Finland + case Norway + case Sweden + + public var countryIdentifier: String { + switch self { + case .Finland: + return "FI" + case .Norway: + return "NO" + case .Sweden: + return "SE" + } + } +} + +public enum SwissGermanSpeakingCountry: CountryType { + case Switzerland + case France + case Liechtenstein + + public var countryIdentifier: String { + switch self { + case .Switzerland: + return "CH" + case .France: + return "FR" + case .Liechtenstein: + return "LI" + } + } +} + +public enum HausaSpeakingCountry: CountryType { + case Ghana + case Niger + case Nigeria + + public var countryIdentifier: String { + switch self { + case .Ghana: + return "GH" + case .Niger: + return "NE" + case .Nigeria: + return "NG" + } + } +} + +public enum AlbanianSpeakingCountry: CountryType { + case Albania + case Macedonia + case Kosovo + + public var countryIdentifier: String { + switch self { + case .Albania: + return "AL" + case .Macedonia: + return "MK" + case .Kosovo: + return "XK" + } + } +} + +public enum QuechuaSpeakingCountry: CountryType { + case Bolivia + case Ecuador + case Peru + + public var countryIdentifier: String { + switch self { + case .Bolivia: + return "BO" + case .Ecuador: + return "EC" + case .Peru: + return "PE" + } + } +} + +public enum MalaySpeakingCountry: CountryType { + case Brunei + case Malaysia + case Singapore + + public var countryIdentifier: String { + switch self { + case .Brunei: + return "BN" + case .Malaysia: + return "MY" + case .Singapore: + return "SG" + } + } +} + +public enum ItalianSpeakingCountry: CountryType { + case Switzerland + case Italy + case SanMarino + + public var countryIdentifier: String { + switch self { + case .Switzerland: + return "CH" + case .Italy: + return "IT" + case .SanMarino: + return "SM" + } + } +} + +public enum SwedishSpeakingCountry: CountryType { + case ÅlandIslands + case Finland + case Sweden + + public var countryIdentifier: String { + switch self { + case .ÅlandIslands: + return "AX" + case .Finland: + return "FI" + case .Sweden: + return "SE" + } + } +} + +public enum PunjabiSpeakingCountry: CountryType { + case India + case Pakistan + + public var countryIdentifier: String { + switch self { + case .India: + return "IN" + case .Pakistan: + return "PK" + } + } +} + +public enum DanishSpeakingCountry: CountryType { + case Denmark + case Greenland + + public var countryIdentifier: String { + switch self { + case .Denmark: + return "DK" + case .Greenland: + return "GL" + } + } +} + +public enum NorwegianBokmålSpeakingCountry: CountryType { + case Norway + case SvalbardJanMayen + + public var countryIdentifier: String { + switch self { + case .Norway: + return "NO" + case .SvalbardJanMayen: + return "SJ" + } + } +} + +public enum UrduSpeakingCountry: CountryType { + case India + case Pakistan + + public var countryIdentifier: String { + switch self { + case .India: + return "IN" + case .Pakistan: + return "PK" + } + } +} + +public enum CroatianSpeakingCountry: CountryType { + case BosniaHerzegovina + case Croatia + + public var countryIdentifier: String { + switch self { + case .BosniaHerzegovina: + return "BA" + case .Croatia: + return "HR" + } + } +} + +public enum AfrikaansSpeakingCountry: CountryType { + case Namibia + case SouthAfrica + + public var countryIdentifier: String { + switch self { + case .Namibia: + return "NA" + case .SouthAfrica: + return "ZA" + } + } +} + +public enum YorubaSpeakingCountry: CountryType { + case Benin + case Nigeria + + public var countryIdentifier: String { + switch self { + case .Benin: + return "BJ" + case .Nigeria: + return "NG" + } + } +} + +public enum BengaliSpeakingCountry: CountryType { + case Bangladesh + case India + + public var countryIdentifier: String { + switch self { + case .Bangladesh: + return "BD" + case .India: + return "IN" + } + } +} + +public enum GreekSpeakingCountry: CountryType { + case Cyprus + case Greece + + public var countryIdentifier: String { + switch self { + case .Cyprus: + return "CY" + case .Greece: + return "GR" + } + } +} + +public enum TesoSpeakingCountry: CountryType { + case Kenya + case Uganda + + public var countryIdentifier: String { + switch self { + case .Kenya: + return "KE" + case .Uganda: + return "UG" + } + } +} + +public enum KoreanSpeakingCountry: CountryType { + case NorthKorea + case SouthKorea + + public var countryIdentifier: String { + switch self { + case .NorthKorea: + return "KP" + case .SouthKorea: + return "KR" + } + } +} + +public enum UzbekSpeakingCountry: CountryType { + case Afghanistan + case Uzbekistan + + public var countryIdentifier: String { + switch self { + case .Afghanistan: + return "AF" + case .Uzbekistan: + return "UZ" + } + } +} + +public enum OsseticSpeakingCountry: CountryType { + case Georgia + case Russia + + public var countryIdentifier: String { + switch self { + case .Georgia: + return "GE" + case .Russia: + return "RU" + } + } +} + +public enum TurkishSpeakingCountry: CountryType { + case Cyprus + case Turkey + + public var countryIdentifier: String { + switch self { + case .Cyprus: + return "CY" + case .Turkey: + return "TR" + } + } +} + +public enum EweSpeakingCountry: CountryType { + case Ghana + case Togo + + public var countryIdentifier: String { + switch self { + case .Ghana: + return "GH" + case .Togo: + return "TG" + } + } +} + +public enum RomanianSpeakingCountry: CountryType { + case Moldova + case Romania + + public var countryIdentifier: String { + switch self { + case .Moldova: + return "MD" + case .Romania: + return "RO" + } + } +} + +public enum TigrinyaSpeakingCountry: CountryType { + case Eritrea + case Ethiopia + + public var countryIdentifier: String { + switch self { + case .Eritrea: + return "ER" + case .Ethiopia: + return "ET" + } + } +} + +public enum TibetanSpeakingCountry: CountryType { + case China + case India + + public var countryIdentifier: String { + switch self { + case .China: + return "CN" + case .India: + return "IN" + } + } +} + +public enum CentralKurdishSpeakingCountry: CountryType { + case Iraq + case Iran + + public var countryIdentifier: String { + switch self { + case .Iraq: + return "IQ" + case .Iran: + return "IR" + } + } +} + +public enum MasaiSpeakingCountry: CountryType { + case Kenya + case Tanzania + + public var countryIdentifier: String { + switch self { + case .Kenya: + return "KE" + case .Tanzania: + return "TZ" + } + } +} + +public enum OromoSpeakingCountry: CountryType { + case Ethiopia + case Kenya + + public var countryIdentifier: String { + switch self { + case .Ethiopia: + return "ET" + case .Kenya: + return "KE" + } + } +} + +public enum NepaliSpeakingCountry: CountryType { + case India + case Nepal + + public var countryIdentifier: String { + switch self { + case .India: + return "IN" + case .Nepal: + return "NP" + } + } +} + +public enum PersianSpeakingCountry: CountryType { + case Afghanistan + case Iran + + public var countryIdentifier: String { + switch self { + case .Afghanistan: + return "AF" + case .Iran: + return "IR" + } + } +} + +// MARK: - Locale + +public enum Locale { + case Afrikaans(AfrikaansSpeakingCountry) + case Aghem + case Akan + case Albanian(AlbanianSpeakingCountry) + case Amharic + case Arabic(ArabicSpeakingCountry) + case Armenian + case Assamese + case Asu + case Azerbaijani + case Bafia + case Bambara + case Basaa + case Basque + case Belarusian + case Bemba + case Bena + case Bengali(BengaliSpeakingCountry) + case Bodo + case Bosnian + case Breton + case Bulgarian + case Burmese + case Catalan(CatalanSpeakingCountry) + case CentralAtlasTamazight + case CentralKurdish(CentralKurdishSpeakingCountry) + case Cherokee + case Chiga + case Chinese(ChineseSpeakingCountry) + case Colognian + case Cornish + case Croatian(CroatianSpeakingCountry) + case Czech + case Danish(DanishSpeakingCountry) + case Duala + case Dutch(DutchSpeakingCountry) + case Dzongkha + case Embu + case English(EnglishSpeakingCountry) + case Estonian + case Ewe(EweSpeakingCountry) + case Ewondo + case Faroese + case Filipino + case Finnish + case French(FrenchSpeakingCountry) + case Friulian + case Fulah(FulahSpeakingCountry) + case Galician + case Ganda + case Georgian + case German(GermanSpeakingCountry) + case Greek(GreekSpeakingCountry) + case Gujarati + case Gusii + case Hausa(HausaSpeakingCountry) + case Hawaiian + case Hebrew + case Hindi + case Hungarian + case Icelandic + case Igbo + case InariSami + case Indonesian + case Inuktitut + case Irish + case Italian(ItalianSpeakingCountry) + case Japanese + case JolaFonyi + case Kabuverdianu + case Kabyle + case Kako + case Kalaallisut + case Kalenjin + case Kamba + case Kannada + case Kashmiri + case Kazakh + case Khmer + case Kikuyu + case Kinyarwanda + case Konkani + case Korean(KoreanSpeakingCountry) + case KoyraChiini + case KoyraboroSenni + case Kwasio + case Kyrgyz + case Lakota + case Langi + case Lao + case Latvian + case Lingala(LingalaSpeakingCountry) + case Lithuanian + case LowerSorbian + case LubaKatanga + case Luo + case Luxembourgish + case Luyia + case Macedonian + case Machame + case MakhuwaMeetto + case Makonde + case Malagasy + case Malay(MalaySpeakingCountry) + case Malayalam + case Maltese + case Manx + case Marathi + case Masai(MasaiSpeakingCountry) + case Meru + case Meta + case Mongolian + case Morisyen + case Mundang + case Nama + case Nepali(NepaliSpeakingCountry) + case Ngiemboon + case Ngomba + case NorthNdebele + case NorthernSami(NorthernSamiSpeakingCountry) + case NorwegianBokmål(NorwegianBokmålSpeakingCountry) + case NorwegianNynorsk + case Nuer + case Nyankole + case Oriya + case Oromo(OromoSpeakingCountry) + case Ossetic(OsseticSpeakingCountry) + case Pashto + case Persian(PersianSpeakingCountry) + case Polish + case Portuguese(PortugueseSpeakingCountry) + case Punjabi(PunjabiSpeakingCountry) + case Quechua(QuechuaSpeakingCountry) + case Romanian(RomanianSpeakingCountry) + case Romansh + case Rombo + case Rundi + case Russian(RussianSpeakingCountry) + case Rwa + case Sakha + case Samburu + case Sango + case Sangu + case ScottishGaelic + case Sena + case Serbian(SerbianSpeakingCountry) + case Shambala + case Shona + case SichuanYi + case Sinhala + case Slovak + case Slovenian + case Soga + case Somali(SomaliSpeakingCountry) + case Spanish(SpanishSpeakingCountry) + case StandardMoroccanTamazight + case Swahili(SwahiliSpeakingCountry) + case Swedish(SwedishSpeakingCountry) + case SwissGerman(SwissGermanSpeakingCountry) + case Tachelhit + case Taita + case Tajik + case Tamil(TamilSpeakingCountry) + case Tasawaq + case Telugu + case Teso(TesoSpeakingCountry) + case Thai + case Tibetan(TibetanSpeakingCountry) + case Tigrinya(TigrinyaSpeakingCountry) + case Tongan + case Turkish(TurkishSpeakingCountry) + case Turkmen + case Ukrainian + case UpperSorbian + case Urdu(UrduSpeakingCountry) + case Uyghur + case Uzbek(UzbekSpeakingCountry) + case Vai + case Vietnamese + case Vunjo + case Walser + case Welsh + case WesternFrisian + case Yangben + case Yiddish + case Yoruba(YorubaSpeakingCountry) + case Zarma + case Zulu +} + +extension Locale: LanguageType { + + public var languageIdentifier: String { + switch self { + case .Afrikaans(_): + return "af" + case .Aghem: + return "agq" + case .Akan: + return "ak" + case .Albanian(_): + return "sq" + case .Amharic: + return "am" + case .Arabic(_): + return "ar" + case .Armenian: + return "hy" + case .Assamese: + return "as" + case .Asu: + return "asa" + case .Azerbaijani: + return "az" + case .Bafia: + return "ksf" + case .Bambara: + return "bm" + case .Basaa: + return "bas" + case .Basque: + return "eu" + case .Belarusian: + return "be" + case .Bemba: + return "bem" + case .Bena: + return "bez" + case .Bengali(_): + return "bn" + case .Bodo: + return "brx" + case .Bosnian: + return "bs" + case .Breton: + return "br" + case .Bulgarian: + return "bg" + case .Burmese: + return "my" + case .Catalan(_): + return "ca" + case .CentralAtlasTamazight: + return "tzm" + case .CentralKurdish(_): + return "ckb" + case .Cherokee: + return "chr" + case .Chiga: + return "cgg" + case .Chinese(_): + return "zh" + case .Colognian: + return "ksh" + case .Cornish: + return "kw" + case .Croatian(_): + return "hr" + case .Czech: + return "cs" + case .Danish(_): + return "da" + case .Duala: + return "dua" + case .Dutch(_): + return "nl" + case .Dzongkha: + return "dz" + case .Embu: + return "ebu" + case .English(_): + return "en" + case .Estonian: + return "et" + case .Ewe(_): + return "ee" + case .Ewondo: + return "ewo" + case .Faroese: + return "fo" + case .Filipino: + return "fil" + case .Finnish: + return "fi" + case .French(_): + return "fr" + case .Friulian: + return "fur" + case .Fulah(_): + return "ff" + case .Galician: + return "gl" + case .Ganda: + return "lg" + case .Georgian: + return "ka" + case .German(_): + return "de" + case .Greek(_): + return "el" + case .Gujarati: + return "gu" + case .Gusii: + return "guz" + case .Hausa(_): + return "ha" + case .Hawaiian: + return "haw" + case .Hebrew: + return "he" + case .Hindi: + return "hi" + case .Hungarian: + return "hu" + case .Icelandic: + return "is" + case .Igbo: + return "ig" + case .InariSami: + return "smn" + case .Indonesian: + return "id" + case .Inuktitut: + return "iu" + case .Irish: + return "ga" + case .Italian(_): + return "it" + case .Japanese: + return "ja" + case .JolaFonyi: + return "dyo" + case .Kabuverdianu: + return "kea" + case .Kabyle: + return "kab" + case .Kako: + return "kkj" + case .Kalaallisut: + return "kl" + case .Kalenjin: + return "kln" + case .Kamba: + return "kam" + case .Kannada: + return "kn" + case .Kashmiri: + return "ks" + case .Kazakh: + return "kk" + case .Khmer: + return "km" + case .Kikuyu: + return "ki" + case .Kinyarwanda: + return "rw" + case .Konkani: + return "kok" + case .Korean(_): + return "ko" + case .KoyraChiini: + return "khq" + case .KoyraboroSenni: + return "ses" + case .Kwasio: + return "nmg" + case .Kyrgyz: + return "ky" + case .Lakota: + return "lkt" + case .Langi: + return "lag" + case .Lao: + return "lo" + case .Latvian: + return "lv" + case .Lingala(_): + return "ln" + case .Lithuanian: + return "lt" + case .LowerSorbian: + return "dsb" + case .LubaKatanga: + return "lu" + case .Luo: + return "luo" + case .Luxembourgish: + return "lb" + case .Luyia: + return "luy" + case .Macedonian: + return "mk" + case .Machame: + return "jmc" + case .MakhuwaMeetto: + return "mgh" + case .Makonde: + return "kde" + case .Malagasy: + return "mg" + case .Malay(_): + return "ms" + case .Malayalam: + return "ml" + case .Maltese: + return "mt" + case .Manx: + return "gv" + case .Marathi: + return "mr" + case .Masai(_): + return "mas" + case .Meru: + return "mer" + case .Meta: + return "mgo" + case .Mongolian: + return "mn" + case .Morisyen: + return "mfe" + case .Mundang: + return "mua" + case .Nama: + return "naq" + case .Nepali(_): + return "ne" + case .Ngiemboon: + return "nnh" + case .Ngomba: + return "jgo" + case .NorthNdebele: + return "nd" + case .NorthernSami(_): + return "se" + case .NorwegianBokmål(_): + return "nb" + case .NorwegianNynorsk: + return "nn" + case .Nuer: + return "nus" + case .Nyankole: + return "nyn" + case .Oriya: + return "or" + case .Oromo(_): + return "om" + case .Ossetic(_): + return "os" + case .Pashto: + return "ps" + case .Persian(_): + return "fa" + case .Polish: + return "pl" + case .Portuguese(_): + return "pt" + case .Punjabi(_): + return "pa" + case .Quechua(_): + return "qu" + case .Romanian(_): + return "ro" + case .Romansh: + return "rm" + case .Rombo: + return "rof" + case .Rundi: + return "rn" + case .Russian(_): + return "ru" + case .Rwa: + return "rwk" + case .Sakha: + return "sah" + case .Samburu: + return "saq" + case .Sango: + return "sg" + case .Sangu: + return "sbp" + case .ScottishGaelic: + return "gd" + case .Sena: + return "seh" + case .Serbian(_): + return "sr" + case .Shambala: + return "ksb" + case .Shona: + return "sn" + case .SichuanYi: + return "ii" + case .Sinhala: + return "si" + case .Slovak: + return "sk" + case .Slovenian: + return "sl" + case .Soga: + return "xog" + case .Somali(_): + return "so" + case .Spanish(_): + return "es" + case .StandardMoroccanTamazight: + return "zgh" + case .Swahili(_): + return "sw" + case .Swedish(_): + return "sv" + case .SwissGerman(_): + return "gsw" + case .Tachelhit: + return "shi" + case .Taita: + return "dav" + case .Tajik: + return "tg" + case .Tamil(_): + return "ta" + case .Tasawaq: + return "twq" + case .Telugu: + return "te" + case .Teso(_): + return "teo" + case .Thai: + return "th" + case .Tibetan(_): + return "bo" + case .Tigrinya(_): + return "ti" + case .Tongan: + return "to" + case .Turkish(_): + return "tr" + case .Turkmen: + return "tk" + case .Ukrainian: + return "uk" + case .UpperSorbian: + return "hsb" + case .Urdu(_): + return "ur" + case .Uyghur: + return "ug" + case .Uzbek(_): + return "uz" + case .Vai: + return "vai" + case .Vietnamese: + return "vi" + case .Vunjo: + return "vun" + case .Walser: + return "wae" + case .Welsh: + return "cy" + case .WesternFrisian: + return "fy" + case .Yangben: + return "yav" + case .Yiddish: + return "yi" + case .Yoruba(_): + return "yo" + case .Zarma: + return "dje" + case .Zulu: + return "zu" + } + } +} + +extension Locale: CountryType { + + public var countryIdentifier: String { + switch self { + case .Aghem, .Akan, .Amharic, .Armenian, .Assamese, .Asu, .Azerbaijani, .Bafia, .Bambara, .Basaa, .Basque, .Belarusian, .Bemba, .Bena, .Bodo, .Bosnian, .Breton, .Bulgarian, .Burmese, .CentralAtlasTamazight, .Cherokee, .Chiga, .Colognian, .Cornish, .Czech, .Duala, .Dzongkha, .Embu, .Estonian, .Ewondo, .Faroese, .Filipino, .Finnish, .Friulian, .Galician, .Ganda, .Georgian, .Gujarati, .Gusii, .Hawaiian, .Hebrew, .Hindi, .Hungarian, .Icelandic, .Igbo, .InariSami, .Indonesian, .Inuktitut, .Irish, .Japanese, .JolaFonyi, .Kabuverdianu, .Kabyle, .Kako, .Kalaallisut, .Kalenjin, .Kamba, .Kannada, .Kashmiri, .Kazakh, .Khmer, .Kikuyu, .Kinyarwanda, .Konkani, .KoyraChiini, .KoyraboroSenni, .Kwasio, .Kyrgyz, .Lakota, .Langi, .Lao, .Latvian, .Lithuanian, .LowerSorbian, .LubaKatanga, .Luo, .Luxembourgish, .Luyia, .Macedonian, .Machame, .MakhuwaMeetto, .Makonde, .Malagasy, .Malayalam, .Maltese, .Manx, .Marathi, .Meru, .Meta, .Mongolian, .Morisyen, .Mundang, .Nama, .Ngiemboon, .Ngomba, .NorthNdebele, .NorwegianNynorsk, .Nuer, .Nyankole, .Oriya, .Pashto, .Polish, .Romansh, .Rombo, .Rundi, .Rwa, .Sakha, .Samburu, .Sango, .Sangu, .ScottishGaelic, .Sena, .Shambala, .Shona, .SichuanYi, .Sinhala, .Slovak, .Slovenian, .Soga, .StandardMoroccanTamazight, .Tachelhit, .Taita, .Tajik, .Tasawaq, .Telugu, .Thai, .Tongan, .Turkmen, .Ukrainian, .UpperSorbian, .Uyghur, .Vai, .Vietnamese, .Vunjo, .Walser, .Welsh, .WesternFrisian, .Yangben, .Yiddish, .Zarma, .Zulu: + return "" + case .Afrikaans(let country): + return country.countryIdentifier + case .Albanian(let country): + return country.countryIdentifier + case .Arabic(let country): + return country.countryIdentifier + case .Bengali(let country): + return country.countryIdentifier + case .Catalan(let country): + return country.countryIdentifier + case .CentralKurdish(let country): + return country.countryIdentifier + case .Chinese(let country): + return country.countryIdentifier + case .Croatian(let country): + return country.countryIdentifier + case .Danish(let country): + return country.countryIdentifier + case .Dutch(let country): + return country.countryIdentifier + case .English(let country): + return country.countryIdentifier + case .Ewe(let country): + return country.countryIdentifier + case .French(let country): + return country.countryIdentifier + case .Fulah(let country): + return country.countryIdentifier + case .German(let country): + return country.countryIdentifier + case .Greek(let country): + return country.countryIdentifier + case .Hausa(let country): + return country.countryIdentifier + case .Italian(let country): + return country.countryIdentifier + case .Korean(let country): + return country.countryIdentifier + case .Lingala(let country): + return country.countryIdentifier + case .Malay(let country): + return country.countryIdentifier + case .Masai(let country): + return country.countryIdentifier + case .Nepali(let country): + return country.countryIdentifier + case .NorthernSami(let country): + return country.countryIdentifier + case .NorwegianBokmål(let country): + return country.countryIdentifier + case .Oromo(let country): + return country.countryIdentifier + case .Ossetic(let country): + return country.countryIdentifier + case .Persian(let country): + return country.countryIdentifier + case .Portuguese(let country): + return country.countryIdentifier + case .Punjabi(let country): + return country.countryIdentifier + case .Quechua(let country): + return country.countryIdentifier + case .Romanian(let country): + return country.countryIdentifier + case .Russian(let country): + return country.countryIdentifier + case .Serbian(let country): + return country.countryIdentifier + case .Somali(let country): + return country.countryIdentifier + case .Spanish(let country): + return country.countryIdentifier + case .Swahili(let country): + return country.countryIdentifier + case .Swedish(let country): + return country.countryIdentifier + case .SwissGerman(let country): + return country.countryIdentifier + case .Tamil(let country): + return country.countryIdentifier + case .Teso(let country): + return country.countryIdentifier + case .Tibetan(let country): + return country.countryIdentifier + case .Tigrinya(let country): + return country.countryIdentifier + case .Turkish(let country): + return country.countryIdentifier + case .Urdu(let country): + return country.countryIdentifier + case .Uzbek(let country): + return country.countryIdentifier + case .Yoruba(let country): + return country.countryIdentifier + } + } +} + +extension Locale: LocaleType { + // Uses default implementation +} diff --git a/Money/Shared/Locale.swift b/Money/Shared/Locale.swift new file mode 100644 index 0000000..2eb7932 --- /dev/null +++ b/Money/Shared/Locale.swift @@ -0,0 +1,32 @@ +// +// Locale.swift +// Money +// +// Created by Daniel Thorpe on 22/11/2015. +// +// + +import Foundation + +public protocol LanguageType { + var languageIdentifier: String { get } +} + +public protocol CountryType { + var countryIdentifier: String { get } +} + +public protocol LocaleType { + var localeIdentifier: String { get } +} + +extension LocaleType where Self: LanguageType, Self: CountryType { + public var localeIdentifier: String { + guard !countryIdentifier.isEmpty else { + return languageIdentifier + } + return "\(languageIdentifier)_\(countryIdentifier)" + } +} + +let locale: Locale = .English(.UnitedKingdom) diff --git a/Money/Shared/Money.swift b/Money/Shared/Money.swift index dfaac00..90e4907 100644 --- a/Money/Shared/Money.swift +++ b/Money/Shared/Money.swift @@ -74,12 +74,16 @@ public extension MoneyType { public extension MoneyType where Currency: ISOCurrencyType { + func formattedForLocale(locale: Locale, style: NSNumberFormatterStyle = .CurrencyStyle) -> String { + return formattedForLanguageId(locale.localeIdentifier, style: style) + } + /** ### Localized Formatted String This function will format the Money into a string suitable - for the provided language identifier. + for the provided a locale identifier. */ func formattedForLanguageId(languageId: String, style: NSNumberFormatterStyle = .CurrencyStyle) -> String { let formatter: NSNumberFormatter = Currency.formatter.copy() as! NSNumberFormatter diff --git a/Supporting Files/Generate.swift b/Supporting Files/Generate.swift index 91f0372..2ce39b6 100755 --- a/Supporting Files/Generate.swift +++ b/Supporting Files/Generate.swift @@ -13,6 +13,34 @@ import Foundation typealias Writer = (String) -> Void typealias Generator = (Writer) -> Void +let enUS = NSLocale(localeIdentifier: "en_US") + +protocol TypeGenerator { + static var typeName: String { get } + var displayName: String { get } +} + +extension TypeGenerator { + + var name: String { + return (displayName.capitalizedStringWithLocale(enUS) as NSString) + .stringByReplacingOccurrencesOfString(" ", withString: "") + .stringByReplacingOccurrencesOfString("-", withString: "") + .stringByReplacingOccurrencesOfString("ʼ", withString: "") + .stringByReplacingOccurrencesOfString(".", withString: "") + .stringByReplacingOccurrencesOfString("&", withString: "") + .stringByReplacingOccurrencesOfString("(", withString: "") + .stringByReplacingOccurrencesOfString(")", withString: "") + .stringByReplacingOccurrencesOfString("’", withString: "") + } + + var protocolName: String { + return "\(name)\(Self.typeName)Type" + } +} + +/// MARK: - Currency Info + func createMoneyTypeForCurrency(code: String) -> String { return "_Money" } @@ -74,6 +102,233 @@ func createMoneyTypes(line: Writer) { } } +/// MARK: - Locale Info + +struct Country: Comparable, TypeGenerator, CustomStringConvertible { + static let typeName = "Country" + let id: String + let displayName: String + var langaugeIds = Set() + + var description: String { + return "\(self.id): \(displayName) -> \(langaugeIds)" + } + + init?(id: String) { + self.id = id + guard let countryDisplayName = enUS.displayNameForKey(NSLocaleCountryCode, value: id) else { + return nil + } + displayName = countryDisplayName + } +} + +struct Language: Comparable, TypeGenerator, CustomStringConvertible { + static let typeName = "Language" + + let id: String + let displayName: String + var coutryIds = Set() + + var description: String { + return "\(id): \(displayName) -> \(coutryIds)" + } + + var languageSpeakingCountryEnumName: String { + return "\(name)Speaking\(Country.typeName)" + } + + init?(id: String) { + self.id = id + guard let languageDisplayName = enUS.displayNameForKey(NSLocaleLanguageCode, value: id) else { + return nil + } + displayName = languageDisplayName + } +} + +func ==(lhs: Country, rhs: Country) -> Bool { + return lhs.id == rhs.id +} + +func <(lhs: Country, rhs: Country) -> Bool { + return lhs.name < rhs.name +} + +func ==(lhs: Language, rhs: Language) -> Bool { + return lhs.id == rhs.id +} + +func <(lhs: Language, rhs: Language) -> Bool { + return lhs.name < rhs.name +} + + +typealias CountriesById = Dictionary +typealias LanguagesById = Dictionary + +func createLanguagesAndCountries() -> (languages: LanguagesById, countries: CountriesById) { + + let localeIDs = NSLocale.availableLocaleIdentifiers() + var countriesById = CountriesById() + var languagesById = LanguagesById() + + for id in localeIDs { + let locale = NSLocale(localeIdentifier: id) + + let countryId = locale.objectForKey(NSLocaleCountryCode) as? String + let country: Country? = countryId.flatMap { countriesById[$0] ?? Country(id: $0) } + + let languageId = locale.objectForKey(NSLocaleLanguageCode) as? String + let language: Language? = languageId.flatMap { languagesById[$0] ?? Language(id: $0) } + + if let countryId = countryId, var language = language { + language.coutryIds.insert(countryId) + languagesById.updateValue(language, forKey: language.id) + } + + if let languageId = languageId, var country = country { + country.langaugeIds.insert(languageId) + countriesById.updateValue(country, forKey: country.id) + } + } + + return (languagesById, countriesById) +} + +func createLocaleTypes(line: Writer) { + let (languagesById, countriesById) = createLanguagesAndCountries() + + let countries: [Country] = ([Country])(countriesById.values).sort { $0.langaugeIds.count > $1.langaugeIds.count } + let languages: [Language] = ([Language])(languagesById.values).sort { $0.coutryIds.count > $1.coutryIds.count } + + let languagesWithLessThanTwoCountries = languages.filter({ $0.coutryIds.count < 2 }).sort() + let languagesWithMoreThanOneCountry = languages.filter({ $0.coutryIds.count > 1 }).sort() + + func createLanguageSpeakingCountry(language: Language) { + line("") + + // Write the enum type + line("public enum \(language.languageSpeakingCountryEnumName): CountryType {") + + let _countries = language.coutryIds.sort().flatMap({ countriesById[$0] }) + + // Write the cases + for country in _countries { + line(" case \(country.name)") + } + + line("") + line(" public var countryIdentifier: String {") + line(" switch self {") + + for country in _countries { + line(" case .\(country.name):") + line(" return \"\(country.id)\"") + } + + line(" }") // End of switch + line(" }") // End of var + + line("}") // End of enum + } + + func createLanguageSpeakingCountries() { + line("") + line("// MARK: - Country Types") + for language in languages.filter({ $0.coutryIds.count > 1 }) { + createLanguageSpeakingCountry(language) + } + } + + func createLocale() { + line("") + line("// MARK: - Locale") + line("") + line("public enum Locale {") + + for language in languages.sort() { + if language.coutryIds.count > 1 { + line(" case \(language.name)(\(language.languageSpeakingCountryEnumName))") + } + else { + line(" case \(language.name)") + } + } + + line("}") // End of enum + + // Add extension for LanguageType protocol + line("") + line("extension Locale: LanguageType {") + line("") + line(" public var languageIdentifier: String {") + line(" switch self {") + + for language in languages.sort() { + if language.coutryIds.count > 1 { + line(" case .\(language.name)(_):") + line(" return \"\(language.id)\"") + } + else { + line(" case .\(language.name):") + line(" return \"\(language.id)\"") + } + } + + line(" }") // End of switch + line(" }") // End of var + line("}") // End of extension + + // Add extension for CountryType protocol + line("") + line("extension Locale: CountryType {") + line("") + line(" public var countryIdentifier: String {") + line(" switch self {") + + let caseNames = languagesWithLessThanTwoCountries.map { ".\($0.name)" } + let joinedCaseNames = caseNames.joinWithSeparator(", ") + line(" case \(joinedCaseNames):") + line(" return \"\"") + + for language in languagesWithMoreThanOneCountry { + line(" case .\(language.name)(let country):") + line(" return country.countryIdentifier") + } + +// for language in languages.sort() { +// if language.coutryIds.count > 1 { +// line(" case .\(language.name)(let country):") +// line(" return country.countryIdentifier") +// } +// else { +// line(" case .\(language.name):") +// line(" return \"\"") +// } +// } + + line(" }") // End of switch + line(" }") // End of var + line("}") // End of extension + + + // Add extension for LocaleType protocol + line("") + line("extension Locale: LocaleType {") + line(" // Uses default implementation") + line("}") // End of extension + + } + + // Create the (Language)SpeakingCountry enum types + createLanguageSpeakingCountries() + + // Create the Locale enum + createLocale() + +} + func generate(outputPath: String) { guard let outputStream = NSOutputStream(toFileAtPath: outputPath, append: false) else { @@ -98,6 +353,8 @@ func generate(outputPath: String) { createExtensionFor("Currency", writer: writeLine, content: createCurrencyTypes) write("\n") createMoneyTypes(writeLine) + write("\n") + createLocaleTypes(writeLine) } // MARK: - Main() diff --git a/Tests/Shared/MoneyTests.swift b/Tests/Shared/MoneyTests.swift index 1926cbe..9f3194c 100644 --- a/Tests/Shared/MoneyTests.swift +++ b/Tests/Shared/MoneyTests.swift @@ -316,10 +316,25 @@ class MoneyFormattingTests: MoneyTests { jpy = 32_000 } + // Tests assume a en_GB test environment + func test__locale_identifier_equals_current_locale() { + XCTAssertEqual(NSLocale.currentLocale().localeIdentifier, Locale.English(.UnitedKingdom).localeIdentifier) + } + func test__formatted_for_es_ES() { let formatted = gbp.formattedForLanguageId("es_ES") XCTAssertEqual(formatted, "100,00 GBP") } + + func test__formatted_for_Spanish_Spain() { + let formatted = gbp.formattedForLocale(.Spanish(.Spain)) + XCTAssertEqual(formatted, "100,00 GBP") + } + + func test__formatted_for_English_UnitedKingdom() { + let formatted = gbp.formattedForLocale(.English(.UnitedKingdom)) + XCTAssertEqual(formatted, "£100.00") + } } class MoneyValueCodingTests: XCTestCase { From 6213d083326810564fa8dffde01bde2632e4353c Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Sun, 22 Nov 2015 20:23:46 +0000 Subject: [PATCH 04/24] [MNY-24]: Removes unneeded constant --- Money/Shared/Locale.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Money/Shared/Locale.swift b/Money/Shared/Locale.swift index 2eb7932..ac1e417 100644 --- a/Money/Shared/Locale.swift +++ b/Money/Shared/Locale.swift @@ -27,6 +27,4 @@ extension LocaleType where Self: LanguageType, Self: CountryType { } return "\(languageIdentifier)_\(countryIdentifier)" } -} - -let locale: Locale = .English(.UnitedKingdom) +} \ No newline at end of file From ee27da0fc80fa0f34f37658ab2d1aaceb80b88d5 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Sun, 22 Nov 2015 20:27:41 +0000 Subject: [PATCH 05/24] [MNY-24]: Fixes test for current locale --- Tests/Shared/MoneyTests.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tests/Shared/MoneyTests.swift b/Tests/Shared/MoneyTests.swift index 9f3194c..14fdeb6 100644 --- a/Tests/Shared/MoneyTests.swift +++ b/Tests/Shared/MoneyTests.swift @@ -318,7 +318,9 @@ class MoneyFormattingTests: MoneyTests { // Tests assume a en_GB test environment func test__locale_identifier_equals_current_locale() { - XCTAssertEqual(NSLocale.currentLocale().localeIdentifier, Locale.English(.UnitedKingdom).localeIdentifier) + let gb = NSLocale.currentLocale().localeIdentifier == Locale.English(.UnitedKingdom).localeIdentifier + let us = NSLocale.currentLocale().localeIdentifier == Locale.English(.UnitedStates).localeIdentifier + XCTAssertTrue(gb || us) } func test__formatted_for_es_ES() { From 551c90f9d2d0853283b342eeb93689862ff36679 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Sun, 22 Nov 2015 22:35:09 +0000 Subject: [PATCH 06/24] [MNY-24]: Fixes some locale/formatter issues --- Money/Shared/Currency.swift | 41 +++++++++++++++++++++------------ Money/Shared/Locale.swift | 17 ++++++++++++++ Money/Shared/Money.swift | 28 ++++++++++++++-------- Tests/Shared/DecimalTests.swift | 4 ++-- Tests/Shared/MoneyTests.swift | 18 +++++++-------- 5 files changed, 72 insertions(+), 36 deletions(-) diff --git a/Money/Shared/Currency.swift b/Money/Shared/Currency.swift index bfb5a46..2ea67a3 100644 --- a/Money/Shared/Currency.swift +++ b/Money/Shared/Currency.swift @@ -88,7 +88,7 @@ public protocol ISOCurrencyType: CurrencyType { static var sharedInstance: Self { get } - var _locale: NSLocale { get } + var _code: String { get } var _formatter: NSNumberFormatter { get } } @@ -97,7 +97,7 @@ public extension ISOCurrencyType { /// The currency code static var code: String { - return formatter.currencyCode + return sharedInstance._code } /// The currency symbol @@ -133,21 +133,32 @@ public struct Currency { */ public class Base { - public let _formatter: NSNumberFormatter - public let _locale: NSLocale - - init(locale: NSLocale) { - _formatter = { - let fmtr = NSNumberFormatter() - fmtr.numberStyle = .CurrencyStyle - fmtr.locale = locale - return fmtr - }() - _locale = locale + public let _code: String + + lazy var locale: NSLocale = { + let id = NSLocale.localeIdentifierFromComponents([NSLocaleCurrencyCode: self._code]) + return NSLocale(localeIdentifier: id) + }() + + public lazy var _formatter: NSNumberFormatter = { + let currencyLocale = self.locale + let currentLocale = NSLocale.currentLocale() + let fmtr = NSNumberFormatter() + fmtr.numberStyle = .CurrencyStyle + fmtr.currencyCode = self._code + let symbol = currencyLocale.currencySymbol + fmtr.currencySymbol = currentLocale.displayNameForKey(NSLocaleCurrencySymbol, value: symbol) ?? symbol + fmtr.currencyGroupingSeparator = currentLocale.currencyGroupingSeparator + fmtr.currencyDecimalSeparator = currentLocale.currencyDecimalSeparator + return fmtr + }() + + init(code: String) { + self._code = code } - convenience init(code: String) { - self.init(locale: NSLocale(localeIdentifier: NSLocale.localeIdentifierFromComponents([NSLocaleCurrencyCode: code]))) + convenience init(locale: NSLocale) { + self.init(code: locale.objectForKey(NSLocaleCurrencyCode) as! String) } } diff --git a/Money/Shared/Locale.swift b/Money/Shared/Locale.swift index ac1e417..5e53eec 100644 --- a/Money/Shared/Locale.swift +++ b/Money/Shared/Locale.swift @@ -8,6 +8,8 @@ import Foundation +internal let __formatter = NSNumberFormatter() + public protocol LanguageType { var languageIdentifier: String { get } } @@ -27,4 +29,19 @@ extension LocaleType where Self: LanguageType, Self: CountryType { } return "\(languageIdentifier)_\(countryIdentifier)" } +} + +internal extension NSLocale { + + var currencySymbol: String { + return objectForKey(NSLocaleCurrencySymbol) as! String + } + + var currencyGroupingSeparator: String { + return objectForKey(NSLocaleGroupingSeparator) as! String + } + + var currencyDecimalSeparator: String { + return objectForKey(NSLocaleDecimalSeparator) as! String + } } \ No newline at end of file diff --git a/Money/Shared/Money.swift b/Money/Shared/Money.swift index 90e4907..2a14ba8 100644 --- a/Money/Shared/Money.swift +++ b/Money/Shared/Money.swift @@ -67,15 +67,15 @@ public extension MoneyType { These are `.CurrencyISOCodeStyle`, `.CurrencyPluralStyle`, and `.CurrencyAccountingStyle`. */ - func formattedWithStyle(style: NSNumberFormatterStyle) -> String { + func formattedWithStyle(style: NSNumberFormatterStyle = .CurrencyStyle) -> String { return Currency.formatter.formattedStringWithStyle(style)(decimal) } } -public extension MoneyType where Currency: ISOCurrencyType { +extension MoneyType where Currency: ISOCurrencyType { - func formattedForLocale(locale: Locale, style: NSNumberFormatterStyle = .CurrencyStyle) -> String { - return formattedForLanguageId(locale.localeIdentifier, style: style) + public func formattedForLocale(locale: Locale, style: NSNumberFormatterStyle = .CurrencyStyle) -> String { + return formattedForLocaleId(locale.localeIdentifier, style: style) } /** @@ -85,11 +85,19 @@ public extension MoneyType where Currency: ISOCurrencyType { This function will format the Money into a string suitable for the provided a locale identifier. */ - func formattedForLanguageId(languageId: String, style: NSNumberFormatterStyle = .CurrencyStyle) -> String { - let formatter: NSNumberFormatter = Currency.formatter.copy() as! NSNumberFormatter - formatter.locale = NSLocale(localeIdentifier: NSLocale.canonicalLocaleIdentifierFromString(languageId)) - formatter.currencyCode = Currency.code - return formatter.formattedStringWithStyle(style)(decimal) + public func formattedForLocaleId(localeId: String, style: NSNumberFormatterStyle = .CurrencyStyle) -> String { + let locale = NSLocale(localeIdentifier: NSLocale.canonicalLocaleIdentifierFromString(localeId)) + return formattedForLocale(locale) + } + + internal func formattedForLocale(locale: NSLocale, style: NSNumberFormatterStyle = .CurrencyStyle) -> String { + __formatter.locale = locale + __formatter.numberStyle = style + __formatter.currencyCode = Currency.code + __formatter.currencySymbol = Currency.symbol + __formatter.currencyGroupingSeparator = locale.currencyGroupingSeparator + __formatter.currencyDecimalSeparator = locale.currencyDecimalSeparator + return __formatter.stringFromDecimal(decimal)! } } @@ -283,7 +291,7 @@ extension _Money: CustomStringConvertible { NSNumberFormatterStyle.CurrencyStyle. */ public var description: String { - return formattedWithStyle(.CurrencyStyle) + return formattedWithStyle() } } diff --git a/Tests/Shared/DecimalTests.swift b/Tests/Shared/DecimalTests.swift index 3db0f67..ee7dfec 100644 --- a/Tests/Shared/DecimalTests.swift +++ b/Tests/Shared/DecimalTests.swift @@ -74,13 +74,13 @@ class DecimalNumberConversionTests: DecimalTests { func test__multiply() { let result = decimal * money - XCTAssertEqual(result.description, "£ 200.00") + XCTAssertEqual(result.description, "£200.00") XCTAssertEqual(money * decimal, 200) } func test__divide() { let result = decimal / money - XCTAssertEqual(result.description, "£ 0.50") + XCTAssertEqual(result.description, "£0.50") XCTAssertEqual(money / decimal, 2) } } diff --git a/Tests/Shared/MoneyTests.swift b/Tests/Shared/MoneyTests.swift index 14fdeb6..a3a27ae 100644 --- a/Tests/Shared/MoneyTests.swift +++ b/Tests/Shared/MoneyTests.swift @@ -263,35 +263,35 @@ class MoneyDescriptionTests: MoneyTests { func test__gbp_description() { XCTAssertEqual(Currency.GBP.code, "GBP") XCTAssertEqual(Currency.GBP.symbol, "£") - XCTAssertEqual(gbp.description, "£ 100.00") + XCTAssertEqual(gbp.description, "£100.00") XCTAssertEqual(Currency.GBP.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } func test__usd_description() { XCTAssertEqual(Currency.USD.code, "USD") XCTAssertEqual(Currency.USD.symbol, "US$") - XCTAssertEqual(usd.description, "US$ 99.00") + XCTAssertEqual(usd.description, "US$99.00") XCTAssertEqual(Currency.USD.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } func test__cad_description() { XCTAssertEqual(Currency.CAD.code, "CAD") XCTAssertEqual(Currency.CAD.symbol, "CA$") - XCTAssertEqual(cad.description, "CA$ 102.01") + XCTAssertEqual(cad.description, "CA$102.01") XCTAssertEqual(Currency.CAD.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } func test__aud_description() { XCTAssertEqual(Currency.AUD.code, "AUD") XCTAssertEqual(Currency.AUD.symbol, "A$") - XCTAssertEqual(aud.description, "A$ 100.00") + XCTAssertEqual(aud.description, "A$100.00") XCTAssertEqual(Currency.AUD.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } func test__eur_description() { XCTAssertEqual(Currency.EUR.code, "EUR") XCTAssertEqual(Currency.EUR.symbol, "€") - XCTAssertEqual(eur.description, "€ 249.50") + XCTAssertEqual(eur.description, "€249.50") XCTAssertEqual(Currency.EUR.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } @@ -299,7 +299,7 @@ class MoneyDescriptionTests: MoneyTests { XCTAssertEqual(Currency.JPY.code, "JPY") XCTAssertEqual(Currency.JPY.symbol, "JP¥") XCTAssertEqual(Currency.JPY.scale, 0) - XCTAssertEqual(jpy.description, "JP¥ 320") + XCTAssertEqual(jpy.description, "JP¥320") XCTAssertEqual(Currency.JPY.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } } @@ -324,13 +324,13 @@ class MoneyFormattingTests: MoneyTests { } func test__formatted_for_es_ES() { - let formatted = gbp.formattedForLanguageId("es_ES") - XCTAssertEqual(formatted, "100,00 GBP") + let formatted = gbp.formattedForLocaleId("es_ES") + XCTAssertEqual(formatted, "100,00 £") } func test__formatted_for_Spanish_Spain() { let formatted = gbp.formattedForLocale(.Spanish(.Spain)) - XCTAssertEqual(formatted, "100,00 GBP") + XCTAssertEqual(formatted, "100,00 £") } func test__formatted_for_English_UnitedKingdom() { From 4e95d58aea6ae6aa11e99a795bf260ee016d2f69 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 00:02:29 +0000 Subject: [PATCH 07/24] [MNY-24]: Adds start of autogenerated unit tests. --- Money.xcodeproj/project.pbxproj | 11 +- Money/Shared/Autogenerated.swift | 2294 +++++++++++++------------ Supporting Files/Generate.swift | 292 +++- Tests/Shared/AutogeneratedTests.swift | 2052 ++++++++++++++++++++++ 4 files changed, 3479 insertions(+), 1170 deletions(-) create mode 100644 Tests/Shared/AutogeneratedTests.swift diff --git a/Money.xcodeproj/project.pbxproj b/Money.xcodeproj/project.pbxproj index 419e38f..24a09c6 100644 --- a/Money.xcodeproj/project.pbxproj +++ b/Money.xcodeproj/project.pbxproj @@ -28,6 +28,9 @@ 65579FB71C0228EB00C3F8C7 /* Locale.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579FB51C0228EB00C3F8C7 /* Locale.swift */; }; 65579FB81C0228EB00C3F8C7 /* Locale.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579FB51C0228EB00C3F8C7 /* Locale.swift */; }; 65579FB91C0228EB00C3F8C7 /* Locale.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579FB51C0228EB00C3F8C7 /* Locale.swift */; }; + 65579FC61C0288A300C3F8C7 /* AutogeneratedTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579FC51C0288A300C3F8C7 /* AutogeneratedTests.swift */; }; + 65579FC71C0288A300C3F8C7 /* AutogeneratedTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579FC51C0288A300C3F8C7 /* AutogeneratedTests.swift */; }; + 65579FC81C0288A300C3F8C7 /* AutogeneratedTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579FC51C0288A300C3F8C7 /* AutogeneratedTests.swift */; }; 6557F4C71BEB7F32003CD2BF /* ValueCoding.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6557F4C61BEB7F32003CD2BF /* ValueCoding.framework */; }; 6557F4C91BEB7F3D003CD2BF /* ValueCoding.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6557F4C81BEB7F3D003CD2BF /* ValueCoding.framework */; }; 6557F4CB1BEB7F46003CD2BF /* ValueCoding.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6557F4CA1BEB7F46003CD2BF /* ValueCoding.framework */; }; @@ -196,6 +199,7 @@ /* Begin PBXFileReference section */ 65579F8B1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DecimalNumberTypeTests.swift; sourceTree = ""; }; 65579FB51C0228EB00C3F8C7 /* Locale.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Locale.swift; sourceTree = ""; }; + 65579FC51C0288A300C3F8C7 /* AutogeneratedTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutogeneratedTests.swift; sourceTree = ""; }; 6557F4C61BEB7F32003CD2BF /* ValueCoding.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ValueCoding.framework; path = Carthage/Build/iOS/ValueCoding.framework; sourceTree = ""; }; 6557F4C81BEB7F3D003CD2BF /* ValueCoding.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ValueCoding.framework; path = Carthage/Build/watchOS/ValueCoding.framework; sourceTree = ""; }; 6557F4CA1BEB7F46003CD2BF /* ValueCoding.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ValueCoding.framework; path = Carthage/Build/tvOS/ValueCoding.framework; sourceTree = ""; }; @@ -410,6 +414,7 @@ isa = PBXGroup; children = ( 65DD22AD1BFA10DF0054F62D /* Troll.png */, + 65579FC51C0288A300C3F8C7 /* AutogeneratedTests.swift */, 65DD22A01BFA10DF0054F62D /* BitcoinTests.swift */, 65579F8B1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift */, 65DD22A11BFA10DF0054F62D /* DecimalTests.swift */, @@ -789,10 +794,11 @@ name = "Generate Currency Type"; outputPaths = ( "$(SRCROOT)/Money/Shared/Autogenerated.swift", + "$(SRCROOT)/Tests/Shared/AutogeneratedTests.swift", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"$SCRIPT_INPUT_FILE_0\" \"$SCRIPT_OUTPUT_FILE_0\"\n\n\n\n\n"; + shellScript = "\"$SCRIPT_INPUT_FILE_0\" \"$SCRIPT_OUTPUT_FILE_0\" \"$SCRIPT_OUTPUT_FILE_1\"\n\n\n\n\n"; }; 65D305641BE955AE0032D99F /* Carthage Copy Frameworks */ = { isa = PBXShellScriptBuildPhase; @@ -885,6 +891,7 @@ 65DD22C21BFA10F30054F62D /* FXYahooTests.swift in Sources */, 65DD22C41BFA10F30054F62D /* NSDecimalNumberTests.swift in Sources */, 65DD22BF1BFA10F30054F62D /* DecimalTests.swift in Sources */, + 65579FC61C0288A300C3F8C7 /* AutogeneratedTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -932,6 +939,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 65579FC71C0288A300C3F8C7 /* AutogeneratedTests.swift in Sources */, 65DD22B61BFA10F20054F62D /* BitcoinTests.swift in Sources */, 65DD22B91BFA10F20054F62D /* FXTests.swift in Sources */, 65DD22BD1BFA10F20054F62D /* NSDecimalTests.swift in Sources */, @@ -968,6 +976,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 65579FC81C0288A300C3F8C7 /* AutogeneratedTests.swift in Sources */, 65DD22B51BFA10F10054F62D /* NSDecimalTests.swift in Sources */, 65DD22B41BFA10F10054F62D /* NSDecimalNumberTests.swift in Sources */, 65DD22AF1BFA10F10054F62D /* DecimalTests.swift in Sources */, diff --git a/Money/Shared/Autogenerated.swift b/Money/Shared/Autogenerated.swift index f6f4b2f..686a149 100644 --- a/Money/Shared/Autogenerated.swift +++ b/Money/Shared/Autogenerated.swift @@ -2127,807 +2127,867 @@ public typealias ZWD = _Money // MARK: - Country Types -public enum EnglishSpeakingCountry: CountryType { - case World - case Europe - case Andorra - case AntiguaBarbuda - case Anguilla +public enum AfrikaansSpeakingCountry: CountryType { + + case Namibia + case SouthAfrica + + public static let all: [AfrikaansSpeakingCountry] = [ .Namibia, .SouthAfrica ] + + public var countryIdentifier: String { + switch self { + case .Namibia: + return "NA" + case .SouthAfrica: + return "ZA" + } + } +} + +public enum AlbanianSpeakingCountry: CountryType { + case Albania - case AmericanSamoa - case Austria - case Australia - case BosniaHerzegovina - case Barbados - case Belgium - case Bermuda - case Bahamas - case Botswana - case Belize - case Canada - case CocosKeelingIslands - case Switzerland - case CookIslands - case Cameroon - case ChristmasIsland - case Cyprus - case CzechRepublic - case Germany - case DiegoGarcia - case Denmark - case Dominica - case Estonia + case Macedonia + case Kosovo + + public static let all: [AlbanianSpeakingCountry] = [ .Albania, .Macedonia, .Kosovo ] + + public var countryIdentifier: String { + switch self { + case .Albania: + return "AL" + case .Macedonia: + return "MK" + case .Kosovo: + return "XK" + } + } +} + +public enum ArabicSpeakingCountry: CountryType { + + case World + case UnitedArabEmirates + case Bahrain + case Djibouti + case Algeria + case Egypt + case WesternSahara case Eritrea - case Spain - case Finland - case Fiji - case FalklandIslands - case Micronesia - case France - case UnitedKingdom - case Grenada - case Guernsey - case Ghana - case Gibraltar - case Gambia - case Greece - case Guam - case Guyana - case HongKongSarChina - case Croatia - case Hungary - case Ireland case Israel - case IsleOfMan - case India - case BritishIndianOceanTerritory - case Iceland - case Italy - case Jersey - case Jamaica - case Kenya - case Kiribati - case StKittsNevis - case CaymanIslands - case StLucia - case Liberia - case Lesotho - case Lithuania - case Luxembourg - case Latvia - case Montenegro - case Madagascar - case MarshallIslands - case MacauSarChina - case NorthernMarianaIslands - case Montserrat - case Malta - case Mauritius - case Malawi - case Malaysia - case Namibia - case NorfolkIsland - case Nigeria - case Netherlands - case Norway - case Nauru - case Niue - case NewZealand - case PapuaNewGuinea - case Philippines - case Pakistan - case Poland - case PitcairnIslands - case PuertoRico - case Portugal - case Palau - case Romania - case Russia - case Rwanda - case SolomonIslands - case Seychelles + case Iraq + case Jordan + case Comoros + case Kuwait + case Lebanon + case Libya + case Morocco + case Mauritania + case Oman + case PalestinianTerritories + case Qatar + case SaudiArabia case Sudan - case Sweden - case Singapore - case StHelena - case Slovenia - case Slovakia - case SierraLeone + case Somalia case SouthSudan - case SintMaarten - case Swaziland - case TurksCaicosIslands - case Tokelau - case Tonga - case Turkey - case TrinidadTobago - case Tuvalu - case Tanzania - case Uganda - case USOutlyingIslands - case UnitedStates - case StVincentGrenadines - case BritishVirginIslands - case USVirginIslands - case Vanuatu - case Samoa - case SouthAfrica - case Zambia - case Zimbabwe + case Syria + case Chad + case Tunisia + case Yemen + + public static let all: [ArabicSpeakingCountry] = [ .World, .UnitedArabEmirates, .Bahrain, .Djibouti, .Algeria, .Egypt, .WesternSahara, .Eritrea, .Israel, .Iraq, .Jordan, .Comoros, .Kuwait, .Lebanon, .Libya, .Morocco, .Mauritania, .Oman, .PalestinianTerritories, .Qatar, .SaudiArabia, .Sudan, .Somalia, .SouthSudan, .Syria, .Chad, .Tunisia, .Yemen ] public var countryIdentifier: String { switch self { case .World: return "001" - case .Europe: - return "150" - case .Andorra: - return "AD" - case .AntiguaBarbuda: - return "AG" - case .Anguilla: - return "AI" - case .Albania: - return "AL" - case .AmericanSamoa: - return "AS" - case .Austria: - return "AT" - case .Australia: - return "AU" - case .BosniaHerzegovina: - return "BA" - case .Barbados: - return "BB" - case .Belgium: - return "BE" - case .Bermuda: - return "BM" - case .Bahamas: - return "BS" - case .Botswana: - return "BW" - case .Belize: - return "BZ" - case .Canada: - return "CA" - case .CocosKeelingIslands: - return "CC" - case .Switzerland: - return "CH" - case .CookIslands: - return "CK" - case .Cameroon: - return "CM" - case .ChristmasIsland: - return "CX" - case .Cyprus: - return "CY" - case .CzechRepublic: - return "CZ" - case .Germany: - return "DE" - case .DiegoGarcia: - return "DG" - case .Denmark: - return "DK" - case .Dominica: - return "DM" - case .Estonia: - return "EE" + case .UnitedArabEmirates: + return "AE" + case .Bahrain: + return "BH" + case .Djibouti: + return "DJ" + case .Algeria: + return "DZ" + case .Egypt: + return "EG" + case .WesternSahara: + return "EH" case .Eritrea: return "ER" - case .Spain: - return "ES" - case .Finland: - return "FI" - case .Fiji: - return "FJ" - case .FalklandIslands: - return "FK" - case .Micronesia: - return "FM" - case .France: - return "FR" - case .UnitedKingdom: - return "GB" - case .Grenada: - return "GD" - case .Guernsey: - return "GG" - case .Ghana: - return "GH" - case .Gibraltar: - return "GI" - case .Gambia: - return "GM" - case .Greece: - return "GR" - case .Guam: - return "GU" - case .Guyana: - return "GY" - case .HongKongSarChina: - return "HK" - case .Croatia: - return "HR" - case .Hungary: - return "HU" - case .Ireland: - return "IE" case .Israel: return "IL" - case .IsleOfMan: - return "IM" - case .India: - return "IN" - case .BritishIndianOceanTerritory: - return "IO" - case .Iceland: - return "IS" - case .Italy: - return "IT" - case .Jersey: - return "JE" - case .Jamaica: - return "JM" - case .Kenya: - return "KE" - case .Kiribati: - return "KI" - case .StKittsNevis: - return "KN" - case .CaymanIslands: - return "KY" - case .StLucia: - return "LC" - case .Liberia: - return "LR" - case .Lesotho: - return "LS" - case .Lithuania: - return "LT" - case .Luxembourg: - return "LU" - case .Latvia: - return "LV" - case .Montenegro: - return "ME" - case .Madagascar: - return "MG" - case .MarshallIslands: - return "MH" - case .MacauSarChina: - return "MO" - case .NorthernMarianaIslands: - return "MP" - case .Montserrat: - return "MS" - case .Malta: - return "MT" - case .Mauritius: - return "MU" - case .Malawi: - return "MW" - case .Malaysia: - return "MY" - case .Namibia: - return "NA" - case .NorfolkIsland: - return "NF" - case .Nigeria: - return "NG" - case .Netherlands: - return "NL" - case .Norway: - return "NO" - case .Nauru: - return "NR" - case .Niue: - return "NU" - case .NewZealand: - return "NZ" - case .PapuaNewGuinea: - return "PG" - case .Philippines: - return "PH" - case .Pakistan: - return "PK" - case .Poland: - return "PL" - case .PitcairnIslands: - return "PN" - case .PuertoRico: - return "PR" - case .Portugal: - return "PT" - case .Palau: - return "PW" - case .Romania: - return "RO" - case .Russia: - return "RU" - case .Rwanda: - return "RW" - case .SolomonIslands: - return "SB" - case .Seychelles: - return "SC" + case .Iraq: + return "IQ" + case .Jordan: + return "JO" + case .Comoros: + return "KM" + case .Kuwait: + return "KW" + case .Lebanon: + return "LB" + case .Libya: + return "LY" + case .Morocco: + return "MA" + case .Mauritania: + return "MR" + case .Oman: + return "OM" + case .PalestinianTerritories: + return "PS" + case .Qatar: + return "QA" + case .SaudiArabia: + return "SA" case .Sudan: return "SD" - case .Sweden: - return "SE" - case .Singapore: - return "SG" - case .StHelena: - return "SH" - case .Slovenia: - return "SI" - case .Slovakia: - return "SK" - case .SierraLeone: - return "SL" + case .Somalia: + return "SO" case .SouthSudan: return "SS" - case .SintMaarten: - return "SX" - case .Swaziland: - return "SZ" - case .TurksCaicosIslands: - return "TC" - case .Tokelau: - return "TK" - case .Tonga: - return "TO" - case .Turkey: - return "TR" - case .TrinidadTobago: - return "TT" - case .Tuvalu: - return "TV" - case .Tanzania: - return "TZ" - case .Uganda: - return "UG" - case .USOutlyingIslands: - return "UM" - case .UnitedStates: - return "US" - case .StVincentGrenadines: - return "VC" - case .BritishVirginIslands: - return "VG" - case .USVirginIslands: - return "VI" - case .Vanuatu: - return "VU" - case .Samoa: - return "WS" - case .SouthAfrica: - return "ZA" - case .Zambia: - return "ZM" - case .Zimbabwe: - return "ZW" + case .Syria: + return "SY" + case .Chad: + return "TD" + case .Tunisia: + return "TN" + case .Yemen: + return "YE" } } } -public enum FrenchSpeakingCountry: CountryType { - case Belgium - case BurkinaFaso - case Burundi - case Benin - case StBarthélemy - case Canada - case CongoKinshasa - case CentralAfricanRepublic - case CongoBrazzaville - case Switzerland - case CôteDivoire - case Cameroon - case Djibouti - case Algeria +public enum BengaliSpeakingCountry: CountryType { + + case Bangladesh + case India + + public static let all: [BengaliSpeakingCountry] = [ .Bangladesh, .India ] + + public var countryIdentifier: String { + switch self { + case .Bangladesh: + return "BD" + case .India: + return "IN" + } + } +} + +public enum CatalanSpeakingCountry: CountryType { + + case Andorra + case Spain case France - case Gabon - case FrenchGuiana - case Guinea - case Guadeloupe - case EquatorialGuinea - case Haiti - case Comoros - case Luxembourg - case Morocco - case Monaco - case StMartin - case Madagascar - case Mali - case Martinique - case Mauritania - case Mauritius - case NewCaledonia - case Niger - case FrenchPolynesia - case StPierreMiquelon - case Réunion - case Rwanda - case Seychelles - case Senegal - case Syria - case Chad - case Togo - case Tunisia - case Vanuatu - case WallisFutuna - case Mayotte + case Italy + + public static let all: [CatalanSpeakingCountry] = [ .Andorra, .Spain, .France, .Italy ] public var countryIdentifier: String { switch self { - case .Belgium: - return "BE" - case .BurkinaFaso: - return "BF" - case .Burundi: - return "BI" - case .Benin: - return "BJ" - case .StBarthélemy: - return "BL" - case .Canada: - return "CA" - case .CongoKinshasa: - return "CD" - case .CentralAfricanRepublic: - return "CF" - case .CongoBrazzaville: - return "CG" - case .Switzerland: - return "CH" - case .CôteDivoire: - return "CI" - case .Cameroon: - return "CM" - case .Djibouti: - return "DJ" - case .Algeria: - return "DZ" + case .Andorra: + return "AD" + case .Spain: + return "ES" case .France: return "FR" - case .Gabon: - return "GA" - case .FrenchGuiana: - return "GF" - case .Guinea: - return "GN" - case .Guadeloupe: - return "GP" - case .EquatorialGuinea: - return "GQ" - case .Haiti: - return "HT" - case .Comoros: - return "KM" - case .Luxembourg: - return "LU" - case .Morocco: - return "MA" - case .Monaco: - return "MC" - case .StMartin: - return "MF" - case .Madagascar: - return "MG" - case .Mali: - return "ML" - case .Martinique: - return "MQ" - case .Mauritania: - return "MR" - case .Mauritius: - return "MU" - case .NewCaledonia: - return "NC" - case .Niger: - return "NE" - case .FrenchPolynesia: - return "PF" - case .StPierreMiquelon: - return "PM" - case .Réunion: - return "RE" - case .Rwanda: - return "RW" - case .Seychelles: - return "SC" - case .Senegal: - return "SN" - case .Syria: - return "SY" - case .Chad: - return "TD" - case .Togo: - return "TG" - case .Tunisia: - return "TN" - case .Vanuatu: - return "VU" - case .WallisFutuna: - return "WF" - case .Mayotte: - return "YT" + case .Italy: + return "IT" } } } -public enum ArabicSpeakingCountry: CountryType { - case World - case UnitedArabEmirates - case Bahrain - case Djibouti - case Algeria - case Egypt - case WesternSahara - case Eritrea - case Israel +public enum CentralKurdishSpeakingCountry: CountryType { + case Iraq - case Jordan - case Comoros - case Kuwait - case Lebanon - case Libya - case Morocco - case Mauritania - case Oman - case PalestinianTerritories - case Qatar - case SaudiArabia - case Sudan - case Somalia - case SouthSudan - case Syria - case Chad - case Tunisia - case Yemen + case Iran + + public static let all: [CentralKurdishSpeakingCountry] = [ .Iraq, .Iran ] public var countryIdentifier: String { switch self { - case .World: - return "001" - case .UnitedArabEmirates: - return "AE" - case .Bahrain: - return "BH" - case .Djibouti: - return "DJ" - case .Algeria: - return "DZ" - case .Egypt: - return "EG" - case .WesternSahara: - return "EH" - case .Eritrea: - return "ER" - case .Israel: - return "IL" case .Iraq: return "IQ" - case .Jordan: - return "JO" - case .Comoros: - return "KM" - case .Kuwait: - return "KW" - case .Lebanon: - return "LB" - case .Libya: - return "LY" - case .Morocco: - return "MA" - case .Mauritania: - return "MR" - case .Oman: - return "OM" - case .PalestinianTerritories: - return "PS" - case .Qatar: - return "QA" - case .SaudiArabia: - return "SA" - case .Sudan: - return "SD" - case .Somalia: - return "SO" - case .SouthSudan: - return "SS" - case .Syria: - return "SY" - case .Chad: - return "TD" - case .Tunisia: - return "TN" - case .Yemen: - return "YE" + case .Iran: + return "IR" } } } -public enum SpanishSpeakingCountry: CountryType { - case LatinAmerica - case Argentina - case Bolivia - case Chile - case Colombia - case CostaRica - case Cuba - case DominicanRepublic - case CeutaMelilla - case Ecuador - case Spain - case EquatorialGuinea - case Guatemala - case Honduras - case CanaryIslands - case Mexico - case Nicaragua - case Panama - case Peru - case Philippines - case PuertoRico - case Paraguay - case ElSalvador - case UnitedStates - case Uruguay - case Venezuela +public enum ChineseSpeakingCountry: CountryType { + + case China + case HongKongSarChina + case MacauSarChina + case Singapore + case Taiwan + + public static let all: [ChineseSpeakingCountry] = [ .China, .HongKongSarChina, .MacauSarChina, .Singapore, .Taiwan ] public var countryIdentifier: String { switch self { - case .LatinAmerica: - return "419" - case .Argentina: - return "AR" - case .Bolivia: - return "BO" - case .Chile: - return "CL" - case .Colombia: - return "CO" - case .CostaRica: - return "CR" - case .Cuba: - return "CU" - case .DominicanRepublic: - return "DO" - case .CeutaMelilla: - return "EA" - case .Ecuador: - return "EC" + case .China: + return "CN" + case .HongKongSarChina: + return "HK" + case .MacauSarChina: + return "MO" + case .Singapore: + return "SG" + case .Taiwan: + return "TW" + } + } +} + +public enum CroatianSpeakingCountry: CountryType { + + case BosniaHerzegovina + case Croatia + + public static let all: [CroatianSpeakingCountry] = [ .BosniaHerzegovina, .Croatia ] + + public var countryIdentifier: String { + switch self { + case .BosniaHerzegovina: + return "BA" + case .Croatia: + return "HR" + } + } +} + +public enum DanishSpeakingCountry: CountryType { + + case Denmark + case Greenland + + public static let all: [DanishSpeakingCountry] = [ .Denmark, .Greenland ] + + public var countryIdentifier: String { + switch self { + case .Denmark: + return "DK" + case .Greenland: + return "GL" + } + } +} + +public enum DutchSpeakingCountry: CountryType { + + case Aruba + case Belgium + case CaribbeanNetherlands + case Curaçao + case Netherlands + case Suriname + case SintMaarten + + public static let all: [DutchSpeakingCountry] = [ .Aruba, .Belgium, .CaribbeanNetherlands, .Curaçao, .Netherlands, .Suriname, .SintMaarten ] + + public var countryIdentifier: String { + switch self { + case .Aruba: + return "AW" + case .Belgium: + return "BE" + case .CaribbeanNetherlands: + return "BQ" + case .Curaçao: + return "CW" + case .Netherlands: + return "NL" + case .Suriname: + return "SR" + case .SintMaarten: + return "SX" + } + } +} + +public enum EnglishSpeakingCountry: CountryType { + + case World + case Europe + case Andorra + case AntiguaBarbuda + case Anguilla + case Albania + case AmericanSamoa + case Austria + case Australia + case BosniaHerzegovina + case Barbados + case Belgium + case Bermuda + case Bahamas + case Botswana + case Belize + case Canada + case CocosKeelingIslands + case Switzerland + case CookIslands + case Cameroon + case ChristmasIsland + case Cyprus + case CzechRepublic + case Germany + case DiegoGarcia + case Denmark + case Dominica + case Estonia + case Eritrea + case Spain + case Finland + case Fiji + case FalklandIslands + case Micronesia + case France + case UnitedKingdom + case Grenada + case Guernsey + case Ghana + case Gibraltar + case Gambia + case Greece + case Guam + case Guyana + case HongKongSarChina + case Croatia + case Hungary + case Ireland + case Israel + case IsleOfMan + case India + case BritishIndianOceanTerritory + case Iceland + case Italy + case Jersey + case Jamaica + case Kenya + case Kiribati + case StKittsNevis + case CaymanIslands + case StLucia + case Liberia + case Lesotho + case Lithuania + case Luxembourg + case Latvia + case Montenegro + case Madagascar + case MarshallIslands + case MacauSarChina + case NorthernMarianaIslands + case Montserrat + case Malta + case Mauritius + case Malawi + case Malaysia + case Namibia + case NorfolkIsland + case Nigeria + case Netherlands + case Norway + case Nauru + case Niue + case NewZealand + case PapuaNewGuinea + case Philippines + case Pakistan + case Poland + case PitcairnIslands + case PuertoRico + case Portugal + case Palau + case Romania + case Russia + case Rwanda + case SolomonIslands + case Seychelles + case Sudan + case Sweden + case Singapore + case StHelena + case Slovenia + case Slovakia + case SierraLeone + case SouthSudan + case SintMaarten + case Swaziland + case TurksCaicosIslands + case Tokelau + case Tonga + case Turkey + case TrinidadTobago + case Tuvalu + case Tanzania + case Uganda + case USOutlyingIslands + case UnitedStates + case StVincentGrenadines + case BritishVirginIslands + case USVirginIslands + case Vanuatu + case Samoa + case SouthAfrica + case Zambia + case Zimbabwe + + public static let all: [EnglishSpeakingCountry] = [ .World, .Europe, .Andorra, .AntiguaBarbuda, .Anguilla, .Albania, .AmericanSamoa, .Austria, .Australia, .BosniaHerzegovina, .Barbados, .Belgium, .Bermuda, .Bahamas, .Botswana, .Belize, .Canada, .CocosKeelingIslands, .Switzerland, .CookIslands, .Cameroon, .ChristmasIsland, .Cyprus, .CzechRepublic, .Germany, .DiegoGarcia, .Denmark, .Dominica, .Estonia, .Eritrea, .Spain, .Finland, .Fiji, .FalklandIslands, .Micronesia, .France, .UnitedKingdom, .Grenada, .Guernsey, .Ghana, .Gibraltar, .Gambia, .Greece, .Guam, .Guyana, .HongKongSarChina, .Croatia, .Hungary, .Ireland, .Israel, .IsleOfMan, .India, .BritishIndianOceanTerritory, .Iceland, .Italy, .Jersey, .Jamaica, .Kenya, .Kiribati, .StKittsNevis, .CaymanIslands, .StLucia, .Liberia, .Lesotho, .Lithuania, .Luxembourg, .Latvia, .Montenegro, .Madagascar, .MarshallIslands, .MacauSarChina, .NorthernMarianaIslands, .Montserrat, .Malta, .Mauritius, .Malawi, .Malaysia, .Namibia, .NorfolkIsland, .Nigeria, .Netherlands, .Norway, .Nauru, .Niue, .NewZealand, .PapuaNewGuinea, .Philippines, .Pakistan, .Poland, .PitcairnIslands, .PuertoRico, .Portugal, .Palau, .Romania, .Russia, .Rwanda, .SolomonIslands, .Seychelles, .Sudan, .Sweden, .Singapore, .StHelena, .Slovenia, .Slovakia, .SierraLeone, .SouthSudan, .SintMaarten, .Swaziland, .TurksCaicosIslands, .Tokelau, .Tonga, .Turkey, .TrinidadTobago, .Tuvalu, .Tanzania, .Uganda, .USOutlyingIslands, .UnitedStates, .StVincentGrenadines, .BritishVirginIslands, .USVirginIslands, .Vanuatu, .Samoa, .SouthAfrica, .Zambia, .Zimbabwe ] + + public var countryIdentifier: String { + switch self { + case .World: + return "001" + case .Europe: + return "150" + case .Andorra: + return "AD" + case .AntiguaBarbuda: + return "AG" + case .Anguilla: + return "AI" + case .Albania: + return "AL" + case .AmericanSamoa: + return "AS" + case .Austria: + return "AT" + case .Australia: + return "AU" + case .BosniaHerzegovina: + return "BA" + case .Barbados: + return "BB" + case .Belgium: + return "BE" + case .Bermuda: + return "BM" + case .Bahamas: + return "BS" + case .Botswana: + return "BW" + case .Belize: + return "BZ" + case .Canada: + return "CA" + case .CocosKeelingIslands: + return "CC" + case .Switzerland: + return "CH" + case .CookIslands: + return "CK" + case .Cameroon: + return "CM" + case .ChristmasIsland: + return "CX" + case .Cyprus: + return "CY" + case .CzechRepublic: + return "CZ" + case .Germany: + return "DE" + case .DiegoGarcia: + return "DG" + case .Denmark: + return "DK" + case .Dominica: + return "DM" + case .Estonia: + return "EE" + case .Eritrea: + return "ER" case .Spain: return "ES" - case .EquatorialGuinea: - return "GQ" - case .Guatemala: - return "GT" - case .Honduras: - return "HN" - case .CanaryIslands: - return "IC" - case .Mexico: - return "MX" - case .Nicaragua: - return "NI" - case .Panama: - return "PA" - case .Peru: - return "PE" + case .Finland: + return "FI" + case .Fiji: + return "FJ" + case .FalklandIslands: + return "FK" + case .Micronesia: + return "FM" + case .France: + return "FR" + case .UnitedKingdom: + return "GB" + case .Grenada: + return "GD" + case .Guernsey: + return "GG" + case .Ghana: + return "GH" + case .Gibraltar: + return "GI" + case .Gambia: + return "GM" + case .Greece: + return "GR" + case .Guam: + return "GU" + case .Guyana: + return "GY" + case .HongKongSarChina: + return "HK" + case .Croatia: + return "HR" + case .Hungary: + return "HU" + case .Ireland: + return "IE" + case .Israel: + return "IL" + case .IsleOfMan: + return "IM" + case .India: + return "IN" + case .BritishIndianOceanTerritory: + return "IO" + case .Iceland: + return "IS" + case .Italy: + return "IT" + case .Jersey: + return "JE" + case .Jamaica: + return "JM" + case .Kenya: + return "KE" + case .Kiribati: + return "KI" + case .StKittsNevis: + return "KN" + case .CaymanIslands: + return "KY" + case .StLucia: + return "LC" + case .Liberia: + return "LR" + case .Lesotho: + return "LS" + case .Lithuania: + return "LT" + case .Luxembourg: + return "LU" + case .Latvia: + return "LV" + case .Montenegro: + return "ME" + case .Madagascar: + return "MG" + case .MarshallIslands: + return "MH" + case .MacauSarChina: + return "MO" + case .NorthernMarianaIslands: + return "MP" + case .Montserrat: + return "MS" + case .Malta: + return "MT" + case .Mauritius: + return "MU" + case .Malawi: + return "MW" + case .Malaysia: + return "MY" + case .Namibia: + return "NA" + case .NorfolkIsland: + return "NF" + case .Nigeria: + return "NG" + case .Netherlands: + return "NL" + case .Norway: + return "NO" + case .Nauru: + return "NR" + case .Niue: + return "NU" + case .NewZealand: + return "NZ" + case .PapuaNewGuinea: + return "PG" case .Philippines: return "PH" + case .Pakistan: + return "PK" + case .Poland: + return "PL" + case .PitcairnIslands: + return "PN" case .PuertoRico: return "PR" - case .Paraguay: - return "PY" - case .ElSalvador: - return "SV" + case .Portugal: + return "PT" + case .Palau: + return "PW" + case .Romania: + return "RO" + case .Russia: + return "RU" + case .Rwanda: + return "RW" + case .SolomonIslands: + return "SB" + case .Seychelles: + return "SC" + case .Sudan: + return "SD" + case .Sweden: + return "SE" + case .Singapore: + return "SG" + case .StHelena: + return "SH" + case .Slovenia: + return "SI" + case .Slovakia: + return "SK" + case .SierraLeone: + return "SL" + case .SouthSudan: + return "SS" + case .SintMaarten: + return "SX" + case .Swaziland: + return "SZ" + case .TurksCaicosIslands: + return "TC" + case .Tokelau: + return "TK" + case .Tonga: + return "TO" + case .Turkey: + return "TR" + case .TrinidadTobago: + return "TT" + case .Tuvalu: + return "TV" + case .Tanzania: + return "TZ" + case .Uganda: + return "UG" + case .USOutlyingIslands: + return "UM" case .UnitedStates: return "US" - case .Uruguay: - return "UY" - case .Venezuela: - return "VE" + case .StVincentGrenadines: + return "VC" + case .BritishVirginIslands: + return "VG" + case .USVirginIslands: + return "VI" + case .Vanuatu: + return "VU" + case .Samoa: + return "WS" + case .SouthAfrica: + return "ZA" + case .Zambia: + return "ZM" + case .Zimbabwe: + return "ZW" } } } -public enum PortugueseSpeakingCountry: CountryType { - case Angola - case Brazil - case CapeVerde - case GuineaBissau - case MacauSarChina - case Mozambique - case Portugal - case SãoToméPríncipe - case TimorLeste +public enum EweSpeakingCountry: CountryType { + + case Ghana + case Togo + + public static let all: [EweSpeakingCountry] = [ .Ghana, .Togo ] public var countryIdentifier: String { switch self { - case .Angola: - return "AO" - case .Brazil: - return "BR" - case .CapeVerde: - return "CV" - case .GuineaBissau: - return "GW" - case .MacauSarChina: - return "MO" - case .Mozambique: - return "MZ" - case .Portugal: - return "PT" - case .SãoToméPríncipe: - return "ST" - case .TimorLeste: - return "TL" + case .Ghana: + return "GH" + case .Togo: + return "TG" } } } -public enum DutchSpeakingCountry: CountryType { - case Aruba +public enum FrenchSpeakingCountry: CountryType { + case Belgium - case CaribbeanNetherlands - case Curaçao - case Netherlands - case Suriname - case SintMaarten + case BurkinaFaso + case Burundi + case Benin + case StBarthélemy + case Canada + case CongoKinshasa + case CentralAfricanRepublic + case CongoBrazzaville + case Switzerland + case CôteDivoire + case Cameroon + case Djibouti + case Algeria + case France + case Gabon + case FrenchGuiana + case Guinea + case Guadeloupe + case EquatorialGuinea + case Haiti + case Comoros + case Luxembourg + case Morocco + case Monaco + case StMartin + case Madagascar + case Mali + case Martinique + case Mauritania + case Mauritius + case NewCaledonia + case Niger + case FrenchPolynesia + case StPierreMiquelon + case Réunion + case Rwanda + case Seychelles + case Senegal + case Syria + case Chad + case Togo + case Tunisia + case Vanuatu + case WallisFutuna + case Mayotte + + public static let all: [FrenchSpeakingCountry] = [ .Belgium, .BurkinaFaso, .Burundi, .Benin, .StBarthélemy, .Canada, .CongoKinshasa, .CentralAfricanRepublic, .CongoBrazzaville, .Switzerland, .CôteDivoire, .Cameroon, .Djibouti, .Algeria, .France, .Gabon, .FrenchGuiana, .Guinea, .Guadeloupe, .EquatorialGuinea, .Haiti, .Comoros, .Luxembourg, .Morocco, .Monaco, .StMartin, .Madagascar, .Mali, .Martinique, .Mauritania, .Mauritius, .NewCaledonia, .Niger, .FrenchPolynesia, .StPierreMiquelon, .Réunion, .Rwanda, .Seychelles, .Senegal, .Syria, .Chad, .Togo, .Tunisia, .Vanuatu, .WallisFutuna, .Mayotte ] public var countryIdentifier: String { switch self { - case .Aruba: - return "AW" case .Belgium: return "BE" - case .CaribbeanNetherlands: - return "BQ" - case .Curaçao: - return "CW" - case .Netherlands: - return "NL" - case .Suriname: - return "SR" - case .SintMaarten: - return "SX" + case .BurkinaFaso: + return "BF" + case .Burundi: + return "BI" + case .Benin: + return "BJ" + case .StBarthélemy: + return "BL" + case .Canada: + return "CA" + case .CongoKinshasa: + return "CD" + case .CentralAfricanRepublic: + return "CF" + case .CongoBrazzaville: + return "CG" + case .Switzerland: + return "CH" + case .CôteDivoire: + return "CI" + case .Cameroon: + return "CM" + case .Djibouti: + return "DJ" + case .Algeria: + return "DZ" + case .France: + return "FR" + case .Gabon: + return "GA" + case .FrenchGuiana: + return "GF" + case .Guinea: + return "GN" + case .Guadeloupe: + return "GP" + case .EquatorialGuinea: + return "GQ" + case .Haiti: + return "HT" + case .Comoros: + return "KM" + case .Luxembourg: + return "LU" + case .Morocco: + return "MA" + case .Monaco: + return "MC" + case .StMartin: + return "MF" + case .Madagascar: + return "MG" + case .Mali: + return "ML" + case .Martinique: + return "MQ" + case .Mauritania: + return "MR" + case .Mauritius: + return "MU" + case .NewCaledonia: + return "NC" + case .Niger: + return "NE" + case .FrenchPolynesia: + return "PF" + case .StPierreMiquelon: + return "PM" + case .Réunion: + return "RE" + case .Rwanda: + return "RW" + case .Seychelles: + return "SC" + case .Senegal: + return "SN" + case .Syria: + return "SY" + case .Chad: + return "TD" + case .Togo: + return "TG" + case .Tunisia: + return "TN" + case .Vanuatu: + return "VU" + case .WallisFutuna: + return "WF" + case .Mayotte: + return "YT" } } } -public enum RussianSpeakingCountry: CountryType { - case Belarus - case Kyrgyzstan - case Kazakhstan - case Moldova - case Russia - case Ukraine +public enum FulahSpeakingCountry: CountryType { + + case Cameroon + case Guinea + case Mauritania + case Senegal + + public static let all: [FulahSpeakingCountry] = [ .Cameroon, .Guinea, .Mauritania, .Senegal ] public var countryIdentifier: String { switch self { - case .Belarus: - return "BY" - case .Kyrgyzstan: - return "KG" - case .Kazakhstan: - return "KZ" - case .Moldova: - return "MD" - case .Russia: - return "RU" - case .Ukraine: - return "UA" + case .Cameroon: + return "CM" + case .Guinea: + return "GN" + case .Mauritania: + return "MR" + case .Senegal: + return "SN" } } } public enum GermanSpeakingCountry: CountryType { + case Austria case Belgium case Switzerland @@ -2935,6 +2995,8 @@ public enum GermanSpeakingCountry: CountryType { case Liechtenstein case Luxembourg + public static let all: [GermanSpeakingCountry] = [ .Austria, .Belgium, .Switzerland, .Germany, .Liechtenstein, .Luxembourg ] + public var countryIdentifier: String { switch self { case .Austria: @@ -2953,135 +3015,89 @@ public enum GermanSpeakingCountry: CountryType { } } -public enum ChineseSpeakingCountry: CountryType { - case China - case HongKongSarChina - case MacauSarChina - case Singapore - case Taiwan +public enum GreekSpeakingCountry: CountryType { + + case Cyprus + case Greece + + public static let all: [GreekSpeakingCountry] = [ .Cyprus, .Greece ] public var countryIdentifier: String { switch self { - case .China: - return "CN" - case .HongKongSarChina: - return "HK" - case .MacauSarChina: - return "MO" - case .Singapore: - return "SG" - case .Taiwan: - return "TW" + case .Cyprus: + return "CY" + case .Greece: + return "GR" } } } -public enum FulahSpeakingCountry: CountryType { - case Cameroon - case Guinea - case Mauritania - case Senegal +public enum HausaSpeakingCountry: CountryType { + + case Ghana + case Niger + case Nigeria + + public static let all: [HausaSpeakingCountry] = [ .Ghana, .Niger, .Nigeria ] public var countryIdentifier: String { switch self { - case .Cameroon: - return "CM" - case .Guinea: - return "GN" - case .Mauritania: - return "MR" - case .Senegal: - return "SN" + case .Ghana: + return "GH" + case .Niger: + return "NE" + case .Nigeria: + return "NG" } } } -public enum CatalanSpeakingCountry: CountryType { - case Andorra - case Spain - case France +public enum ItalianSpeakingCountry: CountryType { + + case Switzerland case Italy + case SanMarino + + public static let all: [ItalianSpeakingCountry] = [ .Switzerland, .Italy, .SanMarino ] public var countryIdentifier: String { switch self { - case .Andorra: - return "AD" - case .Spain: - return "ES" - case .France: - return "FR" + case .Switzerland: + return "CH" case .Italy: return "IT" + case .SanMarino: + return "SM" } } } -public enum SerbianSpeakingCountry: CountryType { - case BosniaHerzegovina - case Montenegro - case Serbia - case Kosovo - - public var countryIdentifier: String { - switch self { - case .BosniaHerzegovina: - return "BA" - case .Montenegro: - return "ME" - case .Serbia: - return "RS" - case .Kosovo: - return "XK" - } - } -} - -public enum SomaliSpeakingCountry: CountryType { - case Djibouti - case Ethiopia - case Kenya - case Somalia +public enum KoreanSpeakingCountry: CountryType { - public var countryIdentifier: String { - switch self { - case .Djibouti: - return "DJ" - case .Ethiopia: - return "ET" - case .Kenya: - return "KE" - case .Somalia: - return "SO" - } - } -} + case NorthKorea + case SouthKorea -public enum TamilSpeakingCountry: CountryType { - case India - case SriLanka - case Malaysia - case Singapore + public static let all: [KoreanSpeakingCountry] = [ .NorthKorea, .SouthKorea ] public var countryIdentifier: String { switch self { - case .India: - return "IN" - case .SriLanka: - return "LK" - case .Malaysia: - return "MY" - case .Singapore: - return "SG" + case .NorthKorea: + return "KP" + case .SouthKorea: + return "KR" } } } public enum LingalaSpeakingCountry: CountryType { + case Angola case CongoKinshasa case CentralAfricanRepublic case CongoBrazzaville + public static let all: [LingalaSpeakingCountry] = [ .Angola, .CongoKinshasa, .CentralAfricanRepublic, .CongoBrazzaville ] + public var countryIdentifier: String { switch self { case .Angola: @@ -3096,31 +3112,68 @@ public enum LingalaSpeakingCountry: CountryType { } } -public enum SwahiliSpeakingCountry: CountryType { - case CongoKinshasa +public enum MalaySpeakingCountry: CountryType { + + case Brunei + case Malaysia + case Singapore + + public static let all: [MalaySpeakingCountry] = [ .Brunei, .Malaysia, .Singapore ] + + public var countryIdentifier: String { + switch self { + case .Brunei: + return "BN" + case .Malaysia: + return "MY" + case .Singapore: + return "SG" + } + } +} + +public enum MasaiSpeakingCountry: CountryType { + case Kenya case Tanzania - case Uganda + + public static let all: [MasaiSpeakingCountry] = [ .Kenya, .Tanzania ] public var countryIdentifier: String { switch self { - case .CongoKinshasa: - return "CD" case .Kenya: return "KE" case .Tanzania: return "TZ" - case .Uganda: - return "UG" + } + } +} + +public enum NepaliSpeakingCountry: CountryType { + + case India + case Nepal + + public static let all: [NepaliSpeakingCountry] = [ .India, .Nepal ] + + public var countryIdentifier: String { + switch self { + case .India: + return "IN" + case .Nepal: + return "NP" } } } public enum NorthernSamiSpeakingCountry: CountryType { + case Finland case Norway case Sweden + public static let all: [NorthernSamiSpeakingCountry] = [ .Finland, .Norway, .Sweden ] + public var countryIdentifier: String { switch self { case .Finland: @@ -3133,62 +3186,137 @@ public enum NorthernSamiSpeakingCountry: CountryType { } } -public enum SwissGermanSpeakingCountry: CountryType { - case Switzerland - case France - case Liechtenstein +public enum NorwegianBokmålSpeakingCountry: CountryType { + + case Norway + case SvalbardJanMayen + + public static let all: [NorwegianBokmålSpeakingCountry] = [ .Norway, .SvalbardJanMayen ] public var countryIdentifier: String { switch self { - case .Switzerland: - return "CH" - case .France: - return "FR" - case .Liechtenstein: - return "LI" + case .Norway: + return "NO" + case .SvalbardJanMayen: + return "SJ" + } + } +} + +public enum OromoSpeakingCountry: CountryType { + + case Ethiopia + case Kenya + + public static let all: [OromoSpeakingCountry] = [ .Ethiopia, .Kenya ] + + public var countryIdentifier: String { + switch self { + case .Ethiopia: + return "ET" + case .Kenya: + return "KE" + } + } +} + +public enum OsseticSpeakingCountry: CountryType { + + case Georgia + case Russia + + public static let all: [OsseticSpeakingCountry] = [ .Georgia, .Russia ] + + public var countryIdentifier: String { + switch self { + case .Georgia: + return "GE" + case .Russia: + return "RU" + } + } +} + +public enum PersianSpeakingCountry: CountryType { + + case Afghanistan + case Iran + + public static let all: [PersianSpeakingCountry] = [ .Afghanistan, .Iran ] + + public var countryIdentifier: String { + switch self { + case .Afghanistan: + return "AF" + case .Iran: + return "IR" } } } -public enum HausaSpeakingCountry: CountryType { - case Ghana - case Niger - case Nigeria +public enum PortugueseSpeakingCountry: CountryType { + + case Angola + case Brazil + case CapeVerde + case GuineaBissau + case MacauSarChina + case Mozambique + case Portugal + case SãoToméPríncipe + case TimorLeste + + public static let all: [PortugueseSpeakingCountry] = [ .Angola, .Brazil, .CapeVerde, .GuineaBissau, .MacauSarChina, .Mozambique, .Portugal, .SãoToméPríncipe, .TimorLeste ] public var countryIdentifier: String { switch self { - case .Ghana: - return "GH" - case .Niger: - return "NE" - case .Nigeria: - return "NG" + case .Angola: + return "AO" + case .Brazil: + return "BR" + case .CapeVerde: + return "CV" + case .GuineaBissau: + return "GW" + case .MacauSarChina: + return "MO" + case .Mozambique: + return "MZ" + case .Portugal: + return "PT" + case .SãoToméPríncipe: + return "ST" + case .TimorLeste: + return "TL" } } } -public enum AlbanianSpeakingCountry: CountryType { - case Albania - case Macedonia - case Kosovo +public enum PunjabiSpeakingCountry: CountryType { + + case India + case Pakistan + + public static let all: [PunjabiSpeakingCountry] = [ .India, .Pakistan ] public var countryIdentifier: String { switch self { - case .Albania: - return "AL" - case .Macedonia: - return "MK" - case .Kosovo: - return "XK" + case .India: + return "IN" + case .Pakistan: + return "PK" } } } public enum QuechuaSpeakingCountry: CountryType { + case Bolivia case Ecuador case Peru + public static let all: [QuechuaSpeakingCountry] = [ .Bolivia, .Ecuador, .Peru ] + public var countryIdentifier: String { switch self { case .Bolivia: @@ -3201,187 +3329,280 @@ public enum QuechuaSpeakingCountry: CountryType { } } -public enum MalaySpeakingCountry: CountryType { - case Brunei - case Malaysia - case Singapore +public enum RomanianSpeakingCountry: CountryType { - public var countryIdentifier: String { - switch self { - case .Brunei: - return "BN" - case .Malaysia: - return "MY" - case .Singapore: - return "SG" - } - } -} + case Moldova + case Romania -public enum ItalianSpeakingCountry: CountryType { - case Switzerland - case Italy - case SanMarino + public static let all: [RomanianSpeakingCountry] = [ .Moldova, .Romania ] public var countryIdentifier: String { switch self { - case .Switzerland: - return "CH" - case .Italy: - return "IT" - case .SanMarino: - return "SM" + case .Moldova: + return "MD" + case .Romania: + return "RO" } } } -public enum SwedishSpeakingCountry: CountryType { - case ÅlandIslands - case Finland - case Sweden +public enum RussianSpeakingCountry: CountryType { - public var countryIdentifier: String { - switch self { - case .ÅlandIslands: - return "AX" - case .Finland: - return "FI" - case .Sweden: - return "SE" - } - } -} + case Belarus + case Kyrgyzstan + case Kazakhstan + case Moldova + case Russia + case Ukraine -public enum PunjabiSpeakingCountry: CountryType { - case India - case Pakistan + public static let all: [RussianSpeakingCountry] = [ .Belarus, .Kyrgyzstan, .Kazakhstan, .Moldova, .Russia, .Ukraine ] public var countryIdentifier: String { switch self { - case .India: - return "IN" - case .Pakistan: - return "PK" + case .Belarus: + return "BY" + case .Kyrgyzstan: + return "KG" + case .Kazakhstan: + return "KZ" + case .Moldova: + return "MD" + case .Russia: + return "RU" + case .Ukraine: + return "UA" } } } -public enum DanishSpeakingCountry: CountryType { - case Denmark - case Greenland +public enum SerbianSpeakingCountry: CountryType { + + case BosniaHerzegovina + case Montenegro + case Serbia + case Kosovo + + public static let all: [SerbianSpeakingCountry] = [ .BosniaHerzegovina, .Montenegro, .Serbia, .Kosovo ] public var countryIdentifier: String { switch self { - case .Denmark: - return "DK" - case .Greenland: - return "GL" + case .BosniaHerzegovina: + return "BA" + case .Montenegro: + return "ME" + case .Serbia: + return "RS" + case .Kosovo: + return "XK" } } } -public enum NorwegianBokmålSpeakingCountry: CountryType { - case Norway - case SvalbardJanMayen +public enum SomaliSpeakingCountry: CountryType { + + case Djibouti + case Ethiopia + case Kenya + case Somalia + + public static let all: [SomaliSpeakingCountry] = [ .Djibouti, .Ethiopia, .Kenya, .Somalia ] public var countryIdentifier: String { switch self { - case .Norway: - return "NO" - case .SvalbardJanMayen: - return "SJ" + case .Djibouti: + return "DJ" + case .Ethiopia: + return "ET" + case .Kenya: + return "KE" + case .Somalia: + return "SO" } } } -public enum UrduSpeakingCountry: CountryType { - case India - case Pakistan +public enum SpanishSpeakingCountry: CountryType { + + case LatinAmerica + case Argentina + case Bolivia + case Chile + case Colombia + case CostaRica + case Cuba + case DominicanRepublic + case CeutaMelilla + case Ecuador + case Spain + case EquatorialGuinea + case Guatemala + case Honduras + case CanaryIslands + case Mexico + case Nicaragua + case Panama + case Peru + case Philippines + case PuertoRico + case Paraguay + case ElSalvador + case UnitedStates + case Uruguay + case Venezuela + + public static let all: [SpanishSpeakingCountry] = [ .LatinAmerica, .Argentina, .Bolivia, .Chile, .Colombia, .CostaRica, .Cuba, .DominicanRepublic, .CeutaMelilla, .Ecuador, .Spain, .EquatorialGuinea, .Guatemala, .Honduras, .CanaryIslands, .Mexico, .Nicaragua, .Panama, .Peru, .Philippines, .PuertoRico, .Paraguay, .ElSalvador, .UnitedStates, .Uruguay, .Venezuela ] public var countryIdentifier: String { switch self { - case .India: - return "IN" - case .Pakistan: - return "PK" + case .LatinAmerica: + return "419" + case .Argentina: + return "AR" + case .Bolivia: + return "BO" + case .Chile: + return "CL" + case .Colombia: + return "CO" + case .CostaRica: + return "CR" + case .Cuba: + return "CU" + case .DominicanRepublic: + return "DO" + case .CeutaMelilla: + return "EA" + case .Ecuador: + return "EC" + case .Spain: + return "ES" + case .EquatorialGuinea: + return "GQ" + case .Guatemala: + return "GT" + case .Honduras: + return "HN" + case .CanaryIslands: + return "IC" + case .Mexico: + return "MX" + case .Nicaragua: + return "NI" + case .Panama: + return "PA" + case .Peru: + return "PE" + case .Philippines: + return "PH" + case .PuertoRico: + return "PR" + case .Paraguay: + return "PY" + case .ElSalvador: + return "SV" + case .UnitedStates: + return "US" + case .Uruguay: + return "UY" + case .Venezuela: + return "VE" } } } -public enum CroatianSpeakingCountry: CountryType { - case BosniaHerzegovina - case Croatia +public enum SwahiliSpeakingCountry: CountryType { + + case CongoKinshasa + case Kenya + case Tanzania + case Uganda + + public static let all: [SwahiliSpeakingCountry] = [ .CongoKinshasa, .Kenya, .Tanzania, .Uganda ] public var countryIdentifier: String { switch self { - case .BosniaHerzegovina: - return "BA" - case .Croatia: - return "HR" + case .CongoKinshasa: + return "CD" + case .Kenya: + return "KE" + case .Tanzania: + return "TZ" + case .Uganda: + return "UG" } } } -public enum AfrikaansSpeakingCountry: CountryType { - case Namibia - case SouthAfrica +public enum SwedishSpeakingCountry: CountryType { + + case ÅlandIslands + case Finland + case Sweden + + public static let all: [SwedishSpeakingCountry] = [ .ÅlandIslands, .Finland, .Sweden ] public var countryIdentifier: String { switch self { - case .Namibia: - return "NA" - case .SouthAfrica: - return "ZA" + case .ÅlandIslands: + return "AX" + case .Finland: + return "FI" + case .Sweden: + return "SE" } } } -public enum YorubaSpeakingCountry: CountryType { - case Benin - case Nigeria +public enum SwissGermanSpeakingCountry: CountryType { + + case Switzerland + case France + case Liechtenstein + + public static let all: [SwissGermanSpeakingCountry] = [ .Switzerland, .France, .Liechtenstein ] public var countryIdentifier: String { switch self { - case .Benin: - return "BJ" - case .Nigeria: - return "NG" + case .Switzerland: + return "CH" + case .France: + return "FR" + case .Liechtenstein: + return "LI" } } } -public enum BengaliSpeakingCountry: CountryType { - case Bangladesh +public enum TamilSpeakingCountry: CountryType { + case India + case SriLanka + case Malaysia + case Singapore + + public static let all: [TamilSpeakingCountry] = [ .India, .SriLanka, .Malaysia, .Singapore ] public var countryIdentifier: String { switch self { - case .Bangladesh: - return "BD" case .India: return "IN" - } - } -} - -public enum GreekSpeakingCountry: CountryType { - case Cyprus - case Greece - - public var countryIdentifier: String { - switch self { - case .Cyprus: - return "CY" - case .Greece: - return "GR" + case .SriLanka: + return "LK" + case .Malaysia: + return "MY" + case .Singapore: + return "SG" } } } public enum TesoSpeakingCountry: CountryType { + case Kenya case Uganda + public static let all: [TesoSpeakingCountry] = [ .Kenya, .Uganda ] + public var countryIdentifier: String { switch self { case .Kenya: @@ -3392,52 +3613,47 @@ public enum TesoSpeakingCountry: CountryType { } } -public enum KoreanSpeakingCountry: CountryType { - case NorthKorea - case SouthKorea +public enum TibetanSpeakingCountry: CountryType { - public var countryIdentifier: String { - switch self { - case .NorthKorea: - return "KP" - case .SouthKorea: - return "KR" - } - } -} + case China + case India -public enum UzbekSpeakingCountry: CountryType { - case Afghanistan - case Uzbekistan + public static let all: [TibetanSpeakingCountry] = [ .China, .India ] public var countryIdentifier: String { switch self { - case .Afghanistan: - return "AF" - case .Uzbekistan: - return "UZ" + case .China: + return "CN" + case .India: + return "IN" } } } -public enum OsseticSpeakingCountry: CountryType { - case Georgia - case Russia +public enum TigrinyaSpeakingCountry: CountryType { + + case Eritrea + case Ethiopia + + public static let all: [TigrinyaSpeakingCountry] = [ .Eritrea, .Ethiopia ] public var countryIdentifier: String { switch self { - case .Georgia: - return "GE" - case .Russia: - return "RU" + case .Eritrea: + return "ER" + case .Ethiopia: + return "ET" } } } public enum TurkishSpeakingCountry: CountryType { + case Cyprus case Turkey + public static let all: [TurkishSpeakingCountry] = [ .Cyprus, .Turkey ] + public var countryIdentifier: String { switch self { case .Cyprus: @@ -3448,128 +3664,53 @@ public enum TurkishSpeakingCountry: CountryType { } } -public enum EweSpeakingCountry: CountryType { - case Ghana - case Togo - - public var countryIdentifier: String { - switch self { - case .Ghana: - return "GH" - case .Togo: - return "TG" - } - } -} - -public enum RomanianSpeakingCountry: CountryType { - case Moldova - case Romania - - public var countryIdentifier: String { - switch self { - case .Moldova: - return "MD" - case .Romania: - return "RO" - } - } -} - -public enum TigrinyaSpeakingCountry: CountryType { - case Eritrea - case Ethiopia - - public var countryIdentifier: String { - switch self { - case .Eritrea: - return "ER" - case .Ethiopia: - return "ET" - } - } -} +public enum UrduSpeakingCountry: CountryType { -public enum TibetanSpeakingCountry: CountryType { - case China case India + case Pakistan + + public static let all: [UrduSpeakingCountry] = [ .India, .Pakistan ] public var countryIdentifier: String { switch self { - case .China: - return "CN" case .India: return "IN" + case .Pakistan: + return "PK" } } } -public enum CentralKurdishSpeakingCountry: CountryType { - case Iraq - case Iran - - public var countryIdentifier: String { - switch self { - case .Iraq: - return "IQ" - case .Iran: - return "IR" - } - } -} - -public enum MasaiSpeakingCountry: CountryType { - case Kenya - case Tanzania +public enum UzbekSpeakingCountry: CountryType { - public var countryIdentifier: String { - switch self { - case .Kenya: - return "KE" - case .Tanzania: - return "TZ" - } - } -} + case Afghanistan + case Uzbekistan -public enum OromoSpeakingCountry: CountryType { - case Ethiopia - case Kenya + public static let all: [UzbekSpeakingCountry] = [ .Afghanistan, .Uzbekistan ] public var countryIdentifier: String { switch self { - case .Ethiopia: - return "ET" - case .Kenya: - return "KE" + case .Afghanistan: + return "AF" + case .Uzbekistan: + return "UZ" } } } -public enum NepaliSpeakingCountry: CountryType { - case India - case Nepal +public enum YorubaSpeakingCountry: CountryType { - public var countryIdentifier: String { - switch self { - case .India: - return "IN" - case .Nepal: - return "NP" - } - } -} + case Benin + case Nigeria -public enum PersianSpeakingCountry: CountryType { - case Afghanistan - case Iran + public static let all: [YorubaSpeakingCountry] = [ .Benin, .Nigeria ] public var countryIdentifier: String { switch self { - case .Afghanistan: - return "AF" - case .Iran: - return "IR" + case .Benin: + return "BJ" + case .Nigeria: + return "NG" } } } @@ -3577,6 +3718,7 @@ public enum PersianSpeakingCountry: CountryType { // MARK: - Locale public enum Locale { + case Afrikaans(AfrikaansSpeakingCountry) case Aghem case Akan diff --git a/Supporting Files/Generate.swift b/Supporting Files/Generate.swift index 2ce39b6..06abe80 100755 --- a/Supporting Files/Generate.swift +++ b/Supporting Files/Generate.swift @@ -34,6 +34,10 @@ extension TypeGenerator { .stringByReplacingOccurrencesOfString("’", withString: "") } + var caseNameValue: String { + return ".\(name)" + } + var protocolName: String { return "\(name)\(Self.typeName)Type" } @@ -128,10 +132,10 @@ struct Language: Comparable, TypeGenerator, CustomStringConvertible { let id: String let displayName: String - var coutryIds = Set() + var countryIds = Set() var description: String { - return "\(id): \(displayName) -> \(coutryIds)" + return "\(id): \(displayName) -> \(countryIds)" } var languageSpeakingCountryEnumName: String { @@ -163,173 +167,238 @@ func <(lhs: Language, rhs: Language) -> Bool { return lhs.name < rhs.name } - -typealias CountriesById = Dictionary typealias LanguagesById = Dictionary +typealias CountriesById = Dictionary -func createLanguagesAndCountries() -> (languages: LanguagesById, countries: CountriesById) { - - let localeIDs = NSLocale.availableLocaleIdentifiers() - var countriesById = CountriesById() - var languagesById = LanguagesById() - - for id in localeIDs { - let locale = NSLocale(localeIdentifier: id) +struct LocaleInfo { + + let languagesById: LanguagesById + let countriesById: CountriesById + let languages: [Language] + let countries: [Country] + let languagesWithLessThanTwoCountries: [Language] + let languagesWithMoreThanOneCountry: [Language] + + init() { + let localeIDs = NSLocale.availableLocaleIdentifiers() + var _countriesById = CountriesById() + var _languagesById = LanguagesById() + + for id in localeIDs { + let locale = NSLocale(localeIdentifier: id) + let countryId = locale.objectForKey(NSLocaleCountryCode) as? String + let country: Country? = countryId.flatMap { _countriesById[$0] ?? Country(id: $0) } + let languageId = locale.objectForKey(NSLocaleLanguageCode) as? String + let language: Language? = languageId.flatMap { _languagesById[$0] ?? Language(id: $0) } + + if let countryId = countryId, var language = language { + language.countryIds.insert(countryId) + _languagesById.updateValue(language, forKey: language.id) + } - let countryId = locale.objectForKey(NSLocaleCountryCode) as? String - let country: Country? = countryId.flatMap { countriesById[$0] ?? Country(id: $0) } + if let languageId = languageId, var country = country { + country.langaugeIds.insert(languageId) + _countriesById.updateValue(country, forKey: country.id) + } + } - let languageId = locale.objectForKey(NSLocaleLanguageCode) as? String - let language: Language? = languageId.flatMap { languagesById[$0] ?? Language(id: $0) } + self.languagesById = _languagesById + self.countriesById = _countriesById - if let countryId = countryId, var language = language { - language.coutryIds.insert(countryId) - languagesById.updateValue(language, forKey: language.id) - } + countries = ([Country])(countriesById.values).sort { $0.langaugeIds.count > $1.langaugeIds.count } + languages = ([Language])(languagesById.values).sort { $0.countryIds.count > $1.countryIds.count } - if let languageId = languageId, var country = country { - country.langaugeIds.insert(languageId) - countriesById.updateValue(country, forKey: country.id) - } + languagesWithLessThanTwoCountries = languages.filter({ $0.countryIds.count < 2 }).sort() + languagesWithMoreThanOneCountry = languages.filter({ $0.countryIds.count > 1 }).sort() } - - return (languagesById, countriesById) } -func createLocaleTypes(line: Writer) { - let (languagesById, countriesById) = createLanguagesAndCountries() +let info = LocaleInfo() - let countries: [Country] = ([Country])(countriesById.values).sort { $0.langaugeIds.count > $1.langaugeIds.count } - let languages: [Language] = ([Language])(languagesById.values).sort { $0.coutryIds.count > $1.coutryIds.count } +func createLanguageSpeakingCountry(line: Writer, language: Language) { + let name = language.languageSpeakingCountryEnumName - let languagesWithLessThanTwoCountries = languages.filter({ $0.coutryIds.count < 2 }).sort() - let languagesWithMoreThanOneCountry = languages.filter({ $0.coutryIds.count > 1 }).sort() + line("") - func createLanguageSpeakingCountry(language: Language) { - line("") + // Write the enum type + line("public enum \(name): CountryType {") - // Write the enum type - line("public enum \(language.languageSpeakingCountryEnumName): CountryType {") + let _countries = language.countryIds.sort().flatMap({ info.countriesById[$0] }) - let _countries = language.coutryIds.sort().flatMap({ countriesById[$0] }) + // Write the cases + line("") + for country in _countries { + line(" case \(country.name)") + } - // Write the cases - for country in _countries { - line(" case \(country.name)") - } - line("") - line(" public var countryIdentifier: String {") - line(" switch self {") + // Write a static constant for all + let caseNames = _countries.map { $0.caseNameValue } + let joinedCaseNames = caseNames.joinWithSeparator(", ") + line("") + line(" public static let all: [\(name)] = [ \(joinedCaseNames) ]") + + line("") + line(" public var countryIdentifier: String {") + line(" switch self {") - for country in _countries { + for country in _countries { line(" case .\(country.name):") line(" return \"\(country.id)\"") - } + } - line(" }") // End of switch - line(" }") // End of var + line(" }") // End of switch + line(" }") // End of var - line("}") // End of enum - } + line("}") // End of enum +} - func createLanguageSpeakingCountries() { - line("") - line("// MARK: - Country Types") - for language in languages.filter({ $0.coutryIds.count > 1 }) { - createLanguageSpeakingCountry(language) - } +func createLanguageSpeakingCountries(line: Writer) { + line("") + line("// MARK: - Country Types") + for language in info.languagesWithMoreThanOneCountry { + createLanguageSpeakingCountry(line, language: language) } +} - func createLocale() { - line("") - line("// MARK: - Locale") +func createLocale(line: Writer) { + line("") + line("// MARK: - Locale") + + do { line("") line("public enum Locale {") - for language in languages.sort() { - if language.coutryIds.count > 1 { - line(" case \(language.name)(\(language.languageSpeakingCountryEnumName))") + // Write a static constant for all + // let caseNames = info.languages.map { ".\($0.name)" } + // let joinedCaseNames = caseNames.joinWithSeparator(", ") + // line("") + // line(" public static let all: [Locale] = [ \(joinedCaseNames) ]") + + line("") + for language in info.languages.sort() { + if language.countryIds.count > 1 { + line(" case \(language.name)(\(language.languageSpeakingCountryEnumName))") } else { - line(" case \(language.name)") + line(" case \(language.name)") } } line("}") // End of enum + } - // Add extension for LanguageType protocol + // Add extension for LanguageType protocol + do { line("") line("extension Locale: LanguageType {") line("") line(" public var languageIdentifier: String {") line(" switch self {") - for language in languages.sort() { - if language.coutryIds.count > 1 { - line(" case .\(language.name)(_):") - line(" return \"\(language.id)\"") + for language in info.languages.sort() { + if language.countryIds.count > 1 { + line(" case .\(language.name)(_):") + line(" return \"\(language.id)\"") } else { - line(" case .\(language.name):") - line(" return \"\(language.id)\"") + line(" case .\(language.name):") + line(" return \"\(language.id)\"") } } line(" }") // End of switch line(" }") // End of var line("}") // End of extension + } - // Add extension for CountryType protocol + // Add extension for CountryType protocol + do { line("") line("extension Locale: CountryType {") line("") line(" public var countryIdentifier: String {") line(" switch self {") - let caseNames = languagesWithLessThanTwoCountries.map { ".\($0.name)" } + let caseNames = info.languagesWithLessThanTwoCountries.map { $0.caseNameValue } let joinedCaseNames = caseNames.joinWithSeparator(", ") line(" case \(joinedCaseNames):") line(" return \"\"") - for language in languagesWithMoreThanOneCountry { + for language in info.languagesWithMoreThanOneCountry { line(" case .\(language.name)(let country):") line(" return country.countryIdentifier") } -// for language in languages.sort() { -// if language.coutryIds.count > 1 { -// line(" case .\(language.name)(let country):") -// line(" return country.countryIdentifier") -// } -// else { -// line(" case .\(language.name):") -// line(" return \"\"") -// } -// } - line(" }") // End of switch line(" }") // End of var line("}") // End of extension + } - - // Add extension for LocaleType protocol + // Add extension for LocaleType protocol + do { line("") line("extension Locale: LocaleType {") line(" // Uses default implementation") line("}") // End of extension - } +} + +func createLocaleTypes(line: Writer) { // Create the (Language)SpeakingCountry enum types - createLanguageSpeakingCountries() + createLanguageSpeakingCountries(line) // Create the Locale enum - createLocale() + createLocale(line) } -func generate(outputPath: String) { +// MARK: - Unit Tests + +func createUnitTestImports(line: Writer) { + line("import XCTest") + line("@testable import Money") +} + +func createXCTestCaseNamed(line: Writer, className: String, content: Generator) { + line("") + line("class \(className)Tests: XCTestCase {") + content(line) + line("}") +} + +func createTestForCountryIentifierFromCountryCaseName(line: Writer, country: Country) { + line("") + line(" func test__country_identifier_for_\(country.name)() {") + line(" country = .\(country.name)") + line(" XCTAssertEqual(country.countryIdentifier, \"\(country.id)\")") + line(" }") +} + +func createUnitTestClassForLanguageSpeakingCountry(line: Writer, language: Language) { + let name = language.languageSpeakingCountryEnumName + createXCTestCaseNamed(line, className: name) { line in + line("") + line(" var country: \(name)!") + for country in language.countryIds.flatMap({ info.countriesById[$0] }) { + createTestForCountryIentifierFromCountryCaseName(line, country: country) + } + } +} + +func createUnitTestClassesForLanguageSpeakingCountries(line: Writer) { + line("") + line("// MARK: - Country Types Tests") + for language in info.languagesWithMoreThanOneCountry { + createUnitTestClassForLanguageSpeakingCountry(line, language: language) + } +} + + +// MARK: - Generators + +func generateSourceCode(outputPath: String) { guard let outputStream = NSOutputStream(toFileAtPath: outputPath, append: false) else { fatalError("Unable to create output stream at path: \(outputPath)") @@ -350,6 +419,8 @@ func generate(outputPath: String) { outputStream.open() createFrontMatter(writeLine) + + createExtensionFor("Currency", writer: writeLine, content: createCurrencyTypes) write("\n") createMoneyTypes(writeLine) @@ -357,12 +428,47 @@ func generate(outputPath: String) { createLocaleTypes(writeLine) } +func generateUnitTests(outputPath: String) { + + guard let outputStream = NSOutputStream(toFileAtPath: outputPath, append: false) else { + fatalError("Unable to create output stream at path: \(outputPath)") + } + + defer { + outputStream.close() + } + + let write: Writer = { str in + guard let data = str.dataUsingEncoding(NSUTF8StringEncoding) else { + fatalError("Unable to encode str: \(str)") + } + outputStream.write(UnsafePointer(data.bytes), maxLength: data.length) + } + + let writeLine: Writer = { write("\($0)\n") } + + outputStream.open() + createFrontMatter(writeLine) + + createUnitTestImports(writeLine) + + createUnitTestClassesForLanguageSpeakingCountries(writeLine) + + +} + // MARK: - Main() -if Process.arguments.count == 1 { +print(Process.arguments) + +if Process.arguments.count < 1 { print("Invalid usage. Requires an output path.") exit(1) } -let outputPath = Process.arguments[1] -generate(outputPath) \ No newline at end of file +let pathToSourceCodeFile = Process.arguments[1] +generateSourceCode(pathToSourceCodeFile) + +let pathToUnitTestsFile = Process.arguments[2] +generateUnitTests(pathToUnitTestsFile) + diff --git a/Tests/Shared/AutogeneratedTests.swift b/Tests/Shared/AutogeneratedTests.swift new file mode 100644 index 0000000..12e9888 --- /dev/null +++ b/Tests/Shared/AutogeneratedTests.swift @@ -0,0 +1,2052 @@ +// +// Money, https://github.com/danthorpe/Money +// Created by Dan Thorpe, @danthorpe +// +// The MIT License (MIT) +// +// Copyright (c) 2015 Daniel Thorpe +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// Autogenerated from build scripts, do not manually edit this file. + +import XCTest +@testable import Money + +// MARK: - Country Types Tests + +class AfrikaansSpeakingCountryTests: XCTestCase { + + var country: AfrikaansSpeakingCountry! + + func test__country_identifier_for_Namibia() { + country = .Namibia + XCTAssertEqual(country.countryIdentifier, "NA") + } + + func test__country_identifier_for_SouthAfrica() { + country = .SouthAfrica + XCTAssertEqual(country.countryIdentifier, "ZA") + } +} + +class AlbanianSpeakingCountryTests: XCTestCase { + + var country: AlbanianSpeakingCountry! + + func test__country_identifier_for_Macedonia() { + country = .Macedonia + XCTAssertEqual(country.countryIdentifier, "MK") + } + + func test__country_identifier_for_Albania() { + country = .Albania + XCTAssertEqual(country.countryIdentifier, "AL") + } + + func test__country_identifier_for_Kosovo() { + country = .Kosovo + XCTAssertEqual(country.countryIdentifier, "XK") + } +} + +class ArabicSpeakingCountryTests: XCTestCase { + + var country: ArabicSpeakingCountry! + + func test__country_identifier_for_Somalia() { + country = .Somalia + XCTAssertEqual(country.countryIdentifier, "SO") + } + + func test__country_identifier_for_Iraq() { + country = .Iraq + XCTAssertEqual(country.countryIdentifier, "IQ") + } + + func test__country_identifier_for_Kuwait() { + country = .Kuwait + XCTAssertEqual(country.countryIdentifier, "KW") + } + + func test__country_identifier_for_Chad() { + country = .Chad + XCTAssertEqual(country.countryIdentifier, "TD") + } + + func test__country_identifier_for_Libya() { + country = .Libya + XCTAssertEqual(country.countryIdentifier, "LY") + } + + func test__country_identifier_for_Egypt() { + country = .Egypt + XCTAssertEqual(country.countryIdentifier, "EG") + } + + func test__country_identifier_for_WesternSahara() { + country = .WesternSahara + XCTAssertEqual(country.countryIdentifier, "EH") + } + + func test__country_identifier_for_SaudiArabia() { + country = .SaudiArabia + XCTAssertEqual(country.countryIdentifier, "SA") + } + + func test__country_identifier_for_Mauritania() { + country = .Mauritania + XCTAssertEqual(country.countryIdentifier, "MR") + } + + func test__country_identifier_for_Djibouti() { + country = .Djibouti + XCTAssertEqual(country.countryIdentifier, "DJ") + } + + func test__country_identifier_for_Eritrea() { + country = .Eritrea + XCTAssertEqual(country.countryIdentifier, "ER") + } + + func test__country_identifier_for_Lebanon() { + country = .Lebanon + XCTAssertEqual(country.countryIdentifier, "LB") + } + + func test__country_identifier_for_Oman() { + country = .Oman + XCTAssertEqual(country.countryIdentifier, "OM") + } + + func test__country_identifier_for_PalestinianTerritories() { + country = .PalestinianTerritories + XCTAssertEqual(country.countryIdentifier, "PS") + } + + func test__country_identifier_for_Sudan() { + country = .Sudan + XCTAssertEqual(country.countryIdentifier, "SD") + } + + func test__country_identifier_for_SouthSudan() { + country = .SouthSudan + XCTAssertEqual(country.countryIdentifier, "SS") + } + + func test__country_identifier_for_Algeria() { + country = .Algeria + XCTAssertEqual(country.countryIdentifier, "DZ") + } + + func test__country_identifier_for_Morocco() { + country = .Morocco + XCTAssertEqual(country.countryIdentifier, "MA") + } + + func test__country_identifier_for_Bahrain() { + country = .Bahrain + XCTAssertEqual(country.countryIdentifier, "BH") + } + + func test__country_identifier_for_UnitedArabEmirates() { + country = .UnitedArabEmirates + XCTAssertEqual(country.countryIdentifier, "AE") + } + + func test__country_identifier_for_Qatar() { + country = .Qatar + XCTAssertEqual(country.countryIdentifier, "QA") + } + + func test__country_identifier_for_Comoros() { + country = .Comoros + XCTAssertEqual(country.countryIdentifier, "KM") + } + + func test__country_identifier_for_Syria() { + country = .Syria + XCTAssertEqual(country.countryIdentifier, "SY") + } + + func test__country_identifier_for_Yemen() { + country = .Yemen + XCTAssertEqual(country.countryIdentifier, "YE") + } + + func test__country_identifier_for_Jordan() { + country = .Jordan + XCTAssertEqual(country.countryIdentifier, "JO") + } + + func test__country_identifier_for_Tunisia() { + country = .Tunisia + XCTAssertEqual(country.countryIdentifier, "TN") + } + + func test__country_identifier_for_Israel() { + country = .Israel + XCTAssertEqual(country.countryIdentifier, "IL") + } + + func test__country_identifier_for_World() { + country = .World + XCTAssertEqual(country.countryIdentifier, "001") + } +} + +class BengaliSpeakingCountryTests: XCTestCase { + + var country: BengaliSpeakingCountry! + + func test__country_identifier_for_Bangladesh() { + country = .Bangladesh + XCTAssertEqual(country.countryIdentifier, "BD") + } + + func test__country_identifier_for_India() { + country = .India + XCTAssertEqual(country.countryIdentifier, "IN") + } +} + +class CatalanSpeakingCountryTests: XCTestCase { + + var country: CatalanSpeakingCountry! + + func test__country_identifier_for_Italy() { + country = .Italy + XCTAssertEqual(country.countryIdentifier, "IT") + } + + func test__country_identifier_for_France() { + country = .France + XCTAssertEqual(country.countryIdentifier, "FR") + } + + func test__country_identifier_for_Spain() { + country = .Spain + XCTAssertEqual(country.countryIdentifier, "ES") + } + + func test__country_identifier_for_Andorra() { + country = .Andorra + XCTAssertEqual(country.countryIdentifier, "AD") + } +} + +class CentralKurdishSpeakingCountryTests: XCTestCase { + + var country: CentralKurdishSpeakingCountry! + + func test__country_identifier_for_Iraq() { + country = .Iraq + XCTAssertEqual(country.countryIdentifier, "IQ") + } + + func test__country_identifier_for_Iran() { + country = .Iran + XCTAssertEqual(country.countryIdentifier, "IR") + } +} + +class ChineseSpeakingCountryTests: XCTestCase { + + var country: ChineseSpeakingCountry! + + func test__country_identifier_for_Taiwan() { + country = .Taiwan + XCTAssertEqual(country.countryIdentifier, "TW") + } + + func test__country_identifier_for_HongKongSarChina() { + country = .HongKongSarChina + XCTAssertEqual(country.countryIdentifier, "HK") + } + + func test__country_identifier_for_MacauSarChina() { + country = .MacauSarChina + XCTAssertEqual(country.countryIdentifier, "MO") + } + + func test__country_identifier_for_Singapore() { + country = .Singapore + XCTAssertEqual(country.countryIdentifier, "SG") + } + + func test__country_identifier_for_China() { + country = .China + XCTAssertEqual(country.countryIdentifier, "CN") + } +} + +class CroatianSpeakingCountryTests: XCTestCase { + + var country: CroatianSpeakingCountry! + + func test__country_identifier_for_Croatia() { + country = .Croatia + XCTAssertEqual(country.countryIdentifier, "HR") + } + + func test__country_identifier_for_BosniaHerzegovina() { + country = .BosniaHerzegovina + XCTAssertEqual(country.countryIdentifier, "BA") + } +} + +class DanishSpeakingCountryTests: XCTestCase { + + var country: DanishSpeakingCountry! + + func test__country_identifier_for_Denmark() { + country = .Denmark + XCTAssertEqual(country.countryIdentifier, "DK") + } + + func test__country_identifier_for_Greenland() { + country = .Greenland + XCTAssertEqual(country.countryIdentifier, "GL") + } +} + +class DutchSpeakingCountryTests: XCTestCase { + + var country: DutchSpeakingCountry! + + func test__country_identifier_for_Belgium() { + country = .Belgium + XCTAssertEqual(country.countryIdentifier, "BE") + } + + func test__country_identifier_for_Curaçao() { + country = .Curaçao + XCTAssertEqual(country.countryIdentifier, "CW") + } + + func test__country_identifier_for_Suriname() { + country = .Suriname + XCTAssertEqual(country.countryIdentifier, "SR") + } + + func test__country_identifier_for_Netherlands() { + country = .Netherlands + XCTAssertEqual(country.countryIdentifier, "NL") + } + + func test__country_identifier_for_SintMaarten() { + country = .SintMaarten + XCTAssertEqual(country.countryIdentifier, "SX") + } + + func test__country_identifier_for_CaribbeanNetherlands() { + country = .CaribbeanNetherlands + XCTAssertEqual(country.countryIdentifier, "BQ") + } + + func test__country_identifier_for_Aruba() { + country = .Aruba + XCTAssertEqual(country.countryIdentifier, "AW") + } +} + +class EnglishSpeakingCountryTests: XCTestCase { + + var country: EnglishSpeakingCountry! + + func test__country_identifier_for_Singapore() { + country = .Singapore + XCTAssertEqual(country.countryIdentifier, "SG") + } + + func test__country_identifier_for_Netherlands() { + country = .Netherlands + XCTAssertEqual(country.countryIdentifier, "NL") + } + + func test__country_identifier_for_Malaysia() { + country = .Malaysia + XCTAssertEqual(country.countryIdentifier, "MY") + } + + func test__country_identifier_for_PapuaNewGuinea() { + country = .PapuaNewGuinea + XCTAssertEqual(country.countryIdentifier, "PG") + } + + func test__country_identifier_for_Barbados() { + country = .Barbados + XCTAssertEqual(country.countryIdentifier, "BB") + } + + func test__country_identifier_for_HongKongSarChina() { + country = .HongKongSarChina + XCTAssertEqual(country.countryIdentifier, "HK") + } + + func test__country_identifier_for_Eritrea() { + country = .Eritrea + XCTAssertEqual(country.countryIdentifier, "ER") + } + + func test__country_identifier_for_IsleOfMan() { + country = .IsleOfMan + XCTAssertEqual(country.countryIdentifier, "IM") + } + + func test__country_identifier_for_Lesotho() { + country = .Lesotho + XCTAssertEqual(country.countryIdentifier, "LS") + } + + func test__country_identifier_for_Palau() { + country = .Palau + XCTAssertEqual(country.countryIdentifier, "PW") + } + + func test__country_identifier_for_SintMaarten() { + country = .SintMaarten + XCTAssertEqual(country.countryIdentifier, "SX") + } + + func test__country_identifier_for_Belgium() { + country = .Belgium + XCTAssertEqual(country.countryIdentifier, "BE") + } + + func test__country_identifier_for_BosniaHerzegovina() { + country = .BosniaHerzegovina + XCTAssertEqual(country.countryIdentifier, "BA") + } + + func test__country_identifier_for_Cameroon() { + country = .Cameroon + XCTAssertEqual(country.countryIdentifier, "CM") + } + + func test__country_identifier_for_Gibraltar() { + country = .Gibraltar + XCTAssertEqual(country.countryIdentifier, "GI") + } + + func test__country_identifier_for_Montenegro() { + country = .Montenegro + XCTAssertEqual(country.countryIdentifier, "ME") + } + + func test__country_identifier_for_Madagascar() { + country = .Madagascar + XCTAssertEqual(country.countryIdentifier, "MG") + } + + func test__country_identifier_for_CzechRepublic() { + country = .CzechRepublic + XCTAssertEqual(country.countryIdentifier, "CZ") + } + + func test__country_identifier_for_MarshallIslands() { + country = .MarshallIslands + XCTAssertEqual(country.countryIdentifier, "MH") + } + + func test__country_identifier_for_Swaziland() { + country = .Swaziland + XCTAssertEqual(country.countryIdentifier, "SZ") + } + + func test__country_identifier_for_Austria() { + country = .Austria + XCTAssertEqual(country.countryIdentifier, "AT") + } + + func test__country_identifier_for_Romania() { + country = .Romania + XCTAssertEqual(country.countryIdentifier, "RO") + } + + func test__country_identifier_for_Malawi() { + country = .Malawi + XCTAssertEqual(country.countryIdentifier, "MW") + } + + func test__country_identifier_for_Jersey() { + country = .Jersey + XCTAssertEqual(country.countryIdentifier, "JE") + } + + func test__country_identifier_for_Germany() { + country = .Germany + XCTAssertEqual(country.countryIdentifier, "DE") + } + + func test__country_identifier_for_Kiribati() { + country = .Kiribati + XCTAssertEqual(country.countryIdentifier, "KI") + } + + func test__country_identifier_for_Norway() { + country = .Norway + XCTAssertEqual(country.countryIdentifier, "NO") + } + + func test__country_identifier_for_MacauSarChina() { + country = .MacauSarChina + XCTAssertEqual(country.countryIdentifier, "MO") + } + + func test__country_identifier_for_Jamaica() { + country = .Jamaica + XCTAssertEqual(country.countryIdentifier, "JM") + } + + func test__country_identifier_for_ChristmasIsland() { + country = .ChristmasIsland + XCTAssertEqual(country.countryIdentifier, "CX") + } + + func test__country_identifier_for_Montserrat() { + country = .Montserrat + XCTAssertEqual(country.countryIdentifier, "MS") + } + + func test__country_identifier_for_SolomonIslands() { + country = .SolomonIslands + XCTAssertEqual(country.countryIdentifier, "SB") + } + + func test__country_identifier_for_USOutlyingIslands() { + country = .USOutlyingIslands + XCTAssertEqual(country.countryIdentifier, "UM") + } + + func test__country_identifier_for_Seychelles() { + country = .Seychelles + XCTAssertEqual(country.countryIdentifier, "SC") + } + + func test__country_identifier_for_CaymanIslands() { + country = .CaymanIslands + XCTAssertEqual(country.countryIdentifier, "KY") + } + + func test__country_identifier_for_Finland() { + country = .Finland + XCTAssertEqual(country.countryIdentifier, "FI") + } + + func test__country_identifier_for_AntiguaBarbuda() { + country = .AntiguaBarbuda + XCTAssertEqual(country.countryIdentifier, "AG") + } + + func test__country_identifier_for_Anguilla() { + country = .Anguilla + XCTAssertEqual(country.countryIdentifier, "AI") + } + + func test__country_identifier_for_Mauritius() { + country = .Mauritius + XCTAssertEqual(country.countryIdentifier, "MU") + } + + func test__country_identifier_for_Tonga() { + country = .Tonga + XCTAssertEqual(country.countryIdentifier, "TO") + } + + func test__country_identifier_for_Italy() { + country = .Italy + XCTAssertEqual(country.countryIdentifier, "IT") + } + + func test__country_identifier_for_Nigeria() { + country = .Nigeria + XCTAssertEqual(country.countryIdentifier, "NG") + } + + func test__country_identifier_for_Australia() { + country = .Australia + XCTAssertEqual(country.countryIdentifier, "AU") + } + + func test__country_identifier_for_SierraLeone() { + country = .SierraLeone + XCTAssertEqual(country.countryIdentifier, "SL") + } + + func test__country_identifier_for_BritishVirginIslands() { + country = .BritishVirginIslands + XCTAssertEqual(country.countryIdentifier, "VG") + } + + func test__country_identifier_for_Guernsey() { + country = .Guernsey + XCTAssertEqual(country.countryIdentifier, "GG") + } + + func test__country_identifier_for_SouthSudan() { + country = .SouthSudan + XCTAssertEqual(country.countryIdentifier, "SS") + } + + func test__country_identifier_for_Denmark() { + country = .Denmark + XCTAssertEqual(country.countryIdentifier, "DK") + } + + func test__country_identifier_for_Guam() { + country = .Guam + XCTAssertEqual(country.countryIdentifier, "GU") + } + + func test__country_identifier_for_Andorra() { + country = .Andorra + XCTAssertEqual(country.countryIdentifier, "AD") + } + + func test__country_identifier_for_Cyprus() { + country = .Cyprus + XCTAssertEqual(country.countryIdentifier, "CY") + } + + func test__country_identifier_for_StVincentGrenadines() { + country = .StVincentGrenadines + XCTAssertEqual(country.countryIdentifier, "VC") + } + + func test__country_identifier_for_UnitedStates() { + country = .UnitedStates + XCTAssertEqual(country.countryIdentifier, "US") + } + + func test__country_identifier_for_Liberia() { + country = .Liberia + XCTAssertEqual(country.countryIdentifier, "LR") + } + + func test__country_identifier_for_Uganda() { + country = .Uganda + XCTAssertEqual(country.countryIdentifier, "UG") + } + + func test__country_identifier_for_Slovakia() { + country = .Slovakia + XCTAssertEqual(country.countryIdentifier, "SK") + } + + func test__country_identifier_for_Bermuda() { + country = .Bermuda + XCTAssertEqual(country.countryIdentifier, "BM") + } + + func test__country_identifier_for_PitcairnIslands() { + country = .PitcairnIslands + XCTAssertEqual(country.countryIdentifier, "PN") + } + + func test__country_identifier_for_Slovenia() { + country = .Slovenia + XCTAssertEqual(country.countryIdentifier, "SI") + } + + func test__country_identifier_for_Switzerland() { + country = .Switzerland + XCTAssertEqual(country.countryIdentifier, "CH") + } + + func test__country_identifier_for_Lithuania() { + country = .Lithuania + XCTAssertEqual(country.countryIdentifier, "LT") + } + + func test__country_identifier_for_Tuvalu() { + country = .Tuvalu + XCTAssertEqual(country.countryIdentifier, "TV") + } + + func test__country_identifier_for_World() { + country = .World + XCTAssertEqual(country.countryIdentifier, "001") + } + + func test__country_identifier_for_TurksCaicosIslands() { + country = .TurksCaicosIslands + XCTAssertEqual(country.countryIdentifier, "TC") + } + + func test__country_identifier_for_Vanuatu() { + country = .Vanuatu + XCTAssertEqual(country.countryIdentifier, "VU") + } + + func test__country_identifier_for_NewZealand() { + country = .NewZealand + XCTAssertEqual(country.countryIdentifier, "NZ") + } + + func test__country_identifier_for_Latvia() { + country = .Latvia + XCTAssertEqual(country.countryIdentifier, "LV") + } + + func test__country_identifier_for_Ireland() { + country = .Ireland + XCTAssertEqual(country.countryIdentifier, "IE") + } + + func test__country_identifier_for_Guyana() { + country = .Guyana + XCTAssertEqual(country.countryIdentifier, "GY") + } + + func test__country_identifier_for_BritishIndianOceanTerritory() { + country = .BritishIndianOceanTerritory + XCTAssertEqual(country.countryIdentifier, "IO") + } + + func test__country_identifier_for_Philippines() { + country = .Philippines + XCTAssertEqual(country.countryIdentifier, "PH") + } + + func test__country_identifier_for_Niue() { + country = .Niue + XCTAssertEqual(country.countryIdentifier, "NU") + } + + func test__country_identifier_for_Gambia() { + country = .Gambia + XCTAssertEqual(country.countryIdentifier, "GM") + } + + func test__country_identifier_for_Spain() { + country = .Spain + XCTAssertEqual(country.countryIdentifier, "ES") + } + + func test__country_identifier_for_NorthernMarianaIslands() { + country = .NorthernMarianaIslands + XCTAssertEqual(country.countryIdentifier, "MP") + } + + func test__country_identifier_for_Estonia() { + country = .Estonia + XCTAssertEqual(country.countryIdentifier, "EE") + } + + func test__country_identifier_for_Greece() { + country = .Greece + XCTAssertEqual(country.countryIdentifier, "GR") + } + + func test__country_identifier_for_Canada() { + country = .Canada + XCTAssertEqual(country.countryIdentifier, "CA") + } + + func test__country_identifier_for_Sudan() { + country = .Sudan + XCTAssertEqual(country.countryIdentifier, "SD") + } + + func test__country_identifier_for_StLucia() { + country = .StLucia + XCTAssertEqual(country.countryIdentifier, "LC") + } + + func test__country_identifier_for_Croatia() { + country = .Croatia + XCTAssertEqual(country.countryIdentifier, "HR") + } + + func test__country_identifier_for_NorfolkIsland() { + country = .NorfolkIsland + XCTAssertEqual(country.countryIdentifier, "NF") + } + + func test__country_identifier_for_UnitedKingdom() { + country = .UnitedKingdom + XCTAssertEqual(country.countryIdentifier, "GB") + } + + func test__country_identifier_for_Dominica() { + country = .Dominica + XCTAssertEqual(country.countryIdentifier, "DM") + } + + func test__country_identifier_for_Europe() { + country = .Europe + XCTAssertEqual(country.countryIdentifier, "150") + } + + func test__country_identifier_for_Portugal() { + country = .Portugal + XCTAssertEqual(country.countryIdentifier, "PT") + } + + func test__country_identifier_for_Turkey() { + country = .Turkey + XCTAssertEqual(country.countryIdentifier, "TR") + } + + func test__country_identifier_for_Malta() { + country = .Malta + XCTAssertEqual(country.countryIdentifier, "MT") + } + + func test__country_identifier_for_Albania() { + country = .Albania + XCTAssertEqual(country.countryIdentifier, "AL") + } + + func test__country_identifier_for_TrinidadTobago() { + country = .TrinidadTobago + XCTAssertEqual(country.countryIdentifier, "TT") + } + + func test__country_identifier_for_Samoa() { + country = .Samoa + XCTAssertEqual(country.countryIdentifier, "WS") + } + + func test__country_identifier_for_Israel() { + country = .Israel + XCTAssertEqual(country.countryIdentifier, "IL") + } + + func test__country_identifier_for_DiegoGarcia() { + country = .DiegoGarcia + XCTAssertEqual(country.countryIdentifier, "DG") + } + + func test__country_identifier_for_Rwanda() { + country = .Rwanda + XCTAssertEqual(country.countryIdentifier, "RW") + } + + func test__country_identifier_for_Fiji() { + country = .Fiji + XCTAssertEqual(country.countryIdentifier, "FJ") + } + + func test__country_identifier_for_Kenya() { + country = .Kenya + XCTAssertEqual(country.countryIdentifier, "KE") + } + + func test__country_identifier_for_Russia() { + country = .Russia + XCTAssertEqual(country.countryIdentifier, "RU") + } + + func test__country_identifier_for_Bahamas() { + country = .Bahamas + XCTAssertEqual(country.countryIdentifier, "BS") + } + + func test__country_identifier_for_Luxembourg() { + country = .Luxembourg + XCTAssertEqual(country.countryIdentifier, "LU") + } + + func test__country_identifier_for_Hungary() { + country = .Hungary + XCTAssertEqual(country.countryIdentifier, "HU") + } + + func test__country_identifier_for_Tanzania() { + country = .Tanzania + XCTAssertEqual(country.countryIdentifier, "TZ") + } + + func test__country_identifier_for_Namibia() { + country = .Namibia + XCTAssertEqual(country.countryIdentifier, "NA") + } + + func test__country_identifier_for_Zimbabwe() { + country = .Zimbabwe + XCTAssertEqual(country.countryIdentifier, "ZW") + } + + func test__country_identifier_for_SouthAfrica() { + country = .SouthAfrica + XCTAssertEqual(country.countryIdentifier, "ZA") + } + + func test__country_identifier_for_Grenada() { + country = .Grenada + XCTAssertEqual(country.countryIdentifier, "GD") + } + + func test__country_identifier_for_Belize() { + country = .Belize + XCTAssertEqual(country.countryIdentifier, "BZ") + } + + func test__country_identifier_for_Botswana() { + country = .Botswana + XCTAssertEqual(country.countryIdentifier, "BW") + } + + func test__country_identifier_for_PuertoRico() { + country = .PuertoRico + XCTAssertEqual(country.countryIdentifier, "PR") + } + + func test__country_identifier_for_USVirginIslands() { + country = .USVirginIslands + XCTAssertEqual(country.countryIdentifier, "VI") + } + + func test__country_identifier_for_Sweden() { + country = .Sweden + XCTAssertEqual(country.countryIdentifier, "SE") + } + + func test__country_identifier_for_FalklandIslands() { + country = .FalklandIslands + XCTAssertEqual(country.countryIdentifier, "FK") + } + + func test__country_identifier_for_CocosKeelingIslands() { + country = .CocosKeelingIslands + XCTAssertEqual(country.countryIdentifier, "CC") + } + + func test__country_identifier_for_France() { + country = .France + XCTAssertEqual(country.countryIdentifier, "FR") + } + + func test__country_identifier_for_StKittsNevis() { + country = .StKittsNevis + XCTAssertEqual(country.countryIdentifier, "KN") + } + + func test__country_identifier_for_Pakistan() { + country = .Pakistan + XCTAssertEqual(country.countryIdentifier, "PK") + } + + func test__country_identifier_for_Zambia() { + country = .Zambia + XCTAssertEqual(country.countryIdentifier, "ZM") + } + + func test__country_identifier_for_Poland() { + country = .Poland + XCTAssertEqual(country.countryIdentifier, "PL") + } + + func test__country_identifier_for_Tokelau() { + country = .Tokelau + XCTAssertEqual(country.countryIdentifier, "TK") + } + + func test__country_identifier_for_CookIslands() { + country = .CookIslands + XCTAssertEqual(country.countryIdentifier, "CK") + } + + func test__country_identifier_for_StHelena() { + country = .StHelena + XCTAssertEqual(country.countryIdentifier, "SH") + } + + func test__country_identifier_for_Nauru() { + country = .Nauru + XCTAssertEqual(country.countryIdentifier, "NR") + } + + func test__country_identifier_for_Ghana() { + country = .Ghana + XCTAssertEqual(country.countryIdentifier, "GH") + } + + func test__country_identifier_for_Iceland() { + country = .Iceland + XCTAssertEqual(country.countryIdentifier, "IS") + } + + func test__country_identifier_for_Micronesia() { + country = .Micronesia + XCTAssertEqual(country.countryIdentifier, "FM") + } + + func test__country_identifier_for_AmericanSamoa() { + country = .AmericanSamoa + XCTAssertEqual(country.countryIdentifier, "AS") + } + + func test__country_identifier_for_India() { + country = .India + XCTAssertEqual(country.countryIdentifier, "IN") + } +} + +class EweSpeakingCountryTests: XCTestCase { + + var country: EweSpeakingCountry! + + func test__country_identifier_for_Togo() { + country = .Togo + XCTAssertEqual(country.countryIdentifier, "TG") + } + + func test__country_identifier_for_Ghana() { + country = .Ghana + XCTAssertEqual(country.countryIdentifier, "GH") + } +} + +class FrenchSpeakingCountryTests: XCTestCase { + + var country: FrenchSpeakingCountry! + + func test__country_identifier_for_Rwanda() { + country = .Rwanda + XCTAssertEqual(country.countryIdentifier, "RW") + } + + func test__country_identifier_for_Seychelles() { + country = .Seychelles + XCTAssertEqual(country.countryIdentifier, "SC") + } + + func test__country_identifier_for_Vanuatu() { + country = .Vanuatu + XCTAssertEqual(country.countryIdentifier, "VU") + } + + func test__country_identifier_for_Mauritius() { + country = .Mauritius + XCTAssertEqual(country.countryIdentifier, "MU") + } + + func test__country_identifier_for_Chad() { + country = .Chad + XCTAssertEqual(country.countryIdentifier, "TD") + } + + func test__country_identifier_for_Djibouti() { + country = .Djibouti + XCTAssertEqual(country.countryIdentifier, "DJ") + } + + func test__country_identifier_for_CongoBrazzaville() { + country = .CongoBrazzaville + XCTAssertEqual(country.countryIdentifier, "CG") + } + + func test__country_identifier_for_Monaco() { + country = .Monaco + XCTAssertEqual(country.countryIdentifier, "MC") + } + + func test__country_identifier_for_Mauritania() { + country = .Mauritania + XCTAssertEqual(country.countryIdentifier, "MR") + } + + func test__country_identifier_for_Luxembourg() { + country = .Luxembourg + XCTAssertEqual(country.countryIdentifier, "LU") + } + + func test__country_identifier_for_Niger() { + country = .Niger + XCTAssertEqual(country.countryIdentifier, "NE") + } + + func test__country_identifier_for_StMartin() { + country = .StMartin + XCTAssertEqual(country.countryIdentifier, "MF") + } + + func test__country_identifier_for_Mayotte() { + country = .Mayotte + XCTAssertEqual(country.countryIdentifier, "YT") + } + + func test__country_identifier_for_Benin() { + country = .Benin + XCTAssertEqual(country.countryIdentifier, "BJ") + } + + func test__country_identifier_for_Canada() { + country = .Canada + XCTAssertEqual(country.countryIdentifier, "CA") + } + + func test__country_identifier_for_FrenchGuiana() { + country = .FrenchGuiana + XCTAssertEqual(country.countryIdentifier, "GF") + } + + func test__country_identifier_for_NewCaledonia() { + country = .NewCaledonia + XCTAssertEqual(country.countryIdentifier, "NC") + } + + func test__country_identifier_for_Haiti() { + country = .Haiti + XCTAssertEqual(country.countryIdentifier, "HT") + } + + func test__country_identifier_for_Senegal() { + country = .Senegal + XCTAssertEqual(country.countryIdentifier, "SN") + } + + func test__country_identifier_for_CentralAfricanRepublic() { + country = .CentralAfricanRepublic + XCTAssertEqual(country.countryIdentifier, "CF") + } + + func test__country_identifier_for_France() { + country = .France + XCTAssertEqual(country.countryIdentifier, "FR") + } + + func test__country_identifier_for_Belgium() { + country = .Belgium + XCTAssertEqual(country.countryIdentifier, "BE") + } + + func test__country_identifier_for_StPierreMiquelon() { + country = .StPierreMiquelon + XCTAssertEqual(country.countryIdentifier, "PM") + } + + func test__country_identifier_for_Togo() { + country = .Togo + XCTAssertEqual(country.countryIdentifier, "TG") + } + + func test__country_identifier_for_FrenchPolynesia() { + country = .FrenchPolynesia + XCTAssertEqual(country.countryIdentifier, "PF") + } + + func test__country_identifier_for_Morocco() { + country = .Morocco + XCTAssertEqual(country.countryIdentifier, "MA") + } + + func test__country_identifier_for_Cameroon() { + country = .Cameroon + XCTAssertEqual(country.countryIdentifier, "CM") + } + + func test__country_identifier_for_Burundi() { + country = .Burundi + XCTAssertEqual(country.countryIdentifier, "BI") + } + + func test__country_identifier_for_StBarthélemy() { + country = .StBarthélemy + XCTAssertEqual(country.countryIdentifier, "BL") + } + + func test__country_identifier_for_Madagascar() { + country = .Madagascar + XCTAssertEqual(country.countryIdentifier, "MG") + } + + func test__country_identifier_for_Algeria() { + country = .Algeria + XCTAssertEqual(country.countryIdentifier, "DZ") + } + + func test__country_identifier_for_Guinea() { + country = .Guinea + XCTAssertEqual(country.countryIdentifier, "GN") + } + + func test__country_identifier_for_BurkinaFaso() { + country = .BurkinaFaso + XCTAssertEqual(country.countryIdentifier, "BF") + } + + func test__country_identifier_for_Guadeloupe() { + country = .Guadeloupe + XCTAssertEqual(country.countryIdentifier, "GP") + } + + func test__country_identifier_for_CongoKinshasa() { + country = .CongoKinshasa + XCTAssertEqual(country.countryIdentifier, "CD") + } + + func test__country_identifier_for_Réunion() { + country = .Réunion + XCTAssertEqual(country.countryIdentifier, "RE") + } + + func test__country_identifier_for_Mali() { + country = .Mali + XCTAssertEqual(country.countryIdentifier, "ML") + } + + func test__country_identifier_for_Martinique() { + country = .Martinique + XCTAssertEqual(country.countryIdentifier, "MQ") + } + + func test__country_identifier_for_WallisFutuna() { + country = .WallisFutuna + XCTAssertEqual(country.countryIdentifier, "WF") + } + + func test__country_identifier_for_EquatorialGuinea() { + country = .EquatorialGuinea + XCTAssertEqual(country.countryIdentifier, "GQ") + } + + func test__country_identifier_for_Switzerland() { + country = .Switzerland + XCTAssertEqual(country.countryIdentifier, "CH") + } + + func test__country_identifier_for_CôteDivoire() { + country = .CôteDivoire + XCTAssertEqual(country.countryIdentifier, "CI") + } + + func test__country_identifier_for_Comoros() { + country = .Comoros + XCTAssertEqual(country.countryIdentifier, "KM") + } + + func test__country_identifier_for_Syria() { + country = .Syria + XCTAssertEqual(country.countryIdentifier, "SY") + } + + func test__country_identifier_for_Gabon() { + country = .Gabon + XCTAssertEqual(country.countryIdentifier, "GA") + } + + func test__country_identifier_for_Tunisia() { + country = .Tunisia + XCTAssertEqual(country.countryIdentifier, "TN") + } +} + +class FulahSpeakingCountryTests: XCTestCase { + + var country: FulahSpeakingCountry! + + func test__country_identifier_for_Senegal() { + country = .Senegal + XCTAssertEqual(country.countryIdentifier, "SN") + } + + func test__country_identifier_for_Cameroon() { + country = .Cameroon + XCTAssertEqual(country.countryIdentifier, "CM") + } + + func test__country_identifier_for_Mauritania() { + country = .Mauritania + XCTAssertEqual(country.countryIdentifier, "MR") + } + + func test__country_identifier_for_Guinea() { + country = .Guinea + XCTAssertEqual(country.countryIdentifier, "GN") + } +} + +class GermanSpeakingCountryTests: XCTestCase { + + var country: GermanSpeakingCountry! + + func test__country_identifier_for_Belgium() { + country = .Belgium + XCTAssertEqual(country.countryIdentifier, "BE") + } + + func test__country_identifier_for_Austria() { + country = .Austria + XCTAssertEqual(country.countryIdentifier, "AT") + } + + func test__country_identifier_for_Liechtenstein() { + country = .Liechtenstein + XCTAssertEqual(country.countryIdentifier, "LI") + } + + func test__country_identifier_for_Luxembourg() { + country = .Luxembourg + XCTAssertEqual(country.countryIdentifier, "LU") + } + + func test__country_identifier_for_Switzerland() { + country = .Switzerland + XCTAssertEqual(country.countryIdentifier, "CH") + } + + func test__country_identifier_for_Germany() { + country = .Germany + XCTAssertEqual(country.countryIdentifier, "DE") + } +} + +class GreekSpeakingCountryTests: XCTestCase { + + var country: GreekSpeakingCountry! + + func test__country_identifier_for_Cyprus() { + country = .Cyprus + XCTAssertEqual(country.countryIdentifier, "CY") + } + + func test__country_identifier_for_Greece() { + country = .Greece + XCTAssertEqual(country.countryIdentifier, "GR") + } +} + +class HausaSpeakingCountryTests: XCTestCase { + + var country: HausaSpeakingCountry! + + func test__country_identifier_for_Niger() { + country = .Niger + XCTAssertEqual(country.countryIdentifier, "NE") + } + + func test__country_identifier_for_Ghana() { + country = .Ghana + XCTAssertEqual(country.countryIdentifier, "GH") + } + + func test__country_identifier_for_Nigeria() { + country = .Nigeria + XCTAssertEqual(country.countryIdentifier, "NG") + } +} + +class ItalianSpeakingCountryTests: XCTestCase { + + var country: ItalianSpeakingCountry! + + func test__country_identifier_for_Italy() { + country = .Italy + XCTAssertEqual(country.countryIdentifier, "IT") + } + + func test__country_identifier_for_Switzerland() { + country = .Switzerland + XCTAssertEqual(country.countryIdentifier, "CH") + } + + func test__country_identifier_for_SanMarino() { + country = .SanMarino + XCTAssertEqual(country.countryIdentifier, "SM") + } +} + +class KoreanSpeakingCountryTests: XCTestCase { + + var country: KoreanSpeakingCountry! + + func test__country_identifier_for_NorthKorea() { + country = .NorthKorea + XCTAssertEqual(country.countryIdentifier, "KP") + } + + func test__country_identifier_for_SouthKorea() { + country = .SouthKorea + XCTAssertEqual(country.countryIdentifier, "KR") + } +} + +class LingalaSpeakingCountryTests: XCTestCase { + + var country: LingalaSpeakingCountry! + + func test__country_identifier_for_CongoKinshasa() { + country = .CongoKinshasa + XCTAssertEqual(country.countryIdentifier, "CD") + } + + func test__country_identifier_for_CentralAfricanRepublic() { + country = .CentralAfricanRepublic + XCTAssertEqual(country.countryIdentifier, "CF") + } + + func test__country_identifier_for_Angola() { + country = .Angola + XCTAssertEqual(country.countryIdentifier, "AO") + } + + func test__country_identifier_for_CongoBrazzaville() { + country = .CongoBrazzaville + XCTAssertEqual(country.countryIdentifier, "CG") + } +} + +class MalaySpeakingCountryTests: XCTestCase { + + var country: MalaySpeakingCountry! + + func test__country_identifier_for_Brunei() { + country = .Brunei + XCTAssertEqual(country.countryIdentifier, "BN") + } + + func test__country_identifier_for_Malaysia() { + country = .Malaysia + XCTAssertEqual(country.countryIdentifier, "MY") + } + + func test__country_identifier_for_Singapore() { + country = .Singapore + XCTAssertEqual(country.countryIdentifier, "SG") + } +} + +class MasaiSpeakingCountryTests: XCTestCase { + + var country: MasaiSpeakingCountry! + + func test__country_identifier_for_Tanzania() { + country = .Tanzania + XCTAssertEqual(country.countryIdentifier, "TZ") + } + + func test__country_identifier_for_Kenya() { + country = .Kenya + XCTAssertEqual(country.countryIdentifier, "KE") + } +} + +class NepaliSpeakingCountryTests: XCTestCase { + + var country: NepaliSpeakingCountry! + + func test__country_identifier_for_Nepal() { + country = .Nepal + XCTAssertEqual(country.countryIdentifier, "NP") + } + + func test__country_identifier_for_India() { + country = .India + XCTAssertEqual(country.countryIdentifier, "IN") + } +} + +class NorthernSamiSpeakingCountryTests: XCTestCase { + + var country: NorthernSamiSpeakingCountry! + + func test__country_identifier_for_Sweden() { + country = .Sweden + XCTAssertEqual(country.countryIdentifier, "SE") + } + + func test__country_identifier_for_Norway() { + country = .Norway + XCTAssertEqual(country.countryIdentifier, "NO") + } + + func test__country_identifier_for_Finland() { + country = .Finland + XCTAssertEqual(country.countryIdentifier, "FI") + } +} + +class NorwegianBokmålSpeakingCountryTests: XCTestCase { + + var country: NorwegianBokmålSpeakingCountry! + + func test__country_identifier_for_SvalbardJanMayen() { + country = .SvalbardJanMayen + XCTAssertEqual(country.countryIdentifier, "SJ") + } + + func test__country_identifier_for_Norway() { + country = .Norway + XCTAssertEqual(country.countryIdentifier, "NO") + } +} + +class OromoSpeakingCountryTests: XCTestCase { + + var country: OromoSpeakingCountry! + + func test__country_identifier_for_Ethiopia() { + country = .Ethiopia + XCTAssertEqual(country.countryIdentifier, "ET") + } + + func test__country_identifier_for_Kenya() { + country = .Kenya + XCTAssertEqual(country.countryIdentifier, "KE") + } +} + +class OsseticSpeakingCountryTests: XCTestCase { + + var country: OsseticSpeakingCountry! + + func test__country_identifier_for_Georgia() { + country = .Georgia + XCTAssertEqual(country.countryIdentifier, "GE") + } + + func test__country_identifier_for_Russia() { + country = .Russia + XCTAssertEqual(country.countryIdentifier, "RU") + } +} + +class PersianSpeakingCountryTests: XCTestCase { + + var country: PersianSpeakingCountry! + + func test__country_identifier_for_Iran() { + country = .Iran + XCTAssertEqual(country.countryIdentifier, "IR") + } + + func test__country_identifier_for_Afghanistan() { + country = .Afghanistan + XCTAssertEqual(country.countryIdentifier, "AF") + } +} + +class PortugueseSpeakingCountryTests: XCTestCase { + + var country: PortugueseSpeakingCountry! + + func test__country_identifier_for_Brazil() { + country = .Brazil + XCTAssertEqual(country.countryIdentifier, "BR") + } + + func test__country_identifier_for_GuineaBissau() { + country = .GuineaBissau + XCTAssertEqual(country.countryIdentifier, "GW") + } + + func test__country_identifier_for_TimorLeste() { + country = .TimorLeste + XCTAssertEqual(country.countryIdentifier, "TL") + } + + func test__country_identifier_for_SãoToméPríncipe() { + country = .SãoToméPríncipe + XCTAssertEqual(country.countryIdentifier, "ST") + } + + func test__country_identifier_for_Portugal() { + country = .Portugal + XCTAssertEqual(country.countryIdentifier, "PT") + } + + func test__country_identifier_for_Angola() { + country = .Angola + XCTAssertEqual(country.countryIdentifier, "AO") + } + + func test__country_identifier_for_MacauSarChina() { + country = .MacauSarChina + XCTAssertEqual(country.countryIdentifier, "MO") + } + + func test__country_identifier_for_Mozambique() { + country = .Mozambique + XCTAssertEqual(country.countryIdentifier, "MZ") + } + + func test__country_identifier_for_CapeVerde() { + country = .CapeVerde + XCTAssertEqual(country.countryIdentifier, "CV") + } +} + +class PunjabiSpeakingCountryTests: XCTestCase { + + var country: PunjabiSpeakingCountry! + + func test__country_identifier_for_Pakistan() { + country = .Pakistan + XCTAssertEqual(country.countryIdentifier, "PK") + } + + func test__country_identifier_for_India() { + country = .India + XCTAssertEqual(country.countryIdentifier, "IN") + } +} + +class QuechuaSpeakingCountryTests: XCTestCase { + + var country: QuechuaSpeakingCountry! + + func test__country_identifier_for_Bolivia() { + country = .Bolivia + XCTAssertEqual(country.countryIdentifier, "BO") + } + + func test__country_identifier_for_Ecuador() { + country = .Ecuador + XCTAssertEqual(country.countryIdentifier, "EC") + } + + func test__country_identifier_for_Peru() { + country = .Peru + XCTAssertEqual(country.countryIdentifier, "PE") + } +} + +class RomanianSpeakingCountryTests: XCTestCase { + + var country: RomanianSpeakingCountry! + + func test__country_identifier_for_Romania() { + country = .Romania + XCTAssertEqual(country.countryIdentifier, "RO") + } + + func test__country_identifier_for_Moldova() { + country = .Moldova + XCTAssertEqual(country.countryIdentifier, "MD") + } +} + +class RussianSpeakingCountryTests: XCTestCase { + + var country: RussianSpeakingCountry! + + func test__country_identifier_for_Kyrgyzstan() { + country = .Kyrgyzstan + XCTAssertEqual(country.countryIdentifier, "KG") + } + + func test__country_identifier_for_Belarus() { + country = .Belarus + XCTAssertEqual(country.countryIdentifier, "BY") + } + + func test__country_identifier_for_Russia() { + country = .Russia + XCTAssertEqual(country.countryIdentifier, "RU") + } + + func test__country_identifier_for_Ukraine() { + country = .Ukraine + XCTAssertEqual(country.countryIdentifier, "UA") + } + + func test__country_identifier_for_Moldova() { + country = .Moldova + XCTAssertEqual(country.countryIdentifier, "MD") + } + + func test__country_identifier_for_Kazakhstan() { + country = .Kazakhstan + XCTAssertEqual(country.countryIdentifier, "KZ") + } +} + +class SerbianSpeakingCountryTests: XCTestCase { + + var country: SerbianSpeakingCountry! + + func test__country_identifier_for_Montenegro() { + country = .Montenegro + XCTAssertEqual(country.countryIdentifier, "ME") + } + + func test__country_identifier_for_BosniaHerzegovina() { + country = .BosniaHerzegovina + XCTAssertEqual(country.countryIdentifier, "BA") + } + + func test__country_identifier_for_Serbia() { + country = .Serbia + XCTAssertEqual(country.countryIdentifier, "RS") + } + + func test__country_identifier_for_Kosovo() { + country = .Kosovo + XCTAssertEqual(country.countryIdentifier, "XK") + } +} + +class SomaliSpeakingCountryTests: XCTestCase { + + var country: SomaliSpeakingCountry! + + func test__country_identifier_for_Kenya() { + country = .Kenya + XCTAssertEqual(country.countryIdentifier, "KE") + } + + func test__country_identifier_for_Somalia() { + country = .Somalia + XCTAssertEqual(country.countryIdentifier, "SO") + } + + func test__country_identifier_for_Ethiopia() { + country = .Ethiopia + XCTAssertEqual(country.countryIdentifier, "ET") + } + + func test__country_identifier_for_Djibouti() { + country = .Djibouti + XCTAssertEqual(country.countryIdentifier, "DJ") + } +} + +class SpanishSpeakingCountryTests: XCTestCase { + + var country: SpanishSpeakingCountry! + + func test__country_identifier_for_Bolivia() { + country = .Bolivia + XCTAssertEqual(country.countryIdentifier, "BO") + } + + func test__country_identifier_for_Peru() { + country = .Peru + XCTAssertEqual(country.countryIdentifier, "PE") + } + + func test__country_identifier_for_Panama() { + country = .Panama + XCTAssertEqual(country.countryIdentifier, "PA") + } + + func test__country_identifier_for_Venezuela() { + country = .Venezuela + XCTAssertEqual(country.countryIdentifier, "VE") + } + + func test__country_identifier_for_Philippines() { + country = .Philippines + XCTAssertEqual(country.countryIdentifier, "PH") + } + + func test__country_identifier_for_Spain() { + country = .Spain + XCTAssertEqual(country.countryIdentifier, "ES") + } + + func test__country_identifier_for_LatinAmerica() { + country = .LatinAmerica + XCTAssertEqual(country.countryIdentifier, "419") + } + + func test__country_identifier_for_Paraguay() { + country = .Paraguay + XCTAssertEqual(country.countryIdentifier, "PY") + } + + func test__country_identifier_for_Colombia() { + country = .Colombia + XCTAssertEqual(country.countryIdentifier, "CO") + } + + func test__country_identifier_for_Nicaragua() { + country = .Nicaragua + XCTAssertEqual(country.countryIdentifier, "NI") + } + + func test__country_identifier_for_Chile() { + country = .Chile + XCTAssertEqual(country.countryIdentifier, "CL") + } + + func test__country_identifier_for_CanaryIslands() { + country = .CanaryIslands + XCTAssertEqual(country.countryIdentifier, "IC") + } + + func test__country_identifier_for_PuertoRico() { + country = .PuertoRico + XCTAssertEqual(country.countryIdentifier, "PR") + } + + func test__country_identifier_for_Honduras() { + country = .Honduras + XCTAssertEqual(country.countryIdentifier, "HN") + } + + func test__country_identifier_for_Mexico() { + country = .Mexico + XCTAssertEqual(country.countryIdentifier, "MX") + } + + func test__country_identifier_for_Uruguay() { + country = .Uruguay + XCTAssertEqual(country.countryIdentifier, "UY") + } + + func test__country_identifier_for_CeutaMelilla() { + country = .CeutaMelilla + XCTAssertEqual(country.countryIdentifier, "EA") + } + + func test__country_identifier_for_UnitedStates() { + country = .UnitedStates + XCTAssertEqual(country.countryIdentifier, "US") + } + + func test__country_identifier_for_ElSalvador() { + country = .ElSalvador + XCTAssertEqual(country.countryIdentifier, "SV") + } + + func test__country_identifier_for_Argentina() { + country = .Argentina + XCTAssertEqual(country.countryIdentifier, "AR") + } + + func test__country_identifier_for_Ecuador() { + country = .Ecuador + XCTAssertEqual(country.countryIdentifier, "EC") + } + + func test__country_identifier_for_EquatorialGuinea() { + country = .EquatorialGuinea + XCTAssertEqual(country.countryIdentifier, "GQ") + } + + func test__country_identifier_for_Guatemala() { + country = .Guatemala + XCTAssertEqual(country.countryIdentifier, "GT") + } + + func test__country_identifier_for_Cuba() { + country = .Cuba + XCTAssertEqual(country.countryIdentifier, "CU") + } + + func test__country_identifier_for_DominicanRepublic() { + country = .DominicanRepublic + XCTAssertEqual(country.countryIdentifier, "DO") + } + + func test__country_identifier_for_CostaRica() { + country = .CostaRica + XCTAssertEqual(country.countryIdentifier, "CR") + } +} + +class SwahiliSpeakingCountryTests: XCTestCase { + + var country: SwahiliSpeakingCountry! + + func test__country_identifier_for_CongoKinshasa() { + country = .CongoKinshasa + XCTAssertEqual(country.countryIdentifier, "CD") + } + + func test__country_identifier_for_Tanzania() { + country = .Tanzania + XCTAssertEqual(country.countryIdentifier, "TZ") + } + + func test__country_identifier_for_Kenya() { + country = .Kenya + XCTAssertEqual(country.countryIdentifier, "KE") + } + + func test__country_identifier_for_Uganda() { + country = .Uganda + XCTAssertEqual(country.countryIdentifier, "UG") + } +} + +class SwedishSpeakingCountryTests: XCTestCase { + + var country: SwedishSpeakingCountry! + + func test__country_identifier_for_Sweden() { + country = .Sweden + XCTAssertEqual(country.countryIdentifier, "SE") + } + + func test__country_identifier_for_ÅlandIslands() { + country = .ÅlandIslands + XCTAssertEqual(country.countryIdentifier, "AX") + } + + func test__country_identifier_for_Finland() { + country = .Finland + XCTAssertEqual(country.countryIdentifier, "FI") + } +} + +class SwissGermanSpeakingCountryTests: XCTestCase { + + var country: SwissGermanSpeakingCountry! + + func test__country_identifier_for_Switzerland() { + country = .Switzerland + XCTAssertEqual(country.countryIdentifier, "CH") + } + + func test__country_identifier_for_France() { + country = .France + XCTAssertEqual(country.countryIdentifier, "FR") + } + + func test__country_identifier_for_Liechtenstein() { + country = .Liechtenstein + XCTAssertEqual(country.countryIdentifier, "LI") + } +} + +class TamilSpeakingCountryTests: XCTestCase { + + var country: TamilSpeakingCountry! + + func test__country_identifier_for_India() { + country = .India + XCTAssertEqual(country.countryIdentifier, "IN") + } + + func test__country_identifier_for_Singapore() { + country = .Singapore + XCTAssertEqual(country.countryIdentifier, "SG") + } + + func test__country_identifier_for_Malaysia() { + country = .Malaysia + XCTAssertEqual(country.countryIdentifier, "MY") + } + + func test__country_identifier_for_SriLanka() { + country = .SriLanka + XCTAssertEqual(country.countryIdentifier, "LK") + } +} + +class TesoSpeakingCountryTests: XCTestCase { + + var country: TesoSpeakingCountry! + + func test__country_identifier_for_Kenya() { + country = .Kenya + XCTAssertEqual(country.countryIdentifier, "KE") + } + + func test__country_identifier_for_Uganda() { + country = .Uganda + XCTAssertEqual(country.countryIdentifier, "UG") + } +} + +class TibetanSpeakingCountryTests: XCTestCase { + + var country: TibetanSpeakingCountry! + + func test__country_identifier_for_India() { + country = .India + XCTAssertEqual(country.countryIdentifier, "IN") + } + + func test__country_identifier_for_China() { + country = .China + XCTAssertEqual(country.countryIdentifier, "CN") + } +} + +class TigrinyaSpeakingCountryTests: XCTestCase { + + var country: TigrinyaSpeakingCountry! + + func test__country_identifier_for_Ethiopia() { + country = .Ethiopia + XCTAssertEqual(country.countryIdentifier, "ET") + } + + func test__country_identifier_for_Eritrea() { + country = .Eritrea + XCTAssertEqual(country.countryIdentifier, "ER") + } +} + +class TurkishSpeakingCountryTests: XCTestCase { + + var country: TurkishSpeakingCountry! + + func test__country_identifier_for_Cyprus() { + country = .Cyprus + XCTAssertEqual(country.countryIdentifier, "CY") + } + + func test__country_identifier_for_Turkey() { + country = .Turkey + XCTAssertEqual(country.countryIdentifier, "TR") + } +} + +class UrduSpeakingCountryTests: XCTestCase { + + var country: UrduSpeakingCountry! + + func test__country_identifier_for_Pakistan() { + country = .Pakistan + XCTAssertEqual(country.countryIdentifier, "PK") + } + + func test__country_identifier_for_India() { + country = .India + XCTAssertEqual(country.countryIdentifier, "IN") + } +} + +class UzbekSpeakingCountryTests: XCTestCase { + + var country: UzbekSpeakingCountry! + + func test__country_identifier_for_Uzbekistan() { + country = .Uzbekistan + XCTAssertEqual(country.countryIdentifier, "UZ") + } + + func test__country_identifier_for_Afghanistan() { + country = .Afghanistan + XCTAssertEqual(country.countryIdentifier, "AF") + } +} + +class YorubaSpeakingCountryTests: XCTestCase { + + var country: YorubaSpeakingCountry! + + func test__country_identifier_for_Benin() { + country = .Benin + XCTAssertEqual(country.countryIdentifier, "BJ") + } + + func test__country_identifier_for_Nigeria() { + country = .Nigeria + XCTAssertEqual(country.countryIdentifier, "NG") + } +} From 28fd425253a02e8c74502b91ac49a833eef55132 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 00:17:19 +0000 Subject: [PATCH 08/24] [MNY-24]: Few tweaks to generator --- Supporting Files/Generate.swift | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Supporting Files/Generate.swift b/Supporting Files/Generate.swift index 06abe80..6510337 100755 --- a/Supporting Files/Generate.swift +++ b/Supporting Files/Generate.swift @@ -269,12 +269,6 @@ func createLocale(line: Writer) { line("") line("public enum Locale {") - // Write a static constant for all - // let caseNames = info.languages.map { ".\($0.name)" } - // let joinedCaseNames = caseNames.joinWithSeparator(", ") - // line("") - // line(" public static let all: [Locale] = [ \(joinedCaseNames) ]") - line("") for language in info.languages.sort() { if language.countryIds.count > 1 { @@ -285,6 +279,9 @@ func createLocale(line: Writer) { } } + // Write a static constant for all + + line("}") // End of enum } @@ -379,7 +376,7 @@ func createTestForCountryIentifierFromCountryCaseName(line: Writer, country: Cou func createUnitTestClassForLanguageSpeakingCountry(line: Writer, language: Language) { let name = language.languageSpeakingCountryEnumName createXCTestCaseNamed(line, className: name) { line in - line("") + line("") line(" var country: \(name)!") for country in language.countryIds.flatMap({ info.countriesById[$0] }) { createTestForCountryIentifierFromCountryCaseName(line, country: country) From 6c9b2913f877c92248be9781595b736392085234 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 11:09:32 +0000 Subject: [PATCH 09/24] [MNY-24]: Adds tests for autogenerated test Locale enum --- Supporting Files/Generate.swift | 58 +- Tests/Shared/AutogeneratedTests.swift | 2995 +++++++++++++++++++++++++ 2 files changed, 3043 insertions(+), 10 deletions(-) diff --git a/Supporting Files/Generate.swift b/Supporting Files/Generate.swift index 6510337..8dc3624 100755 --- a/Supporting Files/Generate.swift +++ b/Supporting Files/Generate.swift @@ -279,9 +279,6 @@ func createLocale(line: Writer) { } } - // Write a static constant for all - - line("}") // End of enum } @@ -365,7 +362,7 @@ func createXCTestCaseNamed(line: Writer, className: String, content: Generator) line("}") } -func createTestForCountryIentifierFromCountryCaseName(line: Writer, country: Country) { +func createTestForCountryIdentifierFromCountryCaseName(line: Writer, country: Country) { line("") line(" func test__country_identifier_for_\(country.name)() {") line(" country = .\(country.name)") @@ -373,25 +370,66 @@ func createTestForCountryIentifierFromCountryCaseName(line: Writer, country: Cou line(" }") } -func createUnitTestClassForLanguageSpeakingCountry(line: Writer, language: Language) { +func createUnitTestsForLanguageSpeakingCountry(line: Writer, language: Language) { let name = language.languageSpeakingCountryEnumName createXCTestCaseNamed(line, className: name) { line in line("") line(" var country: \(name)!") for country in language.countryIds.flatMap({ info.countriesById[$0] }) { - createTestForCountryIentifierFromCountryCaseName(line, country: country) + createTestForCountryIdentifierFromCountryCaseName(line, country: country) } } } -func createUnitTestClassesForLanguageSpeakingCountries(line: Writer) { +func createUnitTestsForLanguageSpeakingCountries(line: Writer) { line("") line("// MARK: - Country Types Tests") for language in info.languagesWithMoreThanOneCountry { - createUnitTestClassForLanguageSpeakingCountry(line, language: language) + createUnitTestsForLanguageSpeakingCountry(line, language: language) } } +func createTestForLanguageIdentifier(line: Writer, language: Language, country: Country? = .None) { + line("") + if let country = country { + line(" func test__language_identifier_for_\(language.name)_\(country.name)() {") + line(" locale = .\(language.name)(\(country.caseNameValue))") + line(" XCTAssertEqual(locale.languageIdentifier, \"\(language.id)\")") + line(" XCTAssertEqual(locale.localeIdentifier, \"\(language.id)_\(country.id)\")") + line(" }") + } + else { + line(" func test__language_identifier_for_\(language.name)() {") + line(" locale = .\(language.name)") + line(" XCTAssertEqual(locale.languageIdentifier, \"\(language.id)\")") + line(" XCTAssertEqual(locale.localeIdentifier, \"\(language.id)\")") + line(" }") + } +} + +func createUnitTestsForLocaleWithLanguage(line: Writer, language: Language) { + if language.countryIds.count < 2 { + createTestForLanguageIdentifier(line, language: language) + } + else { + for country in language.countryIds.flatMap({ info.countriesById[$0] }) { + createTestForLanguageIdentifier(line, language: language, country: country) + } + } +} + +func createUnitTestsForLocale(line: Writer) { + line("") + line("// MARK: - Locale Tests") + createXCTestCaseNamed(line, className: "Locale") { line in + line("") + line(" var locale: Locale!") + + for language in info.languages { + createUnitTestsForLocaleWithLanguage(line, language: language) + } + } +} // MARK: - Generators @@ -449,9 +487,9 @@ func generateUnitTests(outputPath: String) { createUnitTestImports(writeLine) - createUnitTestClassesForLanguageSpeakingCountries(writeLine) - + createUnitTestsForLanguageSpeakingCountries(writeLine) + createUnitTestsForLocale(writeLine) } // MARK: - Main() diff --git a/Tests/Shared/AutogeneratedTests.swift b/Tests/Shared/AutogeneratedTests.swift index 12e9888..c2285f3 100644 --- a/Tests/Shared/AutogeneratedTests.swift +++ b/Tests/Shared/AutogeneratedTests.swift @@ -2050,3 +2050,2998 @@ class YorubaSpeakingCountryTests: XCTestCase { XCTAssertEqual(country.countryIdentifier, "NG") } } + +// MARK: - Locale Tests + +class LocaleTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_English_Singapore() { + locale = .English(.Singapore) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SG") + } + + func test__language_identifier_for_English_Netherlands() { + locale = .English(.Netherlands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_NL") + } + + func test__language_identifier_for_English_Malaysia() { + locale = .English(.Malaysia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_MY") + } + + func test__language_identifier_for_English_PapuaNewGuinea() { + locale = .English(.PapuaNewGuinea) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PG") + } + + func test__language_identifier_for_English_Barbados() { + locale = .English(.Barbados) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_BB") + } + + func test__language_identifier_for_English_HongKongSarChina() { + locale = .English(.HongKongSarChina) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_HK") + } + + func test__language_identifier_for_English_Eritrea() { + locale = .English(.Eritrea) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_ER") + } + + func test__language_identifier_for_English_IsleOfMan() { + locale = .English(.IsleOfMan) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_IM") + } + + func test__language_identifier_for_English_Lesotho() { + locale = .English(.Lesotho) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_LS") + } + + func test__language_identifier_for_English_Palau() { + locale = .English(.Palau) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PW") + } + + func test__language_identifier_for_English_SintMaarten() { + locale = .English(.SintMaarten) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SX") + } + + func test__language_identifier_for_English_Belgium() { + locale = .English(.Belgium) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_BE") + } + + func test__language_identifier_for_English_BosniaHerzegovina() { + locale = .English(.BosniaHerzegovina) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_BA") + } + + func test__language_identifier_for_English_Cameroon() { + locale = .English(.Cameroon) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_CM") + } + + func test__language_identifier_for_English_Gibraltar() { + locale = .English(.Gibraltar) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GI") + } + + func test__language_identifier_for_English_Montenegro() { + locale = .English(.Montenegro) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_ME") + } + + func test__language_identifier_for_English_Madagascar() { + locale = .English(.Madagascar) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_MG") + } + + func test__language_identifier_for_English_CzechRepublic() { + locale = .English(.CzechRepublic) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_CZ") + } + + func test__language_identifier_for_English_MarshallIslands() { + locale = .English(.MarshallIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_MH") + } + + func test__language_identifier_for_English_Swaziland() { + locale = .English(.Swaziland) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SZ") + } + + func test__language_identifier_for_English_Austria() { + locale = .English(.Austria) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_AT") + } + + func test__language_identifier_for_English_Romania() { + locale = .English(.Romania) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_RO") + } + + func test__language_identifier_for_English_Malawi() { + locale = .English(.Malawi) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_MW") + } + + func test__language_identifier_for_English_Jersey() { + locale = .English(.Jersey) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_JE") + } + + func test__language_identifier_for_English_Germany() { + locale = .English(.Germany) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_DE") + } + + func test__language_identifier_for_English_Kiribati() { + locale = .English(.Kiribati) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_KI") + } + + func test__language_identifier_for_English_Norway() { + locale = .English(.Norway) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_NO") + } + + func test__language_identifier_for_English_MacauSarChina() { + locale = .English(.MacauSarChina) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_MO") + } + + func test__language_identifier_for_English_Jamaica() { + locale = .English(.Jamaica) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_JM") + } + + func test__language_identifier_for_English_ChristmasIsland() { + locale = .English(.ChristmasIsland) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_CX") + } + + func test__language_identifier_for_English_Montserrat() { + locale = .English(.Montserrat) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_MS") + } + + func test__language_identifier_for_English_SolomonIslands() { + locale = .English(.SolomonIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SB") + } + + func test__language_identifier_for_English_USOutlyingIslands() { + locale = .English(.USOutlyingIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_UM") + } + + func test__language_identifier_for_English_Seychelles() { + locale = .English(.Seychelles) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SC") + } + + func test__language_identifier_for_English_CaymanIslands() { + locale = .English(.CaymanIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_KY") + } + + func test__language_identifier_for_English_Finland() { + locale = .English(.Finland) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_FI") + } + + func test__language_identifier_for_English_AntiguaBarbuda() { + locale = .English(.AntiguaBarbuda) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_AG") + } + + func test__language_identifier_for_English_Anguilla() { + locale = .English(.Anguilla) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_AI") + } + + func test__language_identifier_for_English_Mauritius() { + locale = .English(.Mauritius) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_MU") + } + + func test__language_identifier_for_English_Tonga() { + locale = .English(.Tonga) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_TO") + } + + func test__language_identifier_for_English_Italy() { + locale = .English(.Italy) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_IT") + } + + func test__language_identifier_for_English_Nigeria() { + locale = .English(.Nigeria) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_NG") + } + + func test__language_identifier_for_English_Australia() { + locale = .English(.Australia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_AU") + } + + func test__language_identifier_for_English_SierraLeone() { + locale = .English(.SierraLeone) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SL") + } + + func test__language_identifier_for_English_BritishVirginIslands() { + locale = .English(.BritishVirginIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_VG") + } + + func test__language_identifier_for_English_Guernsey() { + locale = .English(.Guernsey) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GG") + } + + func test__language_identifier_for_English_SouthSudan() { + locale = .English(.SouthSudan) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SS") + } + + func test__language_identifier_for_English_Denmark() { + locale = .English(.Denmark) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_DK") + } + + func test__language_identifier_for_English_Guam() { + locale = .English(.Guam) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GU") + } + + func test__language_identifier_for_English_Andorra() { + locale = .English(.Andorra) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_AD") + } + + func test__language_identifier_for_English_Cyprus() { + locale = .English(.Cyprus) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_CY") + } + + func test__language_identifier_for_English_StVincentGrenadines() { + locale = .English(.StVincentGrenadines) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_VC") + } + + func test__language_identifier_for_English_UnitedStates() { + locale = .English(.UnitedStates) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_US") + } + + func test__language_identifier_for_English_Liberia() { + locale = .English(.Liberia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_LR") + } + + func test__language_identifier_for_English_Uganda() { + locale = .English(.Uganda) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_UG") + } + + func test__language_identifier_for_English_Slovakia() { + locale = .English(.Slovakia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SK") + } + + func test__language_identifier_for_English_Bermuda() { + locale = .English(.Bermuda) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_BM") + } + + func test__language_identifier_for_English_PitcairnIslands() { + locale = .English(.PitcairnIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PN") + } + + func test__language_identifier_for_English_Slovenia() { + locale = .English(.Slovenia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SI") + } + + func test__language_identifier_for_English_Switzerland() { + locale = .English(.Switzerland) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_CH") + } + + func test__language_identifier_for_English_Lithuania() { + locale = .English(.Lithuania) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_LT") + } + + func test__language_identifier_for_English_Tuvalu() { + locale = .English(.Tuvalu) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_TV") + } + + func test__language_identifier_for_English_World() { + locale = .English(.World) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_001") + } + + func test__language_identifier_for_English_TurksCaicosIslands() { + locale = .English(.TurksCaicosIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_TC") + } + + func test__language_identifier_for_English_Vanuatu() { + locale = .English(.Vanuatu) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_VU") + } + + func test__language_identifier_for_English_NewZealand() { + locale = .English(.NewZealand) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_NZ") + } + + func test__language_identifier_for_English_Latvia() { + locale = .English(.Latvia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_LV") + } + + func test__language_identifier_for_English_Ireland() { + locale = .English(.Ireland) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_IE") + } + + func test__language_identifier_for_English_Guyana() { + locale = .English(.Guyana) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GY") + } + + func test__language_identifier_for_English_BritishIndianOceanTerritory() { + locale = .English(.BritishIndianOceanTerritory) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_IO") + } + + func test__language_identifier_for_English_Philippines() { + locale = .English(.Philippines) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PH") + } + + func test__language_identifier_for_English_Niue() { + locale = .English(.Niue) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_NU") + } + + func test__language_identifier_for_English_Gambia() { + locale = .English(.Gambia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GM") + } + + func test__language_identifier_for_English_Spain() { + locale = .English(.Spain) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_ES") + } + + func test__language_identifier_for_English_NorthernMarianaIslands() { + locale = .English(.NorthernMarianaIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_MP") + } + + func test__language_identifier_for_English_Estonia() { + locale = .English(.Estonia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_EE") + } + + func test__language_identifier_for_English_Greece() { + locale = .English(.Greece) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GR") + } + + func test__language_identifier_for_English_Canada() { + locale = .English(.Canada) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_CA") + } + + func test__language_identifier_for_English_Sudan() { + locale = .English(.Sudan) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SD") + } + + func test__language_identifier_for_English_StLucia() { + locale = .English(.StLucia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_LC") + } + + func test__language_identifier_for_English_Croatia() { + locale = .English(.Croatia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_HR") + } + + func test__language_identifier_for_English_NorfolkIsland() { + locale = .English(.NorfolkIsland) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_NF") + } + + func test__language_identifier_for_English_UnitedKingdom() { + locale = .English(.UnitedKingdom) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GB") + } + + func test__language_identifier_for_English_Dominica() { + locale = .English(.Dominica) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_DM") + } + + func test__language_identifier_for_English_Europe() { + locale = .English(.Europe) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_150") + } + + func test__language_identifier_for_English_Portugal() { + locale = .English(.Portugal) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PT") + } + + func test__language_identifier_for_English_Turkey() { + locale = .English(.Turkey) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_TR") + } + + func test__language_identifier_for_English_Malta() { + locale = .English(.Malta) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_MT") + } + + func test__language_identifier_for_English_Albania() { + locale = .English(.Albania) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_AL") + } + + func test__language_identifier_for_English_TrinidadTobago() { + locale = .English(.TrinidadTobago) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_TT") + } + + func test__language_identifier_for_English_Samoa() { + locale = .English(.Samoa) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_WS") + } + + func test__language_identifier_for_English_Israel() { + locale = .English(.Israel) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_IL") + } + + func test__language_identifier_for_English_DiegoGarcia() { + locale = .English(.DiegoGarcia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_DG") + } + + func test__language_identifier_for_English_Rwanda() { + locale = .English(.Rwanda) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_RW") + } + + func test__language_identifier_for_English_Fiji() { + locale = .English(.Fiji) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_FJ") + } + + func test__language_identifier_for_English_Kenya() { + locale = .English(.Kenya) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_KE") + } + + func test__language_identifier_for_English_Russia() { + locale = .English(.Russia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_RU") + } + + func test__language_identifier_for_English_Bahamas() { + locale = .English(.Bahamas) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_BS") + } + + func test__language_identifier_for_English_Luxembourg() { + locale = .English(.Luxembourg) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_LU") + } + + func test__language_identifier_for_English_Hungary() { + locale = .English(.Hungary) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_HU") + } + + func test__language_identifier_for_English_Tanzania() { + locale = .English(.Tanzania) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_TZ") + } + + func test__language_identifier_for_English_Namibia() { + locale = .English(.Namibia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_NA") + } + + func test__language_identifier_for_English_Zimbabwe() { + locale = .English(.Zimbabwe) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_ZW") + } + + func test__language_identifier_for_English_SouthAfrica() { + locale = .English(.SouthAfrica) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_ZA") + } + + func test__language_identifier_for_English_Grenada() { + locale = .English(.Grenada) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GD") + } + + func test__language_identifier_for_English_Belize() { + locale = .English(.Belize) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_BZ") + } + + func test__language_identifier_for_English_Botswana() { + locale = .English(.Botswana) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_BW") + } + + func test__language_identifier_for_English_PuertoRico() { + locale = .English(.PuertoRico) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PR") + } + + func test__language_identifier_for_English_USVirginIslands() { + locale = .English(.USVirginIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_VI") + } + + func test__language_identifier_for_English_Sweden() { + locale = .English(.Sweden) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SE") + } + + func test__language_identifier_for_English_FalklandIslands() { + locale = .English(.FalklandIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_FK") + } + + func test__language_identifier_for_English_CocosKeelingIslands() { + locale = .English(.CocosKeelingIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_CC") + } + + func test__language_identifier_for_English_France() { + locale = .English(.France) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_FR") + } + + func test__language_identifier_for_English_StKittsNevis() { + locale = .English(.StKittsNevis) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_KN") + } + + func test__language_identifier_for_English_Pakistan() { + locale = .English(.Pakistan) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PK") + } + + func test__language_identifier_for_English_Zambia() { + locale = .English(.Zambia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_ZM") + } + + func test__language_identifier_for_English_Poland() { + locale = .English(.Poland) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PL") + } + + func test__language_identifier_for_English_Tokelau() { + locale = .English(.Tokelau) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_TK") + } + + func test__language_identifier_for_English_CookIslands() { + locale = .English(.CookIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_CK") + } + + func test__language_identifier_for_English_StHelena() { + locale = .English(.StHelena) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SH") + } + + func test__language_identifier_for_English_Nauru() { + locale = .English(.Nauru) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_NR") + } + + func test__language_identifier_for_English_Ghana() { + locale = .English(.Ghana) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GH") + } + + func test__language_identifier_for_English_Iceland() { + locale = .English(.Iceland) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_IS") + } + + func test__language_identifier_for_English_Micronesia() { + locale = .English(.Micronesia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_FM") + } + + func test__language_identifier_for_English_AmericanSamoa() { + locale = .English(.AmericanSamoa) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_AS") + } + + func test__language_identifier_for_English_India() { + locale = .English(.India) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_IN") + } + + func test__language_identifier_for_French_Rwanda() { + locale = .French(.Rwanda) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_RW") + } + + func test__language_identifier_for_French_Seychelles() { + locale = .French(.Seychelles) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_SC") + } + + func test__language_identifier_for_French_Vanuatu() { + locale = .French(.Vanuatu) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_VU") + } + + func test__language_identifier_for_French_Mauritius() { + locale = .French(.Mauritius) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MU") + } + + func test__language_identifier_for_French_Chad() { + locale = .French(.Chad) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_TD") + } + + func test__language_identifier_for_French_Djibouti() { + locale = .French(.Djibouti) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_DJ") + } + + func test__language_identifier_for_French_CongoBrazzaville() { + locale = .French(.CongoBrazzaville) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CG") + } + + func test__language_identifier_for_French_Monaco() { + locale = .French(.Monaco) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MC") + } + + func test__language_identifier_for_French_Mauritania() { + locale = .French(.Mauritania) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MR") + } + + func test__language_identifier_for_French_Luxembourg() { + locale = .French(.Luxembourg) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_LU") + } + + func test__language_identifier_for_French_Niger() { + locale = .French(.Niger) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_NE") + } + + func test__language_identifier_for_French_StMartin() { + locale = .French(.StMartin) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MF") + } + + func test__language_identifier_for_French_Mayotte() { + locale = .French(.Mayotte) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_YT") + } + + func test__language_identifier_for_French_Benin() { + locale = .French(.Benin) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_BJ") + } + + func test__language_identifier_for_French_Canada() { + locale = .French(.Canada) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CA") + } + + func test__language_identifier_for_French_FrenchGuiana() { + locale = .French(.FrenchGuiana) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_GF") + } + + func test__language_identifier_for_French_NewCaledonia() { + locale = .French(.NewCaledonia) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_NC") + } + + func test__language_identifier_for_French_Haiti() { + locale = .French(.Haiti) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_HT") + } + + func test__language_identifier_for_French_Senegal() { + locale = .French(.Senegal) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_SN") + } + + func test__language_identifier_for_French_CentralAfricanRepublic() { + locale = .French(.CentralAfricanRepublic) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CF") + } + + func test__language_identifier_for_French_France() { + locale = .French(.France) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_FR") + } + + func test__language_identifier_for_French_Belgium() { + locale = .French(.Belgium) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_BE") + } + + func test__language_identifier_for_French_StPierreMiquelon() { + locale = .French(.StPierreMiquelon) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_PM") + } + + func test__language_identifier_for_French_Togo() { + locale = .French(.Togo) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_TG") + } + + func test__language_identifier_for_French_FrenchPolynesia() { + locale = .French(.FrenchPolynesia) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_PF") + } + + func test__language_identifier_for_French_Morocco() { + locale = .French(.Morocco) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MA") + } + + func test__language_identifier_for_French_Cameroon() { + locale = .French(.Cameroon) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CM") + } + + func test__language_identifier_for_French_Burundi() { + locale = .French(.Burundi) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_BI") + } + + func test__language_identifier_for_French_StBarthélemy() { + locale = .French(.StBarthélemy) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_BL") + } + + func test__language_identifier_for_French_Madagascar() { + locale = .French(.Madagascar) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MG") + } + + func test__language_identifier_for_French_Algeria() { + locale = .French(.Algeria) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_DZ") + } + + func test__language_identifier_for_French_Guinea() { + locale = .French(.Guinea) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_GN") + } + + func test__language_identifier_for_French_BurkinaFaso() { + locale = .French(.BurkinaFaso) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_BF") + } + + func test__language_identifier_for_French_Guadeloupe() { + locale = .French(.Guadeloupe) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_GP") + } + + func test__language_identifier_for_French_CongoKinshasa() { + locale = .French(.CongoKinshasa) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CD") + } + + func test__language_identifier_for_French_Réunion() { + locale = .French(.Réunion) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_RE") + } + + func test__language_identifier_for_French_Mali() { + locale = .French(.Mali) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_ML") + } + + func test__language_identifier_for_French_Martinique() { + locale = .French(.Martinique) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MQ") + } + + func test__language_identifier_for_French_WallisFutuna() { + locale = .French(.WallisFutuna) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_WF") + } + + func test__language_identifier_for_French_EquatorialGuinea() { + locale = .French(.EquatorialGuinea) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_GQ") + } + + func test__language_identifier_for_French_Switzerland() { + locale = .French(.Switzerland) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CH") + } + + func test__language_identifier_for_French_CôteDivoire() { + locale = .French(.CôteDivoire) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CI") + } + + func test__language_identifier_for_French_Comoros() { + locale = .French(.Comoros) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_KM") + } + + func test__language_identifier_for_French_Syria() { + locale = .French(.Syria) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_SY") + } + + func test__language_identifier_for_French_Gabon() { + locale = .French(.Gabon) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_GA") + } + + func test__language_identifier_for_French_Tunisia() { + locale = .French(.Tunisia) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_TN") + } + + func test__language_identifier_for_Arabic_Somalia() { + locale = .Arabic(.Somalia) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_SO") + } + + func test__language_identifier_for_Arabic_Iraq() { + locale = .Arabic(.Iraq) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_IQ") + } + + func test__language_identifier_for_Arabic_Kuwait() { + locale = .Arabic(.Kuwait) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_KW") + } + + func test__language_identifier_for_Arabic_Chad() { + locale = .Arabic(.Chad) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_TD") + } + + func test__language_identifier_for_Arabic_Libya() { + locale = .Arabic(.Libya) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_LY") + } + + func test__language_identifier_for_Arabic_Egypt() { + locale = .Arabic(.Egypt) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_EG") + } + + func test__language_identifier_for_Arabic_WesternSahara() { + locale = .Arabic(.WesternSahara) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_EH") + } + + func test__language_identifier_for_Arabic_SaudiArabia() { + locale = .Arabic(.SaudiArabia) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_SA") + } + + func test__language_identifier_for_Arabic_Mauritania() { + locale = .Arabic(.Mauritania) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_MR") + } + + func test__language_identifier_for_Arabic_Djibouti() { + locale = .Arabic(.Djibouti) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_DJ") + } + + func test__language_identifier_for_Arabic_Eritrea() { + locale = .Arabic(.Eritrea) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_ER") + } + + func test__language_identifier_for_Arabic_Lebanon() { + locale = .Arabic(.Lebanon) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_LB") + } + + func test__language_identifier_for_Arabic_Oman() { + locale = .Arabic(.Oman) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_OM") + } + + func test__language_identifier_for_Arabic_PalestinianTerritories() { + locale = .Arabic(.PalestinianTerritories) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_PS") + } + + func test__language_identifier_for_Arabic_Sudan() { + locale = .Arabic(.Sudan) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_SD") + } + + func test__language_identifier_for_Arabic_SouthSudan() { + locale = .Arabic(.SouthSudan) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_SS") + } + + func test__language_identifier_for_Arabic_Algeria() { + locale = .Arabic(.Algeria) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_DZ") + } + + func test__language_identifier_for_Arabic_Morocco() { + locale = .Arabic(.Morocco) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_MA") + } + + func test__language_identifier_for_Arabic_Bahrain() { + locale = .Arabic(.Bahrain) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_BH") + } + + func test__language_identifier_for_Arabic_UnitedArabEmirates() { + locale = .Arabic(.UnitedArabEmirates) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_AE") + } + + func test__language_identifier_for_Arabic_Qatar() { + locale = .Arabic(.Qatar) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_QA") + } + + func test__language_identifier_for_Arabic_Comoros() { + locale = .Arabic(.Comoros) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_KM") + } + + func test__language_identifier_for_Arabic_Syria() { + locale = .Arabic(.Syria) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_SY") + } + + func test__language_identifier_for_Arabic_Yemen() { + locale = .Arabic(.Yemen) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_YE") + } + + func test__language_identifier_for_Arabic_Jordan() { + locale = .Arabic(.Jordan) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_JO") + } + + func test__language_identifier_for_Arabic_Tunisia() { + locale = .Arabic(.Tunisia) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_TN") + } + + func test__language_identifier_for_Arabic_Israel() { + locale = .Arabic(.Israel) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_IL") + } + + func test__language_identifier_for_Arabic_World() { + locale = .Arabic(.World) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_001") + } + + func test__language_identifier_for_Spanish_Bolivia() { + locale = .Spanish(.Bolivia) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_BO") + } + + func test__language_identifier_for_Spanish_Peru() { + locale = .Spanish(.Peru) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_PE") + } + + func test__language_identifier_for_Spanish_Panama() { + locale = .Spanish(.Panama) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_PA") + } + + func test__language_identifier_for_Spanish_Venezuela() { + locale = .Spanish(.Venezuela) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_VE") + } + + func test__language_identifier_for_Spanish_Philippines() { + locale = .Spanish(.Philippines) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_PH") + } + + func test__language_identifier_for_Spanish_Spain() { + locale = .Spanish(.Spain) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_ES") + } + + func test__language_identifier_for_Spanish_LatinAmerica() { + locale = .Spanish(.LatinAmerica) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_419") + } + + func test__language_identifier_for_Spanish_Paraguay() { + locale = .Spanish(.Paraguay) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_PY") + } + + func test__language_identifier_for_Spanish_Colombia() { + locale = .Spanish(.Colombia) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_CO") + } + + func test__language_identifier_for_Spanish_Nicaragua() { + locale = .Spanish(.Nicaragua) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_NI") + } + + func test__language_identifier_for_Spanish_Chile() { + locale = .Spanish(.Chile) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_CL") + } + + func test__language_identifier_for_Spanish_CanaryIslands() { + locale = .Spanish(.CanaryIslands) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_IC") + } + + func test__language_identifier_for_Spanish_PuertoRico() { + locale = .Spanish(.PuertoRico) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_PR") + } + + func test__language_identifier_for_Spanish_Honduras() { + locale = .Spanish(.Honduras) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_HN") + } + + func test__language_identifier_for_Spanish_Mexico() { + locale = .Spanish(.Mexico) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_MX") + } + + func test__language_identifier_for_Spanish_Uruguay() { + locale = .Spanish(.Uruguay) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_UY") + } + + func test__language_identifier_for_Spanish_CeutaMelilla() { + locale = .Spanish(.CeutaMelilla) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_EA") + } + + func test__language_identifier_for_Spanish_UnitedStates() { + locale = .Spanish(.UnitedStates) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_US") + } + + func test__language_identifier_for_Spanish_ElSalvador() { + locale = .Spanish(.ElSalvador) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_SV") + } + + func test__language_identifier_for_Spanish_Argentina() { + locale = .Spanish(.Argentina) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_AR") + } + + func test__language_identifier_for_Spanish_Ecuador() { + locale = .Spanish(.Ecuador) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_EC") + } + + func test__language_identifier_for_Spanish_EquatorialGuinea() { + locale = .Spanish(.EquatorialGuinea) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_GQ") + } + + func test__language_identifier_for_Spanish_Guatemala() { + locale = .Spanish(.Guatemala) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_GT") + } + + func test__language_identifier_for_Spanish_Cuba() { + locale = .Spanish(.Cuba) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_CU") + } + + func test__language_identifier_for_Spanish_DominicanRepublic() { + locale = .Spanish(.DominicanRepublic) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_DO") + } + + func test__language_identifier_for_Spanish_CostaRica() { + locale = .Spanish(.CostaRica) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_CR") + } + + func test__language_identifier_for_Portuguese_Brazil() { + locale = .Portuguese(.Brazil) + XCTAssertEqual(locale.languageIdentifier, "pt") + XCTAssertEqual(locale.localeIdentifier, "pt_BR") + } + + func test__language_identifier_for_Portuguese_GuineaBissau() { + locale = .Portuguese(.GuineaBissau) + XCTAssertEqual(locale.languageIdentifier, "pt") + XCTAssertEqual(locale.localeIdentifier, "pt_GW") + } + + func test__language_identifier_for_Portuguese_TimorLeste() { + locale = .Portuguese(.TimorLeste) + XCTAssertEqual(locale.languageIdentifier, "pt") + XCTAssertEqual(locale.localeIdentifier, "pt_TL") + } + + func test__language_identifier_for_Portuguese_SãoToméPríncipe() { + locale = .Portuguese(.SãoToméPríncipe) + XCTAssertEqual(locale.languageIdentifier, "pt") + XCTAssertEqual(locale.localeIdentifier, "pt_ST") + } + + func test__language_identifier_for_Portuguese_Portugal() { + locale = .Portuguese(.Portugal) + XCTAssertEqual(locale.languageIdentifier, "pt") + XCTAssertEqual(locale.localeIdentifier, "pt_PT") + } + + func test__language_identifier_for_Portuguese_Angola() { + locale = .Portuguese(.Angola) + XCTAssertEqual(locale.languageIdentifier, "pt") + XCTAssertEqual(locale.localeIdentifier, "pt_AO") + } + + func test__language_identifier_for_Portuguese_MacauSarChina() { + locale = .Portuguese(.MacauSarChina) + XCTAssertEqual(locale.languageIdentifier, "pt") + XCTAssertEqual(locale.localeIdentifier, "pt_MO") + } + + func test__language_identifier_for_Portuguese_Mozambique() { + locale = .Portuguese(.Mozambique) + XCTAssertEqual(locale.languageIdentifier, "pt") + XCTAssertEqual(locale.localeIdentifier, "pt_MZ") + } + + func test__language_identifier_for_Portuguese_CapeVerde() { + locale = .Portuguese(.CapeVerde) + XCTAssertEqual(locale.languageIdentifier, "pt") + XCTAssertEqual(locale.localeIdentifier, "pt_CV") + } + + func test__language_identifier_for_Dutch_Belgium() { + locale = .Dutch(.Belgium) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_BE") + } + + func test__language_identifier_for_Dutch_Curaçao() { + locale = .Dutch(.Curaçao) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_CW") + } + + func test__language_identifier_for_Dutch_Suriname() { + locale = .Dutch(.Suriname) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_SR") + } + + func test__language_identifier_for_Dutch_Netherlands() { + locale = .Dutch(.Netherlands) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_NL") + } + + func test__language_identifier_for_Dutch_SintMaarten() { + locale = .Dutch(.SintMaarten) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_SX") + } + + func test__language_identifier_for_Dutch_CaribbeanNetherlands() { + locale = .Dutch(.CaribbeanNetherlands) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_BQ") + } + + func test__language_identifier_for_Dutch_Aruba() { + locale = .Dutch(.Aruba) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_AW") + } + + func test__language_identifier_for_Russian_Kyrgyzstan() { + locale = .Russian(.Kyrgyzstan) + XCTAssertEqual(locale.languageIdentifier, "ru") + XCTAssertEqual(locale.localeIdentifier, "ru_KG") + } + + func test__language_identifier_for_Russian_Belarus() { + locale = .Russian(.Belarus) + XCTAssertEqual(locale.languageIdentifier, "ru") + XCTAssertEqual(locale.localeIdentifier, "ru_BY") + } + + func test__language_identifier_for_Russian_Russia() { + locale = .Russian(.Russia) + XCTAssertEqual(locale.languageIdentifier, "ru") + XCTAssertEqual(locale.localeIdentifier, "ru_RU") + } + + func test__language_identifier_for_Russian_Ukraine() { + locale = .Russian(.Ukraine) + XCTAssertEqual(locale.languageIdentifier, "ru") + XCTAssertEqual(locale.localeIdentifier, "ru_UA") + } + + func test__language_identifier_for_Russian_Moldova() { + locale = .Russian(.Moldova) + XCTAssertEqual(locale.languageIdentifier, "ru") + XCTAssertEqual(locale.localeIdentifier, "ru_MD") + } + + func test__language_identifier_for_Russian_Kazakhstan() { + locale = .Russian(.Kazakhstan) + XCTAssertEqual(locale.languageIdentifier, "ru") + XCTAssertEqual(locale.localeIdentifier, "ru_KZ") + } + + func test__language_identifier_for_German_Belgium() { + locale = .German(.Belgium) + XCTAssertEqual(locale.languageIdentifier, "de") + XCTAssertEqual(locale.localeIdentifier, "de_BE") + } + + func test__language_identifier_for_German_Austria() { + locale = .German(.Austria) + XCTAssertEqual(locale.languageIdentifier, "de") + XCTAssertEqual(locale.localeIdentifier, "de_AT") + } + + func test__language_identifier_for_German_Liechtenstein() { + locale = .German(.Liechtenstein) + XCTAssertEqual(locale.languageIdentifier, "de") + XCTAssertEqual(locale.localeIdentifier, "de_LI") + } + + func test__language_identifier_for_German_Luxembourg() { + locale = .German(.Luxembourg) + XCTAssertEqual(locale.languageIdentifier, "de") + XCTAssertEqual(locale.localeIdentifier, "de_LU") + } + + func test__language_identifier_for_German_Switzerland() { + locale = .German(.Switzerland) + XCTAssertEqual(locale.languageIdentifier, "de") + XCTAssertEqual(locale.localeIdentifier, "de_CH") + } + + func test__language_identifier_for_German_Germany() { + locale = .German(.Germany) + XCTAssertEqual(locale.languageIdentifier, "de") + XCTAssertEqual(locale.localeIdentifier, "de_DE") + } + + func test__language_identifier_for_Chinese_Taiwan() { + locale = .Chinese(.Taiwan) + XCTAssertEqual(locale.languageIdentifier, "zh") + XCTAssertEqual(locale.localeIdentifier, "zh_TW") + } + + func test__language_identifier_for_Chinese_HongKongSarChina() { + locale = .Chinese(.HongKongSarChina) + XCTAssertEqual(locale.languageIdentifier, "zh") + XCTAssertEqual(locale.localeIdentifier, "zh_HK") + } + + func test__language_identifier_for_Chinese_MacauSarChina() { + locale = .Chinese(.MacauSarChina) + XCTAssertEqual(locale.languageIdentifier, "zh") + XCTAssertEqual(locale.localeIdentifier, "zh_MO") + } + + func test__language_identifier_for_Chinese_Singapore() { + locale = .Chinese(.Singapore) + XCTAssertEqual(locale.languageIdentifier, "zh") + XCTAssertEqual(locale.localeIdentifier, "zh_SG") + } + + func test__language_identifier_for_Chinese_China() { + locale = .Chinese(.China) + XCTAssertEqual(locale.languageIdentifier, "zh") + XCTAssertEqual(locale.localeIdentifier, "zh_CN") + } + + func test__language_identifier_for_Fulah_Senegal() { + locale = .Fulah(.Senegal) + XCTAssertEqual(locale.languageIdentifier, "ff") + XCTAssertEqual(locale.localeIdentifier, "ff_SN") + } + + func test__language_identifier_for_Fulah_Cameroon() { + locale = .Fulah(.Cameroon) + XCTAssertEqual(locale.languageIdentifier, "ff") + XCTAssertEqual(locale.localeIdentifier, "ff_CM") + } + + func test__language_identifier_for_Fulah_Mauritania() { + locale = .Fulah(.Mauritania) + XCTAssertEqual(locale.languageIdentifier, "ff") + XCTAssertEqual(locale.localeIdentifier, "ff_MR") + } + + func test__language_identifier_for_Fulah_Guinea() { + locale = .Fulah(.Guinea) + XCTAssertEqual(locale.languageIdentifier, "ff") + XCTAssertEqual(locale.localeIdentifier, "ff_GN") + } + + func test__language_identifier_for_Catalan_Italy() { + locale = .Catalan(.Italy) + XCTAssertEqual(locale.languageIdentifier, "ca") + XCTAssertEqual(locale.localeIdentifier, "ca_IT") + } + + func test__language_identifier_for_Catalan_France() { + locale = .Catalan(.France) + XCTAssertEqual(locale.languageIdentifier, "ca") + XCTAssertEqual(locale.localeIdentifier, "ca_FR") + } + + func test__language_identifier_for_Catalan_Spain() { + locale = .Catalan(.Spain) + XCTAssertEqual(locale.languageIdentifier, "ca") + XCTAssertEqual(locale.localeIdentifier, "ca_ES") + } + + func test__language_identifier_for_Catalan_Andorra() { + locale = .Catalan(.Andorra) + XCTAssertEqual(locale.languageIdentifier, "ca") + XCTAssertEqual(locale.localeIdentifier, "ca_AD") + } + + func test__language_identifier_for_Serbian_Montenegro() { + locale = .Serbian(.Montenegro) + XCTAssertEqual(locale.languageIdentifier, "sr") + XCTAssertEqual(locale.localeIdentifier, "sr_ME") + } + + func test__language_identifier_for_Serbian_BosniaHerzegovina() { + locale = .Serbian(.BosniaHerzegovina) + XCTAssertEqual(locale.languageIdentifier, "sr") + XCTAssertEqual(locale.localeIdentifier, "sr_BA") + } + + func test__language_identifier_for_Serbian_Serbia() { + locale = .Serbian(.Serbia) + XCTAssertEqual(locale.languageIdentifier, "sr") + XCTAssertEqual(locale.localeIdentifier, "sr_RS") + } + + func test__language_identifier_for_Serbian_Kosovo() { + locale = .Serbian(.Kosovo) + XCTAssertEqual(locale.languageIdentifier, "sr") + XCTAssertEqual(locale.localeIdentifier, "sr_XK") + } + + func test__language_identifier_for_Somali_Kenya() { + locale = .Somali(.Kenya) + XCTAssertEqual(locale.languageIdentifier, "so") + XCTAssertEqual(locale.localeIdentifier, "so_KE") + } + + func test__language_identifier_for_Somali_Somalia() { + locale = .Somali(.Somalia) + XCTAssertEqual(locale.languageIdentifier, "so") + XCTAssertEqual(locale.localeIdentifier, "so_SO") + } + + func test__language_identifier_for_Somali_Ethiopia() { + locale = .Somali(.Ethiopia) + XCTAssertEqual(locale.languageIdentifier, "so") + XCTAssertEqual(locale.localeIdentifier, "so_ET") + } + + func test__language_identifier_for_Somali_Djibouti() { + locale = .Somali(.Djibouti) + XCTAssertEqual(locale.languageIdentifier, "so") + XCTAssertEqual(locale.localeIdentifier, "so_DJ") + } + + func test__language_identifier_for_Tamil_India() { + locale = .Tamil(.India) + XCTAssertEqual(locale.languageIdentifier, "ta") + XCTAssertEqual(locale.localeIdentifier, "ta_IN") + } + + func test__language_identifier_for_Tamil_Singapore() { + locale = .Tamil(.Singapore) + XCTAssertEqual(locale.languageIdentifier, "ta") + XCTAssertEqual(locale.localeIdentifier, "ta_SG") + } + + func test__language_identifier_for_Tamil_Malaysia() { + locale = .Tamil(.Malaysia) + XCTAssertEqual(locale.languageIdentifier, "ta") + XCTAssertEqual(locale.localeIdentifier, "ta_MY") + } + + func test__language_identifier_for_Tamil_SriLanka() { + locale = .Tamil(.SriLanka) + XCTAssertEqual(locale.languageIdentifier, "ta") + XCTAssertEqual(locale.localeIdentifier, "ta_LK") + } + + func test__language_identifier_for_Lingala_CongoKinshasa() { + locale = .Lingala(.CongoKinshasa) + XCTAssertEqual(locale.languageIdentifier, "ln") + XCTAssertEqual(locale.localeIdentifier, "ln_CD") + } + + func test__language_identifier_for_Lingala_CentralAfricanRepublic() { + locale = .Lingala(.CentralAfricanRepublic) + XCTAssertEqual(locale.languageIdentifier, "ln") + XCTAssertEqual(locale.localeIdentifier, "ln_CF") + } + + func test__language_identifier_for_Lingala_Angola() { + locale = .Lingala(.Angola) + XCTAssertEqual(locale.languageIdentifier, "ln") + XCTAssertEqual(locale.localeIdentifier, "ln_AO") + } + + func test__language_identifier_for_Lingala_CongoBrazzaville() { + locale = .Lingala(.CongoBrazzaville) + XCTAssertEqual(locale.languageIdentifier, "ln") + XCTAssertEqual(locale.localeIdentifier, "ln_CG") + } + + func test__language_identifier_for_Swahili_CongoKinshasa() { + locale = .Swahili(.CongoKinshasa) + XCTAssertEqual(locale.languageIdentifier, "sw") + XCTAssertEqual(locale.localeIdentifier, "sw_CD") + } + + func test__language_identifier_for_Swahili_Tanzania() { + locale = .Swahili(.Tanzania) + XCTAssertEqual(locale.languageIdentifier, "sw") + XCTAssertEqual(locale.localeIdentifier, "sw_TZ") + } + + func test__language_identifier_for_Swahili_Kenya() { + locale = .Swahili(.Kenya) + XCTAssertEqual(locale.languageIdentifier, "sw") + XCTAssertEqual(locale.localeIdentifier, "sw_KE") + } + + func test__language_identifier_for_Swahili_Uganda() { + locale = .Swahili(.Uganda) + XCTAssertEqual(locale.languageIdentifier, "sw") + XCTAssertEqual(locale.localeIdentifier, "sw_UG") + } + + func test__language_identifier_for_NorthernSami_Sweden() { + locale = .NorthernSami(.Sweden) + XCTAssertEqual(locale.languageIdentifier, "se") + XCTAssertEqual(locale.localeIdentifier, "se_SE") + } + + func test__language_identifier_for_NorthernSami_Norway() { + locale = .NorthernSami(.Norway) + XCTAssertEqual(locale.languageIdentifier, "se") + XCTAssertEqual(locale.localeIdentifier, "se_NO") + } + + func test__language_identifier_for_NorthernSami_Finland() { + locale = .NorthernSami(.Finland) + XCTAssertEqual(locale.languageIdentifier, "se") + XCTAssertEqual(locale.localeIdentifier, "se_FI") + } + + func test__language_identifier_for_SwissGerman_Switzerland() { + locale = .SwissGerman(.Switzerland) + XCTAssertEqual(locale.languageIdentifier, "gsw") + XCTAssertEqual(locale.localeIdentifier, "gsw_CH") + } + + func test__language_identifier_for_SwissGerman_France() { + locale = .SwissGerman(.France) + XCTAssertEqual(locale.languageIdentifier, "gsw") + XCTAssertEqual(locale.localeIdentifier, "gsw_FR") + } + + func test__language_identifier_for_SwissGerman_Liechtenstein() { + locale = .SwissGerman(.Liechtenstein) + XCTAssertEqual(locale.languageIdentifier, "gsw") + XCTAssertEqual(locale.localeIdentifier, "gsw_LI") + } + + func test__language_identifier_for_Hausa_Niger() { + locale = .Hausa(.Niger) + XCTAssertEqual(locale.languageIdentifier, "ha") + XCTAssertEqual(locale.localeIdentifier, "ha_NE") + } + + func test__language_identifier_for_Hausa_Ghana() { + locale = .Hausa(.Ghana) + XCTAssertEqual(locale.languageIdentifier, "ha") + XCTAssertEqual(locale.localeIdentifier, "ha_GH") + } + + func test__language_identifier_for_Hausa_Nigeria() { + locale = .Hausa(.Nigeria) + XCTAssertEqual(locale.languageIdentifier, "ha") + XCTAssertEqual(locale.localeIdentifier, "ha_NG") + } + + func test__language_identifier_for_Albanian_Macedonia() { + locale = .Albanian(.Macedonia) + XCTAssertEqual(locale.languageIdentifier, "sq") + XCTAssertEqual(locale.localeIdentifier, "sq_MK") + } + + func test__language_identifier_for_Albanian_Albania() { + locale = .Albanian(.Albania) + XCTAssertEqual(locale.languageIdentifier, "sq") + XCTAssertEqual(locale.localeIdentifier, "sq_AL") + } + + func test__language_identifier_for_Albanian_Kosovo() { + locale = .Albanian(.Kosovo) + XCTAssertEqual(locale.languageIdentifier, "sq") + XCTAssertEqual(locale.localeIdentifier, "sq_XK") + } + + func test__language_identifier_for_Quechua_Bolivia() { + locale = .Quechua(.Bolivia) + XCTAssertEqual(locale.languageIdentifier, "qu") + XCTAssertEqual(locale.localeIdentifier, "qu_BO") + } + + func test__language_identifier_for_Quechua_Ecuador() { + locale = .Quechua(.Ecuador) + XCTAssertEqual(locale.languageIdentifier, "qu") + XCTAssertEqual(locale.localeIdentifier, "qu_EC") + } + + func test__language_identifier_for_Quechua_Peru() { + locale = .Quechua(.Peru) + XCTAssertEqual(locale.languageIdentifier, "qu") + XCTAssertEqual(locale.localeIdentifier, "qu_PE") + } + + func test__language_identifier_for_Malay_Brunei() { + locale = .Malay(.Brunei) + XCTAssertEqual(locale.languageIdentifier, "ms") + XCTAssertEqual(locale.localeIdentifier, "ms_BN") + } + + func test__language_identifier_for_Malay_Malaysia() { + locale = .Malay(.Malaysia) + XCTAssertEqual(locale.languageIdentifier, "ms") + XCTAssertEqual(locale.localeIdentifier, "ms_MY") + } + + func test__language_identifier_for_Malay_Singapore() { + locale = .Malay(.Singapore) + XCTAssertEqual(locale.languageIdentifier, "ms") + XCTAssertEqual(locale.localeIdentifier, "ms_SG") + } + + func test__language_identifier_for_Italian_Italy() { + locale = .Italian(.Italy) + XCTAssertEqual(locale.languageIdentifier, "it") + XCTAssertEqual(locale.localeIdentifier, "it_IT") + } + + func test__language_identifier_for_Italian_Switzerland() { + locale = .Italian(.Switzerland) + XCTAssertEqual(locale.languageIdentifier, "it") + XCTAssertEqual(locale.localeIdentifier, "it_CH") + } + + func test__language_identifier_for_Italian_SanMarino() { + locale = .Italian(.SanMarino) + XCTAssertEqual(locale.languageIdentifier, "it") + XCTAssertEqual(locale.localeIdentifier, "it_SM") + } + + func test__language_identifier_for_Swedish_Sweden() { + locale = .Swedish(.Sweden) + XCTAssertEqual(locale.languageIdentifier, "sv") + XCTAssertEqual(locale.localeIdentifier, "sv_SE") + } + + func test__language_identifier_for_Swedish_ÅlandIslands() { + locale = .Swedish(.ÅlandIslands) + XCTAssertEqual(locale.languageIdentifier, "sv") + XCTAssertEqual(locale.localeIdentifier, "sv_AX") + } + + func test__language_identifier_for_Swedish_Finland() { + locale = .Swedish(.Finland) + XCTAssertEqual(locale.languageIdentifier, "sv") + XCTAssertEqual(locale.localeIdentifier, "sv_FI") + } + + func test__language_identifier_for_Punjabi_Pakistan() { + locale = .Punjabi(.Pakistan) + XCTAssertEqual(locale.languageIdentifier, "pa") + XCTAssertEqual(locale.localeIdentifier, "pa_PK") + } + + func test__language_identifier_for_Punjabi_India() { + locale = .Punjabi(.India) + XCTAssertEqual(locale.languageIdentifier, "pa") + XCTAssertEqual(locale.localeIdentifier, "pa_IN") + } + + func test__language_identifier_for_Danish_Denmark() { + locale = .Danish(.Denmark) + XCTAssertEqual(locale.languageIdentifier, "da") + XCTAssertEqual(locale.localeIdentifier, "da_DK") + } + + func test__language_identifier_for_Danish_Greenland() { + locale = .Danish(.Greenland) + XCTAssertEqual(locale.languageIdentifier, "da") + XCTAssertEqual(locale.localeIdentifier, "da_GL") + } + + func test__language_identifier_for_NorwegianBokmål_SvalbardJanMayen() { + locale = .NorwegianBokmål(.SvalbardJanMayen) + XCTAssertEqual(locale.languageIdentifier, "nb") + XCTAssertEqual(locale.localeIdentifier, "nb_SJ") + } + + func test__language_identifier_for_NorwegianBokmål_Norway() { + locale = .NorwegianBokmål(.Norway) + XCTAssertEqual(locale.languageIdentifier, "nb") + XCTAssertEqual(locale.localeIdentifier, "nb_NO") + } + + func test__language_identifier_for_Urdu_Pakistan() { + locale = .Urdu(.Pakistan) + XCTAssertEqual(locale.languageIdentifier, "ur") + XCTAssertEqual(locale.localeIdentifier, "ur_PK") + } + + func test__language_identifier_for_Urdu_India() { + locale = .Urdu(.India) + XCTAssertEqual(locale.languageIdentifier, "ur") + XCTAssertEqual(locale.localeIdentifier, "ur_IN") + } + + func test__language_identifier_for_Croatian_Croatia() { + locale = .Croatian(.Croatia) + XCTAssertEqual(locale.languageIdentifier, "hr") + XCTAssertEqual(locale.localeIdentifier, "hr_HR") + } + + func test__language_identifier_for_Croatian_BosniaHerzegovina() { + locale = .Croatian(.BosniaHerzegovina) + XCTAssertEqual(locale.languageIdentifier, "hr") + XCTAssertEqual(locale.localeIdentifier, "hr_BA") + } + + func test__language_identifier_for_Afrikaans_Namibia() { + locale = .Afrikaans(.Namibia) + XCTAssertEqual(locale.languageIdentifier, "af") + XCTAssertEqual(locale.localeIdentifier, "af_NA") + } + + func test__language_identifier_for_Afrikaans_SouthAfrica() { + locale = .Afrikaans(.SouthAfrica) + XCTAssertEqual(locale.languageIdentifier, "af") + XCTAssertEqual(locale.localeIdentifier, "af_ZA") + } + + func test__language_identifier_for_Yoruba_Benin() { + locale = .Yoruba(.Benin) + XCTAssertEqual(locale.languageIdentifier, "yo") + XCTAssertEqual(locale.localeIdentifier, "yo_BJ") + } + + func test__language_identifier_for_Yoruba_Nigeria() { + locale = .Yoruba(.Nigeria) + XCTAssertEqual(locale.languageIdentifier, "yo") + XCTAssertEqual(locale.localeIdentifier, "yo_NG") + } + + func test__language_identifier_for_Bengali_Bangladesh() { + locale = .Bengali(.Bangladesh) + XCTAssertEqual(locale.languageIdentifier, "bn") + XCTAssertEqual(locale.localeIdentifier, "bn_BD") + } + + func test__language_identifier_for_Bengali_India() { + locale = .Bengali(.India) + XCTAssertEqual(locale.languageIdentifier, "bn") + XCTAssertEqual(locale.localeIdentifier, "bn_IN") + } + + func test__language_identifier_for_Greek_Cyprus() { + locale = .Greek(.Cyprus) + XCTAssertEqual(locale.languageIdentifier, "el") + XCTAssertEqual(locale.localeIdentifier, "el_CY") + } + + func test__language_identifier_for_Greek_Greece() { + locale = .Greek(.Greece) + XCTAssertEqual(locale.languageIdentifier, "el") + XCTAssertEqual(locale.localeIdentifier, "el_GR") + } + + func test__language_identifier_for_Teso_Kenya() { + locale = .Teso(.Kenya) + XCTAssertEqual(locale.languageIdentifier, "teo") + XCTAssertEqual(locale.localeIdentifier, "teo_KE") + } + + func test__language_identifier_for_Teso_Uganda() { + locale = .Teso(.Uganda) + XCTAssertEqual(locale.languageIdentifier, "teo") + XCTAssertEqual(locale.localeIdentifier, "teo_UG") + } + + func test__language_identifier_for_Korean_NorthKorea() { + locale = .Korean(.NorthKorea) + XCTAssertEqual(locale.languageIdentifier, "ko") + XCTAssertEqual(locale.localeIdentifier, "ko_KP") + } + + func test__language_identifier_for_Korean_SouthKorea() { + locale = .Korean(.SouthKorea) + XCTAssertEqual(locale.languageIdentifier, "ko") + XCTAssertEqual(locale.localeIdentifier, "ko_KR") + } + + func test__language_identifier_for_Uzbek_Uzbekistan() { + locale = .Uzbek(.Uzbekistan) + XCTAssertEqual(locale.languageIdentifier, "uz") + XCTAssertEqual(locale.localeIdentifier, "uz_UZ") + } + + func test__language_identifier_for_Uzbek_Afghanistan() { + locale = .Uzbek(.Afghanistan) + XCTAssertEqual(locale.languageIdentifier, "uz") + XCTAssertEqual(locale.localeIdentifier, "uz_AF") + } + + func test__language_identifier_for_Ossetic_Georgia() { + locale = .Ossetic(.Georgia) + XCTAssertEqual(locale.languageIdentifier, "os") + XCTAssertEqual(locale.localeIdentifier, "os_GE") + } + + func test__language_identifier_for_Ossetic_Russia() { + locale = .Ossetic(.Russia) + XCTAssertEqual(locale.languageIdentifier, "os") + XCTAssertEqual(locale.localeIdentifier, "os_RU") + } + + func test__language_identifier_for_Turkish_Cyprus() { + locale = .Turkish(.Cyprus) + XCTAssertEqual(locale.languageIdentifier, "tr") + XCTAssertEqual(locale.localeIdentifier, "tr_CY") + } + + func test__language_identifier_for_Turkish_Turkey() { + locale = .Turkish(.Turkey) + XCTAssertEqual(locale.languageIdentifier, "tr") + XCTAssertEqual(locale.localeIdentifier, "tr_TR") + } + + func test__language_identifier_for_Ewe_Togo() { + locale = .Ewe(.Togo) + XCTAssertEqual(locale.languageIdentifier, "ee") + XCTAssertEqual(locale.localeIdentifier, "ee_TG") + } + + func test__language_identifier_for_Ewe_Ghana() { + locale = .Ewe(.Ghana) + XCTAssertEqual(locale.languageIdentifier, "ee") + XCTAssertEqual(locale.localeIdentifier, "ee_GH") + } + + func test__language_identifier_for_Romanian_Romania() { + locale = .Romanian(.Romania) + XCTAssertEqual(locale.languageIdentifier, "ro") + XCTAssertEqual(locale.localeIdentifier, "ro_RO") + } + + func test__language_identifier_for_Romanian_Moldova() { + locale = .Romanian(.Moldova) + XCTAssertEqual(locale.languageIdentifier, "ro") + XCTAssertEqual(locale.localeIdentifier, "ro_MD") + } + + func test__language_identifier_for_Tigrinya_Ethiopia() { + locale = .Tigrinya(.Ethiopia) + XCTAssertEqual(locale.languageIdentifier, "ti") + XCTAssertEqual(locale.localeIdentifier, "ti_ET") + } + + func test__language_identifier_for_Tigrinya_Eritrea() { + locale = .Tigrinya(.Eritrea) + XCTAssertEqual(locale.languageIdentifier, "ti") + XCTAssertEqual(locale.localeIdentifier, "ti_ER") + } + + func test__language_identifier_for_Tibetan_India() { + locale = .Tibetan(.India) + XCTAssertEqual(locale.languageIdentifier, "bo") + XCTAssertEqual(locale.localeIdentifier, "bo_IN") + } + + func test__language_identifier_for_Tibetan_China() { + locale = .Tibetan(.China) + XCTAssertEqual(locale.languageIdentifier, "bo") + XCTAssertEqual(locale.localeIdentifier, "bo_CN") + } + + func test__language_identifier_for_CentralKurdish_Iraq() { + locale = .CentralKurdish(.Iraq) + XCTAssertEqual(locale.languageIdentifier, "ckb") + XCTAssertEqual(locale.localeIdentifier, "ckb_IQ") + } + + func test__language_identifier_for_CentralKurdish_Iran() { + locale = .CentralKurdish(.Iran) + XCTAssertEqual(locale.languageIdentifier, "ckb") + XCTAssertEqual(locale.localeIdentifier, "ckb_IR") + } + + func test__language_identifier_for_Masai_Tanzania() { + locale = .Masai(.Tanzania) + XCTAssertEqual(locale.languageIdentifier, "mas") + XCTAssertEqual(locale.localeIdentifier, "mas_TZ") + } + + func test__language_identifier_for_Masai_Kenya() { + locale = .Masai(.Kenya) + XCTAssertEqual(locale.languageIdentifier, "mas") + XCTAssertEqual(locale.localeIdentifier, "mas_KE") + } + + func test__language_identifier_for_Oromo_Ethiopia() { + locale = .Oromo(.Ethiopia) + XCTAssertEqual(locale.languageIdentifier, "om") + XCTAssertEqual(locale.localeIdentifier, "om_ET") + } + + func test__language_identifier_for_Oromo_Kenya() { + locale = .Oromo(.Kenya) + XCTAssertEqual(locale.languageIdentifier, "om") + XCTAssertEqual(locale.localeIdentifier, "om_KE") + } + + func test__language_identifier_for_Nepali_Nepal() { + locale = .Nepali(.Nepal) + XCTAssertEqual(locale.languageIdentifier, "ne") + XCTAssertEqual(locale.localeIdentifier, "ne_NP") + } + + func test__language_identifier_for_Nepali_India() { + locale = .Nepali(.India) + XCTAssertEqual(locale.languageIdentifier, "ne") + XCTAssertEqual(locale.localeIdentifier, "ne_IN") + } + + func test__language_identifier_for_Persian_Iran() { + locale = .Persian(.Iran) + XCTAssertEqual(locale.languageIdentifier, "fa") + XCTAssertEqual(locale.localeIdentifier, "fa_IR") + } + + func test__language_identifier_for_Persian_Afghanistan() { + locale = .Persian(.Afghanistan) + XCTAssertEqual(locale.languageIdentifier, "fa") + XCTAssertEqual(locale.localeIdentifier, "fa_AF") + } + + func test__language_identifier_for_JolaFonyi() { + locale = .JolaFonyi + XCTAssertEqual(locale.languageIdentifier, "dyo") + XCTAssertEqual(locale.localeIdentifier, "dyo") + } + + func test__language_identifier_for_Soga() { + locale = .Soga + XCTAssertEqual(locale.languageIdentifier, "xog") + XCTAssertEqual(locale.localeIdentifier, "xog") + } + + func test__language_identifier_for_Rombo() { + locale = .Rombo + XCTAssertEqual(locale.languageIdentifier, "rof") + XCTAssertEqual(locale.localeIdentifier, "rof") + } + + func test__language_identifier_for_Manx() { + locale = .Manx + XCTAssertEqual(locale.languageIdentifier, "gv") + XCTAssertEqual(locale.localeIdentifier, "gv") + } + + func test__language_identifier_for_LowerSorbian() { + locale = .LowerSorbian + XCTAssertEqual(locale.languageIdentifier, "dsb") + XCTAssertEqual(locale.localeIdentifier, "dsb") + } + + func test__language_identifier_for_Pashto() { + locale = .Pashto + XCTAssertEqual(locale.languageIdentifier, "ps") + XCTAssertEqual(locale.localeIdentifier, "ps") + } + + func test__language_identifier_for_CentralAtlasTamazight() { + locale = .CentralAtlasTamazight + XCTAssertEqual(locale.languageIdentifier, "tzm") + XCTAssertEqual(locale.localeIdentifier, "tzm") + } + + func test__language_identifier_for_Gusii() { + locale = .Gusii + XCTAssertEqual(locale.languageIdentifier, "guz") + XCTAssertEqual(locale.localeIdentifier, "guz") + } + + func test__language_identifier_for_Nama() { + locale = .Nama + XCTAssertEqual(locale.languageIdentifier, "naq") + XCTAssertEqual(locale.localeIdentifier, "naq") + } + + func test__language_identifier_for_Tajik() { + locale = .Tajik + XCTAssertEqual(locale.languageIdentifier, "tg") + XCTAssertEqual(locale.localeIdentifier, "tg") + } + + func test__language_identifier_for_Kwasio() { + locale = .Kwasio + XCTAssertEqual(locale.languageIdentifier, "nmg") + XCTAssertEqual(locale.localeIdentifier, "nmg") + } + + func test__language_identifier_for_Akan() { + locale = .Akan + XCTAssertEqual(locale.languageIdentifier, "ak") + XCTAssertEqual(locale.localeIdentifier, "ak") + } + + func test__language_identifier_for_Estonian() { + locale = .Estonian + XCTAssertEqual(locale.languageIdentifier, "et") + XCTAssertEqual(locale.localeIdentifier, "et") + } + + func test__language_identifier_for_Colognian() { + locale = .Colognian + XCTAssertEqual(locale.languageIdentifier, "ksh") + XCTAssertEqual(locale.localeIdentifier, "ksh") + } + + func test__language_identifier_for_Konkani() { + locale = .Konkani + XCTAssertEqual(locale.languageIdentifier, "kok") + XCTAssertEqual(locale.localeIdentifier, "kok") + } + + func test__language_identifier_for_ScottishGaelic() { + locale = .ScottishGaelic + XCTAssertEqual(locale.languageIdentifier, "gd") + XCTAssertEqual(locale.localeIdentifier, "gd") + } + + func test__language_identifier_for_Bambara() { + locale = .Bambara + XCTAssertEqual(locale.languageIdentifier, "bm") + XCTAssertEqual(locale.localeIdentifier, "bm") + } + + func test__language_identifier_for_Lakota() { + locale = .Lakota + XCTAssertEqual(locale.languageIdentifier, "lkt") + XCTAssertEqual(locale.localeIdentifier, "lkt") + } + + func test__language_identifier_for_Bosnian() { + locale = .Bosnian + XCTAssertEqual(locale.languageIdentifier, "bs") + XCTAssertEqual(locale.localeIdentifier, "bs") + } + + func test__language_identifier_for_Turkmen() { + locale = .Turkmen + XCTAssertEqual(locale.languageIdentifier, "tk") + XCTAssertEqual(locale.localeIdentifier, "tk") + } + + func test__language_identifier_for_Meta() { + locale = .Meta + XCTAssertEqual(locale.languageIdentifier, "mgo") + XCTAssertEqual(locale.localeIdentifier, "mgo") + } + + func test__language_identifier_for_Sena() { + locale = .Sena + XCTAssertEqual(locale.languageIdentifier, "seh") + XCTAssertEqual(locale.localeIdentifier, "seh") + } + + func test__language_identifier_for_Telugu() { + locale = .Telugu + XCTAssertEqual(locale.languageIdentifier, "te") + XCTAssertEqual(locale.localeIdentifier, "te") + } + + func test__language_identifier_for_Icelandic() { + locale = .Icelandic + XCTAssertEqual(locale.languageIdentifier, "is") + XCTAssertEqual(locale.localeIdentifier, "is") + } + + func test__language_identifier_for_Vunjo() { + locale = .Vunjo + XCTAssertEqual(locale.languageIdentifier, "vun") + XCTAssertEqual(locale.localeIdentifier, "vun") + } + + func test__language_identifier_for_Finnish() { + locale = .Finnish + XCTAssertEqual(locale.languageIdentifier, "fi") + XCTAssertEqual(locale.localeIdentifier, "fi") + } + + func test__language_identifier_for_Yangben() { + locale = .Yangben + XCTAssertEqual(locale.languageIdentifier, "yav") + XCTAssertEqual(locale.localeIdentifier, "yav") + } + + func test__language_identifier_for_Sakha() { + locale = .Sakha + XCTAssertEqual(locale.languageIdentifier, "sah") + XCTAssertEqual(locale.localeIdentifier, "sah") + } + + func test__language_identifier_for_Ngomba() { + locale = .Ngomba + XCTAssertEqual(locale.languageIdentifier, "jgo") + XCTAssertEqual(locale.localeIdentifier, "jgo") + } + + func test__language_identifier_for_Friulian() { + locale = .Friulian + XCTAssertEqual(locale.languageIdentifier, "fur") + XCTAssertEqual(locale.localeIdentifier, "fur") + } + + func test__language_identifier_for_Inuktitut() { + locale = .Inuktitut + XCTAssertEqual(locale.languageIdentifier, "iu") + XCTAssertEqual(locale.localeIdentifier, "iu") + } + + func test__language_identifier_for_NorthNdebele() { + locale = .NorthNdebele + XCTAssertEqual(locale.languageIdentifier, "nd") + XCTAssertEqual(locale.localeIdentifier, "nd") + } + + func test__language_identifier_for_Bulgarian() { + locale = .Bulgarian + XCTAssertEqual(locale.languageIdentifier, "bg") + XCTAssertEqual(locale.localeIdentifier, "bg") + } + + func test__language_identifier_for_Nyankole() { + locale = .Nyankole + XCTAssertEqual(locale.languageIdentifier, "nyn") + XCTAssertEqual(locale.localeIdentifier, "nyn") + } + + func test__language_identifier_for_Kabyle() { + locale = .Kabyle + XCTAssertEqual(locale.languageIdentifier, "kab") + XCTAssertEqual(locale.localeIdentifier, "kab") + } + + func test__language_identifier_for_Filipino() { + locale = .Filipino + XCTAssertEqual(locale.languageIdentifier, "fil") + XCTAssertEqual(locale.localeIdentifier, "fil") + } + + func test__language_identifier_for_Khmer() { + locale = .Khmer + XCTAssertEqual(locale.languageIdentifier, "km") + XCTAssertEqual(locale.localeIdentifier, "km") + } + + func test__language_identifier_for_Slovenian() { + locale = .Slovenian + XCTAssertEqual(locale.languageIdentifier, "sl") + XCTAssertEqual(locale.localeIdentifier, "sl") + } + + func test__language_identifier_for_Bemba() { + locale = .Bemba + XCTAssertEqual(locale.languageIdentifier, "bem") + XCTAssertEqual(locale.localeIdentifier, "bem") + } + + func test__language_identifier_for_Sangu() { + locale = .Sangu + XCTAssertEqual(locale.languageIdentifier, "sbp") + XCTAssertEqual(locale.localeIdentifier, "sbp") + } + + func test__language_identifier_for_Japanese() { + locale = .Japanese + XCTAssertEqual(locale.languageIdentifier, "ja") + XCTAssertEqual(locale.localeIdentifier, "ja") + } + + func test__language_identifier_for_Kannada() { + locale = .Kannada + XCTAssertEqual(locale.languageIdentifier, "kn") + XCTAssertEqual(locale.localeIdentifier, "kn") + } + + func test__language_identifier_for_Azerbaijani() { + locale = .Azerbaijani + XCTAssertEqual(locale.languageIdentifier, "az") + XCTAssertEqual(locale.localeIdentifier, "az") + } + + func test__language_identifier_for_Shambala() { + locale = .Shambala + XCTAssertEqual(locale.languageIdentifier, "ksb") + XCTAssertEqual(locale.localeIdentifier, "ksb") + } + + func test__language_identifier_for_Bafia() { + locale = .Bafia + XCTAssertEqual(locale.languageIdentifier, "ksf") + XCTAssertEqual(locale.localeIdentifier, "ksf") + } + + func test__language_identifier_for_Kazakh() { + locale = .Kazakh + XCTAssertEqual(locale.languageIdentifier, "kk") + XCTAssertEqual(locale.localeIdentifier, "kk") + } + + func test__language_identifier_for_Ngiemboon() { + locale = .Ngiemboon + XCTAssertEqual(locale.languageIdentifier, "nnh") + XCTAssertEqual(locale.localeIdentifier, "nnh") + } + + func test__language_identifier_for_Chiga() { + locale = .Chiga + XCTAssertEqual(locale.languageIdentifier, "cgg") + XCTAssertEqual(locale.localeIdentifier, "cgg") + } + + func test__language_identifier_for_Sango() { + locale = .Sango + XCTAssertEqual(locale.languageIdentifier, "sg") + XCTAssertEqual(locale.localeIdentifier, "sg") + } + + func test__language_identifier_for_WesternFrisian() { + locale = .WesternFrisian + XCTAssertEqual(locale.languageIdentifier, "fy") + XCTAssertEqual(locale.localeIdentifier, "fy") + } + + func test__language_identifier_for_Makonde() { + locale = .Makonde + XCTAssertEqual(locale.languageIdentifier, "kde") + XCTAssertEqual(locale.localeIdentifier, "kde") + } + + func test__language_identifier_for_Ganda() { + locale = .Ganda + XCTAssertEqual(locale.languageIdentifier, "lg") + XCTAssertEqual(locale.localeIdentifier, "lg") + } + + func test__language_identifier_for_Bodo() { + locale = .Bodo + XCTAssertEqual(locale.languageIdentifier, "brx") + XCTAssertEqual(locale.localeIdentifier, "brx") + } + + func test__language_identifier_for_Polish() { + locale = .Polish + XCTAssertEqual(locale.languageIdentifier, "pl") + XCTAssertEqual(locale.localeIdentifier, "pl") + } + + func test__language_identifier_for_Tongan() { + locale = .Tongan + XCTAssertEqual(locale.languageIdentifier, "to") + XCTAssertEqual(locale.localeIdentifier, "to") + } + + func test__language_identifier_for_Bena() { + locale = .Bena + XCTAssertEqual(locale.languageIdentifier, "bez") + XCTAssertEqual(locale.localeIdentifier, "bez") + } + + func test__language_identifier_for_Lithuanian() { + locale = .Lithuanian + XCTAssertEqual(locale.languageIdentifier, "lt") + XCTAssertEqual(locale.localeIdentifier, "lt") + } + + func test__language_identifier_for_Morisyen() { + locale = .Morisyen + XCTAssertEqual(locale.languageIdentifier, "mfe") + XCTAssertEqual(locale.localeIdentifier, "mfe") + } + + func test__language_identifier_for_Machame() { + locale = .Machame + XCTAssertEqual(locale.languageIdentifier, "jmc") + XCTAssertEqual(locale.localeIdentifier, "jmc") + } + + func test__language_identifier_for_Kyrgyz() { + locale = .Kyrgyz + XCTAssertEqual(locale.languageIdentifier, "ky") + XCTAssertEqual(locale.localeIdentifier, "ky") + } + + func test__language_identifier_for_Kalaallisut() { + locale = .Kalaallisut + XCTAssertEqual(locale.languageIdentifier, "kl") + XCTAssertEqual(locale.localeIdentifier, "kl") + } + + func test__language_identifier_for_Oriya() { + locale = .Oriya + XCTAssertEqual(locale.languageIdentifier, "or") + XCTAssertEqual(locale.localeIdentifier, "or") + } + + func test__language_identifier_for_Belarusian() { + locale = .Belarusian + XCTAssertEqual(locale.languageIdentifier, "be") + XCTAssertEqual(locale.localeIdentifier, "be") + } + + func test__language_identifier_for_Hebrew() { + locale = .Hebrew + XCTAssertEqual(locale.languageIdentifier, "he") + XCTAssertEqual(locale.localeIdentifier, "he") + } + + func test__language_identifier_for_Mongolian() { + locale = .Mongolian + XCTAssertEqual(locale.languageIdentifier, "mn") + XCTAssertEqual(locale.localeIdentifier, "mn") + } + + func test__language_identifier_for_Rwa() { + locale = .Rwa + XCTAssertEqual(locale.languageIdentifier, "rwk") + XCTAssertEqual(locale.localeIdentifier, "rwk") + } + + func test__language_identifier_for_Mundang() { + locale = .Mundang + XCTAssertEqual(locale.languageIdentifier, "mua") + XCTAssertEqual(locale.localeIdentifier, "mua") + } + + func test__language_identifier_for_Langi() { + locale = .Langi + XCTAssertEqual(locale.languageIdentifier, "lag") + XCTAssertEqual(locale.localeIdentifier, "lag") + } + + func test__language_identifier_for_Duala() { + locale = .Duala + XCTAssertEqual(locale.languageIdentifier, "dua") + XCTAssertEqual(locale.localeIdentifier, "dua") + } + + func test__language_identifier_for_Embu() { + locale = .Embu + XCTAssertEqual(locale.languageIdentifier, "ebu") + XCTAssertEqual(locale.localeIdentifier, "ebu") + } + + func test__language_identifier_for_Kikuyu() { + locale = .Kikuyu + XCTAssertEqual(locale.languageIdentifier, "ki") + XCTAssertEqual(locale.localeIdentifier, "ki") + } + + func test__language_identifier_for_Basque() { + locale = .Basque + XCTAssertEqual(locale.languageIdentifier, "eu") + XCTAssertEqual(locale.localeIdentifier, "eu") + } + + func test__language_identifier_for_Gujarati() { + locale = .Gujarati + XCTAssertEqual(locale.languageIdentifier, "gu") + XCTAssertEqual(locale.localeIdentifier, "gu") + } + + func test__language_identifier_for_Galician() { + locale = .Galician + XCTAssertEqual(locale.languageIdentifier, "gl") + XCTAssertEqual(locale.localeIdentifier, "gl") + } + + func test__language_identifier_for_Vietnamese() { + locale = .Vietnamese + XCTAssertEqual(locale.languageIdentifier, "vi") + XCTAssertEqual(locale.localeIdentifier, "vi") + } + + func test__language_identifier_for_Meru() { + locale = .Meru + XCTAssertEqual(locale.languageIdentifier, "mer") + XCTAssertEqual(locale.localeIdentifier, "mer") + } + + func test__language_identifier_for_Malayalam() { + locale = .Malayalam + XCTAssertEqual(locale.languageIdentifier, "ml") + XCTAssertEqual(locale.localeIdentifier, "ml") + } + + func test__language_identifier_for_LubaKatanga() { + locale = .LubaKatanga + XCTAssertEqual(locale.languageIdentifier, "lu") + XCTAssertEqual(locale.localeIdentifier, "lu") + } + + func test__language_identifier_for_Ukrainian() { + locale = .Ukrainian + XCTAssertEqual(locale.languageIdentifier, "uk") + XCTAssertEqual(locale.localeIdentifier, "uk") + } + + func test__language_identifier_for_Maltese() { + locale = .Maltese + XCTAssertEqual(locale.languageIdentifier, "mt") + XCTAssertEqual(locale.localeIdentifier, "mt") + } + + func test__language_identifier_for_Sinhala() { + locale = .Sinhala + XCTAssertEqual(locale.languageIdentifier, "si") + XCTAssertEqual(locale.localeIdentifier, "si") + } + + func test__language_identifier_for_Luo() { + locale = .Luo + XCTAssertEqual(locale.languageIdentifier, "luo") + XCTAssertEqual(locale.localeIdentifier, "luo") + } + + func test__language_identifier_for_Faroese() { + locale = .Faroese + XCTAssertEqual(locale.languageIdentifier, "fo") + XCTAssertEqual(locale.localeIdentifier, "fo") + } + + func test__language_identifier_for_Zarma() { + locale = .Zarma + XCTAssertEqual(locale.languageIdentifier, "dje") + XCTAssertEqual(locale.localeIdentifier, "dje") + } + + func test__language_identifier_for_Vai() { + locale = .Vai + XCTAssertEqual(locale.languageIdentifier, "vai") + XCTAssertEqual(locale.localeIdentifier, "vai") + } + + func test__language_identifier_for_Taita() { + locale = .Taita + XCTAssertEqual(locale.languageIdentifier, "dav") + XCTAssertEqual(locale.localeIdentifier, "dav") + } + + func test__language_identifier_for_Tachelhit() { + locale = .Tachelhit + XCTAssertEqual(locale.languageIdentifier, "shi") + XCTAssertEqual(locale.localeIdentifier, "shi") + } + + func test__language_identifier_for_NorwegianNynorsk() { + locale = .NorwegianNynorsk + XCTAssertEqual(locale.languageIdentifier, "nn") + XCTAssertEqual(locale.localeIdentifier, "nn") + } + + func test__language_identifier_for_Assamese() { + locale = .Assamese + XCTAssertEqual(locale.languageIdentifier, "as") + XCTAssertEqual(locale.localeIdentifier, "as") + } + + func test__language_identifier_for_Latvian() { + locale = .Latvian + XCTAssertEqual(locale.languageIdentifier, "lv") + XCTAssertEqual(locale.localeIdentifier, "lv") + } + + func test__language_identifier_for_Igbo() { + locale = .Igbo + XCTAssertEqual(locale.languageIdentifier, "ig") + XCTAssertEqual(locale.localeIdentifier, "ig") + } + + func test__language_identifier_for_Kamba() { + locale = .Kamba + XCTAssertEqual(locale.languageIdentifier, "kam") + XCTAssertEqual(locale.localeIdentifier, "kam") + } + + func test__language_identifier_for_Kako() { + locale = .Kako + XCTAssertEqual(locale.languageIdentifier, "kkj") + XCTAssertEqual(locale.localeIdentifier, "kkj") + } + + func test__language_identifier_for_Lao() { + locale = .Lao + XCTAssertEqual(locale.languageIdentifier, "lo") + XCTAssertEqual(locale.localeIdentifier, "lo") + } + + func test__language_identifier_for_Basaa() { + locale = .Basaa + XCTAssertEqual(locale.languageIdentifier, "bas") + XCTAssertEqual(locale.localeIdentifier, "bas") + } + + func test__language_identifier_for_Nuer() { + locale = .Nuer + XCTAssertEqual(locale.languageIdentifier, "nus") + XCTAssertEqual(locale.localeIdentifier, "nus") + } + + func test__language_identifier_for_Czech() { + locale = .Czech + XCTAssertEqual(locale.languageIdentifier, "cs") + XCTAssertEqual(locale.localeIdentifier, "cs") + } + + func test__language_identifier_for_StandardMoroccanTamazight() { + locale = .StandardMoroccanTamazight + XCTAssertEqual(locale.languageIdentifier, "zgh") + XCTAssertEqual(locale.localeIdentifier, "zgh") + } + + func test__language_identifier_for_Burmese() { + locale = .Burmese + XCTAssertEqual(locale.languageIdentifier, "my") + XCTAssertEqual(locale.localeIdentifier, "my") + } + + func test__language_identifier_for_Romansh() { + locale = .Romansh + XCTAssertEqual(locale.languageIdentifier, "rm") + XCTAssertEqual(locale.localeIdentifier, "rm") + } + + func test__language_identifier_for_Ewondo() { + locale = .Ewondo + XCTAssertEqual(locale.languageIdentifier, "ewo") + XCTAssertEqual(locale.localeIdentifier, "ewo") + } + + func test__language_identifier_for_Amharic() { + locale = .Amharic + XCTAssertEqual(locale.languageIdentifier, "am") + XCTAssertEqual(locale.localeIdentifier, "am") + } + + func test__language_identifier_for_Slovak() { + locale = .Slovak + XCTAssertEqual(locale.languageIdentifier, "sk") + XCTAssertEqual(locale.localeIdentifier, "sk") + } + + func test__language_identifier_for_Kabuverdianu() { + locale = .Kabuverdianu + XCTAssertEqual(locale.languageIdentifier, "kea") + XCTAssertEqual(locale.localeIdentifier, "kea") + } + + func test__language_identifier_for_Hungarian() { + locale = .Hungarian + XCTAssertEqual(locale.languageIdentifier, "hu") + XCTAssertEqual(locale.localeIdentifier, "hu") + } + + func test__language_identifier_for_Breton() { + locale = .Breton + XCTAssertEqual(locale.languageIdentifier, "br") + XCTAssertEqual(locale.localeIdentifier, "br") + } + + func test__language_identifier_for_Luyia() { + locale = .Luyia + XCTAssertEqual(locale.languageIdentifier, "luy") + XCTAssertEqual(locale.localeIdentifier, "luy") + } + + func test__language_identifier_for_Luxembourgish() { + locale = .Luxembourgish + XCTAssertEqual(locale.languageIdentifier, "lb") + XCTAssertEqual(locale.localeIdentifier, "lb") + } + + func test__language_identifier_for_Malagasy() { + locale = .Malagasy + XCTAssertEqual(locale.languageIdentifier, "mg") + XCTAssertEqual(locale.localeIdentifier, "mg") + } + + func test__language_identifier_for_Rundi() { + locale = .Rundi + XCTAssertEqual(locale.languageIdentifier, "rn") + XCTAssertEqual(locale.localeIdentifier, "rn") + } + + func test__language_identifier_for_KoyraChiini() { + locale = .KoyraChiini + XCTAssertEqual(locale.languageIdentifier, "khq") + XCTAssertEqual(locale.localeIdentifier, "khq") + } + + func test__language_identifier_for_Thai() { + locale = .Thai + XCTAssertEqual(locale.languageIdentifier, "th") + XCTAssertEqual(locale.localeIdentifier, "th") + } + + func test__language_identifier_for_Zulu() { + locale = .Zulu + XCTAssertEqual(locale.languageIdentifier, "zu") + XCTAssertEqual(locale.localeIdentifier, "zu") + } + + func test__language_identifier_for_Shona() { + locale = .Shona + XCTAssertEqual(locale.languageIdentifier, "sn") + XCTAssertEqual(locale.localeIdentifier, "sn") + } + + func test__language_identifier_for_Armenian() { + locale = .Armenian + XCTAssertEqual(locale.languageIdentifier, "hy") + XCTAssertEqual(locale.localeIdentifier, "hy") + } + + func test__language_identifier_for_Uyghur() { + locale = .Uyghur + XCTAssertEqual(locale.languageIdentifier, "ug") + XCTAssertEqual(locale.localeIdentifier, "ug") + } + + func test__language_identifier_for_Irish() { + locale = .Irish + XCTAssertEqual(locale.languageIdentifier, "ga") + XCTAssertEqual(locale.localeIdentifier, "ga") + } + + func test__language_identifier_for_Marathi() { + locale = .Marathi + XCTAssertEqual(locale.languageIdentifier, "mr") + XCTAssertEqual(locale.localeIdentifier, "mr") + } + + func test__language_identifier_for_Macedonian() { + locale = .Macedonian + XCTAssertEqual(locale.languageIdentifier, "mk") + XCTAssertEqual(locale.localeIdentifier, "mk") + } + + func test__language_identifier_for_Asu() { + locale = .Asu + XCTAssertEqual(locale.languageIdentifier, "asa") + XCTAssertEqual(locale.localeIdentifier, "asa") + } + + func test__language_identifier_for_Georgian() { + locale = .Georgian + XCTAssertEqual(locale.languageIdentifier, "ka") + XCTAssertEqual(locale.localeIdentifier, "ka") + } + + func test__language_identifier_for_Hawaiian() { + locale = .Hawaiian + XCTAssertEqual(locale.languageIdentifier, "haw") + XCTAssertEqual(locale.localeIdentifier, "haw") + } + + func test__language_identifier_for_Walser() { + locale = .Walser + XCTAssertEqual(locale.languageIdentifier, "wae") + XCTAssertEqual(locale.localeIdentifier, "wae") + } + + func test__language_identifier_for_Kashmiri() { + locale = .Kashmiri + XCTAssertEqual(locale.languageIdentifier, "ks") + XCTAssertEqual(locale.localeIdentifier, "ks") + } + + func test__language_identifier_for_KoyraboroSenni() { + locale = .KoyraboroSenni + XCTAssertEqual(locale.languageIdentifier, "ses") + XCTAssertEqual(locale.localeIdentifier, "ses") + } + + func test__language_identifier_for_Kinyarwanda() { + locale = .Kinyarwanda + XCTAssertEqual(locale.languageIdentifier, "rw") + XCTAssertEqual(locale.localeIdentifier, "rw") + } + + func test__language_identifier_for_Dzongkha() { + locale = .Dzongkha + XCTAssertEqual(locale.languageIdentifier, "dz") + XCTAssertEqual(locale.localeIdentifier, "dz") + } + + func test__language_identifier_for_Aghem() { + locale = .Aghem + XCTAssertEqual(locale.languageIdentifier, "agq") + XCTAssertEqual(locale.localeIdentifier, "agq") + } + + func test__language_identifier_for_MakhuwaMeetto() { + locale = .MakhuwaMeetto + XCTAssertEqual(locale.languageIdentifier, "mgh") + XCTAssertEqual(locale.localeIdentifier, "mgh") + } + + func test__language_identifier_for_Tasawaq() { + locale = .Tasawaq + XCTAssertEqual(locale.languageIdentifier, "twq") + XCTAssertEqual(locale.localeIdentifier, "twq") + } + + func test__language_identifier_for_InariSami() { + locale = .InariSami + XCTAssertEqual(locale.languageIdentifier, "smn") + XCTAssertEqual(locale.localeIdentifier, "smn") + } + + func test__language_identifier_for_Yiddish() { + locale = .Yiddish + XCTAssertEqual(locale.languageIdentifier, "yi") + XCTAssertEqual(locale.localeIdentifier, "yi") + } + + func test__language_identifier_for_SichuanYi() { + locale = .SichuanYi + XCTAssertEqual(locale.languageIdentifier, "ii") + XCTAssertEqual(locale.localeIdentifier, "ii") + } + + func test__language_identifier_for_Hindi() { + locale = .Hindi + XCTAssertEqual(locale.languageIdentifier, "hi") + XCTAssertEqual(locale.localeIdentifier, "hi") + } + + func test__language_identifier_for_Indonesian() { + locale = .Indonesian + XCTAssertEqual(locale.languageIdentifier, "id") + XCTAssertEqual(locale.localeIdentifier, "id") + } + + func test__language_identifier_for_Samburu() { + locale = .Samburu + XCTAssertEqual(locale.languageIdentifier, "saq") + XCTAssertEqual(locale.localeIdentifier, "saq") + } + + func test__language_identifier_for_UpperSorbian() { + locale = .UpperSorbian + XCTAssertEqual(locale.languageIdentifier, "hsb") + XCTAssertEqual(locale.localeIdentifier, "hsb") + } + + func test__language_identifier_for_Kalenjin() { + locale = .Kalenjin + XCTAssertEqual(locale.languageIdentifier, "kln") + XCTAssertEqual(locale.localeIdentifier, "kln") + } + + func test__language_identifier_for_Cherokee() { + locale = .Cherokee + XCTAssertEqual(locale.languageIdentifier, "chr") + XCTAssertEqual(locale.localeIdentifier, "chr") + } + + func test__language_identifier_for_Cornish() { + locale = .Cornish + XCTAssertEqual(locale.languageIdentifier, "kw") + XCTAssertEqual(locale.localeIdentifier, "kw") + } + + func test__language_identifier_for_Welsh() { + locale = .Welsh + XCTAssertEqual(locale.languageIdentifier, "cy") + XCTAssertEqual(locale.localeIdentifier, "cy") + } +} From 8757cdb38e63d7e45ee6f4ff75c4aba2a195426c Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 14:12:57 +0000 Subject: [PATCH 10/24] [MNY-24]: More work refactoring formatting methods into Currency type --- Money/Shared/Currency.swift | 77 ++++++++++++++++++++---------- Money/Shared/Decimal/Decimal.swift | 20 -------- Money/Shared/Locale.swift | 18 ++++--- Money/Shared/Money.swift | 74 +++++++++++++--------------- Tests/Shared/MoneyTests.swift | 24 ++++------ 5 files changed, 107 insertions(+), 106 deletions(-) diff --git a/Money/Shared/Currency.swift b/Money/Shared/Currency.swift index 2ea67a3..d54d91d 100644 --- a/Money/Shared/Currency.swift +++ b/Money/Shared/Currency.swift @@ -45,18 +45,23 @@ public protocol CurrencyType: DecimalNumberBehaviorType { /// The currency code static var code: String { get } - /// The currency symbol - static var symbol: String { get } - /// The currency scale static var scale: Int { get } /// A number formatter for the currency static var formatter: NSNumberFormatter { get } + + static func formattedWithStyle(style: NSNumberFormatterStyle, forLocaleId localeId: String) -> NSDecimalNumber -> String + + static func formattedWithStyle(style: NSNumberFormatterStyle, forLocale locale: Locale) -> NSDecimalNumber -> String } public extension CurrencyType { + static var symbol: String { + return formatter.currencySymbol + } + /** Default implementation of the `NSDecimalNumberBehaviors` for the currency. This uses `NSRoundingMode.RoundBankers` and the @@ -74,11 +79,42 @@ public extension CurrencyType { raiseOnDivideByZero: true ) } + + static func formattedWithStyle(style: NSNumberFormatterStyle, forLocale locale: NSLocale) -> NSDecimalNumber -> String { + __formatter.locale = locale + __formatter.numberStyle = style + switch locale.currencyCode { + case .Some(let wrapped) where wrapped == code: + break + default: + __formatter.currencyCode = code + __formatter.currencySymbol = formatter.currencySymbol + __formatter.internationalCurrencySymbol = formatter.internationalCurrencySymbol + __formatter.currencyGroupingSeparator = formatter.currencyGroupingSeparator + __formatter.currencyDecimalSeparator = formatter.currencyDecimalSeparator + + } + return { __formatter.stringFromNumber($0)! } + } } -// MARK: - Crypto Currencies +// MARK: - Customized Currency Types + +public protocol CustomCurrencyType: CurrencyType { } -public protocol CryptoCurrencyType: CurrencyType { } +public extension CustomCurrencyType { + + static func formattedWithStyle(style: NSNumberFormatterStyle, forLocaleId localeId: String) -> NSDecimalNumber -> String { + let locale = NSLocale(localeIdentifier: NSLocale.canonicalLocaleIdentifierFromString(localeId)) + return formattedWithStyle(style, forLocale: locale) + } + + static func formattedWithStyle(style: NSNumberFormatterStyle, forLocale locale: Locale) -> NSDecimalNumber -> String { + return formattedWithStyle(style, forLocaleId: locale.localeIdentifier) + } +} + +public protocol CryptoCurrencyType: CustomCurrencyType { } /** `ISOCurrencyType` is a refinement of `CurrencyType` so that @@ -100,11 +136,6 @@ public extension ISOCurrencyType { return sharedInstance._code } - /// The currency symbol - static var symbol: String { - return formatter.currencySymbol - } - /// The currency scale static var scale: Int { return formatter.maximumFractionDigits @@ -114,6 +145,18 @@ public extension ISOCurrencyType { static var formatter: NSNumberFormatter { return sharedInstance._formatter } + + static func formattedWithStyle(style: NSNumberFormatterStyle, forLocaleId localeId: String) -> NSDecimalNumber -> String { + let id = "\(NSLocale.currentLocale().localeIdentifier)@currency=\(code)" + let locale = NSLocale(localeIdentifier: NSLocale.canonicalLocaleIdentifierFromString(id)) + return formattedWithStyle(style, forLocale: locale) + } + + static func formattedWithStyle(style: NSNumberFormatterStyle, forLocale locale: Locale) -> NSDecimalNumber -> String { + let id = "\(locale.localeIdentifier)@currency=\(code)" + let locale = NSLocale(localeIdentifier: NSLocale.canonicalLocaleIdentifierFromString(id)) + return formattedWithStyle(style, forLocale: locale) + } } /** @@ -135,21 +178,10 @@ public struct Currency { public let _code: String - lazy var locale: NSLocale = { - let id = NSLocale.localeIdentifierFromComponents([NSLocaleCurrencyCode: self._code]) - return NSLocale(localeIdentifier: id) - }() - public lazy var _formatter: NSNumberFormatter = { - let currencyLocale = self.locale - let currentLocale = NSLocale.currentLocale() let fmtr = NSNumberFormatter() fmtr.numberStyle = .CurrencyStyle fmtr.currencyCode = self._code - let symbol = currencyLocale.currencySymbol - fmtr.currencySymbol = currentLocale.displayNameForKey(NSLocaleCurrencySymbol, value: symbol) ?? symbol - fmtr.currencyGroupingSeparator = currentLocale.currencyGroupingSeparator - fmtr.currencyDecimalSeparator = currentLocale.currencyDecimalSeparator return fmtr }() @@ -173,6 +205,3 @@ public struct Currency { public static var sharedInstance = Local(locale: NSLocale.currentLocale()) } } - - - diff --git a/Money/Shared/Decimal/Decimal.swift b/Money/Shared/Decimal/Decimal.swift index 9e67a09..b1c3398 100644 --- a/Money/Shared/Decimal/Decimal.swift +++ b/Money/Shared/Decimal/Decimal.swift @@ -99,23 +99,3 @@ public final class _DecimalCoder: NSObject, } -// TODO: - Move these into DecimalNumberType - -extension NSNumberFormatter { - - func stringFromDecimal(decimal: _Decimal) -> String? { - return stringFromNumber(decimal.storage) - } - - func formattedStringWithStyle(style: NSNumberFormatterStyle) -> _Decimal -> String { - let currentStyle = numberStyle - numberStyle = style - let result: _Decimal -> String = { decimal in - return self.stringFromDecimal(decimal)! - } - numberStyle = currentStyle - return result - } -} - - diff --git a/Money/Shared/Locale.swift b/Money/Shared/Locale.swift index 5e53eec..b9eed8e 100644 --- a/Money/Shared/Locale.swift +++ b/Money/Shared/Locale.swift @@ -31,17 +31,21 @@ extension LocaleType where Self: LanguageType, Self: CountryType { } } -internal extension NSLocale { +public extension NSLocale { - var currencySymbol: String { - return objectForKey(NSLocaleCurrencySymbol) as! String + var currencyCode: String? { + return objectForKey(NSLocaleCurrencyCode) as? String } - var currencyGroupingSeparator: String { - return objectForKey(NSLocaleGroupingSeparator) as! String + var currencySymbol: String? { + return objectForKey(NSLocaleCurrencySymbol) as? String } - var currencyDecimalSeparator: String { - return objectForKey(NSLocaleDecimalSeparator) as! String + var currencyGroupingSeparator: String? { + return objectForKey(NSLocaleGroupingSeparator) as? String + } + + var currencyDecimalSeparator: String? { + return objectForKey(NSLocaleDecimalSeparator) as? String } } \ No newline at end of file diff --git a/Money/Shared/Money.swift b/Money/Shared/Money.swift index 2a14ba8..d6e93c9 100644 --- a/Money/Shared/Money.swift +++ b/Money/Shared/Money.swift @@ -53,59 +53,53 @@ public protocol MoneyType: DecimalNumberType, ValueCoding { // MARK: - MoneyType Extension -public extension MoneyType { +public extension MoneyType where DecimalStorageType == NSDecimalNumber { + + /// Convenience access to the "amount" as an NSDecimalNumber. + var amount: DecimalStorageType { + return storage + } /** ### Formatted String - This function will format the Money type into a string suitable - for the current localization. It accepts an parameter for the - style `NSNumberFormatterStyle`. Note that iOS 9 and OS X 10.11 - added new styles which are relevant for currency. - - These are `.CurrencyISOCodeStyle`, `.CurrencyPluralStyle`, and - `.CurrencyAccountingStyle`. - */ - func formattedWithStyle(style: NSNumberFormatterStyle = .CurrencyStyle) -> String { - return Currency.formatter.formattedStringWithStyle(style)(decimal) - } -} + This function will format the Money type into a string for + the current locale. -extension MoneyType where Currency: ISOCurrencyType { + For custom currencies which define their own currency code, + create a lazy static `NSNumberFormatter`. Set the following + properties on it: `currencySymbol`, `internationalCurrencySymbol` + `currencyGroupingSeparator` and `currencyDecimalSeparator`, as they + will be used when formatting the string. Feel free to fall back to + the current locale's values for any of these to maintain + natural looking formatting. See the example project for more. - public func formattedForLocale(locale: Locale, style: NSNumberFormatterStyle = .CurrencyStyle) -> String { - return formattedForLocaleId(locale.localeIdentifier, style: style) + - parameter style: the `NSNumberFormatterStyle` to use. + - returns: a localized and formatted string for the money amount. + */ + func formattedWithStyle(style: NSNumberFormatterStyle) -> String { + return Currency.formattedWithStyle(style, forLocaleId: NSLocale.currentLocale().localeIdentifier)(amount) } /** - ### Localized Formatted String + ### Formatted String for specific Locale - This function will format the Money into a string suitable - for the provided a locale identifier. - */ - public func formattedForLocaleId(localeId: String, style: NSNumberFormatterStyle = .CurrencyStyle) -> String { - let locale = NSLocale(localeIdentifier: NSLocale.canonicalLocaleIdentifierFromString(localeId)) - return formattedForLocale(locale) - } - - internal func formattedForLocale(locale: NSLocale, style: NSNumberFormatterStyle = .CurrencyStyle) -> String { - __formatter.locale = locale - __formatter.numberStyle = style - __formatter.currencyCode = Currency.code - __formatter.currencySymbol = Currency.symbol - __formatter.currencyGroupingSeparator = locale.currencyGroupingSeparator - __formatter.currencyDecimalSeparator = locale.currencyDecimalSeparator - return __formatter.stringFromDecimal(decimal)! - } -} + This function will format the Money type into a string suitable + for a specific local. It accepts an parameter for the + style `NSNumberFormatterStyle`. Note that iOS 9 and OS X 10.11 + added new styles which are relevant for currency. -public extension MoneyType where DecimalStorageType == NSDecimalNumber { + These are `.CurrencyISOCodeStyle`, `.CurrencyPluralStyle`, and + `.CurrencyAccountingStyle`. - /// Convenience access to the "amount" as an NSDecimalNumber. - var amount: DecimalStorageType { - return storage + - parameter style: the `NSNumberFormatterStyle` to use. + - parameter locale: a `Locale` value + - returns: a localized and formatted string for the money amount. + */ + func formattedWithStyle(style: NSNumberFormatterStyle, forLocale locale: Locale) -> String { + return Currency.formattedWithStyle(style, forLocale: locale)(amount) } } @@ -291,7 +285,7 @@ extension _Money: CustomStringConvertible { NSNumberFormatterStyle.CurrencyStyle. */ public var description: String { - return formattedWithStyle() + return formattedWithStyle(.CurrencyStyle) } } diff --git a/Tests/Shared/MoneyTests.swift b/Tests/Shared/MoneyTests.swift index a3a27ae..8e628af 100644 --- a/Tests/Shared/MoneyTests.swift +++ b/Tests/Shared/MoneyTests.swift @@ -63,6 +63,11 @@ class MoneyInitializerTests: MoneyTests { money = 10 XCTAssertEqual(money.negative, -10) } + + func test__money_amount() { + money = 10 + XCTAssertEqual(money.amount, NSDecimalNumber(integer: 10)) + } } class MoneyEqualityTests: XCTestCase { @@ -262,42 +267,36 @@ class MoneyDescriptionTests: MoneyTests { func test__gbp_description() { XCTAssertEqual(Currency.GBP.code, "GBP") - XCTAssertEqual(Currency.GBP.symbol, "£") XCTAssertEqual(gbp.description, "£100.00") XCTAssertEqual(Currency.GBP.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } func test__usd_description() { XCTAssertEqual(Currency.USD.code, "USD") - XCTAssertEqual(Currency.USD.symbol, "US$") XCTAssertEqual(usd.description, "US$99.00") XCTAssertEqual(Currency.USD.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } func test__cad_description() { XCTAssertEqual(Currency.CAD.code, "CAD") - XCTAssertEqual(Currency.CAD.symbol, "CA$") XCTAssertEqual(cad.description, "CA$102.01") XCTAssertEqual(Currency.CAD.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } func test__aud_description() { XCTAssertEqual(Currency.AUD.code, "AUD") - XCTAssertEqual(Currency.AUD.symbol, "A$") XCTAssertEqual(aud.description, "A$100.00") XCTAssertEqual(Currency.AUD.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } func test__eur_description() { XCTAssertEqual(Currency.EUR.code, "EUR") - XCTAssertEqual(Currency.EUR.symbol, "€") XCTAssertEqual(eur.description, "€249.50") XCTAssertEqual(Currency.EUR.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } func test__jpy_description() { XCTAssertEqual(Currency.JPY.code, "JPY") - XCTAssertEqual(Currency.JPY.symbol, "JP¥") XCTAssertEqual(Currency.JPY.scale, 0) XCTAssertEqual(jpy.description, "JP¥320") XCTAssertEqual(Currency.JPY.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) @@ -323,19 +322,14 @@ class MoneyFormattingTests: MoneyTests { XCTAssertTrue(gb || us) } - func test__formatted_for_es_ES() { - let formatted = gbp.formattedForLocaleId("es_ES") - XCTAssertEqual(formatted, "100,00 £") - } - func test__formatted_for_Spanish_Spain() { - let formatted = gbp.formattedForLocale(.Spanish(.Spain)) - XCTAssertEqual(formatted, "100,00 £") + let result = gbp.formattedWithStyle(.CurrencyStyle, forLocale: .Spanish(.Spain)) + XCTAssertEqual(result, "100,00 GBP") } func test__formatted_for_English_UnitedKingdom() { - let formatted = gbp.formattedForLocale(.English(.UnitedKingdom)) - XCTAssertEqual(formatted, "£100.00") + let result = gbp.formattedWithStyle(.CurrencyStyle, forLocale: .English(.UnitedKingdom)) + XCTAssertEqual(result, "£100.00") } } From 24ba86b081e0947b4ca09eb63000d718033a6ec5 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 14:27:56 +0000 Subject: [PATCH 11/24] [MNY-24]: Resets formatter state --- Money/Shared/Currency.swift | 1 + Money/Shared/Locale.swift | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Money/Shared/Currency.swift b/Money/Shared/Currency.swift index d54d91d..002b0b0 100644 --- a/Money/Shared/Currency.swift +++ b/Money/Shared/Currency.swift @@ -81,6 +81,7 @@ public extension CurrencyType { } static func formattedWithStyle(style: NSNumberFormatterStyle, forLocale locale: NSLocale) -> NSDecimalNumber -> String { + __formatter.reset() __formatter.locale = locale __formatter.numberStyle = style switch locale.currencyCode { diff --git a/Money/Shared/Locale.swift b/Money/Shared/Locale.swift index b9eed8e..94b55a4 100644 --- a/Money/Shared/Locale.swift +++ b/Money/Shared/Locale.swift @@ -48,4 +48,14 @@ public extension NSLocale { var currencyDecimalSeparator: String? { return objectForKey(NSLocaleDecimalSeparator) as? String } +} + +internal extension NSNumberFormatter { + func reset() { + currencyCode = nil + currencySymbol = nil + internationalCurrencySymbol = nil + currencyGroupingSeparator = nil + currencyDecimalSeparator = nil + } } \ No newline at end of file From 930c44d9d1b001967000803d74a3aa7542fa1209 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 15:32:48 +0000 Subject: [PATCH 12/24] [MNY-24]: Updates the custom currencies --- .../Custom Money/Custom Money/Currencies.swift | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Examples/Custom Money/Custom Money/Currencies.swift b/Examples/Custom Money/Custom Money/Currencies.swift index b1bd4eb..e79be0f 100644 --- a/Examples/Custom Money/Custom Money/Currencies.swift +++ b/Examples/Custom Money/Custom Money/Currencies.swift @@ -9,20 +9,23 @@ import Foundation import Money -protocol MyCustomCurrencyType: CurrencyType { } +protocol MyCustomCurrencyType: CustomCurrencyType { } extension Currency { final class Heart: MyCustomCurrencyType { static let code: String = "HEARTS" - static let symbol: String = "❤️" static let scale: Int = 0 static let formatter: NSNumberFormatter = { let fmtr = NSNumberFormatter() fmtr.numberStyle = .CurrencyStyle fmtr.maximumFractionDigits = Currency.Heart.scale - fmtr.currencySymbol = Currency.Heart.symbol + fmtr.currencySymbol = "❤️" + fmtr.internationalCurrencySymbol = Currency.Heart.code + let locale = NSLocale.currentLocale() + fmtr.currencyGroupingSeparator = locale.currencyGroupingSeparator + fmtr.currencyDecimalSeparator = locale.currencyDecimalSeparator return fmtr }() } @@ -30,13 +33,16 @@ extension Currency { final class Bee: MyCustomCurrencyType { static let code: String = "BEES" - static let symbol: String = "🐝" static let scale: Int = 0 static let formatter: NSNumberFormatter = { let fmtr = NSNumberFormatter() fmtr.numberStyle = .CurrencyStyle fmtr.maximumFractionDigits = Currency.Bee.scale - fmtr.currencySymbol = Currency.Bee.symbol + fmtr.currencySymbol = "🐝" + fmtr.internationalCurrencySymbol = Currency.Bee.code + let locale = NSLocale.currentLocale() + fmtr.currencyGroupingSeparator = locale.currencyGroupingSeparator + fmtr.currencyDecimalSeparator = locale.currencyDecimalSeparator return fmtr }() } From d2a3d866825f39d67a9b36355f999c1617749384 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 15:33:43 +0000 Subject: [PATCH 13/24] [MNY-24]: Updates Custom Money pods --- Examples/Custom Money/Podfile.lock | 4 +- .../Pods/Local Podspecs/Money.podspec.json | 4 +- Examples/Custom Money/Pods/Manifest.lock | 4 +- .../Pods/Pods.xcodeproj/project.pbxproj | 605 +++++++++--------- .../Target Support Files/Money/Info.plist | 40 +- .../Pods-Custom Money/Info.plist | 40 +- .../Target Support Files/Result/Info.plist | 40 +- .../SwiftyJSON/Info.plist | 40 +- .../ValueCoding/Info.plist | 40 +- 9 files changed, 405 insertions(+), 412 deletions(-) diff --git a/Examples/Custom Money/Podfile.lock b/Examples/Custom Money/Podfile.lock index c58e599..539de3d 100644 --- a/Examples/Custom Money/Podfile.lock +++ b/Examples/Custom Money/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - Money (1.2.1): + - Money (1.3.0): - Result (= 0.6.0-beta.6) - SwiftyJSON - ValueCoding @@ -15,7 +15,7 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - Money: 7bf4b32f795e1eb867c2fcebaaf90b3249824438 + Money: 80739aa547740640fd960128baa40a28a22cc91b Result: dc390d0b58f9ec43fcd536f1ebdd130803cc6cbc SwiftyJSON: 592b53bee5ef3dd9b3bebc6b9cb7ee35426ae8c3 ValueCoding: 54486fde2d7b1c2f1eb46de260b95340abed5bde diff --git a/Examples/Custom Money/Pods/Local Podspecs/Money.podspec.json b/Examples/Custom Money/Pods/Local Podspecs/Money.podspec.json index 1ad5f85..068f864 100644 --- a/Examples/Custom Money/Pods/Local Podspecs/Money.podspec.json +++ b/Examples/Custom Money/Pods/Local Podspecs/Money.podspec.json @@ -1,6 +1,6 @@ { "name": "Money", - "version": "1.2.1", + "version": "1.3.0", "summary": "Swift types for working with Money.", "description": "Money is a Swift cross platform framework for iOS, watchOS, tvOS and OS X. \n\nIt provides types and functionality to help represent and manipulate money \nand currency related information.", "homepage": "https://github.com/danthorpe/Money", @@ -10,7 +10,7 @@ }, "source": { "git": "https://github.com/danthorpe/Money.git", - "tag": "1.2.1" + "tag": "1.3.0" }, "module_name": "Money", "social_media_url": "https://twitter.com/danthorpe", diff --git a/Examples/Custom Money/Pods/Manifest.lock b/Examples/Custom Money/Pods/Manifest.lock index c58e599..539de3d 100644 --- a/Examples/Custom Money/Pods/Manifest.lock +++ b/Examples/Custom Money/Pods/Manifest.lock @@ -1,5 +1,5 @@ PODS: - - Money (1.2.1): + - Money (1.3.0): - Result (= 0.6.0-beta.6) - SwiftyJSON - ValueCoding @@ -15,7 +15,7 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - Money: 7bf4b32f795e1eb867c2fcebaaf90b3249824438 + Money: 80739aa547740640fd960128baa40a28a22cc91b Result: dc390d0b58f9ec43fcd536f1ebdd130803cc6cbc SwiftyJSON: 592b53bee5ef3dd9b3bebc6b9cb7ee35426ae8c3 ValueCoding: 54486fde2d7b1c2f1eb46de260b95340abed5bde diff --git a/Examples/Custom Money/Pods/Pods.xcodeproj/project.pbxproj b/Examples/Custom Money/Pods/Pods.xcodeproj/project.pbxproj index 0336630..ce7f2d1 100644 --- a/Examples/Custom Money/Pods/Pods.xcodeproj/project.pbxproj +++ b/Examples/Custom Money/Pods/Pods.xcodeproj/project.pbxproj @@ -7,113 +7,115 @@ objects = { /* Begin PBXBuildFile section */ - 01CDC2329E573772C61437C6D9E424C6 /* ValueCoding.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C29D8E4CA9E4CF9452CBCB9F8D56071 /* ValueCoding.framework */; }; - 043D5BD57A25AE71536828CA8DA7FF01 /* Autogenerated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E9BC048FABEEEF99AB0BC46166AAC88 /* Autogenerated.swift */; }; - 050CCBF1EA6669EBB882EA43B6519150 /* DecimalNumberType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4299D0CBF7A4E89A05E352987824427 /* DecimalNumberType.swift */; }; - 071010808041919584FA4C48CF0EDDF8 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCB9149D7C1AAA968AE461BDB9D1EEE8 /* Result.swift */; }; + 038C8E58B7B9DAFF0FD566A7007611B4 /* SwiftyJSON-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E2CDFCF407B3970A3F2FD3C19CCA4CE7 /* SwiftyJSON-dummy.m */; }; + 0729C5D8206CD9778B09748985945980 /* Bitcoin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08BC67A546C2AFC811EEBC0A3EA3D057 /* Bitcoin.swift */; }; 09F8C9409DF28C51561C0D4BCBDB7426 /* Pods-Custom Money-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D3CEE659D9C1D3DEA521E896D331964 /* Pods-Custom Money-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 102C7228A7DBF85C365042333B510AAD /* SwiftyJSON-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0216247E5703DEFCB395822BEDEDB978 /* SwiftyJSON-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 159F21B1178289B764BCD3FE003A0885 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D1FC653D131B20022B75023F33F250B9 /* Result.framework */; }; - 18B920DEB8C03D96876FED863C3F067D /* ValueCoding-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B5E95FBF4C047EA6401BB7B12E42A8B7 /* ValueCoding-dummy.m */; }; - 1BE369EA4E4AA3AC22FFEA752BAFE11A /* NSDecimalExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B22516CBC90CD5563F339D7D2D36CEB /* NSDecimalExtensions.swift */; }; - 3486EA9DA434ABCFB425595607F7CF60 /* Decimal.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA0150BA63C11CE658A19419D5BA0242 /* Decimal.swift */; }; + 0DEB71230E556C519D20B52B81856183 /* SwiftyJSON.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77FD247247D6D3CDBF638A9DB0EBDB4E /* SwiftyJSON.framework */; }; + 15A05B248F68888003FEABA47768DE1D /* ResultType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F003A917BF6D1C4FBA4D94B06C30179 /* ResultType.swift */; }; + 236F3967A7690DD0C6FA01C8F896E602 /* ValueCoding-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 65E593BAC0D422045A94607A9C0A277E /* ValueCoding-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 25A9EA2A9FE60984C5E94D0B6D65B3A5 /* SwiftyJSON-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0216247E5703DEFCB395822BEDEDB978 /* SwiftyJSON-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2A9D3A5C8B3A63A8E0A83B9D201CE495 /* Money-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8689B0915191F6FC3B6A0628A6CB5D71 /* Money-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB379DF9ADAE615B5B854B0D09A84B3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8912AF1B024C1949E8DB3ECC403C4AE2 /* Foundation.framework */; }; + 2D28051F1BDF7ADC153BFE8B89FBD9C9 /* Yahoo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F4E5AA87C3A971A927D7266A03C6007 /* Yahoo.swift */; }; 35575A63DB40EB8EC8BFD8189093A5DB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8912AF1B024C1949E8DB3ECC403C4AE2 /* Foundation.framework */; }; - 36E93D1BBF5A6FCF286387141DD6A1A3 /* Currency.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAC6FFF0A1B09876AD5FBF28732DEEF9 /* Currency.swift */; }; - 36F55053B0603A0FFDE8B95F9C0DE60D /* Bitcoin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98BFC35404280D2F4A945B4AB90E6A32 /* Bitcoin.swift */; }; - 39CBED50C7B06A334792D15FB072BAF2 /* Result-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F158272DDE3E68231F6FE2A3DEB56C4E /* Result-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 454630A1C320EC2DB1FF6E8757BFAB9D /* Result-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F2976F6779F80CE007235A83876CE7 /* Result-dummy.m */; }; - 46076C520F75FE0CC485879CA5FA01A4 /* ValueCoding-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 65E593BAC0D422045A94607A9C0A277E /* ValueCoding-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 38B27E2E94FCEAD56BED62B563CA0EC6 /* Money-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C22C68F5162837507ABB2E5CBA7243A /* Money-dummy.m */; }; + 428563C265D3F5B67D83A2473C70660F /* Support.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CDB0B04066D7BD85C7774722D584516 /* Support.swift */; }; 46B661B9D41457BFE21F2618E7CCC4E0 /* Pods-Custom Money-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9600516FB0E389F99DD6A409A89CA451 /* Pods-Custom Money-dummy.m */; }; - 4EBC5C5FE22229EDD33BDED9F754F600 /* FX.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D643686085217B859B62EB64AE65079 /* FX.swift */; }; - 57E91E64CD037A256E4699E0CA7F175D /* NSDecimalNumberExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F606D7587EF018F692AD17993DB7FC2 /* NSDecimalNumberExtensions.swift */; }; - 6970AE86E02D00EF04C76F2BFE64FC8E /* ResultType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F003A917BF6D1C4FBA4D94B06C30179 /* ResultType.swift */; }; - 7F9E59EE6FF0200ACA36025629303B3A /* OpenExchangeRates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2688CBE6732BE29EFC1AB90D9C90FB7C /* OpenExchangeRates.swift */; }; - 9A7EF57674C8EC22B7D65268D0A4DE03 /* Money-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C22C68F5162837507ABB2E5CBA7243A /* Money-dummy.m */; }; - 9C6A17DF519A656ED0784EE10CC4CB6E /* Money.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4D79982E052F868FEAD4C6B411A43AD /* Money.swift */; }; - 9F788DE02454F4895B117B1FA84DEA91 /* Money-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8689B0915191F6FC3B6A0628A6CB5D71 /* Money-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A7F546F1578C13FC4E669EA84D9A143A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8912AF1B024C1949E8DB3ECC403C4AE2 /* Foundation.framework */; }; - B0A5F205F967B27C6FDF03220B3634BB /* ValueCoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED5BC5B78EBB608AE95556AC64F2F724 /* ValueCoding.swift */; }; - B689C6A1DE32D8E2CBC8204AC806B3B4 /* Yahoo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1F3AC336A2B14A1E454CFA3053A3446 /* Yahoo.swift */; }; - CA78A8D38649B0911E61216F1024421C /* SwiftyJSON.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77FD247247D6D3CDBF638A9DB0EBDB4E /* SwiftyJSON.framework */; }; - CB3F617203CDA93497D7B57E9CA36531 /* ApplePay.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7DED3DF92386E03A6F560446322575E /* ApplePay.swift */; }; - CC5136509641EA8530A96E91EA4EE142 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8912AF1B024C1949E8DB3ECC403C4AE2 /* Foundation.framework */; }; - CF0D7CC11E07DB9E560288780B090008 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8912AF1B024C1949E8DB3ECC403C4AE2 /* Foundation.framework */; }; - D068F9F5C541D23AAC5A8A8326B0E0EA /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31FCA3CC32B1FFB7E577A3FD7C8BDC8 /* SwiftyJSON.swift */; }; - E3BCFF79F7FA73444656346BFE183DFB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8912AF1B024C1949E8DB3ECC403C4AE2 /* Foundation.framework */; }; - E44DAE377F46DED2E5F35ECCF2B20382 /* SwiftyJSON-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E2CDFCF407B3970A3F2FD3C19CCA4CE7 /* SwiftyJSON-dummy.m */; }; - EDA7178EE56DA34D5AC145BE581FD88C /* Support.swift in Sources */ = {isa = PBXBuildFile; fileRef = 421293E5BE5A4D53D3EFD8B0D85E6C5A /* Support.swift */; }; + 55F59EF2FEC2FEE3BC277F4BA1D4F09A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8912AF1B024C1949E8DB3ECC403C4AE2 /* Foundation.framework */; }; + 591176D28A122FFA17E011864A776993 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCB9149D7C1AAA968AE461BDB9D1EEE8 /* Result.swift */; }; + 5949E7BCFC6C1C7E8C45060A34A6F716 /* Currency.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FFDF2554FD50F0FE48999A0C3ED4901 /* Currency.swift */; }; + 604C3EF6EBD60E420F79C960C0FFE3F3 /* Autogenerated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65BA58A579BB1C7C57F7BB981A00EE3B /* Autogenerated.swift */; }; + 6147CF51A602C3FCA8FEDE84877B7ACD /* ValueCoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED5BC5B78EBB608AE95556AC64F2F724 /* ValueCoding.swift */; }; + 6DB484443FAE1B97626FAAB91D9E7BF6 /* Result-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F158272DDE3E68231F6FE2A3DEB56C4E /* Result-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 70F55C50ABEB92E976EE1CB30E2A47AC /* NSDecimalNumberExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E62925B3150C7C3667A39618DC790FEE /* NSDecimalNumberExtensions.swift */; }; + 7728D251CE689827DF8E05558D72C81E /* Result-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F2976F6779F80CE007235A83876CE7 /* Result-dummy.m */; }; + 78C32312A383054CE163CB56EB4A6D48 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31FCA3CC32B1FFB7E577A3FD7C8BDC8 /* SwiftyJSON.swift */; }; + 7FBF37C99152E404ECA674EFB04AF389 /* NSDecimalExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85AC61CD09C9146602035B3FAD8286E8 /* NSDecimalExtensions.swift */; }; + 8248BB0527F89719F6C82AED4222C9F6 /* DecimalNumberType.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAB4E53658C315D2C1DA1EF7648011CE /* DecimalNumberType.swift */; }; + 9274FF433AB9B56CF48FC7288EF9325F /* FX.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5930B31AFF68C5977278446CDA62117 /* FX.swift */; }; + A4FD35EB1940F9886E10B10616AB28C1 /* Decimal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96019E6C4F5442A1E3808A4FE6F16AC7 /* Decimal.swift */; }; + A561B627943D37C46AB4D233F70A4DCB /* Money.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4AAAAC72DECF91163331BFCDD583341 /* Money.swift */; }; + C5B2410FDFA66FDB0ED18EBBD613011B /* ValueCoding.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C29D8E4CA9E4CF9452CBCB9F8D56071 /* ValueCoding.framework */; }; + C99613480BF41E01DBBCC5EC99AC5205 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D1FC653D131B20022B75023F33F250B9 /* Result.framework */; }; + CE1689402744CCE280B0F756DA50ECF3 /* ApplePay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09A7BDAF606BBEA6690D697164B25D64 /* ApplePay.swift */; }; + D5EDA42C7061FECC68057157E8E8E72E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8912AF1B024C1949E8DB3ECC403C4AE2 /* Foundation.framework */; }; + DBC86ECB83D8397B20E057F9BF037D81 /* Locale.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B6F31F259C914449AFEB191BD7477F /* Locale.swift */; }; + DE8442956EAF8484B2A954CE7327FA3B /* OpenExchangeRates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C8568ADB63EDF92989E900A1D6364DF /* OpenExchangeRates.swift */; }; + E9B5A442515061359B42AD145087D2CB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8912AF1B024C1949E8DB3ECC403C4AE2 /* Foundation.framework */; }; + F4B434FCD7E72D2F15FBE1EA3D4863D6 /* ValueCoding-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B5E95FBF4C047EA6401BB7B12E42A8B7 /* ValueCoding-dummy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 016D73A97AF1E88DAC05D1442CBF12BD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 4BC85735EDC74D4318B525FA45559B2F; - remoteInfo = ValueCoding; - }; 1DFE2A02B5C6BDFE88F8CA3DFB0FC286 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 1CC232158DD850F851750D630A1619A0; + remoteGlobalIDString = 3347657561F4F3F50CD418F62B4DC36A; remoteInfo = Money; }; - 2E4D0664D7A4441731CDD1F17F0A0717 /* PBXContainerItemProxy */ = { + 36023380F037B6AB8D4492DCA3A27CD5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 8E3382292E423E66A74FE3955E9E2C56; + remoteGlobalIDString = 21908E9D85EA98581A510FE95B15E420; remoteInfo = SwiftyJSON; }; - 36023380F037B6AB8D4492DCA3A27CD5 /* PBXContainerItemProxy */ = { + 3908484531EEE6859A81940C9B59CFE0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 8E3382292E423E66A74FE3955E9E2C56; - remoteInfo = SwiftyJSON; + remoteGlobalIDString = 69E2A071A4F7A31B2F519FD88AF71F04; + remoteInfo = Result; }; 41F272EA7F75CA2CEBC8E35579A501C9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 23A7293FBB783111F02B04F92721B69F; + remoteGlobalIDString = 69E2A071A4F7A31B2F519FD88AF71F04; remoteInfo = Result; }; + 689A35B712A787B3B95896681D00CC01 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 71F9C95AC48B3432BDA235BBD238AE94; + remoteInfo = ValueCoding; + }; A8D7D5C5D4B2B0DBEA7CD9A1C6CA1131 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 4BC85735EDC74D4318B525FA45559B2F; + remoteGlobalIDString = 71F9C95AC48B3432BDA235BBD238AE94; remoteInfo = ValueCoding; }; - C2A1695E336A6C2B91B965F6F79808BC /* PBXContainerItemProxy */ = { + CE9631D32B8258D2F370FFAFA009EA36 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 23A7293FBB783111F02B04F92721B69F; - remoteInfo = Result; + remoteGlobalIDString = 21908E9D85EA98581A510FE95B15E420; + remoteInfo = SwiftyJSON; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 0216247E5703DEFCB395822BEDEDB978 /* SwiftyJSON-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftyJSON-umbrella.h"; sourceTree = ""; }; - 0B22516CBC90CD5563F339D7D2D36CEB /* NSDecimalExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NSDecimalExtensions.swift; sourceTree = ""; }; + 08BC67A546C2AFC811EEBC0A3EA3D057 /* Bitcoin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Bitcoin.swift; sourceTree = ""; }; + 09A7BDAF606BBEA6690D697164B25D64 /* ApplePay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ApplePay.swift; sourceTree = ""; }; 0DA8BD07E1098E205AF45D501594137C /* Result.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Result.modulemap; sourceTree = ""; }; + 1CDB0B04066D7BD85C7774722D584516 /* Support.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Support.swift; sourceTree = ""; }; 1DADDD5C59FCA27235ACA32605BD1527 /* SwiftyJSON-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftyJSON-prefix.pch"; sourceTree = ""; }; - 1E9BC048FABEEEF99AB0BC46166AAC88 /* Autogenerated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Autogenerated.swift; sourceTree = ""; }; - 2688CBE6732BE29EFC1AB90D9C90FB7C /* OpenExchangeRates.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = OpenExchangeRates.swift; sourceTree = ""; }; 269178DAB03BE95581C9933E5AD7BA5E /* Result.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Result.xcconfig; sourceTree = ""; }; - 2F606D7587EF018F692AD17993DB7FC2 /* NSDecimalNumberExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NSDecimalNumberExtensions.swift; sourceTree = ""; }; 3946E597A9D0AC3D75CAFD24BDAFD80E /* Money-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Money-prefix.pch"; sourceTree = ""; }; 3D3CEE659D9C1D3DEA521E896D331964 /* Pods-Custom Money-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Custom Money-umbrella.h"; sourceTree = ""; }; 3D699C1DA947CA5DBF82BE8927112AC0 /* ValueCoding.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = ValueCoding.modulemap; sourceTree = ""; }; 3F972EB6AED7000E61962C751DD7165D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 421293E5BE5A4D53D3EFD8B0D85E6C5A /* Support.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Support.swift; sourceTree = ""; }; 4C1460F12F695C031F6228E5D1C63C9F /* SwiftyJSON.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftyJSON.xcconfig; sourceTree = ""; }; 4F003A917BF6D1C4FBA4D94B06C30179 /* ResultType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultType.swift; path = Result/ResultType.swift; sourceTree = ""; }; + 4FFDF2554FD50F0FE48999A0C3ED4901 /* Currency.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Currency.swift; sourceTree = ""; }; 50DFB978AB699248C726E034F1B3B42F /* ValueCoding.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ValueCoding.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5C29D8E4CA9E4CF9452CBCB9F8D56071 /* ValueCoding.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ValueCoding.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5F4E5AA87C3A971A927D7266A03C6007 /* Yahoo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Yahoo.swift; sourceTree = ""; }; + 65BA58A579BB1C7C57F7BB981A00EE3B /* Autogenerated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Autogenerated.swift; sourceTree = ""; }; 65E593BAC0D422045A94607A9C0A277E /* ValueCoding-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ValueCoding-umbrella.h"; sourceTree = ""; }; 6668142B4A7F7A5DE42435220C510B8F /* Money.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Money.xcconfig; sourceTree = ""; }; 6C22C68F5162837507ABB2E5CBA7243A /* Money-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Money-dummy.m"; sourceTree = ""; }; @@ -123,84 +125,84 @@ 77FD247247D6D3CDBF638A9DB0EBDB4E /* SwiftyJSON.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftyJSON.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7D56F281EDF6E7A4ED5627141F4E4DA2 /* Pods_Custom_Money.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Custom_Money.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 83480F8F94E599798D9FFD36B467F76C /* Money.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Money.modulemap; sourceTree = ""; }; + 84B6F31F259C914449AFEB191BD7477F /* Locale.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Locale.swift; sourceTree = ""; }; + 85AC61CD09C9146602035B3FAD8286E8 /* NSDecimalExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NSDecimalExtensions.swift; sourceTree = ""; }; 8689B0915191F6FC3B6A0628A6CB5D71 /* Money-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Money-umbrella.h"; sourceTree = ""; }; 8912AF1B024C1949E8DB3ECC403C4AE2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 8D643686085217B859B62EB64AE65079 /* FX.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FX.swift; sourceTree = ""; }; 94291E74B2ABBA056AD28AD1873DD8E3 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 946FC5A04C491594712C2DB0468A8E59 /* Pods-Custom Money-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Custom Money-frameworks.sh"; sourceTree = ""; }; 9600516FB0E389F99DD6A409A89CA451 /* Pods-Custom Money-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Custom Money-dummy.m"; sourceTree = ""; }; + 96019E6C4F5442A1E3808A4FE6F16AC7 /* Decimal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Decimal.swift; sourceTree = ""; }; 9678D4111A5AF8A6BB307124E11DCA92 /* Pods-Custom Money-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Custom Money-resources.sh"; sourceTree = ""; }; - 98BFC35404280D2F4A945B4AB90E6A32 /* Bitcoin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Bitcoin.swift; sourceTree = ""; }; + 9C8568ADB63EDF92989E900A1D6364DF /* OpenExchangeRates.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = OpenExchangeRates.swift; sourceTree = ""; }; 9F8525B17F44112BA10D136F7F6C4089 /* ValueCoding-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ValueCoding-prefix.pch"; sourceTree = ""; }; A26E7BC45299526E4063BB4C61816580 /* Money.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Money.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A6DD5137FE8F22C2424D946F7E8D8D68 /* Pods-Custom Money-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Custom Money-acknowledgements.markdown"; sourceTree = ""; }; - B1F3AC336A2B14A1E454CFA3053A3446 /* Yahoo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Yahoo.swift; sourceTree = ""; }; - B4299D0CBF7A4E89A05E352987824427 /* DecimalNumberType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DecimalNumberType.swift; sourceTree = ""; }; B54A2AA14A7640E4A9B85F662D37A7D6 /* SwiftyJSON.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SwiftyJSON.modulemap; sourceTree = ""; }; B5E95FBF4C047EA6401BB7B12E42A8B7 /* ValueCoding-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ValueCoding-dummy.m"; sourceTree = ""; }; - B7DED3DF92386E03A6F560446322575E /* ApplePay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ApplePay.swift; sourceTree = ""; }; BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; C31FCA3CC32B1FFB7E577A3FD7C8BDC8 /* SwiftyJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftyJSON.swift; path = Source/SwiftyJSON.swift; sourceTree = ""; }; C3461681C9E35896A154A3D8722352D1 /* Pods-Custom Money-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Custom Money-acknowledgements.plist"; sourceTree = ""; }; - C4D79982E052F868FEAD4C6B411A43AD /* Money.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Money.swift; sourceTree = ""; }; C6AD9E331A620215773EDAE3D38920CB /* Pods-Custom Money.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Custom Money.release.xcconfig"; sourceTree = ""; }; - CA0150BA63C11CE658A19419D5BA0242 /* Decimal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Decimal.swift; sourceTree = ""; }; CCB9149D7C1AAA968AE461BDB9D1EEE8 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; D1FC653D131B20022B75023F33F250B9 /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D3F2B752C29D13FEC643AB1DFAD68B3E /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D5181C8B9D1105F7243EBF4BDFDA56F8 /* Result-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-prefix.pch"; sourceTree = ""; }; D619B7641BF35CCD0B69F64DE1F3B98A /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D8F2976F6779F80CE007235A83876CE7 /* Result-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-dummy.m"; sourceTree = ""; }; - DAC6FFF0A1B09876AD5FBF28732DEEF9 /* Currency.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Currency.swift; sourceTree = ""; }; DC0E8FE128B75E4AF4C971D16E94076E /* SwiftyJSON.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftyJSON.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DF6284F39323D79B75BEEB8C366DE87C /* Pods-Custom Money.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Custom Money.debug.xcconfig"; sourceTree = ""; }; E2CDFCF407B3970A3F2FD3C19CCA4CE7 /* SwiftyJSON-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftyJSON-dummy.m"; sourceTree = ""; }; + E62925B3150C7C3667A39618DC790FEE /* NSDecimalNumberExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NSDecimalNumberExtensions.swift; sourceTree = ""; }; + EAB4E53658C315D2C1DA1EF7648011CE /* DecimalNumberType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DecimalNumberType.swift; sourceTree = ""; }; ED5BC5B78EBB608AE95556AC64F2F724 /* ValueCoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ValueCoding.swift; path = ValueCoding/ValueCoding.swift; sourceTree = ""; }; F158272DDE3E68231F6FE2A3DEB56C4E /* Result-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-umbrella.h"; sourceTree = ""; }; + F4AAAAC72DECF91163331BFCDD583341 /* Money.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Money.swift; sourceTree = ""; }; F50C4C662DD8A2616FF07C3827D2AAC0 /* Pods-Custom Money.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-Custom Money.modulemap"; sourceTree = ""; }; + F5930B31AFF68C5977278446CDA62117 /* FX.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FX.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 1C6CB977C8427C2DD9292CCC7B862340 /* Frameworks */ = { + 26691E219EB71EEE5497C93262E46BE8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CC5136509641EA8530A96E91EA4EE142 /* Foundation.framework in Frameworks */, + 55F59EF2FEC2FEE3BC277F4BA1D4F09A /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 4716E670998219B6B6EB4A7AB3211D1C /* Frameworks */ = { + 2E83C281B196256F4D04B0202318FAA5 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 35575A63DB40EB8EC8BFD8189093A5DB /* Foundation.framework in Frameworks */, + E9B5A442515061359B42AD145087D2CB /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 4E63CDC2DF3B55480B8EB8C922BC8D2C /* Frameworks */ = { + 4716E670998219B6B6EB4A7AB3211D1C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E3BCFF79F7FA73444656346BFE183DFB /* Foundation.framework in Frameworks */, + 35575A63DB40EB8EC8BFD8189093A5DB /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7928477D0E27DA94424A3FF372E41D05 /* Frameworks */ = { + A387B697F1B332C664E5B917B7A44F89 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A7F546F1578C13FC4E669EA84D9A143A /* Foundation.framework in Frameworks */, + 2BB379DF9ADAE615B5B854B0D09A84B3 /* Foundation.framework in Frameworks */, + C99613480BF41E01DBBCC5EC99AC5205 /* Result.framework in Frameworks */, + 0DEB71230E556C519D20B52B81856183 /* SwiftyJSON.framework in Frameworks */, + C5B2410FDFA66FDB0ED18EBBD613011B /* ValueCoding.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - D33B3238A09F0DE15B806E36D744545D /* Frameworks */ = { + F18CA1F2FE54D2F1A91CC3F097D2662E /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CF0D7CC11E07DB9E560288780B090008 /* Foundation.framework in Frameworks */, - 159F21B1178289B764BCD3FE003A0885 /* Result.framework in Frameworks */, - CA78A8D38649B0911E61216F1024421C /* SwiftyJSON.framework in Frameworks */, - 01CDC2329E573772C61437C6D9E424C6 /* ValueCoding.framework in Frameworks */, + D5EDA42C7061FECC68057157E8E8E72E /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -244,15 +246,29 @@ name = Pods; sourceTree = ""; }; - 7C19DCF690047371AAE3833667886182 /* FX */ = { + 5DD2E484761187C567F4014DEAD6142B /* Decimal */ = { isa = PBXGroup; children = ( - 98BFC35404280D2F4A945B4AB90E6A32 /* Bitcoin.swift */, - 8D643686085217B859B62EB64AE65079 /* FX.swift */, - 2688CBE6732BE29EFC1AB90D9C90FB7C /* OpenExchangeRates.swift */, - B1F3AC336A2B14A1E454CFA3053A3446 /* Yahoo.swift */, + 96019E6C4F5442A1E3808A4FE6F16AC7 /* Decimal.swift */, + EAB4E53658C315D2C1DA1EF7648011CE /* DecimalNumberType.swift */, + 85AC61CD09C9146602035B3FAD8286E8 /* NSDecimalExtensions.swift */, + E62925B3150C7C3667A39618DC790FEE /* NSDecimalNumberExtensions.swift */, ); - path = FX; + path = Decimal; + sourceTree = ""; + }; + 6B4BC295AC3CACEFD0CD9987AFF043AD /* Shared */ = { + isa = PBXGroup; + children = ( + 65BA58A579BB1C7C57F7BB981A00EE3B /* Autogenerated.swift */, + 4FFDF2554FD50F0FE48999A0C3ED4901 /* Currency.swift */, + 84B6F31F259C914449AFEB191BD7477F /* Locale.swift */, + F4AAAAC72DECF91163331BFCDD583341 /* Money.swift */, + 1CDB0B04066D7BD85C7774722D584516 /* Support.swift */, + 5DD2E484761187C567F4014DEAD6142B /* Decimal */, + EE90FDC56D047DE31B05424C8AD23171 /* FX */, + ); + path = Shared; sourceTree = ""; }; 7CD8DE1FA9C24B39D42EAA6BE52E7E30 /* Products */ = { @@ -310,46 +326,13 @@ 8EECE84127C724CBF2DA747FDAD1ECBE /* Money */ = { isa = PBXGroup; children = ( - A596F2F01D5F21C44F61508BED008A83 /* Money */, + E5498F1F4B28BB7BA4A01D3CA741DBC9 /* Money */, EAA430956243F34196DE176B903AA873 /* Support Files */, ); name = Money; path = ../../..; sourceTree = ""; }; - 9D6C6B5B1D50EA6E1644D2E408D8EDE5 /* Decimal */ = { - isa = PBXGroup; - children = ( - CA0150BA63C11CE658A19419D5BA0242 /* Decimal.swift */, - B4299D0CBF7A4E89A05E352987824427 /* DecimalNumberType.swift */, - 0B22516CBC90CD5563F339D7D2D36CEB /* NSDecimalExtensions.swift */, - 2F606D7587EF018F692AD17993DB7FC2 /* NSDecimalNumberExtensions.swift */, - ); - path = Decimal; - sourceTree = ""; - }; - A596F2F01D5F21C44F61508BED008A83 /* Money */ = { - isa = PBXGroup; - children = ( - DB2700AD42E15CFDDE436C7EF1151C17 /* iOS */, - B33EF8AC085A9FA1394A0362E8A499C8 /* Shared */, - ); - path = Money; - sourceTree = ""; - }; - B33EF8AC085A9FA1394A0362E8A499C8 /* Shared */ = { - isa = PBXGroup; - children = ( - 1E9BC048FABEEEF99AB0BC46166AAC88 /* Autogenerated.swift */, - DAC6FFF0A1B09876AD5FBF28732DEEF9 /* Currency.swift */, - C4D79982E052F868FEAD4C6B411A43AD /* Money.swift */, - 421293E5BE5A4D53D3EFD8B0D85E6C5A /* Support.swift */, - 9D6C6B5B1D50EA6E1644D2E408D8EDE5 /* Decimal */, - 7C19DCF690047371AAE3833667886182 /* FX */, - ); - path = Shared; - sourceTree = ""; - }; B5C0E67CF8FBCF29AA3D76C4CEADF315 /* Result */ = { isa = PBXGroup; children = ( @@ -371,6 +354,14 @@ name = Frameworks; sourceTree = ""; }; + C47F2907133A2F3B86AD83E7515FF818 /* iOS */ = { + isa = PBXGroup; + children = ( + 09A7BDAF606BBEA6690D697164B25D64 /* ApplePay.swift */, + ); + path = iOS; + sourceTree = ""; + }; CAC5A6648E74B35CD2E9377F99CF2FF6 /* Development Pods */ = { isa = PBXGroup; children = ( @@ -395,12 +386,13 @@ name = iOS; sourceTree = ""; }; - DB2700AD42E15CFDDE436C7EF1151C17 /* iOS */ = { + E5498F1F4B28BB7BA4A01D3CA741DBC9 /* Money */ = { isa = PBXGroup; children = ( - B7DED3DF92386E03A6F560446322575E /* ApplePay.swift */, + C47F2907133A2F3B86AD83E7515FF818 /* iOS */, + 6B4BC295AC3CACEFD0CD9987AFF043AD /* Shared */, ); - path = iOS; + path = Money; sourceTree = ""; }; EAA430956243F34196DE176B903AA873 /* Support Files */ = { @@ -440,22 +432,33 @@ path = "../Target Support Files/Result"; sourceTree = ""; }; + EE90FDC56D047DE31B05424C8AD23171 /* FX */ = { + isa = PBXGroup; + children = ( + 08BC67A546C2AFC811EEBC0A3EA3D057 /* Bitcoin.swift */, + F5930B31AFF68C5977278446CDA62117 /* FX.swift */, + 9C8568ADB63EDF92989E900A1D6364DF /* OpenExchangeRates.swift */, + 5F4E5AA87C3A971A927D7266A03C6007 /* Yahoo.swift */, + ); + path = FX; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 0FEE4C6970CF21141A8C84FDD7AD1C3C /* Headers */ = { + 0F966CF81B22D45C45CF29E5C8648101 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 102C7228A7DBF85C365042333B510AAD /* SwiftyJSON-umbrella.h in Headers */, + 2A9D3A5C8B3A63A8E0A83B9D201CE495 /* Money-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 2EA34AA3BAC054D6E4642611EA11CCAC /* Headers */ = { + 3350670A2374EEDA693FC44587E4B025 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 39CBED50C7B06A334792D15FB072BAF2 /* Result-umbrella.h in Headers */, + 236F3967A7690DD0C6FA01C8F896E602 /* ValueCoding-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -467,94 +470,94 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 916A431FAF311C9A7FBBD1E61307F9A5 /* Headers */ = { + A6F163D67B06B223409FF5E4AF539111 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 46076C520F75FE0CC485879CA5FA01A4 /* ValueCoding-umbrella.h in Headers */, + 6DB484443FAE1B97626FAAB91D9E7BF6 /* Result-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - BB19B4B2D4F1CA7B3070B06759A30DA5 /* Headers */ = { + E0F0717B80C17559756C56973AB7F797 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 9F788DE02454F4895B117B1FA84DEA91 /* Money-umbrella.h in Headers */, + 25A9EA2A9FE60984C5E94D0B6D65B3A5 /* SwiftyJSON-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 1CC232158DD850F851750D630A1619A0 /* Money */ = { + 21908E9D85EA98581A510FE95B15E420 /* SwiftyJSON */ = { isa = PBXNativeTarget; - buildConfigurationList = 1388689AACE2A14DA17A521B69C583E6 /* Build configuration list for PBXNativeTarget "Money" */; + buildConfigurationList = EF8B566BDC1529DCD6650B788881F07D /* Build configuration list for PBXNativeTarget "SwiftyJSON" */; buildPhases = ( - 2099C4B3B11A468234DE1E5073510688 /* Sources */, - D33B3238A09F0DE15B806E36D744545D /* Frameworks */, - BB19B4B2D4F1CA7B3070B06759A30DA5 /* Headers */, + 6F63AE9B9F0FD2F4183A89AB038D03E0 /* Sources */, + 26691E219EB71EEE5497C93262E46BE8 /* Frameworks */, + E0F0717B80C17559756C56973AB7F797 /* Headers */, ); buildRules = ( ); dependencies = ( - 32935F77C460566C83EE30C50809F2F8 /* PBXTargetDependency */, - 7D4CA1F5E100235C4ED1197E6395406F /* PBXTargetDependency */, - D07CE80CD02E5C531AEAA644FC59C0B5 /* PBXTargetDependency */, ); - name = Money; - productName = Money; - productReference = A26E7BC45299526E4063BB4C61816580 /* Money.framework */; + name = SwiftyJSON; + productName = SwiftyJSON; + productReference = DC0E8FE128B75E4AF4C971D16E94076E /* SwiftyJSON.framework */; productType = "com.apple.product-type.framework"; }; - 23A7293FBB783111F02B04F92721B69F /* Result */ = { + 3347657561F4F3F50CD418F62B4DC36A /* Money */ = { isa = PBXNativeTarget; - buildConfigurationList = 081A3E84FFCCA0D120DA040D7C0642BB /* Build configuration list for PBXNativeTarget "Result" */; + buildConfigurationList = 173EF496D559077C97AB9793C9646A11 /* Build configuration list for PBXNativeTarget "Money" */; buildPhases = ( - D12A0EA6A0161FF6E494EB4EA0A5D7AF /* Sources */, - 1C6CB977C8427C2DD9292CCC7B862340 /* Frameworks */, - 2EA34AA3BAC054D6E4642611EA11CCAC /* Headers */, + 832E307CDD66999769ADF20C2F9FA8BC /* Sources */, + A387B697F1B332C664E5B917B7A44F89 /* Frameworks */, + 0F966CF81B22D45C45CF29E5C8648101 /* Headers */, ); buildRules = ( ); dependencies = ( + 2EF61614FB0F30281A7BB9BDEFDC3160 /* PBXTargetDependency */, + 6843AF9F2117F8FD41A3365C30CB4CE1 /* PBXTargetDependency */, + D54F965FD1C41C03DCE0DC012063512F /* PBXTargetDependency */, ); - name = Result; - productName = Result; - productReference = D619B7641BF35CCD0B69F64DE1F3B98A /* Result.framework */; + name = Money; + productName = Money; + productReference = A26E7BC45299526E4063BB4C61816580 /* Money.framework */; productType = "com.apple.product-type.framework"; }; - 4BC85735EDC74D4318B525FA45559B2F /* ValueCoding */ = { + 69E2A071A4F7A31B2F519FD88AF71F04 /* Result */ = { isa = PBXNativeTarget; - buildConfigurationList = 4323EA468273039AAF7A09F78393BBD8 /* Build configuration list for PBXNativeTarget "ValueCoding" */; + buildConfigurationList = F27989106635EC8785D98836E97BB0C5 /* Build configuration list for PBXNativeTarget "Result" */; buildPhases = ( - E2CDC2BAEBF7D5294E87D15A8B9B6484 /* Sources */, - 7928477D0E27DA94424A3FF372E41D05 /* Frameworks */, - 916A431FAF311C9A7FBBD1E61307F9A5 /* Headers */, + 431218A0886AE946F951B099864F8286 /* Sources */, + 2E83C281B196256F4D04B0202318FAA5 /* Frameworks */, + A6F163D67B06B223409FF5E4AF539111 /* Headers */, ); buildRules = ( ); dependencies = ( ); - name = ValueCoding; - productName = ValueCoding; - productReference = 50DFB978AB699248C726E034F1B3B42F /* ValueCoding.framework */; + name = Result; + productName = Result; + productReference = D619B7641BF35CCD0B69F64DE1F3B98A /* Result.framework */; productType = "com.apple.product-type.framework"; }; - 8E3382292E423E66A74FE3955E9E2C56 /* SwiftyJSON */ = { + 71F9C95AC48B3432BDA235BBD238AE94 /* ValueCoding */ = { isa = PBXNativeTarget; - buildConfigurationList = 4D982EA60D3570F60FB04AE8CC7B8895 /* Build configuration list for PBXNativeTarget "SwiftyJSON" */; + buildConfigurationList = 6F325C4B9048365BEF68BF26E84300EF /* Build configuration list for PBXNativeTarget "ValueCoding" */; buildPhases = ( - 110E1CABA46BB17D6EFDE17FD449ACE3 /* Sources */, - 4E63CDC2DF3B55480B8EB8C922BC8D2C /* Frameworks */, - 0FEE4C6970CF21141A8C84FDD7AD1C3C /* Headers */, + 4EA91A9E1134AB9B8EDCEE218EB77EB3 /* Sources */, + F18CA1F2FE54D2F1A91CC3F097D2662E /* Frameworks */, + 3350670A2374EEDA693FC44587E4B025 /* Headers */, ); buildRules = ( ); dependencies = ( ); - name = SwiftyJSON; - productName = SwiftyJSON; - productReference = DC0E8FE128B75E4AF4C971D16E94076E /* SwiftyJSON.framework */; + name = ValueCoding; + productName = ValueCoding; + productReference = 50DFB978AB699248C726E034F1B3B42F /* ValueCoding.framework */; productType = "com.apple.product-type.framework"; }; B63DBF20C97F25D4F844CB4BDFE4527A /* Pods-Custom Money */ = { @@ -585,7 +588,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0710; + LastUpgradeCheck = 0700; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -599,70 +602,71 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 1CC232158DD850F851750D630A1619A0 /* Money */, + 3347657561F4F3F50CD418F62B4DC36A /* Money */, B63DBF20C97F25D4F844CB4BDFE4527A /* Pods-Custom Money */, - 23A7293FBB783111F02B04F92721B69F /* Result */, - 8E3382292E423E66A74FE3955E9E2C56 /* SwiftyJSON */, - 4BC85735EDC74D4318B525FA45559B2F /* ValueCoding */, + 69E2A071A4F7A31B2F519FD88AF71F04 /* Result */, + 21908E9D85EA98581A510FE95B15E420 /* SwiftyJSON */, + 71F9C95AC48B3432BDA235BBD238AE94 /* ValueCoding */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - 110E1CABA46BB17D6EFDE17FD449ACE3 /* Sources */ = { + 431218A0886AE946F951B099864F8286 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E44DAE377F46DED2E5F35ECCF2B20382 /* SwiftyJSON-dummy.m in Sources */, - D068F9F5C541D23AAC5A8A8326B0E0EA /* SwiftyJSON.swift in Sources */, + 7728D251CE689827DF8E05558D72C81E /* Result-dummy.m in Sources */, + 591176D28A122FFA17E011864A776993 /* Result.swift in Sources */, + 15A05B248F68888003FEABA47768DE1D /* ResultType.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 2099C4B3B11A468234DE1E5073510688 /* Sources */ = { + 4EA91A9E1134AB9B8EDCEE218EB77EB3 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - CB3F617203CDA93497D7B57E9CA36531 /* ApplePay.swift in Sources */, - 043D5BD57A25AE71536828CA8DA7FF01 /* Autogenerated.swift in Sources */, - 36F55053B0603A0FFDE8B95F9C0DE60D /* Bitcoin.swift in Sources */, - 36E93D1BBF5A6FCF286387141DD6A1A3 /* Currency.swift in Sources */, - 3486EA9DA434ABCFB425595607F7CF60 /* Decimal.swift in Sources */, - 050CCBF1EA6669EBB882EA43B6519150 /* DecimalNumberType.swift in Sources */, - 4EBC5C5FE22229EDD33BDED9F754F600 /* FX.swift in Sources */, - 9A7EF57674C8EC22B7D65268D0A4DE03 /* Money-dummy.m in Sources */, - 9C6A17DF519A656ED0784EE10CC4CB6E /* Money.swift in Sources */, - 1BE369EA4E4AA3AC22FFEA752BAFE11A /* NSDecimalExtensions.swift in Sources */, - 57E91E64CD037A256E4699E0CA7F175D /* NSDecimalNumberExtensions.swift in Sources */, - 7F9E59EE6FF0200ACA36025629303B3A /* OpenExchangeRates.swift in Sources */, - EDA7178EE56DA34D5AC145BE581FD88C /* Support.swift in Sources */, - B689C6A1DE32D8E2CBC8204AC806B3B4 /* Yahoo.swift in Sources */, + F4B434FCD7E72D2F15FBE1EA3D4863D6 /* ValueCoding-dummy.m in Sources */, + 6147CF51A602C3FCA8FEDE84877B7ACD /* ValueCoding.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 9939AE9FAD1EEC366F8358A7D92606F6 /* Sources */ = { + 6F63AE9B9F0FD2F4183A89AB038D03E0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 46B661B9D41457BFE21F2618E7CCC4E0 /* Pods-Custom Money-dummy.m in Sources */, + 038C8E58B7B9DAFF0FD566A7007611B4 /* SwiftyJSON-dummy.m in Sources */, + 78C32312A383054CE163CB56EB4A6D48 /* SwiftyJSON.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - D12A0EA6A0161FF6E494EB4EA0A5D7AF /* Sources */ = { + 832E307CDD66999769ADF20C2F9FA8BC /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 454630A1C320EC2DB1FF6E8757BFAB9D /* Result-dummy.m in Sources */, - 071010808041919584FA4C48CF0EDDF8 /* Result.swift in Sources */, - 6970AE86E02D00EF04C76F2BFE64FC8E /* ResultType.swift in Sources */, + CE1689402744CCE280B0F756DA50ECF3 /* ApplePay.swift in Sources */, + 604C3EF6EBD60E420F79C960C0FFE3F3 /* Autogenerated.swift in Sources */, + 0729C5D8206CD9778B09748985945980 /* Bitcoin.swift in Sources */, + 5949E7BCFC6C1C7E8C45060A34A6F716 /* Currency.swift in Sources */, + A4FD35EB1940F9886E10B10616AB28C1 /* Decimal.swift in Sources */, + 8248BB0527F89719F6C82AED4222C9F6 /* DecimalNumberType.swift in Sources */, + 9274FF433AB9B56CF48FC7288EF9325F /* FX.swift in Sources */, + DBC86ECB83D8397B20E057F9BF037D81 /* Locale.swift in Sources */, + 38B27E2E94FCEAD56BED62B563CA0EC6 /* Money-dummy.m in Sources */, + A561B627943D37C46AB4D233F70A4DCB /* Money.swift in Sources */, + 7FBF37C99152E404ECA674EFB04AF389 /* NSDecimalExtensions.swift in Sources */, + 70F55C50ABEB92E976EE1CB30E2A47AC /* NSDecimalNumberExtensions.swift in Sources */, + DE8442956EAF8484B2A954CE7327FA3B /* OpenExchangeRates.swift in Sources */, + 428563C265D3F5B67D83A2473C70660F /* Support.swift in Sources */, + 2D28051F1BDF7ADC153BFE8B89FBD9C9 /* Yahoo.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - E2CDC2BAEBF7D5294E87D15A8B9B6484 /* Sources */ = { + 9939AE9FAD1EEC366F8358A7D92606F6 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 18B920DEB8C03D96876FED863C3F067D /* ValueCoding-dummy.m in Sources */, - B0A5F205F967B27C6FDF03220B3634BB /* ValueCoding.swift in Sources */, + 46B661B9D41457BFE21F2618E7CCC4E0 /* Pods-Custom Money-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -672,51 +676,51 @@ 14EE644027DDF28E4652404B99E3BE47 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SwiftyJSON; - target = 8E3382292E423E66A74FE3955E9E2C56 /* SwiftyJSON */; + target = 21908E9D85EA98581A510FE95B15E420 /* SwiftyJSON */; targetProxy = 36023380F037B6AB8D4492DCA3A27CD5 /* PBXContainerItemProxy */; }; - 32935F77C460566C83EE30C50809F2F8 /* PBXTargetDependency */ = { + 2EF61614FB0F30281A7BB9BDEFDC3160 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Result; - target = 23A7293FBB783111F02B04F92721B69F /* Result */; - targetProxy = C2A1695E336A6C2B91B965F6F79808BC /* PBXContainerItemProxy */; + target = 69E2A071A4F7A31B2F519FD88AF71F04 /* Result */; + targetProxy = 3908484531EEE6859A81940C9B59CFE0 /* PBXContainerItemProxy */; }; 5296D6953C077C85AFCB563124192C7D /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Result; - target = 23A7293FBB783111F02B04F92721B69F /* Result */; + target = 69E2A071A4F7A31B2F519FD88AF71F04 /* Result */; targetProxy = 41F272EA7F75CA2CEBC8E35579A501C9 /* PBXContainerItemProxy */; }; + 6843AF9F2117F8FD41A3365C30CB4CE1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SwiftyJSON; + target = 21908E9D85EA98581A510FE95B15E420 /* SwiftyJSON */; + targetProxy = CE9631D32B8258D2F370FFAFA009EA36 /* PBXContainerItemProxy */; + }; 6A5AB7BA465846DD13A7288647AE3D64 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Money; - target = 1CC232158DD850F851750D630A1619A0 /* Money */; + target = 3347657561F4F3F50CD418F62B4DC36A /* Money */; targetProxy = 1DFE2A02B5C6BDFE88F8CA3DFB0FC286 /* PBXContainerItemProxy */; }; - 7D4CA1F5E100235C4ED1197E6395406F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = SwiftyJSON; - target = 8E3382292E423E66A74FE3955E9E2C56 /* SwiftyJSON */; - targetProxy = 2E4D0664D7A4441731CDD1F17F0A0717 /* PBXContainerItemProxy */; - }; - D07CE80CD02E5C531AEAA644FC59C0B5 /* PBXTargetDependency */ = { + D54F965FD1C41C03DCE0DC012063512F /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = ValueCoding; - target = 4BC85735EDC74D4318B525FA45559B2F /* ValueCoding */; - targetProxy = 016D73A97AF1E88DAC05D1442CBF12BD /* PBXContainerItemProxy */; + target = 71F9C95AC48B3432BDA235BBD238AE94 /* ValueCoding */; + targetProxy = 689A35B712A787B3B95896681D00CC01 /* PBXContainerItemProxy */; }; DBB46D880EEEB766A474B6074D4B98DF /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = ValueCoding; - target = 4BC85735EDC74D4318B525FA45559B2F /* ValueCoding */; + target = 71F9C95AC48B3432BDA235BBD238AE94 /* ValueCoding */; targetProxy = A8D7D5C5D4B2B0DBEA7CD9A1C6CA1131 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 0D34E788556BF0117A9E393B729CD24D /* Release */ = { + 055D01E44408311F27903ADC8D38F0CA /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6668142B4A7F7A5DE42435220C510B8F /* Money.xcconfig */; + baseConfigurationReference = 269178DAB03BE95581C9933E5AD7BA5E /* Result.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -725,22 +729,22 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/Money/Money-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Money/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Money/Money.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Money; + MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = Result; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; 1A5C3AB79FFAD473C53D2FF59AD706F0 /* Debug */ = { isa = XCBuildConfiguration; @@ -763,7 +767,6 @@ OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = Pods_Custom_Money; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -774,9 +777,9 @@ }; name = Debug; }; - 5CCE459C2B148F060DEF089C2B8EF33E /* Release */ = { + 4BF3785E841E8BB4B44226A45951DD6B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C6AD9E331A620215773EDAE3D38920CB /* Pods-Custom Money.release.xcconfig */; + baseConfigurationReference = 765CD792203F037EA7D0D97B135C395A /* ValueCoding.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -785,18 +788,14 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - INFOPLIST_FILE = "Target Support Files/Pods-Custom Money/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/ValueCoding/ValueCoding-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/ValueCoding/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-Custom Money/Pods-Custom Money.modulemap"; + MODULEMAP_FILE = "Target Support Files/ValueCoding/ValueCoding.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_Custom_Money; + PRODUCT_NAME = ValueCoding; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -805,7 +804,7 @@ }; name = Release; }; - 657B2FFE0B4CA9A09BCD2EAB206D9F5F /* Debug */ = { + 5137075954854CFDC9FDBFD4055CD3C4 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 4C1460F12F695C031F6228E5D1C63C9F /* SwiftyJSON.xcconfig */; buildSettings = { @@ -822,21 +821,19 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/SwiftyJSON/SwiftyJSON.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = SwiftyJSON; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 70C41D73A07F76803797C9F3F186CDB7 /* Debug */ = { + 565952CEBE67B77B83B3660145873A03 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 269178DAB03BE95581C9933E5AD7BA5E /* Result.xcconfig */; + baseConfigurationReference = 6668142B4A7F7A5DE42435220C510B8F /* Money.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -845,27 +842,25 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Money/Money-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Money/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Result; + MODULEMAP_FILE = "Target Support Files/Money/Money.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = Money; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 832DBAC21B8F1C674768DF3C0F927D1D /* Release */ = { + 5CCE459C2B148F060DEF089C2B8EF33E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4C1460F12F695C031F6228E5D1C63C9F /* SwiftyJSON.xcconfig */; + baseConfigurationReference = C6AD9E331A620215773EDAE3D38920CB /* Pods-Custom Money.release.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -874,15 +869,17 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/SwiftyJSON/SwiftyJSON-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SwiftyJSON/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-Custom Money/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/SwiftyJSON/SwiftyJSON.modulemap"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Custom Money/Pods-Custom Money.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = SwiftyJSON; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = Pods_Custom_Money; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -891,9 +888,9 @@ }; name = Release; }; - 96075CA15D96321DD896806DBD3CAF71 /* Release */ = { + 829ACAAF4BB2003C92037894037A08CB /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 269178DAB03BE95581C9933E5AD7BA5E /* Result.xcconfig */; + baseConfigurationReference = 765CD792203F037EA7D0D97B135C395A /* ValueCoding.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -902,26 +899,26 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/ValueCoding/ValueCoding-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/ValueCoding/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Result; + MODULEMAP_FILE = "Target Support Files/ValueCoding/ValueCoding.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = ValueCoding; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - A35C6C2EC69A39FE32D454EE4C141800 /* Debug */ = { + 88CDFA37A74FC54F3B6175503E5E98E2 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6668142B4A7F7A5DE42435220C510B8F /* Money.xcconfig */; + baseConfigurationReference = 269178DAB03BE95581C9933E5AD7BA5E /* Result.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -930,23 +927,21 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/Money/Money-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Money/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Money/Money.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Money; + MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = Result; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; C074F63C9EE7CB4D8C618390A32CEC35 /* Debug */ = { isa = XCBuildConfiguration; @@ -966,7 +961,6 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -988,9 +982,9 @@ }; name = Debug; }; - D42841C752D344FA300EDE4604BC87A1 /* Debug */ = { + C96816307E3A214E54456E8FF50C29B9 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 765CD792203F037EA7D0D97B135C395A /* ValueCoding.xcconfig */; + baseConfigurationReference = 6668142B4A7F7A5DE42435220C510B8F /* Money.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -999,15 +993,14 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/ValueCoding/ValueCoding-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ValueCoding/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Money/Money-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Money/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/ValueCoding/ValueCoding.modulemap"; + MODULEMAP_FILE = "Target Support Files/Money/Money.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = ValueCoding; + PRODUCT_NAME = Money; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -1051,9 +1044,9 @@ }; name = Release; }; - E661B0513529A253CACF9BA0AE038BDD /* Release */ = { + FD80488E4A9224EB5F7576CB6451541A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 765CD792203F037EA7D0D97B135C395A /* ValueCoding.xcconfig */; + baseConfigurationReference = 4C1460F12F695C031F6228E5D1C63C9F /* SwiftyJSON.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -1062,40 +1055,31 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/ValueCoding/ValueCoding-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ValueCoding/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/SwiftyJSON/SwiftyJSON-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SwiftyJSON/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/ValueCoding/ValueCoding.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = ValueCoding; + MODULEMAP_FILE = "Target Support Files/SwiftyJSON/SwiftyJSON.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = SwiftyJSON; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 081A3E84FFCCA0D120DA040D7C0642BB /* Build configuration list for PBXNativeTarget "Result" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 70C41D73A07F76803797C9F3F186CDB7 /* Debug */, - 96075CA15D96321DD896806DBD3CAF71 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1388689AACE2A14DA17A521B69C583E6 /* Build configuration list for PBXNativeTarget "Money" */ = { + 173EF496D559077C97AB9793C9646A11 /* Build configuration list for PBXNativeTarget "Money" */ = { isa = XCConfigurationList; buildConfigurations = ( - A35C6C2EC69A39FE32D454EE4C141800 /* Debug */, - 0D34E788556BF0117A9E393B729CD24D /* Release */, + C96816307E3A214E54456E8FF50C29B9 /* Debug */, + 565952CEBE67B77B83B3660145873A03 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1118,20 +1102,29 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 4323EA468273039AAF7A09F78393BBD8 /* Build configuration list for PBXNativeTarget "ValueCoding" */ = { + 6F325C4B9048365BEF68BF26E84300EF /* Build configuration list for PBXNativeTarget "ValueCoding" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 829ACAAF4BB2003C92037894037A08CB /* Debug */, + 4BF3785E841E8BB4B44226A45951DD6B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EF8B566BDC1529DCD6650B788881F07D /* Build configuration list for PBXNativeTarget "SwiftyJSON" */ = { isa = XCConfigurationList; buildConfigurations = ( - D42841C752D344FA300EDE4604BC87A1 /* Debug */, - E661B0513529A253CACF9BA0AE038BDD /* Release */, + FD80488E4A9224EB5F7576CB6451541A /* Debug */, + 5137075954854CFDC9FDBFD4055CD3C4 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 4D982EA60D3570F60FB04AE8CC7B8895 /* Build configuration list for PBXNativeTarget "SwiftyJSON" */ = { + F27989106635EC8785D98836E97BB0C5 /* Build configuration list for PBXNativeTarget "Result" */ = { isa = XCConfigurationList; buildConfigurations = ( - 657B2FFE0B4CA9A09BCD2EAB206D9F5F /* Debug */, - 832DBAC21B8F1C674768DF3C0F927D1D /* Release */, + 055D01E44408311F27903ADC8D38F0CA /* Debug */, + 88CDFA37A74FC54F3B6175503E5E98E2 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Examples/Custom Money/Pods/Target Support Files/Money/Info.plist b/Examples/Custom Money/Pods/Target Support Files/Money/Info.plist index d28b0f0..8c485de 100644 --- a/Examples/Custom Money/Pods/Target Support Files/Money/Info.plist +++ b/Examples/Custom Money/Pods/Target Support Files/Money/Info.plist @@ -2,25 +2,25 @@ - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.2.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.3.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + diff --git a/Examples/Custom Money/Pods/Target Support Files/Pods-Custom Money/Info.plist b/Examples/Custom Money/Pods/Target Support Files/Pods-Custom Money/Info.plist index 11db4b7..6974542 100644 --- a/Examples/Custom Money/Pods/Target Support Files/Pods-Custom Money/Info.plist +++ b/Examples/Custom Money/Pods/Target Support Files/Pods-Custom Money/Info.plist @@ -2,25 +2,25 @@ - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + diff --git a/Examples/Custom Money/Pods/Target Support Files/Result/Info.plist b/Examples/Custom Money/Pods/Target Support Files/Result/Info.plist index b72a2b9..7b20907 100644 --- a/Examples/Custom Money/Pods/Target Support Files/Result/Info.plist +++ b/Examples/Custom Money/Pods/Target Support Files/Result/Info.plist @@ -2,25 +2,25 @@ - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.6.0-beta.6 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.6.0-beta.6 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + diff --git a/Examples/Custom Money/Pods/Target Support Files/SwiftyJSON/Info.plist b/Examples/Custom Money/Pods/Target Support Files/SwiftyJSON/Info.plist index 20aa983..a98a41a 100644 --- a/Examples/Custom Money/Pods/Target Support Files/SwiftyJSON/Info.plist +++ b/Examples/Custom Money/Pods/Target Support Files/SwiftyJSON/Info.plist @@ -2,25 +2,25 @@ - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 2.3.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.3.1 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + diff --git a/Examples/Custom Money/Pods/Target Support Files/ValueCoding/Info.plist b/Examples/Custom Money/Pods/Target Support Files/ValueCoding/Info.plist index e417ac3..01903d7 100644 --- a/Examples/Custom Money/Pods/Target Support Files/ValueCoding/Info.plist +++ b/Examples/Custom Money/Pods/Target Support Files/ValueCoding/Info.plist @@ -2,25 +2,25 @@ - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.1.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.1.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + From c86426bfb510a78f123ca7e58cdf1df8fc33e090 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 15:44:24 +0000 Subject: [PATCH 14/24] [MNY-24]: Updates Money Tests --- Tests/Shared/MoneyTests.swift | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/Tests/Shared/MoneyTests.swift b/Tests/Shared/MoneyTests.swift index 8e628af..f8ba9a8 100644 --- a/Tests/Shared/MoneyTests.swift +++ b/Tests/Shared/MoneyTests.swift @@ -256,50 +256,39 @@ class MoneyDescriptionTests: MoneyTests { cad = 102.01 aud = 99.999 eur = 249.499 - jpy = 319.500002 - } - - /// These tests all assume en_GB language settings - - func test__language_setting_is_en_US_or_en_GB() { - XCTAssertTrue(["en_GB", "en_US"].contains(NSLocale.currentLocale().localeIdentifier)) + jpy = 32_000 } func test__gbp_description() { XCTAssertEqual(Currency.GBP.code, "GBP") XCTAssertEqual(gbp.description, "£100.00") - XCTAssertEqual(Currency.GBP.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } - func test__usd_description() { + func test__usd_formatted_with_style() { XCTAssertEqual(Currency.USD.code, "USD") - XCTAssertEqual(usd.description, "US$99.00") - XCTAssertEqual(Currency.USD.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) + let formatted = usd.formattedWithStyle(.CurrencyStyle, forLocale: .English(.UnitedStates)) + XCTAssertEqual(formatted, "$99.00") } func test__cad_description() { XCTAssertEqual(Currency.CAD.code, "CAD") XCTAssertEqual(cad.description, "CA$102.01") - XCTAssertEqual(Currency.CAD.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } func test__aud_description() { XCTAssertEqual(Currency.AUD.code, "AUD") XCTAssertEqual(aud.description, "A$100.00") - XCTAssertEqual(Currency.AUD.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } func test__eur_description() { XCTAssertEqual(Currency.EUR.code, "EUR") XCTAssertEqual(eur.description, "€249.50") - XCTAssertEqual(Currency.EUR.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) } func test__jpy_description() { XCTAssertEqual(Currency.JPY.code, "JPY") XCTAssertEqual(Currency.JPY.scale, 0) - XCTAssertEqual(jpy.description, "JP¥320") - XCTAssertEqual(Currency.JPY.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) + XCTAssertEqual(jpy.description, "¥32,000") } } From e7e1131880b75826823457543027e437750cd507 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 15:53:12 +0000 Subject: [PATCH 15/24] [MNY-25]: More fixes for tests This is a little complicated as on the Mac locale is more than likely set to en_GB, whereas on iOS it is en_US. --- Tests/Shared/MoneyTests.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Tests/Shared/MoneyTests.swift b/Tests/Shared/MoneyTests.swift index f8ba9a8..be4b822 100644 --- a/Tests/Shared/MoneyTests.swift +++ b/Tests/Shared/MoneyTests.swift @@ -288,7 +288,12 @@ class MoneyDescriptionTests: MoneyTests { func test__jpy_description() { XCTAssertEqual(Currency.JPY.code, "JPY") XCTAssertEqual(Currency.JPY.scale, 0) - XCTAssertEqual(jpy.description, "¥32,000") + if NSLocale.currentLocale().localeIdentifier == "en_US" { + XCTAssertEqual(jpy.description, "¥32,000") + } + else { + XCTAssertEqual(jpy.description, "JP¥32,000") + } } } From eef42b1539fc9f16f0bd7a3a4150ed74a4f96485 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 17:02:32 +0000 Subject: [PATCH 16/24] [MNY-24]: Updates tests --- Money.xcodeproj/project.pbxproj | 8 +++ Money/Shared/Currency.swift | 8 ++- Money/Shared/FX/Bitcoin.swift | 2 +- Money/Shared/Money.swift | 11 +++ Supporting Files/Generate.swift | 2 +- Tests/Shared/AutogeneratedTests.swift | 96 +++++++++++++-------------- Tests/Shared/LocaleTests.swift | 49 ++++++++++++++ Tests/Shared/MoneyTests.swift | 35 ++++++++-- 8 files changed, 153 insertions(+), 58 deletions(-) create mode 100644 Tests/Shared/LocaleTests.swift diff --git a/Money.xcodeproj/project.pbxproj b/Money.xcodeproj/project.pbxproj index 24a09c6..72535d6 100644 --- a/Money.xcodeproj/project.pbxproj +++ b/Money.xcodeproj/project.pbxproj @@ -21,6 +21,9 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 6553909D1C037A1A00610C6F /* LocaleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6553909C1C037A1A00610C6F /* LocaleTests.swift */; }; + 6553909E1C037A1A00610C6F /* LocaleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6553909C1C037A1A00610C6F /* LocaleTests.swift */; }; + 6553909F1C037A1A00610C6F /* LocaleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6553909C1C037A1A00610C6F /* LocaleTests.swift */; }; 65579F8C1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579F8B1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift */; }; 65579F8D1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579F8B1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift */; }; 65579F8E1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65579F8B1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift */; }; @@ -197,6 +200,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 6553909C1C037A1A00610C6F /* LocaleTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocaleTests.swift; sourceTree = ""; }; 65579F8B1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DecimalNumberTypeTests.swift; sourceTree = ""; }; 65579FB51C0228EB00C3F8C7 /* Locale.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Locale.swift; sourceTree = ""; }; 65579FC51C0288A300C3F8C7 /* AutogeneratedTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutogeneratedTests.swift; sourceTree = ""; }; @@ -421,6 +425,7 @@ 65DD22A71BFA10DF0054F62D /* FXOpenExchangeRatesTests.swift */, 65DD22A81BFA10DF0054F62D /* FXTests.swift */, 65DD22A91BFA10DF0054F62D /* FXYahooTests.swift */, + 6553909C1C037A1A00610C6F /* LocaleTests.swift */, 65DD22AA1BFA10DF0054F62D /* MoneyTests.swift */, 65DD22AB1BFA10DF0054F62D /* NSDecimalNumberTests.swift */, 65DD22AC1BFA10DF0054F62D /* NSDecimalTests.swift */, @@ -892,6 +897,7 @@ 65DD22C41BFA10F30054F62D /* NSDecimalNumberTests.swift in Sources */, 65DD22BF1BFA10F30054F62D /* DecimalTests.swift in Sources */, 65579FC61C0288A300C3F8C7 /* AutogeneratedTests.swift in Sources */, + 6553909D1C037A1A00610C6F /* LocaleTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -947,6 +953,7 @@ 65DD22B81BFA10F20054F62D /* FXOpenExchangeRatesTests.swift in Sources */, 65DD22BA1BFA10F20054F62D /* FXYahooTests.swift in Sources */, 65DD22BC1BFA10F20054F62D /* NSDecimalNumberTests.swift in Sources */, + 6553909E1C037A1A00610C6F /* LocaleTests.swift in Sources */, 65579F8D1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift in Sources */, 65DD22B71BFA10F20054F62D /* DecimalTests.swift in Sources */, ); @@ -984,6 +991,7 @@ 65DD22B11BFA10F10054F62D /* FXTests.swift in Sources */, 65DD22B21BFA10F10054F62D /* FXYahooTests.swift in Sources */, 65DD22B01BFA10F10054F62D /* FXOpenExchangeRatesTests.swift in Sources */, + 6553909F1C037A1A00610C6F /* LocaleTests.swift in Sources */, 65579F8E1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift in Sources */, 65DD22AE1BFA10F10054F62D /* BitcoinTests.swift in Sources */, ); diff --git a/Money/Shared/Currency.swift b/Money/Shared/Currency.swift index 002b0b0..3d83455 100644 --- a/Money/Shared/Currency.swift +++ b/Money/Shared/Currency.swift @@ -48,6 +48,9 @@ public protocol CurrencyType: DecimalNumberBehaviorType { /// The currency scale static var scale: Int { get } + /// The currency symbol + static var symbol: String? { get } + /// A number formatter for the currency static var formatter: NSNumberFormatter { get } @@ -58,7 +61,7 @@ public protocol CurrencyType: DecimalNumberBehaviorType { public extension CurrencyType { - static var symbol: String { + static var symbol: String? { return formatter.currencySymbol } @@ -93,6 +96,7 @@ public extension CurrencyType { __formatter.internationalCurrencySymbol = formatter.internationalCurrencySymbol __formatter.currencyGroupingSeparator = formatter.currencyGroupingSeparator __formatter.currencyDecimalSeparator = formatter.currencyDecimalSeparator + __formatter.maximumFractionDigits = formatter.maximumFractionDigits } return { __formatter.stringFromNumber($0)! } @@ -181,8 +185,10 @@ public struct Currency { public lazy var _formatter: NSNumberFormatter = { let fmtr = NSNumberFormatter() + let locale = NSLocale(localeIdentifier: NSLocale.canonicalLocaleIdentifierFromString(NSLocale.localeIdentifierFromComponents([NSLocaleCurrencyCode: self._code]))) fmtr.numberStyle = .CurrencyStyle fmtr.currencyCode = self._code + fmtr.currencySymbol = locale.currencySymbol return fmtr }() diff --git a/Money/Shared/FX/Bitcoin.swift b/Money/Shared/FX/Bitcoin.swift index 6856e7c..351f787 100644 --- a/Money/Shared/FX/Bitcoin.swift +++ b/Money/Shared/FX/Bitcoin.swift @@ -44,7 +44,7 @@ extension Currency { public static let code = "XBT" /// unicode \u{20bf} was accepted as the Bitcoin currency /// symbol in November - public static let symbol = "Ƀ" + public static let symbol: String? = "Ƀ" /// The smallest unit of Bitcoin is the Satoshi /// - see: https://en.bitcoin.it/wiki/Satoshi_(unit) public static let scale: Int = 8 diff --git a/Money/Shared/Money.swift b/Money/Shared/Money.swift index d6e93c9..11fcc33 100644 --- a/Money/Shared/Money.swift +++ b/Money/Shared/Money.swift @@ -53,6 +53,17 @@ public protocol MoneyType: DecimalNumberType, ValueCoding { // MARK: - MoneyType Extension +public extension MoneyType { + + var currencyCode: String { + return Currency.code + } + + var currencySymbol: String? { + return Currency.symbol + } +} + public extension MoneyType where DecimalStorageType == NSDecimalNumber { /// Convenience access to the "amount" as an NSDecimalNumber. diff --git a/Supporting Files/Generate.swift b/Supporting Files/Generate.swift index 8dc3624..aa9f05e 100755 --- a/Supporting Files/Generate.swift +++ b/Supporting Files/Generate.swift @@ -357,7 +357,7 @@ func createUnitTestImports(line: Writer) { func createXCTestCaseNamed(line: Writer, className: String, content: Generator) { line("") - line("class \(className)Tests: XCTestCase {") + line("class \(className)AutogeneratedTests: XCTestCase {") content(line) line("}") } diff --git a/Tests/Shared/AutogeneratedTests.swift b/Tests/Shared/AutogeneratedTests.swift index c2285f3..d107b6e 100644 --- a/Tests/Shared/AutogeneratedTests.swift +++ b/Tests/Shared/AutogeneratedTests.swift @@ -31,7 +31,7 @@ import XCTest // MARK: - Country Types Tests -class AfrikaansSpeakingCountryTests: XCTestCase { +class AfrikaansSpeakingCountryAutogeneratedTests: XCTestCase { var country: AfrikaansSpeakingCountry! @@ -46,7 +46,7 @@ class AfrikaansSpeakingCountryTests: XCTestCase { } } -class AlbanianSpeakingCountryTests: XCTestCase { +class AlbanianSpeakingCountryAutogeneratedTests: XCTestCase { var country: AlbanianSpeakingCountry! @@ -66,7 +66,7 @@ class AlbanianSpeakingCountryTests: XCTestCase { } } -class ArabicSpeakingCountryTests: XCTestCase { +class ArabicSpeakingCountryAutogeneratedTests: XCTestCase { var country: ArabicSpeakingCountry! @@ -211,7 +211,7 @@ class ArabicSpeakingCountryTests: XCTestCase { } } -class BengaliSpeakingCountryTests: XCTestCase { +class BengaliSpeakingCountryAutogeneratedTests: XCTestCase { var country: BengaliSpeakingCountry! @@ -226,7 +226,7 @@ class BengaliSpeakingCountryTests: XCTestCase { } } -class CatalanSpeakingCountryTests: XCTestCase { +class CatalanSpeakingCountryAutogeneratedTests: XCTestCase { var country: CatalanSpeakingCountry! @@ -251,7 +251,7 @@ class CatalanSpeakingCountryTests: XCTestCase { } } -class CentralKurdishSpeakingCountryTests: XCTestCase { +class CentralKurdishSpeakingCountryAutogeneratedTests: XCTestCase { var country: CentralKurdishSpeakingCountry! @@ -266,7 +266,7 @@ class CentralKurdishSpeakingCountryTests: XCTestCase { } } -class ChineseSpeakingCountryTests: XCTestCase { +class ChineseSpeakingCountryAutogeneratedTests: XCTestCase { var country: ChineseSpeakingCountry! @@ -296,7 +296,7 @@ class ChineseSpeakingCountryTests: XCTestCase { } } -class CroatianSpeakingCountryTests: XCTestCase { +class CroatianSpeakingCountryAutogeneratedTests: XCTestCase { var country: CroatianSpeakingCountry! @@ -311,7 +311,7 @@ class CroatianSpeakingCountryTests: XCTestCase { } } -class DanishSpeakingCountryTests: XCTestCase { +class DanishSpeakingCountryAutogeneratedTests: XCTestCase { var country: DanishSpeakingCountry! @@ -326,7 +326,7 @@ class DanishSpeakingCountryTests: XCTestCase { } } -class DutchSpeakingCountryTests: XCTestCase { +class DutchSpeakingCountryAutogeneratedTests: XCTestCase { var country: DutchSpeakingCountry! @@ -366,7 +366,7 @@ class DutchSpeakingCountryTests: XCTestCase { } } -class EnglishSpeakingCountryTests: XCTestCase { +class EnglishSpeakingCountryAutogeneratedTests: XCTestCase { var country: EnglishSpeakingCountry! @@ -1001,7 +1001,7 @@ class EnglishSpeakingCountryTests: XCTestCase { } } -class EweSpeakingCountryTests: XCTestCase { +class EweSpeakingCountryAutogeneratedTests: XCTestCase { var country: EweSpeakingCountry! @@ -1016,7 +1016,7 @@ class EweSpeakingCountryTests: XCTestCase { } } -class FrenchSpeakingCountryTests: XCTestCase { +class FrenchSpeakingCountryAutogeneratedTests: XCTestCase { var country: FrenchSpeakingCountry! @@ -1251,7 +1251,7 @@ class FrenchSpeakingCountryTests: XCTestCase { } } -class FulahSpeakingCountryTests: XCTestCase { +class FulahSpeakingCountryAutogeneratedTests: XCTestCase { var country: FulahSpeakingCountry! @@ -1276,7 +1276,7 @@ class FulahSpeakingCountryTests: XCTestCase { } } -class GermanSpeakingCountryTests: XCTestCase { +class GermanSpeakingCountryAutogeneratedTests: XCTestCase { var country: GermanSpeakingCountry! @@ -1311,7 +1311,7 @@ class GermanSpeakingCountryTests: XCTestCase { } } -class GreekSpeakingCountryTests: XCTestCase { +class GreekSpeakingCountryAutogeneratedTests: XCTestCase { var country: GreekSpeakingCountry! @@ -1326,7 +1326,7 @@ class GreekSpeakingCountryTests: XCTestCase { } } -class HausaSpeakingCountryTests: XCTestCase { +class HausaSpeakingCountryAutogeneratedTests: XCTestCase { var country: HausaSpeakingCountry! @@ -1346,7 +1346,7 @@ class HausaSpeakingCountryTests: XCTestCase { } } -class ItalianSpeakingCountryTests: XCTestCase { +class ItalianSpeakingCountryAutogeneratedTests: XCTestCase { var country: ItalianSpeakingCountry! @@ -1366,7 +1366,7 @@ class ItalianSpeakingCountryTests: XCTestCase { } } -class KoreanSpeakingCountryTests: XCTestCase { +class KoreanSpeakingCountryAutogeneratedTests: XCTestCase { var country: KoreanSpeakingCountry! @@ -1381,7 +1381,7 @@ class KoreanSpeakingCountryTests: XCTestCase { } } -class LingalaSpeakingCountryTests: XCTestCase { +class LingalaSpeakingCountryAutogeneratedTests: XCTestCase { var country: LingalaSpeakingCountry! @@ -1406,7 +1406,7 @@ class LingalaSpeakingCountryTests: XCTestCase { } } -class MalaySpeakingCountryTests: XCTestCase { +class MalaySpeakingCountryAutogeneratedTests: XCTestCase { var country: MalaySpeakingCountry! @@ -1426,7 +1426,7 @@ class MalaySpeakingCountryTests: XCTestCase { } } -class MasaiSpeakingCountryTests: XCTestCase { +class MasaiSpeakingCountryAutogeneratedTests: XCTestCase { var country: MasaiSpeakingCountry! @@ -1441,7 +1441,7 @@ class MasaiSpeakingCountryTests: XCTestCase { } } -class NepaliSpeakingCountryTests: XCTestCase { +class NepaliSpeakingCountryAutogeneratedTests: XCTestCase { var country: NepaliSpeakingCountry! @@ -1456,7 +1456,7 @@ class NepaliSpeakingCountryTests: XCTestCase { } } -class NorthernSamiSpeakingCountryTests: XCTestCase { +class NorthernSamiSpeakingCountryAutogeneratedTests: XCTestCase { var country: NorthernSamiSpeakingCountry! @@ -1476,7 +1476,7 @@ class NorthernSamiSpeakingCountryTests: XCTestCase { } } -class NorwegianBokmålSpeakingCountryTests: XCTestCase { +class NorwegianBokmålSpeakingCountryAutogeneratedTests: XCTestCase { var country: NorwegianBokmålSpeakingCountry! @@ -1491,7 +1491,7 @@ class NorwegianBokmålSpeakingCountryTests: XCTestCase { } } -class OromoSpeakingCountryTests: XCTestCase { +class OromoSpeakingCountryAutogeneratedTests: XCTestCase { var country: OromoSpeakingCountry! @@ -1506,7 +1506,7 @@ class OromoSpeakingCountryTests: XCTestCase { } } -class OsseticSpeakingCountryTests: XCTestCase { +class OsseticSpeakingCountryAutogeneratedTests: XCTestCase { var country: OsseticSpeakingCountry! @@ -1521,7 +1521,7 @@ class OsseticSpeakingCountryTests: XCTestCase { } } -class PersianSpeakingCountryTests: XCTestCase { +class PersianSpeakingCountryAutogeneratedTests: XCTestCase { var country: PersianSpeakingCountry! @@ -1536,7 +1536,7 @@ class PersianSpeakingCountryTests: XCTestCase { } } -class PortugueseSpeakingCountryTests: XCTestCase { +class PortugueseSpeakingCountryAutogeneratedTests: XCTestCase { var country: PortugueseSpeakingCountry! @@ -1586,7 +1586,7 @@ class PortugueseSpeakingCountryTests: XCTestCase { } } -class PunjabiSpeakingCountryTests: XCTestCase { +class PunjabiSpeakingCountryAutogeneratedTests: XCTestCase { var country: PunjabiSpeakingCountry! @@ -1601,7 +1601,7 @@ class PunjabiSpeakingCountryTests: XCTestCase { } } -class QuechuaSpeakingCountryTests: XCTestCase { +class QuechuaSpeakingCountryAutogeneratedTests: XCTestCase { var country: QuechuaSpeakingCountry! @@ -1621,7 +1621,7 @@ class QuechuaSpeakingCountryTests: XCTestCase { } } -class RomanianSpeakingCountryTests: XCTestCase { +class RomanianSpeakingCountryAutogeneratedTests: XCTestCase { var country: RomanianSpeakingCountry! @@ -1636,7 +1636,7 @@ class RomanianSpeakingCountryTests: XCTestCase { } } -class RussianSpeakingCountryTests: XCTestCase { +class RussianSpeakingCountryAutogeneratedTests: XCTestCase { var country: RussianSpeakingCountry! @@ -1671,7 +1671,7 @@ class RussianSpeakingCountryTests: XCTestCase { } } -class SerbianSpeakingCountryTests: XCTestCase { +class SerbianSpeakingCountryAutogeneratedTests: XCTestCase { var country: SerbianSpeakingCountry! @@ -1696,7 +1696,7 @@ class SerbianSpeakingCountryTests: XCTestCase { } } -class SomaliSpeakingCountryTests: XCTestCase { +class SomaliSpeakingCountryAutogeneratedTests: XCTestCase { var country: SomaliSpeakingCountry! @@ -1721,7 +1721,7 @@ class SomaliSpeakingCountryTests: XCTestCase { } } -class SpanishSpeakingCountryTests: XCTestCase { +class SpanishSpeakingCountryAutogeneratedTests: XCTestCase { var country: SpanishSpeakingCountry! @@ -1856,7 +1856,7 @@ class SpanishSpeakingCountryTests: XCTestCase { } } -class SwahiliSpeakingCountryTests: XCTestCase { +class SwahiliSpeakingCountryAutogeneratedTests: XCTestCase { var country: SwahiliSpeakingCountry! @@ -1881,7 +1881,7 @@ class SwahiliSpeakingCountryTests: XCTestCase { } } -class SwedishSpeakingCountryTests: XCTestCase { +class SwedishSpeakingCountryAutogeneratedTests: XCTestCase { var country: SwedishSpeakingCountry! @@ -1901,7 +1901,7 @@ class SwedishSpeakingCountryTests: XCTestCase { } } -class SwissGermanSpeakingCountryTests: XCTestCase { +class SwissGermanSpeakingCountryAutogeneratedTests: XCTestCase { var country: SwissGermanSpeakingCountry! @@ -1921,7 +1921,7 @@ class SwissGermanSpeakingCountryTests: XCTestCase { } } -class TamilSpeakingCountryTests: XCTestCase { +class TamilSpeakingCountryAutogeneratedTests: XCTestCase { var country: TamilSpeakingCountry! @@ -1946,7 +1946,7 @@ class TamilSpeakingCountryTests: XCTestCase { } } -class TesoSpeakingCountryTests: XCTestCase { +class TesoSpeakingCountryAutogeneratedTests: XCTestCase { var country: TesoSpeakingCountry! @@ -1961,7 +1961,7 @@ class TesoSpeakingCountryTests: XCTestCase { } } -class TibetanSpeakingCountryTests: XCTestCase { +class TibetanSpeakingCountryAutogeneratedTests: XCTestCase { var country: TibetanSpeakingCountry! @@ -1976,7 +1976,7 @@ class TibetanSpeakingCountryTests: XCTestCase { } } -class TigrinyaSpeakingCountryTests: XCTestCase { +class TigrinyaSpeakingCountryAutogeneratedTests: XCTestCase { var country: TigrinyaSpeakingCountry! @@ -1991,7 +1991,7 @@ class TigrinyaSpeakingCountryTests: XCTestCase { } } -class TurkishSpeakingCountryTests: XCTestCase { +class TurkishSpeakingCountryAutogeneratedTests: XCTestCase { var country: TurkishSpeakingCountry! @@ -2006,7 +2006,7 @@ class TurkishSpeakingCountryTests: XCTestCase { } } -class UrduSpeakingCountryTests: XCTestCase { +class UrduSpeakingCountryAutogeneratedTests: XCTestCase { var country: UrduSpeakingCountry! @@ -2021,7 +2021,7 @@ class UrduSpeakingCountryTests: XCTestCase { } } -class UzbekSpeakingCountryTests: XCTestCase { +class UzbekSpeakingCountryAutogeneratedTests: XCTestCase { var country: UzbekSpeakingCountry! @@ -2036,7 +2036,7 @@ class UzbekSpeakingCountryTests: XCTestCase { } } -class YorubaSpeakingCountryTests: XCTestCase { +class YorubaSpeakingCountryAutogeneratedTests: XCTestCase { var country: YorubaSpeakingCountry! @@ -2053,7 +2053,7 @@ class YorubaSpeakingCountryTests: XCTestCase { // MARK: - Locale Tests -class LocaleTests: XCTestCase { +class LocaleAutogeneratedTests: XCTestCase { var locale: Locale! diff --git a/Tests/Shared/LocaleTests.swift b/Tests/Shared/LocaleTests.swift new file mode 100644 index 0000000..838ab21 --- /dev/null +++ b/Tests/Shared/LocaleTests.swift @@ -0,0 +1,49 @@ +// +// LocaleTests.swift +// Money +// +// Created by Daniel Thorpe on 23/11/2015. +// +// + +import XCTest +@testable import Money + +class LocaleTests: XCTestCase { + + var en_US: NSLocale! + var es_ES: NSLocale! + + override func setUp() { + super.setUp() + en_US = NSLocale(localeIdentifier: Locale.English(.UnitedStates).localeIdentifier) + es_ES = NSLocale(localeIdentifier: Locale.Spanish(.Spain).localeIdentifier) + } + + override func tearDown() { + super.tearDown() + en_US = nil + es_ES = nil + } + + func test__currency_code() { + XCTAssertEqual(en_US.currencyCode, "USD") + XCTAssertEqual(es_ES.currencyCode, "EUR") + } + + func test__currency_symbol() { + XCTAssertEqual(en_US.currencySymbol, "$") + XCTAssertEqual(es_ES.currencySymbol, "€") + } + + func test__currency_currencyGroupingSeparator() { + XCTAssertEqual(en_US.currencyGroupingSeparator, ",") + XCTAssertEqual(es_ES.currencyGroupingSeparator, ".") + } + + func test__currency_currencyDecimalSeparator() { + XCTAssertEqual(en_US.currencyDecimalSeparator, ".") + XCTAssertEqual(es_ES.currencyDecimalSeparator, ",") + } + +} diff --git a/Tests/Shared/MoneyTests.swift b/Tests/Shared/MoneyTests.swift index be4b822..99deb86 100644 --- a/Tests/Shared/MoneyTests.swift +++ b/Tests/Shared/MoneyTests.swift @@ -30,6 +30,7 @@ class MoneyTests: XCTestCase { var aud: AUD! var eur: EUR! var jpy: JPY! + var btc: BTC! override func tearDown() { super.tearDown() @@ -39,6 +40,7 @@ class MoneyTests: XCTestCase { cad = nil eur = nil jpy = nil + btc = nil } } @@ -257,37 +259,51 @@ class MoneyDescriptionTests: MoneyTests { aud = 99.999 eur = 249.499 jpy = 32_000 + btc = 0.002_007 } func test__gbp_description() { - XCTAssertEqual(Currency.GBP.code, "GBP") + XCTAssertEqual(gbp.currencyCode, "GBP") + XCTAssertEqual(gbp.currencySymbol, "£") XCTAssertEqual(gbp.description, "£100.00") } func test__usd_formatted_with_style() { - XCTAssertEqual(Currency.USD.code, "USD") + XCTAssertEqual(usd.currencyCode, "USD") let formatted = usd.formattedWithStyle(.CurrencyStyle, forLocale: .English(.UnitedStates)) XCTAssertEqual(formatted, "$99.00") } + func test__btc_formatted_with_style() { + XCTAssertEqual(btc.currencyCode, "BTC") + let formatted = btc.formattedWithStyle(.CurrencyStyle, forLocale: .English(.UnitedStates)) + XCTAssertEqual(formatted, "Ƀ0.002007") + } + + func test__btc_formatted_with_style_for_locale() { + XCTAssertEqual(btc.currencyCode, "BTC") + let formatted = btc.formattedWithStyle(.CurrencyStyle, forLocale: .Spanish(.Mexico)) + XCTAssertEqual(formatted, "Ƀ0.002007") + } + func test__cad_description() { - XCTAssertEqual(Currency.CAD.code, "CAD") + XCTAssertEqual(cad.currencyCode, "CAD") XCTAssertEqual(cad.description, "CA$102.01") } func test__aud_description() { - XCTAssertEqual(Currency.AUD.code, "AUD") + XCTAssertEqual(aud.currencyCode, "AUD") XCTAssertEqual(aud.description, "A$100.00") } func test__eur_description() { - XCTAssertEqual(Currency.EUR.code, "EUR") + XCTAssertEqual(eur.currencyCode, "EUR") XCTAssertEqual(eur.description, "€249.50") } func test__jpy_description() { - XCTAssertEqual(Currency.JPY.code, "JPY") - XCTAssertEqual(Currency.JPY.scale, 0) + XCTAssertEqual(jpy.currencyCode, "JPY") + XCTAssertEqual(JPY.Currency.scale, 0) if NSLocale.currentLocale().localeIdentifier == "en_US" { XCTAssertEqual(jpy.description, "¥32,000") } @@ -295,6 +311,11 @@ class MoneyDescriptionTests: MoneyTests { XCTAssertEqual(jpy.description, "JP¥32,000") } } + + func test__jpy_formatted_with_style_for_locale() { + let formatted = jpy.formattedWithStyle(.CurrencyStyle, forLocale: .German(.Germany)) + XCTAssertEqual(formatted, "32.000 ¥") + } } class MoneyFormattingTests: MoneyTests { From 279911b510d579d2b51331591f25356f3b5b151b Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 17:15:51 +0000 Subject: [PATCH 17/24] [MNY-24]: Updating fastlane --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index eefc553..a260f26 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,7 +40,7 @@ GEM faraday (>= 0.7.4, < 0.10) fastimage (1.6.8) addressable (~> 2.3, >= 2.3.5) - fastlane (1.41.0) + fastlane (1.41.1) addressable (~> 2.3.8) cert (>= 1.2.3, < 2.0.0) credentials_manager (>= 0.10.0, < 1.0.0) From 159a5d70f0354f04051b65c9ec827b59057db40c Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 17:28:09 +0000 Subject: [PATCH 18/24] [MNY-24]: Re-generates the local unit tests slightly different. I think this will hel Xcode index quicker. --- Supporting Files/Generate.swift | 13 +- Tests/Shared/AutogeneratedTests.swift | 4153 +++++++++++++------------ 2 files changed, 2206 insertions(+), 1960 deletions(-) diff --git a/Supporting Files/Generate.swift b/Supporting Files/Generate.swift index aa9f05e..32f18e2 100755 --- a/Supporting Files/Generate.swift +++ b/Supporting Files/Generate.swift @@ -421,11 +421,22 @@ func createUnitTestsForLocaleWithLanguage(line: Writer, language: Language) { func createUnitTestsForLocale(line: Writer) { line("") line("// MARK: - Locale Tests") + + for language in info.languagesWithMoreThanOneCountry { + + createXCTestCaseNamed(line, className: "Locale\(language.name)Language") { line in + line("") + line(" var locale: Locale!") + + createUnitTestsForLocaleWithLanguage(line, language: language) + } + } + createXCTestCaseNamed(line, className: "Locale") { line in line("") line(" var locale: Locale!") - for language in info.languages { + for language in info.languagesWithLessThanTwoCountries { createUnitTestsForLocaleWithLanguage(line, language: language) } } diff --git a/Tests/Shared/AutogeneratedTests.swift b/Tests/Shared/AutogeneratedTests.swift index d107b6e..aab9117 100644 --- a/Tests/Shared/AutogeneratedTests.swift +++ b/Tests/Shared/AutogeneratedTests.swift @@ -2053,1365 +2053,1787 @@ class YorubaSpeakingCountryAutogeneratedTests: XCTestCase { // MARK: - Locale Tests -class LocaleAutogeneratedTests: XCTestCase { +class LocaleAfrikaansLanguageAutogeneratedTests: XCTestCase { var locale: Locale! - func test__language_identifier_for_English_Singapore() { - locale = .English(.Singapore) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_SG") + func test__language_identifier_for_Afrikaans_Namibia() { + locale = .Afrikaans(.Namibia) + XCTAssertEqual(locale.languageIdentifier, "af") + XCTAssertEqual(locale.localeIdentifier, "af_NA") } - func test__language_identifier_for_English_Netherlands() { - locale = .English(.Netherlands) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_NL") + func test__language_identifier_for_Afrikaans_SouthAfrica() { + locale = .Afrikaans(.SouthAfrica) + XCTAssertEqual(locale.languageIdentifier, "af") + XCTAssertEqual(locale.localeIdentifier, "af_ZA") } +} - func test__language_identifier_for_English_Malaysia() { - locale = .English(.Malaysia) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_MY") - } +class LocaleAlbanianLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_English_PapuaNewGuinea() { - locale = .English(.PapuaNewGuinea) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_PG") - } + var locale: Locale! - func test__language_identifier_for_English_Barbados() { - locale = .English(.Barbados) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_BB") + func test__language_identifier_for_Albanian_Macedonia() { + locale = .Albanian(.Macedonia) + XCTAssertEqual(locale.languageIdentifier, "sq") + XCTAssertEqual(locale.localeIdentifier, "sq_MK") } - func test__language_identifier_for_English_HongKongSarChina() { - locale = .English(.HongKongSarChina) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_HK") + func test__language_identifier_for_Albanian_Albania() { + locale = .Albanian(.Albania) + XCTAssertEqual(locale.languageIdentifier, "sq") + XCTAssertEqual(locale.localeIdentifier, "sq_AL") } - func test__language_identifier_for_English_Eritrea() { - locale = .English(.Eritrea) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_ER") + func test__language_identifier_for_Albanian_Kosovo() { + locale = .Albanian(.Kosovo) + XCTAssertEqual(locale.languageIdentifier, "sq") + XCTAssertEqual(locale.localeIdentifier, "sq_XK") } +} - func test__language_identifier_for_English_IsleOfMan() { - locale = .English(.IsleOfMan) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_IM") - } +class LocaleArabicLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_English_Lesotho() { - locale = .English(.Lesotho) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_LS") + var locale: Locale! + + func test__language_identifier_for_Arabic_Somalia() { + locale = .Arabic(.Somalia) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_SO") } - func test__language_identifier_for_English_Palau() { - locale = .English(.Palau) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_PW") + func test__language_identifier_for_Arabic_Iraq() { + locale = .Arabic(.Iraq) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_IQ") } - func test__language_identifier_for_English_SintMaarten() { - locale = .English(.SintMaarten) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_SX") + func test__language_identifier_for_Arabic_Kuwait() { + locale = .Arabic(.Kuwait) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_KW") } - func test__language_identifier_for_English_Belgium() { - locale = .English(.Belgium) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_BE") + func test__language_identifier_for_Arabic_Chad() { + locale = .Arabic(.Chad) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_TD") } - func test__language_identifier_for_English_BosniaHerzegovina() { - locale = .English(.BosniaHerzegovina) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_BA") + func test__language_identifier_for_Arabic_Libya() { + locale = .Arabic(.Libya) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_LY") } - func test__language_identifier_for_English_Cameroon() { - locale = .English(.Cameroon) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_CM") + func test__language_identifier_for_Arabic_Egypt() { + locale = .Arabic(.Egypt) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_EG") } - func test__language_identifier_for_English_Gibraltar() { - locale = .English(.Gibraltar) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_GI") + func test__language_identifier_for_Arabic_WesternSahara() { + locale = .Arabic(.WesternSahara) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_EH") } - func test__language_identifier_for_English_Montenegro() { - locale = .English(.Montenegro) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_ME") + func test__language_identifier_for_Arabic_SaudiArabia() { + locale = .Arabic(.SaudiArabia) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_SA") } - func test__language_identifier_for_English_Madagascar() { - locale = .English(.Madagascar) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_MG") + func test__language_identifier_for_Arabic_Mauritania() { + locale = .Arabic(.Mauritania) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_MR") } - func test__language_identifier_for_English_CzechRepublic() { - locale = .English(.CzechRepublic) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_CZ") + func test__language_identifier_for_Arabic_Djibouti() { + locale = .Arabic(.Djibouti) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_DJ") } - func test__language_identifier_for_English_MarshallIslands() { - locale = .English(.MarshallIslands) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_MH") + func test__language_identifier_for_Arabic_Eritrea() { + locale = .Arabic(.Eritrea) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_ER") } - func test__language_identifier_for_English_Swaziland() { - locale = .English(.Swaziland) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_SZ") + func test__language_identifier_for_Arabic_Lebanon() { + locale = .Arabic(.Lebanon) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_LB") } - func test__language_identifier_for_English_Austria() { - locale = .English(.Austria) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_AT") + func test__language_identifier_for_Arabic_Oman() { + locale = .Arabic(.Oman) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_OM") } - func test__language_identifier_for_English_Romania() { - locale = .English(.Romania) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_RO") + func test__language_identifier_for_Arabic_PalestinianTerritories() { + locale = .Arabic(.PalestinianTerritories) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_PS") } - func test__language_identifier_for_English_Malawi() { - locale = .English(.Malawi) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_MW") + func test__language_identifier_for_Arabic_Sudan() { + locale = .Arabic(.Sudan) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_SD") } - func test__language_identifier_for_English_Jersey() { - locale = .English(.Jersey) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_JE") + func test__language_identifier_for_Arabic_SouthSudan() { + locale = .Arabic(.SouthSudan) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_SS") } - func test__language_identifier_for_English_Germany() { - locale = .English(.Germany) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_DE") + func test__language_identifier_for_Arabic_Algeria() { + locale = .Arabic(.Algeria) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_DZ") } - func test__language_identifier_for_English_Kiribati() { - locale = .English(.Kiribati) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_KI") + func test__language_identifier_for_Arabic_Morocco() { + locale = .Arabic(.Morocco) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_MA") } - func test__language_identifier_for_English_Norway() { - locale = .English(.Norway) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_NO") + func test__language_identifier_for_Arabic_Bahrain() { + locale = .Arabic(.Bahrain) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_BH") } - func test__language_identifier_for_English_MacauSarChina() { - locale = .English(.MacauSarChina) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_MO") + func test__language_identifier_for_Arabic_UnitedArabEmirates() { + locale = .Arabic(.UnitedArabEmirates) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_AE") } - func test__language_identifier_for_English_Jamaica() { - locale = .English(.Jamaica) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_JM") + func test__language_identifier_for_Arabic_Qatar() { + locale = .Arabic(.Qatar) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_QA") } - func test__language_identifier_for_English_ChristmasIsland() { - locale = .English(.ChristmasIsland) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_CX") + func test__language_identifier_for_Arabic_Comoros() { + locale = .Arabic(.Comoros) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_KM") } - func test__language_identifier_for_English_Montserrat() { - locale = .English(.Montserrat) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_MS") + func test__language_identifier_for_Arabic_Syria() { + locale = .Arabic(.Syria) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_SY") } - func test__language_identifier_for_English_SolomonIslands() { - locale = .English(.SolomonIslands) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_SB") + func test__language_identifier_for_Arabic_Yemen() { + locale = .Arabic(.Yemen) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_YE") } - func test__language_identifier_for_English_USOutlyingIslands() { - locale = .English(.USOutlyingIslands) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_UM") + func test__language_identifier_for_Arabic_Jordan() { + locale = .Arabic(.Jordan) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_JO") } - func test__language_identifier_for_English_Seychelles() { - locale = .English(.Seychelles) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_SC") + func test__language_identifier_for_Arabic_Tunisia() { + locale = .Arabic(.Tunisia) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_TN") } - func test__language_identifier_for_English_CaymanIslands() { - locale = .English(.CaymanIslands) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_KY") + func test__language_identifier_for_Arabic_Israel() { + locale = .Arabic(.Israel) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_IL") } - func test__language_identifier_for_English_Finland() { - locale = .English(.Finland) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_FI") + func test__language_identifier_for_Arabic_World() { + locale = .Arabic(.World) + XCTAssertEqual(locale.languageIdentifier, "ar") + XCTAssertEqual(locale.localeIdentifier, "ar_001") } +} - func test__language_identifier_for_English_AntiguaBarbuda() { - locale = .English(.AntiguaBarbuda) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_AG") - } +class LocaleBengaliLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_English_Anguilla() { - locale = .English(.Anguilla) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_AI") - } + var locale: Locale! - func test__language_identifier_for_English_Mauritius() { - locale = .English(.Mauritius) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_MU") + func test__language_identifier_for_Bengali_Bangladesh() { + locale = .Bengali(.Bangladesh) + XCTAssertEqual(locale.languageIdentifier, "bn") + XCTAssertEqual(locale.localeIdentifier, "bn_BD") } - func test__language_identifier_for_English_Tonga() { - locale = .English(.Tonga) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_TO") + func test__language_identifier_for_Bengali_India() { + locale = .Bengali(.India) + XCTAssertEqual(locale.languageIdentifier, "bn") + XCTAssertEqual(locale.localeIdentifier, "bn_IN") } +} - func test__language_identifier_for_English_Italy() { - locale = .English(.Italy) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_IT") - } +class LocaleCatalanLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_English_Nigeria() { - locale = .English(.Nigeria) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_NG") - } + var locale: Locale! - func test__language_identifier_for_English_Australia() { - locale = .English(.Australia) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_AU") + func test__language_identifier_for_Catalan_Italy() { + locale = .Catalan(.Italy) + XCTAssertEqual(locale.languageIdentifier, "ca") + XCTAssertEqual(locale.localeIdentifier, "ca_IT") } - func test__language_identifier_for_English_SierraLeone() { - locale = .English(.SierraLeone) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_SL") + func test__language_identifier_for_Catalan_France() { + locale = .Catalan(.France) + XCTAssertEqual(locale.languageIdentifier, "ca") + XCTAssertEqual(locale.localeIdentifier, "ca_FR") } - func test__language_identifier_for_English_BritishVirginIslands() { - locale = .English(.BritishVirginIslands) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_VG") + func test__language_identifier_for_Catalan_Spain() { + locale = .Catalan(.Spain) + XCTAssertEqual(locale.languageIdentifier, "ca") + XCTAssertEqual(locale.localeIdentifier, "ca_ES") } - func test__language_identifier_for_English_Guernsey() { - locale = .English(.Guernsey) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_GG") + func test__language_identifier_for_Catalan_Andorra() { + locale = .Catalan(.Andorra) + XCTAssertEqual(locale.languageIdentifier, "ca") + XCTAssertEqual(locale.localeIdentifier, "ca_AD") } +} - func test__language_identifier_for_English_SouthSudan() { - locale = .English(.SouthSudan) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_SS") - } +class LocaleCentralKurdishLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_English_Denmark() { - locale = .English(.Denmark) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_DK") - } + var locale: Locale! - func test__language_identifier_for_English_Guam() { - locale = .English(.Guam) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_GU") + func test__language_identifier_for_CentralKurdish_Iraq() { + locale = .CentralKurdish(.Iraq) + XCTAssertEqual(locale.languageIdentifier, "ckb") + XCTAssertEqual(locale.localeIdentifier, "ckb_IQ") } - func test__language_identifier_for_English_Andorra() { - locale = .English(.Andorra) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_AD") + func test__language_identifier_for_CentralKurdish_Iran() { + locale = .CentralKurdish(.Iran) + XCTAssertEqual(locale.languageIdentifier, "ckb") + XCTAssertEqual(locale.localeIdentifier, "ckb_IR") } +} - func test__language_identifier_for_English_Cyprus() { - locale = .English(.Cyprus) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_CY") - } +class LocaleChineseLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_English_StVincentGrenadines() { - locale = .English(.StVincentGrenadines) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_VC") - } + var locale: Locale! - func test__language_identifier_for_English_UnitedStates() { - locale = .English(.UnitedStates) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_US") + func test__language_identifier_for_Chinese_Taiwan() { + locale = .Chinese(.Taiwan) + XCTAssertEqual(locale.languageIdentifier, "zh") + XCTAssertEqual(locale.localeIdentifier, "zh_TW") } - func test__language_identifier_for_English_Liberia() { - locale = .English(.Liberia) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_LR") + func test__language_identifier_for_Chinese_HongKongSarChina() { + locale = .Chinese(.HongKongSarChina) + XCTAssertEqual(locale.languageIdentifier, "zh") + XCTAssertEqual(locale.localeIdentifier, "zh_HK") } - func test__language_identifier_for_English_Uganda() { - locale = .English(.Uganda) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_UG") + func test__language_identifier_for_Chinese_MacauSarChina() { + locale = .Chinese(.MacauSarChina) + XCTAssertEqual(locale.languageIdentifier, "zh") + XCTAssertEqual(locale.localeIdentifier, "zh_MO") } - func test__language_identifier_for_English_Slovakia() { - locale = .English(.Slovakia) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_SK") + func test__language_identifier_for_Chinese_Singapore() { + locale = .Chinese(.Singapore) + XCTAssertEqual(locale.languageIdentifier, "zh") + XCTAssertEqual(locale.localeIdentifier, "zh_SG") } - func test__language_identifier_for_English_Bermuda() { - locale = .English(.Bermuda) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_BM") + func test__language_identifier_for_Chinese_China() { + locale = .Chinese(.China) + XCTAssertEqual(locale.languageIdentifier, "zh") + XCTAssertEqual(locale.localeIdentifier, "zh_CN") } +} - func test__language_identifier_for_English_PitcairnIslands() { - locale = .English(.PitcairnIslands) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_PN") - } +class LocaleCroatianLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_English_Slovenia() { - locale = .English(.Slovenia) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_SI") - } + var locale: Locale! - func test__language_identifier_for_English_Switzerland() { - locale = .English(.Switzerland) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_CH") + func test__language_identifier_for_Croatian_Croatia() { + locale = .Croatian(.Croatia) + XCTAssertEqual(locale.languageIdentifier, "hr") + XCTAssertEqual(locale.localeIdentifier, "hr_HR") } - func test__language_identifier_for_English_Lithuania() { - locale = .English(.Lithuania) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_LT") + func test__language_identifier_for_Croatian_BosniaHerzegovina() { + locale = .Croatian(.BosniaHerzegovina) + XCTAssertEqual(locale.languageIdentifier, "hr") + XCTAssertEqual(locale.localeIdentifier, "hr_BA") } +} - func test__language_identifier_for_English_Tuvalu() { - locale = .English(.Tuvalu) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_TV") - } +class LocaleDanishLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_English_World() { - locale = .English(.World) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_001") - } + var locale: Locale! - func test__language_identifier_for_English_TurksCaicosIslands() { - locale = .English(.TurksCaicosIslands) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_TC") + func test__language_identifier_for_Danish_Denmark() { + locale = .Danish(.Denmark) + XCTAssertEqual(locale.languageIdentifier, "da") + XCTAssertEqual(locale.localeIdentifier, "da_DK") } - func test__language_identifier_for_English_Vanuatu() { - locale = .English(.Vanuatu) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_VU") + func test__language_identifier_for_Danish_Greenland() { + locale = .Danish(.Greenland) + XCTAssertEqual(locale.languageIdentifier, "da") + XCTAssertEqual(locale.localeIdentifier, "da_GL") } +} - func test__language_identifier_for_English_NewZealand() { - locale = .English(.NewZealand) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_NZ") - } +class LocaleDutchLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_English_Latvia() { - locale = .English(.Latvia) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_LV") + var locale: Locale! + + func test__language_identifier_for_Dutch_Belgium() { + locale = .Dutch(.Belgium) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_BE") } - func test__language_identifier_for_English_Ireland() { - locale = .English(.Ireland) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_IE") + func test__language_identifier_for_Dutch_Curaçao() { + locale = .Dutch(.Curaçao) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_CW") } - func test__language_identifier_for_English_Guyana() { - locale = .English(.Guyana) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_GY") + func test__language_identifier_for_Dutch_Suriname() { + locale = .Dutch(.Suriname) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_SR") } - func test__language_identifier_for_English_BritishIndianOceanTerritory() { - locale = .English(.BritishIndianOceanTerritory) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_IO") + func test__language_identifier_for_Dutch_Netherlands() { + locale = .Dutch(.Netherlands) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_NL") } - func test__language_identifier_for_English_Philippines() { - locale = .English(.Philippines) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_PH") + func test__language_identifier_for_Dutch_SintMaarten() { + locale = .Dutch(.SintMaarten) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_SX") } - func test__language_identifier_for_English_Niue() { - locale = .English(.Niue) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_NU") + func test__language_identifier_for_Dutch_CaribbeanNetherlands() { + locale = .Dutch(.CaribbeanNetherlands) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_BQ") } - func test__language_identifier_for_English_Gambia() { - locale = .English(.Gambia) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_GM") + func test__language_identifier_for_Dutch_Aruba() { + locale = .Dutch(.Aruba) + XCTAssertEqual(locale.languageIdentifier, "nl") + XCTAssertEqual(locale.localeIdentifier, "nl_AW") } +} - func test__language_identifier_for_English_Spain() { - locale = .English(.Spain) +class LocaleEnglishLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_English_Singapore() { + locale = .English(.Singapore) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_ES") + XCTAssertEqual(locale.localeIdentifier, "en_SG") } - func test__language_identifier_for_English_NorthernMarianaIslands() { - locale = .English(.NorthernMarianaIslands) + func test__language_identifier_for_English_Netherlands() { + locale = .English(.Netherlands) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_MP") + XCTAssertEqual(locale.localeIdentifier, "en_NL") } - func test__language_identifier_for_English_Estonia() { - locale = .English(.Estonia) + func test__language_identifier_for_English_Malaysia() { + locale = .English(.Malaysia) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_EE") + XCTAssertEqual(locale.localeIdentifier, "en_MY") } - func test__language_identifier_for_English_Greece() { - locale = .English(.Greece) + func test__language_identifier_for_English_PapuaNewGuinea() { + locale = .English(.PapuaNewGuinea) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_GR") + XCTAssertEqual(locale.localeIdentifier, "en_PG") } - func test__language_identifier_for_English_Canada() { - locale = .English(.Canada) + func test__language_identifier_for_English_Barbados() { + locale = .English(.Barbados) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_CA") + XCTAssertEqual(locale.localeIdentifier, "en_BB") } - func test__language_identifier_for_English_Sudan() { - locale = .English(.Sudan) + func test__language_identifier_for_English_HongKongSarChina() { + locale = .English(.HongKongSarChina) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_SD") + XCTAssertEqual(locale.localeIdentifier, "en_HK") } - func test__language_identifier_for_English_StLucia() { - locale = .English(.StLucia) + func test__language_identifier_for_English_Eritrea() { + locale = .English(.Eritrea) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_LC") + XCTAssertEqual(locale.localeIdentifier, "en_ER") } - func test__language_identifier_for_English_Croatia() { - locale = .English(.Croatia) + func test__language_identifier_for_English_IsleOfMan() { + locale = .English(.IsleOfMan) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_HR") + XCTAssertEqual(locale.localeIdentifier, "en_IM") } - func test__language_identifier_for_English_NorfolkIsland() { - locale = .English(.NorfolkIsland) + func test__language_identifier_for_English_Lesotho() { + locale = .English(.Lesotho) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_NF") + XCTAssertEqual(locale.localeIdentifier, "en_LS") } - func test__language_identifier_for_English_UnitedKingdom() { - locale = .English(.UnitedKingdom) + func test__language_identifier_for_English_Palau() { + locale = .English(.Palau) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_GB") + XCTAssertEqual(locale.localeIdentifier, "en_PW") } - func test__language_identifier_for_English_Dominica() { - locale = .English(.Dominica) + func test__language_identifier_for_English_SintMaarten() { + locale = .English(.SintMaarten) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_DM") + XCTAssertEqual(locale.localeIdentifier, "en_SX") } - func test__language_identifier_for_English_Europe() { - locale = .English(.Europe) + func test__language_identifier_for_English_Belgium() { + locale = .English(.Belgium) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_150") + XCTAssertEqual(locale.localeIdentifier, "en_BE") } - func test__language_identifier_for_English_Portugal() { - locale = .English(.Portugal) + func test__language_identifier_for_English_BosniaHerzegovina() { + locale = .English(.BosniaHerzegovina) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_PT") + XCTAssertEqual(locale.localeIdentifier, "en_BA") } - func test__language_identifier_for_English_Turkey() { - locale = .English(.Turkey) + func test__language_identifier_for_English_Cameroon() { + locale = .English(.Cameroon) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_TR") + XCTAssertEqual(locale.localeIdentifier, "en_CM") } - func test__language_identifier_for_English_Malta() { - locale = .English(.Malta) + func test__language_identifier_for_English_Gibraltar() { + locale = .English(.Gibraltar) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_MT") + XCTAssertEqual(locale.localeIdentifier, "en_GI") } - func test__language_identifier_for_English_Albania() { - locale = .English(.Albania) + func test__language_identifier_for_English_Montenegro() { + locale = .English(.Montenegro) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_AL") + XCTAssertEqual(locale.localeIdentifier, "en_ME") } - func test__language_identifier_for_English_TrinidadTobago() { - locale = .English(.TrinidadTobago) + func test__language_identifier_for_English_Madagascar() { + locale = .English(.Madagascar) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_TT") + XCTAssertEqual(locale.localeIdentifier, "en_MG") } - func test__language_identifier_for_English_Samoa() { - locale = .English(.Samoa) + func test__language_identifier_for_English_CzechRepublic() { + locale = .English(.CzechRepublic) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_WS") + XCTAssertEqual(locale.localeIdentifier, "en_CZ") } - func test__language_identifier_for_English_Israel() { - locale = .English(.Israel) + func test__language_identifier_for_English_MarshallIslands() { + locale = .English(.MarshallIslands) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_IL") + XCTAssertEqual(locale.localeIdentifier, "en_MH") } - func test__language_identifier_for_English_DiegoGarcia() { - locale = .English(.DiegoGarcia) + func test__language_identifier_for_English_Swaziland() { + locale = .English(.Swaziland) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_DG") + XCTAssertEqual(locale.localeIdentifier, "en_SZ") } - func test__language_identifier_for_English_Rwanda() { - locale = .English(.Rwanda) + func test__language_identifier_for_English_Austria() { + locale = .English(.Austria) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_RW") + XCTAssertEqual(locale.localeIdentifier, "en_AT") } - func test__language_identifier_for_English_Fiji() { - locale = .English(.Fiji) + func test__language_identifier_for_English_Romania() { + locale = .English(.Romania) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_FJ") + XCTAssertEqual(locale.localeIdentifier, "en_RO") } - func test__language_identifier_for_English_Kenya() { - locale = .English(.Kenya) + func test__language_identifier_for_English_Malawi() { + locale = .English(.Malawi) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_KE") + XCTAssertEqual(locale.localeIdentifier, "en_MW") } - func test__language_identifier_for_English_Russia() { - locale = .English(.Russia) + func test__language_identifier_for_English_Jersey() { + locale = .English(.Jersey) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_RU") + XCTAssertEqual(locale.localeIdentifier, "en_JE") } - func test__language_identifier_for_English_Bahamas() { - locale = .English(.Bahamas) + func test__language_identifier_for_English_Germany() { + locale = .English(.Germany) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_BS") + XCTAssertEqual(locale.localeIdentifier, "en_DE") } - func test__language_identifier_for_English_Luxembourg() { - locale = .English(.Luxembourg) + func test__language_identifier_for_English_Kiribati() { + locale = .English(.Kiribati) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_LU") + XCTAssertEqual(locale.localeIdentifier, "en_KI") } - func test__language_identifier_for_English_Hungary() { - locale = .English(.Hungary) + func test__language_identifier_for_English_Norway() { + locale = .English(.Norway) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_HU") + XCTAssertEqual(locale.localeIdentifier, "en_NO") } - func test__language_identifier_for_English_Tanzania() { - locale = .English(.Tanzania) + func test__language_identifier_for_English_MacauSarChina() { + locale = .English(.MacauSarChina) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_TZ") + XCTAssertEqual(locale.localeIdentifier, "en_MO") } - func test__language_identifier_for_English_Namibia() { - locale = .English(.Namibia) + func test__language_identifier_for_English_Jamaica() { + locale = .English(.Jamaica) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_NA") + XCTAssertEqual(locale.localeIdentifier, "en_JM") } - func test__language_identifier_for_English_Zimbabwe() { - locale = .English(.Zimbabwe) + func test__language_identifier_for_English_ChristmasIsland() { + locale = .English(.ChristmasIsland) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_ZW") + XCTAssertEqual(locale.localeIdentifier, "en_CX") } - func test__language_identifier_for_English_SouthAfrica() { - locale = .English(.SouthAfrica) + func test__language_identifier_for_English_Montserrat() { + locale = .English(.Montserrat) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_ZA") + XCTAssertEqual(locale.localeIdentifier, "en_MS") } - func test__language_identifier_for_English_Grenada() { - locale = .English(.Grenada) + func test__language_identifier_for_English_SolomonIslands() { + locale = .English(.SolomonIslands) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_GD") + XCTAssertEqual(locale.localeIdentifier, "en_SB") } - func test__language_identifier_for_English_Belize() { - locale = .English(.Belize) + func test__language_identifier_for_English_USOutlyingIslands() { + locale = .English(.USOutlyingIslands) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_BZ") + XCTAssertEqual(locale.localeIdentifier, "en_UM") } - func test__language_identifier_for_English_Botswana() { - locale = .English(.Botswana) + func test__language_identifier_for_English_Seychelles() { + locale = .English(.Seychelles) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_BW") + XCTAssertEqual(locale.localeIdentifier, "en_SC") } - func test__language_identifier_for_English_PuertoRico() { - locale = .English(.PuertoRico) - XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_PR") - } - - func test__language_identifier_for_English_USVirginIslands() { - locale = .English(.USVirginIslands) + func test__language_identifier_for_English_CaymanIslands() { + locale = .English(.CaymanIslands) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_VI") + XCTAssertEqual(locale.localeIdentifier, "en_KY") } - func test__language_identifier_for_English_Sweden() { - locale = .English(.Sweden) + func test__language_identifier_for_English_Finland() { + locale = .English(.Finland) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_SE") + XCTAssertEqual(locale.localeIdentifier, "en_FI") } - func test__language_identifier_for_English_FalklandIslands() { - locale = .English(.FalklandIslands) + func test__language_identifier_for_English_AntiguaBarbuda() { + locale = .English(.AntiguaBarbuda) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_FK") + XCTAssertEqual(locale.localeIdentifier, "en_AG") } - func test__language_identifier_for_English_CocosKeelingIslands() { - locale = .English(.CocosKeelingIslands) + func test__language_identifier_for_English_Anguilla() { + locale = .English(.Anguilla) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_CC") + XCTAssertEqual(locale.localeIdentifier, "en_AI") } - func test__language_identifier_for_English_France() { - locale = .English(.France) + func test__language_identifier_for_English_Mauritius() { + locale = .English(.Mauritius) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_FR") + XCTAssertEqual(locale.localeIdentifier, "en_MU") } - func test__language_identifier_for_English_StKittsNevis() { - locale = .English(.StKittsNevis) + func test__language_identifier_for_English_Tonga() { + locale = .English(.Tonga) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_KN") + XCTAssertEqual(locale.localeIdentifier, "en_TO") } - func test__language_identifier_for_English_Pakistan() { - locale = .English(.Pakistan) + func test__language_identifier_for_English_Italy() { + locale = .English(.Italy) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_PK") + XCTAssertEqual(locale.localeIdentifier, "en_IT") } - func test__language_identifier_for_English_Zambia() { - locale = .English(.Zambia) + func test__language_identifier_for_English_Nigeria() { + locale = .English(.Nigeria) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_ZM") + XCTAssertEqual(locale.localeIdentifier, "en_NG") } - func test__language_identifier_for_English_Poland() { - locale = .English(.Poland) + func test__language_identifier_for_English_Australia() { + locale = .English(.Australia) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_PL") + XCTAssertEqual(locale.localeIdentifier, "en_AU") } - func test__language_identifier_for_English_Tokelau() { - locale = .English(.Tokelau) + func test__language_identifier_for_English_SierraLeone() { + locale = .English(.SierraLeone) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_TK") + XCTAssertEqual(locale.localeIdentifier, "en_SL") } - func test__language_identifier_for_English_CookIslands() { - locale = .English(.CookIslands) + func test__language_identifier_for_English_BritishVirginIslands() { + locale = .English(.BritishVirginIslands) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_CK") + XCTAssertEqual(locale.localeIdentifier, "en_VG") } - func test__language_identifier_for_English_StHelena() { - locale = .English(.StHelena) + func test__language_identifier_for_English_Guernsey() { + locale = .English(.Guernsey) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_SH") + XCTAssertEqual(locale.localeIdentifier, "en_GG") } - func test__language_identifier_for_English_Nauru() { - locale = .English(.Nauru) + func test__language_identifier_for_English_SouthSudan() { + locale = .English(.SouthSudan) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_NR") + XCTAssertEqual(locale.localeIdentifier, "en_SS") } - func test__language_identifier_for_English_Ghana() { - locale = .English(.Ghana) + func test__language_identifier_for_English_Denmark() { + locale = .English(.Denmark) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_GH") + XCTAssertEqual(locale.localeIdentifier, "en_DK") } - func test__language_identifier_for_English_Iceland() { - locale = .English(.Iceland) + func test__language_identifier_for_English_Guam() { + locale = .English(.Guam) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_IS") + XCTAssertEqual(locale.localeIdentifier, "en_GU") } - func test__language_identifier_for_English_Micronesia() { - locale = .English(.Micronesia) + func test__language_identifier_for_English_Andorra() { + locale = .English(.Andorra) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_FM") + XCTAssertEqual(locale.localeIdentifier, "en_AD") } - func test__language_identifier_for_English_AmericanSamoa() { - locale = .English(.AmericanSamoa) + func test__language_identifier_for_English_Cyprus() { + locale = .English(.Cyprus) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_AS") + XCTAssertEqual(locale.localeIdentifier, "en_CY") } - func test__language_identifier_for_English_India() { - locale = .English(.India) + func test__language_identifier_for_English_StVincentGrenadines() { + locale = .English(.StVincentGrenadines) XCTAssertEqual(locale.languageIdentifier, "en") - XCTAssertEqual(locale.localeIdentifier, "en_IN") + XCTAssertEqual(locale.localeIdentifier, "en_VC") } - func test__language_identifier_for_French_Rwanda() { - locale = .French(.Rwanda) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_RW") + func test__language_identifier_for_English_UnitedStates() { + locale = .English(.UnitedStates) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_US") } - func test__language_identifier_for_French_Seychelles() { - locale = .French(.Seychelles) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_SC") + func test__language_identifier_for_English_Liberia() { + locale = .English(.Liberia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_LR") } - func test__language_identifier_for_French_Vanuatu() { - locale = .French(.Vanuatu) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_VU") + func test__language_identifier_for_English_Uganda() { + locale = .English(.Uganda) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_UG") } - func test__language_identifier_for_French_Mauritius() { - locale = .French(.Mauritius) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_MU") + func test__language_identifier_for_English_Slovakia() { + locale = .English(.Slovakia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SK") } - func test__language_identifier_for_French_Chad() { - locale = .French(.Chad) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_TD") + func test__language_identifier_for_English_Bermuda() { + locale = .English(.Bermuda) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_BM") } - func test__language_identifier_for_French_Djibouti() { - locale = .French(.Djibouti) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_DJ") + func test__language_identifier_for_English_PitcairnIslands() { + locale = .English(.PitcairnIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PN") } - func test__language_identifier_for_French_CongoBrazzaville() { - locale = .French(.CongoBrazzaville) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_CG") + func test__language_identifier_for_English_Slovenia() { + locale = .English(.Slovenia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SI") } - func test__language_identifier_for_French_Monaco() { - locale = .French(.Monaco) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_MC") + func test__language_identifier_for_English_Switzerland() { + locale = .English(.Switzerland) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_CH") } - func test__language_identifier_for_French_Mauritania() { - locale = .French(.Mauritania) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_MR") + func test__language_identifier_for_English_Lithuania() { + locale = .English(.Lithuania) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_LT") } - func test__language_identifier_for_French_Luxembourg() { - locale = .French(.Luxembourg) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_LU") + func test__language_identifier_for_English_Tuvalu() { + locale = .English(.Tuvalu) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_TV") } - func test__language_identifier_for_French_Niger() { - locale = .French(.Niger) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_NE") + func test__language_identifier_for_English_World() { + locale = .English(.World) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_001") } - func test__language_identifier_for_French_StMartin() { - locale = .French(.StMartin) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_MF") + func test__language_identifier_for_English_TurksCaicosIslands() { + locale = .English(.TurksCaicosIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_TC") } - func test__language_identifier_for_French_Mayotte() { - locale = .French(.Mayotte) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_YT") + func test__language_identifier_for_English_Vanuatu() { + locale = .English(.Vanuatu) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_VU") } - func test__language_identifier_for_French_Benin() { - locale = .French(.Benin) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_BJ") + func test__language_identifier_for_English_NewZealand() { + locale = .English(.NewZealand) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_NZ") } - func test__language_identifier_for_French_Canada() { - locale = .French(.Canada) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_CA") + func test__language_identifier_for_English_Latvia() { + locale = .English(.Latvia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_LV") } - func test__language_identifier_for_French_FrenchGuiana() { - locale = .French(.FrenchGuiana) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_GF") + func test__language_identifier_for_English_Ireland() { + locale = .English(.Ireland) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_IE") } - func test__language_identifier_for_French_NewCaledonia() { - locale = .French(.NewCaledonia) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_NC") + func test__language_identifier_for_English_Guyana() { + locale = .English(.Guyana) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GY") } - func test__language_identifier_for_French_Haiti() { - locale = .French(.Haiti) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_HT") + func test__language_identifier_for_English_BritishIndianOceanTerritory() { + locale = .English(.BritishIndianOceanTerritory) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_IO") } - func test__language_identifier_for_French_Senegal() { - locale = .French(.Senegal) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_SN") + func test__language_identifier_for_English_Philippines() { + locale = .English(.Philippines) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PH") } - func test__language_identifier_for_French_CentralAfricanRepublic() { - locale = .French(.CentralAfricanRepublic) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_CF") + func test__language_identifier_for_English_Niue() { + locale = .English(.Niue) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_NU") } - func test__language_identifier_for_French_France() { - locale = .French(.France) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_FR") + func test__language_identifier_for_English_Gambia() { + locale = .English(.Gambia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GM") } - func test__language_identifier_for_French_Belgium() { - locale = .French(.Belgium) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_BE") + func test__language_identifier_for_English_Spain() { + locale = .English(.Spain) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_ES") } - func test__language_identifier_for_French_StPierreMiquelon() { - locale = .French(.StPierreMiquelon) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_PM") + func test__language_identifier_for_English_NorthernMarianaIslands() { + locale = .English(.NorthernMarianaIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_MP") } - func test__language_identifier_for_French_Togo() { - locale = .French(.Togo) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_TG") + func test__language_identifier_for_English_Estonia() { + locale = .English(.Estonia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_EE") } - func test__language_identifier_for_French_FrenchPolynesia() { - locale = .French(.FrenchPolynesia) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_PF") + func test__language_identifier_for_English_Greece() { + locale = .English(.Greece) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GR") } - func test__language_identifier_for_French_Morocco() { - locale = .French(.Morocco) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_MA") + func test__language_identifier_for_English_Canada() { + locale = .English(.Canada) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_CA") } - func test__language_identifier_for_French_Cameroon() { - locale = .French(.Cameroon) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_CM") + func test__language_identifier_for_English_Sudan() { + locale = .English(.Sudan) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SD") } - func test__language_identifier_for_French_Burundi() { - locale = .French(.Burundi) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_BI") + func test__language_identifier_for_English_StLucia() { + locale = .English(.StLucia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_LC") } - func test__language_identifier_for_French_StBarthélemy() { - locale = .French(.StBarthélemy) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_BL") + func test__language_identifier_for_English_Croatia() { + locale = .English(.Croatia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_HR") } - func test__language_identifier_for_French_Madagascar() { - locale = .French(.Madagascar) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_MG") + func test__language_identifier_for_English_NorfolkIsland() { + locale = .English(.NorfolkIsland) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_NF") } - func test__language_identifier_for_French_Algeria() { - locale = .French(.Algeria) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_DZ") + func test__language_identifier_for_English_UnitedKingdom() { + locale = .English(.UnitedKingdom) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GB") } - func test__language_identifier_for_French_Guinea() { - locale = .French(.Guinea) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_GN") + func test__language_identifier_for_English_Dominica() { + locale = .English(.Dominica) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_DM") } - func test__language_identifier_for_French_BurkinaFaso() { - locale = .French(.BurkinaFaso) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_BF") + func test__language_identifier_for_English_Europe() { + locale = .English(.Europe) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_150") } - func test__language_identifier_for_French_Guadeloupe() { - locale = .French(.Guadeloupe) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_GP") + func test__language_identifier_for_English_Portugal() { + locale = .English(.Portugal) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PT") } - func test__language_identifier_for_French_CongoKinshasa() { - locale = .French(.CongoKinshasa) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_CD") + func test__language_identifier_for_English_Turkey() { + locale = .English(.Turkey) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_TR") } - func test__language_identifier_for_French_Réunion() { - locale = .French(.Réunion) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_RE") + func test__language_identifier_for_English_Malta() { + locale = .English(.Malta) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_MT") } - func test__language_identifier_for_French_Mali() { - locale = .French(.Mali) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_ML") + func test__language_identifier_for_English_Albania() { + locale = .English(.Albania) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_AL") } - func test__language_identifier_for_French_Martinique() { - locale = .French(.Martinique) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_MQ") + func test__language_identifier_for_English_TrinidadTobago() { + locale = .English(.TrinidadTobago) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_TT") } - func test__language_identifier_for_French_WallisFutuna() { - locale = .French(.WallisFutuna) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_WF") + func test__language_identifier_for_English_Samoa() { + locale = .English(.Samoa) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_WS") } - func test__language_identifier_for_French_EquatorialGuinea() { - locale = .French(.EquatorialGuinea) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_GQ") + func test__language_identifier_for_English_Israel() { + locale = .English(.Israel) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_IL") } - func test__language_identifier_for_French_Switzerland() { - locale = .French(.Switzerland) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_CH") + func test__language_identifier_for_English_DiegoGarcia() { + locale = .English(.DiegoGarcia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_DG") } - func test__language_identifier_for_French_CôteDivoire() { - locale = .French(.CôteDivoire) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_CI") + func test__language_identifier_for_English_Rwanda() { + locale = .English(.Rwanda) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_RW") } - func test__language_identifier_for_French_Comoros() { - locale = .French(.Comoros) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_KM") + func test__language_identifier_for_English_Fiji() { + locale = .English(.Fiji) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_FJ") } - func test__language_identifier_for_French_Syria() { - locale = .French(.Syria) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_SY") + func test__language_identifier_for_English_Kenya() { + locale = .English(.Kenya) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_KE") } - func test__language_identifier_for_French_Gabon() { - locale = .French(.Gabon) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_GA") + func test__language_identifier_for_English_Russia() { + locale = .English(.Russia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_RU") } - func test__language_identifier_for_French_Tunisia() { - locale = .French(.Tunisia) - XCTAssertEqual(locale.languageIdentifier, "fr") - XCTAssertEqual(locale.localeIdentifier, "fr_TN") + func test__language_identifier_for_English_Bahamas() { + locale = .English(.Bahamas) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_BS") } - func test__language_identifier_for_Arabic_Somalia() { - locale = .Arabic(.Somalia) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_SO") + func test__language_identifier_for_English_Luxembourg() { + locale = .English(.Luxembourg) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_LU") } - func test__language_identifier_for_Arabic_Iraq() { - locale = .Arabic(.Iraq) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_IQ") + func test__language_identifier_for_English_Hungary() { + locale = .English(.Hungary) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_HU") } - func test__language_identifier_for_Arabic_Kuwait() { - locale = .Arabic(.Kuwait) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_KW") + func test__language_identifier_for_English_Tanzania() { + locale = .English(.Tanzania) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_TZ") } - func test__language_identifier_for_Arabic_Chad() { - locale = .Arabic(.Chad) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_TD") + func test__language_identifier_for_English_Namibia() { + locale = .English(.Namibia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_NA") } - func test__language_identifier_for_Arabic_Libya() { - locale = .Arabic(.Libya) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_LY") + func test__language_identifier_for_English_Zimbabwe() { + locale = .English(.Zimbabwe) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_ZW") } - func test__language_identifier_for_Arabic_Egypt() { - locale = .Arabic(.Egypt) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_EG") + func test__language_identifier_for_English_SouthAfrica() { + locale = .English(.SouthAfrica) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_ZA") } - func test__language_identifier_for_Arabic_WesternSahara() { - locale = .Arabic(.WesternSahara) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_EH") + func test__language_identifier_for_English_Grenada() { + locale = .English(.Grenada) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GD") } - func test__language_identifier_for_Arabic_SaudiArabia() { - locale = .Arabic(.SaudiArabia) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_SA") + func test__language_identifier_for_English_Belize() { + locale = .English(.Belize) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_BZ") } - func test__language_identifier_for_Arabic_Mauritania() { - locale = .Arabic(.Mauritania) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_MR") + func test__language_identifier_for_English_Botswana() { + locale = .English(.Botswana) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_BW") } - func test__language_identifier_for_Arabic_Djibouti() { - locale = .Arabic(.Djibouti) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_DJ") + func test__language_identifier_for_English_PuertoRico() { + locale = .English(.PuertoRico) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PR") } - func test__language_identifier_for_Arabic_Eritrea() { - locale = .Arabic(.Eritrea) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_ER") + func test__language_identifier_for_English_USVirginIslands() { + locale = .English(.USVirginIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_VI") } - func test__language_identifier_for_Arabic_Lebanon() { - locale = .Arabic(.Lebanon) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_LB") + func test__language_identifier_for_English_Sweden() { + locale = .English(.Sweden) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SE") } - func test__language_identifier_for_Arabic_Oman() { - locale = .Arabic(.Oman) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_OM") + func test__language_identifier_for_English_FalklandIslands() { + locale = .English(.FalklandIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_FK") } - func test__language_identifier_for_Arabic_PalestinianTerritories() { - locale = .Arabic(.PalestinianTerritories) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_PS") + func test__language_identifier_for_English_CocosKeelingIslands() { + locale = .English(.CocosKeelingIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_CC") } - func test__language_identifier_for_Arabic_Sudan() { - locale = .Arabic(.Sudan) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_SD") + func test__language_identifier_for_English_France() { + locale = .English(.France) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_FR") } - func test__language_identifier_for_Arabic_SouthSudan() { - locale = .Arabic(.SouthSudan) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_SS") + func test__language_identifier_for_English_StKittsNevis() { + locale = .English(.StKittsNevis) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_KN") } - func test__language_identifier_for_Arabic_Algeria() { - locale = .Arabic(.Algeria) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_DZ") + func test__language_identifier_for_English_Pakistan() { + locale = .English(.Pakistan) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PK") } - func test__language_identifier_for_Arabic_Morocco() { - locale = .Arabic(.Morocco) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_MA") + func test__language_identifier_for_English_Zambia() { + locale = .English(.Zambia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_ZM") } - func test__language_identifier_for_Arabic_Bahrain() { - locale = .Arabic(.Bahrain) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_BH") + func test__language_identifier_for_English_Poland() { + locale = .English(.Poland) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_PL") } - func test__language_identifier_for_Arabic_UnitedArabEmirates() { - locale = .Arabic(.UnitedArabEmirates) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_AE") + func test__language_identifier_for_English_Tokelau() { + locale = .English(.Tokelau) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_TK") } - func test__language_identifier_for_Arabic_Qatar() { - locale = .Arabic(.Qatar) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_QA") + func test__language_identifier_for_English_CookIslands() { + locale = .English(.CookIslands) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_CK") } - func test__language_identifier_for_Arabic_Comoros() { - locale = .Arabic(.Comoros) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_KM") + func test__language_identifier_for_English_StHelena() { + locale = .English(.StHelena) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_SH") } - func test__language_identifier_for_Arabic_Syria() { - locale = .Arabic(.Syria) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_SY") + func test__language_identifier_for_English_Nauru() { + locale = .English(.Nauru) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_NR") } - func test__language_identifier_for_Arabic_Yemen() { - locale = .Arabic(.Yemen) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_YE") + func test__language_identifier_for_English_Ghana() { + locale = .English(.Ghana) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_GH") } - func test__language_identifier_for_Arabic_Jordan() { - locale = .Arabic(.Jordan) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_JO") + func test__language_identifier_for_English_Iceland() { + locale = .English(.Iceland) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_IS") } - func test__language_identifier_for_Arabic_Tunisia() { - locale = .Arabic(.Tunisia) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_TN") + func test__language_identifier_for_English_Micronesia() { + locale = .English(.Micronesia) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_FM") } - func test__language_identifier_for_Arabic_Israel() { - locale = .Arabic(.Israel) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_IL") + func test__language_identifier_for_English_AmericanSamoa() { + locale = .English(.AmericanSamoa) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_AS") } - func test__language_identifier_for_Arabic_World() { - locale = .Arabic(.World) - XCTAssertEqual(locale.languageIdentifier, "ar") - XCTAssertEqual(locale.localeIdentifier, "ar_001") + func test__language_identifier_for_English_India() { + locale = .English(.India) + XCTAssertEqual(locale.languageIdentifier, "en") + XCTAssertEqual(locale.localeIdentifier, "en_IN") } +} - func test__language_identifier_for_Spanish_Bolivia() { - locale = .Spanish(.Bolivia) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_BO") - } +class LocaleEweLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_Spanish_Peru() { - locale = .Spanish(.Peru) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_PE") - } + var locale: Locale! - func test__language_identifier_for_Spanish_Panama() { - locale = .Spanish(.Panama) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_PA") + func test__language_identifier_for_Ewe_Togo() { + locale = .Ewe(.Togo) + XCTAssertEqual(locale.languageIdentifier, "ee") + XCTAssertEqual(locale.localeIdentifier, "ee_TG") } - func test__language_identifier_for_Spanish_Venezuela() { - locale = .Spanish(.Venezuela) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_VE") + func test__language_identifier_for_Ewe_Ghana() { + locale = .Ewe(.Ghana) + XCTAssertEqual(locale.languageIdentifier, "ee") + XCTAssertEqual(locale.localeIdentifier, "ee_GH") } +} - func test__language_identifier_for_Spanish_Philippines() { - locale = .Spanish(.Philippines) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_PH") - } +class LocaleFrenchLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_Spanish_Spain() { - locale = .Spanish(.Spain) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_ES") - } + var locale: Locale! - func test__language_identifier_for_Spanish_LatinAmerica() { - locale = .Spanish(.LatinAmerica) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_419") + func test__language_identifier_for_French_Rwanda() { + locale = .French(.Rwanda) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_RW") } - func test__language_identifier_for_Spanish_Paraguay() { - locale = .Spanish(.Paraguay) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_PY") + func test__language_identifier_for_French_Seychelles() { + locale = .French(.Seychelles) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_SC") } - func test__language_identifier_for_Spanish_Colombia() { - locale = .Spanish(.Colombia) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_CO") + func test__language_identifier_for_French_Vanuatu() { + locale = .French(.Vanuatu) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_VU") } - func test__language_identifier_for_Spanish_Nicaragua() { - locale = .Spanish(.Nicaragua) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_NI") + func test__language_identifier_for_French_Mauritius() { + locale = .French(.Mauritius) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MU") + } + + func test__language_identifier_for_French_Chad() { + locale = .French(.Chad) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_TD") + } + + func test__language_identifier_for_French_Djibouti() { + locale = .French(.Djibouti) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_DJ") + } + + func test__language_identifier_for_French_CongoBrazzaville() { + locale = .French(.CongoBrazzaville) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CG") + } + + func test__language_identifier_for_French_Monaco() { + locale = .French(.Monaco) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MC") + } + + func test__language_identifier_for_French_Mauritania() { + locale = .French(.Mauritania) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MR") + } + + func test__language_identifier_for_French_Luxembourg() { + locale = .French(.Luxembourg) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_LU") + } + + func test__language_identifier_for_French_Niger() { + locale = .French(.Niger) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_NE") + } + + func test__language_identifier_for_French_StMartin() { + locale = .French(.StMartin) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MF") + } + + func test__language_identifier_for_French_Mayotte() { + locale = .French(.Mayotte) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_YT") + } + + func test__language_identifier_for_French_Benin() { + locale = .French(.Benin) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_BJ") + } + + func test__language_identifier_for_French_Canada() { + locale = .French(.Canada) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CA") + } + + func test__language_identifier_for_French_FrenchGuiana() { + locale = .French(.FrenchGuiana) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_GF") + } + + func test__language_identifier_for_French_NewCaledonia() { + locale = .French(.NewCaledonia) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_NC") + } + + func test__language_identifier_for_French_Haiti() { + locale = .French(.Haiti) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_HT") + } + + func test__language_identifier_for_French_Senegal() { + locale = .French(.Senegal) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_SN") + } + + func test__language_identifier_for_French_CentralAfricanRepublic() { + locale = .French(.CentralAfricanRepublic) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CF") + } + + func test__language_identifier_for_French_France() { + locale = .French(.France) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_FR") + } + + func test__language_identifier_for_French_Belgium() { + locale = .French(.Belgium) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_BE") + } + + func test__language_identifier_for_French_StPierreMiquelon() { + locale = .French(.StPierreMiquelon) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_PM") + } + + func test__language_identifier_for_French_Togo() { + locale = .French(.Togo) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_TG") + } + + func test__language_identifier_for_French_FrenchPolynesia() { + locale = .French(.FrenchPolynesia) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_PF") + } + + func test__language_identifier_for_French_Morocco() { + locale = .French(.Morocco) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MA") + } + + func test__language_identifier_for_French_Cameroon() { + locale = .French(.Cameroon) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CM") + } + + func test__language_identifier_for_French_Burundi() { + locale = .French(.Burundi) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_BI") + } + + func test__language_identifier_for_French_StBarthélemy() { + locale = .French(.StBarthélemy) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_BL") + } + + func test__language_identifier_for_French_Madagascar() { + locale = .French(.Madagascar) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MG") + } + + func test__language_identifier_for_French_Algeria() { + locale = .French(.Algeria) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_DZ") + } + + func test__language_identifier_for_French_Guinea() { + locale = .French(.Guinea) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_GN") + } + + func test__language_identifier_for_French_BurkinaFaso() { + locale = .French(.BurkinaFaso) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_BF") + } + + func test__language_identifier_for_French_Guadeloupe() { + locale = .French(.Guadeloupe) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_GP") + } + + func test__language_identifier_for_French_CongoKinshasa() { + locale = .French(.CongoKinshasa) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CD") + } + + func test__language_identifier_for_French_Réunion() { + locale = .French(.Réunion) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_RE") + } + + func test__language_identifier_for_French_Mali() { + locale = .French(.Mali) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_ML") + } + + func test__language_identifier_for_French_Martinique() { + locale = .French(.Martinique) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_MQ") + } + + func test__language_identifier_for_French_WallisFutuna() { + locale = .French(.WallisFutuna) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_WF") + } + + func test__language_identifier_for_French_EquatorialGuinea() { + locale = .French(.EquatorialGuinea) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_GQ") + } + + func test__language_identifier_for_French_Switzerland() { + locale = .French(.Switzerland) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CH") + } + + func test__language_identifier_for_French_CôteDivoire() { + locale = .French(.CôteDivoire) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_CI") + } + + func test__language_identifier_for_French_Comoros() { + locale = .French(.Comoros) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_KM") + } + + func test__language_identifier_for_French_Syria() { + locale = .French(.Syria) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_SY") + } + + func test__language_identifier_for_French_Gabon() { + locale = .French(.Gabon) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_GA") + } + + func test__language_identifier_for_French_Tunisia() { + locale = .French(.Tunisia) + XCTAssertEqual(locale.languageIdentifier, "fr") + XCTAssertEqual(locale.localeIdentifier, "fr_TN") + } +} + +class LocaleFulahLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_Fulah_Senegal() { + locale = .Fulah(.Senegal) + XCTAssertEqual(locale.languageIdentifier, "ff") + XCTAssertEqual(locale.localeIdentifier, "ff_SN") } - func test__language_identifier_for_Spanish_Chile() { - locale = .Spanish(.Chile) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_CL") + func test__language_identifier_for_Fulah_Cameroon() { + locale = .Fulah(.Cameroon) + XCTAssertEqual(locale.languageIdentifier, "ff") + XCTAssertEqual(locale.localeIdentifier, "ff_CM") } - func test__language_identifier_for_Spanish_CanaryIslands() { - locale = .Spanish(.CanaryIslands) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_IC") + func test__language_identifier_for_Fulah_Mauritania() { + locale = .Fulah(.Mauritania) + XCTAssertEqual(locale.languageIdentifier, "ff") + XCTAssertEqual(locale.localeIdentifier, "ff_MR") } - func test__language_identifier_for_Spanish_PuertoRico() { - locale = .Spanish(.PuertoRico) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_PR") + func test__language_identifier_for_Fulah_Guinea() { + locale = .Fulah(.Guinea) + XCTAssertEqual(locale.languageIdentifier, "ff") + XCTAssertEqual(locale.localeIdentifier, "ff_GN") + } +} + +class LocaleGermanLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_German_Belgium() { + locale = .German(.Belgium) + XCTAssertEqual(locale.languageIdentifier, "de") + XCTAssertEqual(locale.localeIdentifier, "de_BE") + } + + func test__language_identifier_for_German_Austria() { + locale = .German(.Austria) + XCTAssertEqual(locale.languageIdentifier, "de") + XCTAssertEqual(locale.localeIdentifier, "de_AT") + } + + func test__language_identifier_for_German_Liechtenstein() { + locale = .German(.Liechtenstein) + XCTAssertEqual(locale.languageIdentifier, "de") + XCTAssertEqual(locale.localeIdentifier, "de_LI") + } + + func test__language_identifier_for_German_Luxembourg() { + locale = .German(.Luxembourg) + XCTAssertEqual(locale.languageIdentifier, "de") + XCTAssertEqual(locale.localeIdentifier, "de_LU") + } + + func test__language_identifier_for_German_Switzerland() { + locale = .German(.Switzerland) + XCTAssertEqual(locale.languageIdentifier, "de") + XCTAssertEqual(locale.localeIdentifier, "de_CH") + } + + func test__language_identifier_for_German_Germany() { + locale = .German(.Germany) + XCTAssertEqual(locale.languageIdentifier, "de") + XCTAssertEqual(locale.localeIdentifier, "de_DE") + } +} + +class LocaleGreekLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_Greek_Cyprus() { + locale = .Greek(.Cyprus) + XCTAssertEqual(locale.languageIdentifier, "el") + XCTAssertEqual(locale.localeIdentifier, "el_CY") + } + + func test__language_identifier_for_Greek_Greece() { + locale = .Greek(.Greece) + XCTAssertEqual(locale.languageIdentifier, "el") + XCTAssertEqual(locale.localeIdentifier, "el_GR") + } +} + +class LocaleHausaLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_Hausa_Niger() { + locale = .Hausa(.Niger) + XCTAssertEqual(locale.languageIdentifier, "ha") + XCTAssertEqual(locale.localeIdentifier, "ha_NE") + } + + func test__language_identifier_for_Hausa_Ghana() { + locale = .Hausa(.Ghana) + XCTAssertEqual(locale.languageIdentifier, "ha") + XCTAssertEqual(locale.localeIdentifier, "ha_GH") + } + + func test__language_identifier_for_Hausa_Nigeria() { + locale = .Hausa(.Nigeria) + XCTAssertEqual(locale.languageIdentifier, "ha") + XCTAssertEqual(locale.localeIdentifier, "ha_NG") + } +} + +class LocaleItalianLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_Italian_Italy() { + locale = .Italian(.Italy) + XCTAssertEqual(locale.languageIdentifier, "it") + XCTAssertEqual(locale.localeIdentifier, "it_IT") + } + + func test__language_identifier_for_Italian_Switzerland() { + locale = .Italian(.Switzerland) + XCTAssertEqual(locale.languageIdentifier, "it") + XCTAssertEqual(locale.localeIdentifier, "it_CH") + } + + func test__language_identifier_for_Italian_SanMarino() { + locale = .Italian(.SanMarino) + XCTAssertEqual(locale.languageIdentifier, "it") + XCTAssertEqual(locale.localeIdentifier, "it_SM") + } +} + +class LocaleKoreanLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_Korean_NorthKorea() { + locale = .Korean(.NorthKorea) + XCTAssertEqual(locale.languageIdentifier, "ko") + XCTAssertEqual(locale.localeIdentifier, "ko_KP") + } + + func test__language_identifier_for_Korean_SouthKorea() { + locale = .Korean(.SouthKorea) + XCTAssertEqual(locale.languageIdentifier, "ko") + XCTAssertEqual(locale.localeIdentifier, "ko_KR") + } +} + +class LocaleLingalaLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_Lingala_CongoKinshasa() { + locale = .Lingala(.CongoKinshasa) + XCTAssertEqual(locale.languageIdentifier, "ln") + XCTAssertEqual(locale.localeIdentifier, "ln_CD") + } + + func test__language_identifier_for_Lingala_CentralAfricanRepublic() { + locale = .Lingala(.CentralAfricanRepublic) + XCTAssertEqual(locale.languageIdentifier, "ln") + XCTAssertEqual(locale.localeIdentifier, "ln_CF") + } + + func test__language_identifier_for_Lingala_Angola() { + locale = .Lingala(.Angola) + XCTAssertEqual(locale.languageIdentifier, "ln") + XCTAssertEqual(locale.localeIdentifier, "ln_AO") + } + + func test__language_identifier_for_Lingala_CongoBrazzaville() { + locale = .Lingala(.CongoBrazzaville) + XCTAssertEqual(locale.languageIdentifier, "ln") + XCTAssertEqual(locale.localeIdentifier, "ln_CG") + } +} + +class LocaleMalayLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_Malay_Brunei() { + locale = .Malay(.Brunei) + XCTAssertEqual(locale.languageIdentifier, "ms") + XCTAssertEqual(locale.localeIdentifier, "ms_BN") + } + + func test__language_identifier_for_Malay_Malaysia() { + locale = .Malay(.Malaysia) + XCTAssertEqual(locale.languageIdentifier, "ms") + XCTAssertEqual(locale.localeIdentifier, "ms_MY") + } + + func test__language_identifier_for_Malay_Singapore() { + locale = .Malay(.Singapore) + XCTAssertEqual(locale.languageIdentifier, "ms") + XCTAssertEqual(locale.localeIdentifier, "ms_SG") + } +} + +class LocaleMasaiLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_Masai_Tanzania() { + locale = .Masai(.Tanzania) + XCTAssertEqual(locale.languageIdentifier, "mas") + XCTAssertEqual(locale.localeIdentifier, "mas_TZ") + } + + func test__language_identifier_for_Masai_Kenya() { + locale = .Masai(.Kenya) + XCTAssertEqual(locale.languageIdentifier, "mas") + XCTAssertEqual(locale.localeIdentifier, "mas_KE") + } +} + +class LocaleNepaliLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_Nepali_Nepal() { + locale = .Nepali(.Nepal) + XCTAssertEqual(locale.languageIdentifier, "ne") + XCTAssertEqual(locale.localeIdentifier, "ne_NP") + } + + func test__language_identifier_for_Nepali_India() { + locale = .Nepali(.India) + XCTAssertEqual(locale.languageIdentifier, "ne") + XCTAssertEqual(locale.localeIdentifier, "ne_IN") + } +} + +class LocaleNorthernSamiLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_NorthernSami_Sweden() { + locale = .NorthernSami(.Sweden) + XCTAssertEqual(locale.languageIdentifier, "se") + XCTAssertEqual(locale.localeIdentifier, "se_SE") + } + + func test__language_identifier_for_NorthernSami_Norway() { + locale = .NorthernSami(.Norway) + XCTAssertEqual(locale.languageIdentifier, "se") + XCTAssertEqual(locale.localeIdentifier, "se_NO") + } + + func test__language_identifier_for_NorthernSami_Finland() { + locale = .NorthernSami(.Finland) + XCTAssertEqual(locale.languageIdentifier, "se") + XCTAssertEqual(locale.localeIdentifier, "se_FI") + } +} + +class LocaleNorwegianBokmålLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_NorwegianBokmål_SvalbardJanMayen() { + locale = .NorwegianBokmål(.SvalbardJanMayen) + XCTAssertEqual(locale.languageIdentifier, "nb") + XCTAssertEqual(locale.localeIdentifier, "nb_SJ") } - func test__language_identifier_for_Spanish_Honduras() { - locale = .Spanish(.Honduras) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_HN") + func test__language_identifier_for_NorwegianBokmål_Norway() { + locale = .NorwegianBokmål(.Norway) + XCTAssertEqual(locale.languageIdentifier, "nb") + XCTAssertEqual(locale.localeIdentifier, "nb_NO") } +} - func test__language_identifier_for_Spanish_Mexico() { - locale = .Spanish(.Mexico) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_MX") - } +class LocaleOromoLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_Spanish_Uruguay() { - locale = .Spanish(.Uruguay) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_UY") - } + var locale: Locale! - func test__language_identifier_for_Spanish_CeutaMelilla() { - locale = .Spanish(.CeutaMelilla) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_EA") + func test__language_identifier_for_Oromo_Ethiopia() { + locale = .Oromo(.Ethiopia) + XCTAssertEqual(locale.languageIdentifier, "om") + XCTAssertEqual(locale.localeIdentifier, "om_ET") } - func test__language_identifier_for_Spanish_UnitedStates() { - locale = .Spanish(.UnitedStates) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_US") + func test__language_identifier_for_Oromo_Kenya() { + locale = .Oromo(.Kenya) + XCTAssertEqual(locale.languageIdentifier, "om") + XCTAssertEqual(locale.localeIdentifier, "om_KE") } +} - func test__language_identifier_for_Spanish_ElSalvador() { - locale = .Spanish(.ElSalvador) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_SV") - } +class LocaleOsseticLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_Spanish_Argentina() { - locale = .Spanish(.Argentina) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_AR") - } + var locale: Locale! - func test__language_identifier_for_Spanish_Ecuador() { - locale = .Spanish(.Ecuador) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_EC") + func test__language_identifier_for_Ossetic_Georgia() { + locale = .Ossetic(.Georgia) + XCTAssertEqual(locale.languageIdentifier, "os") + XCTAssertEqual(locale.localeIdentifier, "os_GE") } - func test__language_identifier_for_Spanish_EquatorialGuinea() { - locale = .Spanish(.EquatorialGuinea) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_GQ") + func test__language_identifier_for_Ossetic_Russia() { + locale = .Ossetic(.Russia) + XCTAssertEqual(locale.languageIdentifier, "os") + XCTAssertEqual(locale.localeIdentifier, "os_RU") } +} - func test__language_identifier_for_Spanish_Guatemala() { - locale = .Spanish(.Guatemala) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_GT") - } +class LocalePersianLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_Spanish_Cuba() { - locale = .Spanish(.Cuba) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_CU") - } + var locale: Locale! - func test__language_identifier_for_Spanish_DominicanRepublic() { - locale = .Spanish(.DominicanRepublic) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_DO") + func test__language_identifier_for_Persian_Iran() { + locale = .Persian(.Iran) + XCTAssertEqual(locale.languageIdentifier, "fa") + XCTAssertEqual(locale.localeIdentifier, "fa_IR") } - func test__language_identifier_for_Spanish_CostaRica() { - locale = .Spanish(.CostaRica) - XCTAssertEqual(locale.languageIdentifier, "es") - XCTAssertEqual(locale.localeIdentifier, "es_CR") + func test__language_identifier_for_Persian_Afghanistan() { + locale = .Persian(.Afghanistan) + XCTAssertEqual(locale.languageIdentifier, "fa") + XCTAssertEqual(locale.localeIdentifier, "fa_AF") } +} + +class LocalePortugueseLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! func test__language_identifier_for_Portuguese_Brazil() { locale = .Portuguese(.Brazil) @@ -3466,198 +3888,109 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.languageIdentifier, "pt") XCTAssertEqual(locale.localeIdentifier, "pt_CV") } +} - func test__language_identifier_for_Dutch_Belgium() { - locale = .Dutch(.Belgium) - XCTAssertEqual(locale.languageIdentifier, "nl") - XCTAssertEqual(locale.localeIdentifier, "nl_BE") - } - - func test__language_identifier_for_Dutch_Curaçao() { - locale = .Dutch(.Curaçao) - XCTAssertEqual(locale.languageIdentifier, "nl") - XCTAssertEqual(locale.localeIdentifier, "nl_CW") - } - - func test__language_identifier_for_Dutch_Suriname() { - locale = .Dutch(.Suriname) - XCTAssertEqual(locale.languageIdentifier, "nl") - XCTAssertEqual(locale.localeIdentifier, "nl_SR") - } - - func test__language_identifier_for_Dutch_Netherlands() { - locale = .Dutch(.Netherlands) - XCTAssertEqual(locale.languageIdentifier, "nl") - XCTAssertEqual(locale.localeIdentifier, "nl_NL") - } - - func test__language_identifier_for_Dutch_SintMaarten() { - locale = .Dutch(.SintMaarten) - XCTAssertEqual(locale.languageIdentifier, "nl") - XCTAssertEqual(locale.localeIdentifier, "nl_SX") - } - - func test__language_identifier_for_Dutch_CaribbeanNetherlands() { - locale = .Dutch(.CaribbeanNetherlands) - XCTAssertEqual(locale.languageIdentifier, "nl") - XCTAssertEqual(locale.localeIdentifier, "nl_BQ") - } - - func test__language_identifier_for_Dutch_Aruba() { - locale = .Dutch(.Aruba) - XCTAssertEqual(locale.languageIdentifier, "nl") - XCTAssertEqual(locale.localeIdentifier, "nl_AW") - } - - func test__language_identifier_for_Russian_Kyrgyzstan() { - locale = .Russian(.Kyrgyzstan) - XCTAssertEqual(locale.languageIdentifier, "ru") - XCTAssertEqual(locale.localeIdentifier, "ru_KG") - } - - func test__language_identifier_for_Russian_Belarus() { - locale = .Russian(.Belarus) - XCTAssertEqual(locale.languageIdentifier, "ru") - XCTAssertEqual(locale.localeIdentifier, "ru_BY") - } - - func test__language_identifier_for_Russian_Russia() { - locale = .Russian(.Russia) - XCTAssertEqual(locale.languageIdentifier, "ru") - XCTAssertEqual(locale.localeIdentifier, "ru_RU") - } - - func test__language_identifier_for_Russian_Ukraine() { - locale = .Russian(.Ukraine) - XCTAssertEqual(locale.languageIdentifier, "ru") - XCTAssertEqual(locale.localeIdentifier, "ru_UA") - } - - func test__language_identifier_for_Russian_Moldova() { - locale = .Russian(.Moldova) - XCTAssertEqual(locale.languageIdentifier, "ru") - XCTAssertEqual(locale.localeIdentifier, "ru_MD") - } - - func test__language_identifier_for_Russian_Kazakhstan() { - locale = .Russian(.Kazakhstan) - XCTAssertEqual(locale.languageIdentifier, "ru") - XCTAssertEqual(locale.localeIdentifier, "ru_KZ") - } - - func test__language_identifier_for_German_Belgium() { - locale = .German(.Belgium) - XCTAssertEqual(locale.languageIdentifier, "de") - XCTAssertEqual(locale.localeIdentifier, "de_BE") - } +class LocalePunjabiLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_German_Austria() { - locale = .German(.Austria) - XCTAssertEqual(locale.languageIdentifier, "de") - XCTAssertEqual(locale.localeIdentifier, "de_AT") - } + var locale: Locale! - func test__language_identifier_for_German_Liechtenstein() { - locale = .German(.Liechtenstein) - XCTAssertEqual(locale.languageIdentifier, "de") - XCTAssertEqual(locale.localeIdentifier, "de_LI") + func test__language_identifier_for_Punjabi_Pakistan() { + locale = .Punjabi(.Pakistan) + XCTAssertEqual(locale.languageIdentifier, "pa") + XCTAssertEqual(locale.localeIdentifier, "pa_PK") } - func test__language_identifier_for_German_Luxembourg() { - locale = .German(.Luxembourg) - XCTAssertEqual(locale.languageIdentifier, "de") - XCTAssertEqual(locale.localeIdentifier, "de_LU") + func test__language_identifier_for_Punjabi_India() { + locale = .Punjabi(.India) + XCTAssertEqual(locale.languageIdentifier, "pa") + XCTAssertEqual(locale.localeIdentifier, "pa_IN") } +} - func test__language_identifier_for_German_Switzerland() { - locale = .German(.Switzerland) - XCTAssertEqual(locale.languageIdentifier, "de") - XCTAssertEqual(locale.localeIdentifier, "de_CH") - } +class LocaleQuechuaLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_German_Germany() { - locale = .German(.Germany) - XCTAssertEqual(locale.languageIdentifier, "de") - XCTAssertEqual(locale.localeIdentifier, "de_DE") - } + var locale: Locale! - func test__language_identifier_for_Chinese_Taiwan() { - locale = .Chinese(.Taiwan) - XCTAssertEqual(locale.languageIdentifier, "zh") - XCTAssertEqual(locale.localeIdentifier, "zh_TW") + func test__language_identifier_for_Quechua_Bolivia() { + locale = .Quechua(.Bolivia) + XCTAssertEqual(locale.languageIdentifier, "qu") + XCTAssertEqual(locale.localeIdentifier, "qu_BO") } - func test__language_identifier_for_Chinese_HongKongSarChina() { - locale = .Chinese(.HongKongSarChina) - XCTAssertEqual(locale.languageIdentifier, "zh") - XCTAssertEqual(locale.localeIdentifier, "zh_HK") + func test__language_identifier_for_Quechua_Ecuador() { + locale = .Quechua(.Ecuador) + XCTAssertEqual(locale.languageIdentifier, "qu") + XCTAssertEqual(locale.localeIdentifier, "qu_EC") } - func test__language_identifier_for_Chinese_MacauSarChina() { - locale = .Chinese(.MacauSarChina) - XCTAssertEqual(locale.languageIdentifier, "zh") - XCTAssertEqual(locale.localeIdentifier, "zh_MO") + func test__language_identifier_for_Quechua_Peru() { + locale = .Quechua(.Peru) + XCTAssertEqual(locale.languageIdentifier, "qu") + XCTAssertEqual(locale.localeIdentifier, "qu_PE") } +} - func test__language_identifier_for_Chinese_Singapore() { - locale = .Chinese(.Singapore) - XCTAssertEqual(locale.languageIdentifier, "zh") - XCTAssertEqual(locale.localeIdentifier, "zh_SG") - } +class LocaleRomanianLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_Chinese_China() { - locale = .Chinese(.China) - XCTAssertEqual(locale.languageIdentifier, "zh") - XCTAssertEqual(locale.localeIdentifier, "zh_CN") - } + var locale: Locale! - func test__language_identifier_for_Fulah_Senegal() { - locale = .Fulah(.Senegal) - XCTAssertEqual(locale.languageIdentifier, "ff") - XCTAssertEqual(locale.localeIdentifier, "ff_SN") + func test__language_identifier_for_Romanian_Romania() { + locale = .Romanian(.Romania) + XCTAssertEqual(locale.languageIdentifier, "ro") + XCTAssertEqual(locale.localeIdentifier, "ro_RO") } - func test__language_identifier_for_Fulah_Cameroon() { - locale = .Fulah(.Cameroon) - XCTAssertEqual(locale.languageIdentifier, "ff") - XCTAssertEqual(locale.localeIdentifier, "ff_CM") + func test__language_identifier_for_Romanian_Moldova() { + locale = .Romanian(.Moldova) + XCTAssertEqual(locale.languageIdentifier, "ro") + XCTAssertEqual(locale.localeIdentifier, "ro_MD") } +} - func test__language_identifier_for_Fulah_Mauritania() { - locale = .Fulah(.Mauritania) - XCTAssertEqual(locale.languageIdentifier, "ff") - XCTAssertEqual(locale.localeIdentifier, "ff_MR") +class LocaleRussianLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_Russian_Kyrgyzstan() { + locale = .Russian(.Kyrgyzstan) + XCTAssertEqual(locale.languageIdentifier, "ru") + XCTAssertEqual(locale.localeIdentifier, "ru_KG") } - func test__language_identifier_for_Fulah_Guinea() { - locale = .Fulah(.Guinea) - XCTAssertEqual(locale.languageIdentifier, "ff") - XCTAssertEqual(locale.localeIdentifier, "ff_GN") + func test__language_identifier_for_Russian_Belarus() { + locale = .Russian(.Belarus) + XCTAssertEqual(locale.languageIdentifier, "ru") + XCTAssertEqual(locale.localeIdentifier, "ru_BY") } - func test__language_identifier_for_Catalan_Italy() { - locale = .Catalan(.Italy) - XCTAssertEqual(locale.languageIdentifier, "ca") - XCTAssertEqual(locale.localeIdentifier, "ca_IT") + func test__language_identifier_for_Russian_Russia() { + locale = .Russian(.Russia) + XCTAssertEqual(locale.languageIdentifier, "ru") + XCTAssertEqual(locale.localeIdentifier, "ru_RU") } - func test__language_identifier_for_Catalan_France() { - locale = .Catalan(.France) - XCTAssertEqual(locale.languageIdentifier, "ca") - XCTAssertEqual(locale.localeIdentifier, "ca_FR") + func test__language_identifier_for_Russian_Ukraine() { + locale = .Russian(.Ukraine) + XCTAssertEqual(locale.languageIdentifier, "ru") + XCTAssertEqual(locale.localeIdentifier, "ru_UA") } - func test__language_identifier_for_Catalan_Spain() { - locale = .Catalan(.Spain) - XCTAssertEqual(locale.languageIdentifier, "ca") - XCTAssertEqual(locale.localeIdentifier, "ca_ES") + func test__language_identifier_for_Russian_Moldova() { + locale = .Russian(.Moldova) + XCTAssertEqual(locale.languageIdentifier, "ru") + XCTAssertEqual(locale.localeIdentifier, "ru_MD") } - func test__language_identifier_for_Catalan_Andorra() { - locale = .Catalan(.Andorra) - XCTAssertEqual(locale.languageIdentifier, "ca") - XCTAssertEqual(locale.localeIdentifier, "ca_AD") + func test__language_identifier_for_Russian_Kazakhstan() { + locale = .Russian(.Kazakhstan) + XCTAssertEqual(locale.languageIdentifier, "ru") + XCTAssertEqual(locale.localeIdentifier, "ru_KZ") } +} + +class LocaleSerbianLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! func test__language_identifier_for_Serbian_Montenegro() { locale = .Serbian(.Montenegro) @@ -3682,6 +4015,11 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.languageIdentifier, "sr") XCTAssertEqual(locale.localeIdentifier, "sr_XK") } +} + +class LocaleSomaliLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! func test__language_identifier_for_Somali_Kenya() { locale = .Somali(.Kenya) @@ -3706,426 +4044,293 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.languageIdentifier, "so") XCTAssertEqual(locale.localeIdentifier, "so_DJ") } +} - func test__language_identifier_for_Tamil_India() { - locale = .Tamil(.India) - XCTAssertEqual(locale.languageIdentifier, "ta") - XCTAssertEqual(locale.localeIdentifier, "ta_IN") - } - - func test__language_identifier_for_Tamil_Singapore() { - locale = .Tamil(.Singapore) - XCTAssertEqual(locale.languageIdentifier, "ta") - XCTAssertEqual(locale.localeIdentifier, "ta_SG") - } - - func test__language_identifier_for_Tamil_Malaysia() { - locale = .Tamil(.Malaysia) - XCTAssertEqual(locale.languageIdentifier, "ta") - XCTAssertEqual(locale.localeIdentifier, "ta_MY") - } - - func test__language_identifier_for_Tamil_SriLanka() { - locale = .Tamil(.SriLanka) - XCTAssertEqual(locale.languageIdentifier, "ta") - XCTAssertEqual(locale.localeIdentifier, "ta_LK") - } - - func test__language_identifier_for_Lingala_CongoKinshasa() { - locale = .Lingala(.CongoKinshasa) - XCTAssertEqual(locale.languageIdentifier, "ln") - XCTAssertEqual(locale.localeIdentifier, "ln_CD") - } - - func test__language_identifier_for_Lingala_CentralAfricanRepublic() { - locale = .Lingala(.CentralAfricanRepublic) - XCTAssertEqual(locale.languageIdentifier, "ln") - XCTAssertEqual(locale.localeIdentifier, "ln_CF") - } - - func test__language_identifier_for_Lingala_Angola() { - locale = .Lingala(.Angola) - XCTAssertEqual(locale.languageIdentifier, "ln") - XCTAssertEqual(locale.localeIdentifier, "ln_AO") - } - - func test__language_identifier_for_Lingala_CongoBrazzaville() { - locale = .Lingala(.CongoBrazzaville) - XCTAssertEqual(locale.languageIdentifier, "ln") - XCTAssertEqual(locale.localeIdentifier, "ln_CG") - } - - func test__language_identifier_for_Swahili_CongoKinshasa() { - locale = .Swahili(.CongoKinshasa) - XCTAssertEqual(locale.languageIdentifier, "sw") - XCTAssertEqual(locale.localeIdentifier, "sw_CD") - } - - func test__language_identifier_for_Swahili_Tanzania() { - locale = .Swahili(.Tanzania) - XCTAssertEqual(locale.languageIdentifier, "sw") - XCTAssertEqual(locale.localeIdentifier, "sw_TZ") - } - - func test__language_identifier_for_Swahili_Kenya() { - locale = .Swahili(.Kenya) - XCTAssertEqual(locale.languageIdentifier, "sw") - XCTAssertEqual(locale.localeIdentifier, "sw_KE") - } - - func test__language_identifier_for_Swahili_Uganda() { - locale = .Swahili(.Uganda) - XCTAssertEqual(locale.languageIdentifier, "sw") - XCTAssertEqual(locale.localeIdentifier, "sw_UG") - } - - func test__language_identifier_for_NorthernSami_Sweden() { - locale = .NorthernSami(.Sweden) - XCTAssertEqual(locale.languageIdentifier, "se") - XCTAssertEqual(locale.localeIdentifier, "se_SE") - } - - func test__language_identifier_for_NorthernSami_Norway() { - locale = .NorthernSami(.Norway) - XCTAssertEqual(locale.languageIdentifier, "se") - XCTAssertEqual(locale.localeIdentifier, "se_NO") - } - - func test__language_identifier_for_NorthernSami_Finland() { - locale = .NorthernSami(.Finland) - XCTAssertEqual(locale.languageIdentifier, "se") - XCTAssertEqual(locale.localeIdentifier, "se_FI") - } - - func test__language_identifier_for_SwissGerman_Switzerland() { - locale = .SwissGerman(.Switzerland) - XCTAssertEqual(locale.languageIdentifier, "gsw") - XCTAssertEqual(locale.localeIdentifier, "gsw_CH") - } - - func test__language_identifier_for_SwissGerman_France() { - locale = .SwissGerman(.France) - XCTAssertEqual(locale.languageIdentifier, "gsw") - XCTAssertEqual(locale.localeIdentifier, "gsw_FR") - } - - func test__language_identifier_for_SwissGerman_Liechtenstein() { - locale = .SwissGerman(.Liechtenstein) - XCTAssertEqual(locale.languageIdentifier, "gsw") - XCTAssertEqual(locale.localeIdentifier, "gsw_LI") - } - - func test__language_identifier_for_Hausa_Niger() { - locale = .Hausa(.Niger) - XCTAssertEqual(locale.languageIdentifier, "ha") - XCTAssertEqual(locale.localeIdentifier, "ha_NE") - } - - func test__language_identifier_for_Hausa_Ghana() { - locale = .Hausa(.Ghana) - XCTAssertEqual(locale.languageIdentifier, "ha") - XCTAssertEqual(locale.localeIdentifier, "ha_GH") - } - - func test__language_identifier_for_Hausa_Nigeria() { - locale = .Hausa(.Nigeria) - XCTAssertEqual(locale.languageIdentifier, "ha") - XCTAssertEqual(locale.localeIdentifier, "ha_NG") - } - - func test__language_identifier_for_Albanian_Macedonia() { - locale = .Albanian(.Macedonia) - XCTAssertEqual(locale.languageIdentifier, "sq") - XCTAssertEqual(locale.localeIdentifier, "sq_MK") - } - - func test__language_identifier_for_Albanian_Albania() { - locale = .Albanian(.Albania) - XCTAssertEqual(locale.languageIdentifier, "sq") - XCTAssertEqual(locale.localeIdentifier, "sq_AL") - } - - func test__language_identifier_for_Albanian_Kosovo() { - locale = .Albanian(.Kosovo) - XCTAssertEqual(locale.languageIdentifier, "sq") - XCTAssertEqual(locale.localeIdentifier, "sq_XK") - } - - func test__language_identifier_for_Quechua_Bolivia() { - locale = .Quechua(.Bolivia) - XCTAssertEqual(locale.languageIdentifier, "qu") - XCTAssertEqual(locale.localeIdentifier, "qu_BO") - } +class LocaleSpanishLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_Quechua_Ecuador() { - locale = .Quechua(.Ecuador) - XCTAssertEqual(locale.languageIdentifier, "qu") - XCTAssertEqual(locale.localeIdentifier, "qu_EC") - } + var locale: Locale! - func test__language_identifier_for_Quechua_Peru() { - locale = .Quechua(.Peru) - XCTAssertEqual(locale.languageIdentifier, "qu") - XCTAssertEqual(locale.localeIdentifier, "qu_PE") + func test__language_identifier_for_Spanish_Bolivia() { + locale = .Spanish(.Bolivia) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_BO") } - func test__language_identifier_for_Malay_Brunei() { - locale = .Malay(.Brunei) - XCTAssertEqual(locale.languageIdentifier, "ms") - XCTAssertEqual(locale.localeIdentifier, "ms_BN") + func test__language_identifier_for_Spanish_Peru() { + locale = .Spanish(.Peru) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_PE") } - func test__language_identifier_for_Malay_Malaysia() { - locale = .Malay(.Malaysia) - XCTAssertEqual(locale.languageIdentifier, "ms") - XCTAssertEqual(locale.localeIdentifier, "ms_MY") + func test__language_identifier_for_Spanish_Panama() { + locale = .Spanish(.Panama) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_PA") } - func test__language_identifier_for_Malay_Singapore() { - locale = .Malay(.Singapore) - XCTAssertEqual(locale.languageIdentifier, "ms") - XCTAssertEqual(locale.localeIdentifier, "ms_SG") + func test__language_identifier_for_Spanish_Venezuela() { + locale = .Spanish(.Venezuela) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_VE") } - func test__language_identifier_for_Italian_Italy() { - locale = .Italian(.Italy) - XCTAssertEqual(locale.languageIdentifier, "it") - XCTAssertEqual(locale.localeIdentifier, "it_IT") + func test__language_identifier_for_Spanish_Philippines() { + locale = .Spanish(.Philippines) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_PH") } - func test__language_identifier_for_Italian_Switzerland() { - locale = .Italian(.Switzerland) - XCTAssertEqual(locale.languageIdentifier, "it") - XCTAssertEqual(locale.localeIdentifier, "it_CH") + func test__language_identifier_for_Spanish_Spain() { + locale = .Spanish(.Spain) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_ES") } - func test__language_identifier_for_Italian_SanMarino() { - locale = .Italian(.SanMarino) - XCTAssertEqual(locale.languageIdentifier, "it") - XCTAssertEqual(locale.localeIdentifier, "it_SM") + func test__language_identifier_for_Spanish_LatinAmerica() { + locale = .Spanish(.LatinAmerica) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_419") } - func test__language_identifier_for_Swedish_Sweden() { - locale = .Swedish(.Sweden) - XCTAssertEqual(locale.languageIdentifier, "sv") - XCTAssertEqual(locale.localeIdentifier, "sv_SE") + func test__language_identifier_for_Spanish_Paraguay() { + locale = .Spanish(.Paraguay) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_PY") } - func test__language_identifier_for_Swedish_ÅlandIslands() { - locale = .Swedish(.ÅlandIslands) - XCTAssertEqual(locale.languageIdentifier, "sv") - XCTAssertEqual(locale.localeIdentifier, "sv_AX") + func test__language_identifier_for_Spanish_Colombia() { + locale = .Spanish(.Colombia) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_CO") } - func test__language_identifier_for_Swedish_Finland() { - locale = .Swedish(.Finland) - XCTAssertEqual(locale.languageIdentifier, "sv") - XCTAssertEqual(locale.localeIdentifier, "sv_FI") + func test__language_identifier_for_Spanish_Nicaragua() { + locale = .Spanish(.Nicaragua) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_NI") } - func test__language_identifier_for_Punjabi_Pakistan() { - locale = .Punjabi(.Pakistan) - XCTAssertEqual(locale.languageIdentifier, "pa") - XCTAssertEqual(locale.localeIdentifier, "pa_PK") + func test__language_identifier_for_Spanish_Chile() { + locale = .Spanish(.Chile) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_CL") } - func test__language_identifier_for_Punjabi_India() { - locale = .Punjabi(.India) - XCTAssertEqual(locale.languageIdentifier, "pa") - XCTAssertEqual(locale.localeIdentifier, "pa_IN") + func test__language_identifier_for_Spanish_CanaryIslands() { + locale = .Spanish(.CanaryIslands) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_IC") } - func test__language_identifier_for_Danish_Denmark() { - locale = .Danish(.Denmark) - XCTAssertEqual(locale.languageIdentifier, "da") - XCTAssertEqual(locale.localeIdentifier, "da_DK") + func test__language_identifier_for_Spanish_PuertoRico() { + locale = .Spanish(.PuertoRico) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_PR") } - func test__language_identifier_for_Danish_Greenland() { - locale = .Danish(.Greenland) - XCTAssertEqual(locale.languageIdentifier, "da") - XCTAssertEqual(locale.localeIdentifier, "da_GL") + func test__language_identifier_for_Spanish_Honduras() { + locale = .Spanish(.Honduras) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_HN") } - func test__language_identifier_for_NorwegianBokmål_SvalbardJanMayen() { - locale = .NorwegianBokmål(.SvalbardJanMayen) - XCTAssertEqual(locale.languageIdentifier, "nb") - XCTAssertEqual(locale.localeIdentifier, "nb_SJ") + func test__language_identifier_for_Spanish_Mexico() { + locale = .Spanish(.Mexico) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_MX") } - func test__language_identifier_for_NorwegianBokmål_Norway() { - locale = .NorwegianBokmål(.Norway) - XCTAssertEqual(locale.languageIdentifier, "nb") - XCTAssertEqual(locale.localeIdentifier, "nb_NO") + func test__language_identifier_for_Spanish_Uruguay() { + locale = .Spanish(.Uruguay) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_UY") } - func test__language_identifier_for_Urdu_Pakistan() { - locale = .Urdu(.Pakistan) - XCTAssertEqual(locale.languageIdentifier, "ur") - XCTAssertEqual(locale.localeIdentifier, "ur_PK") + func test__language_identifier_for_Spanish_CeutaMelilla() { + locale = .Spanish(.CeutaMelilla) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_EA") } - func test__language_identifier_for_Urdu_India() { - locale = .Urdu(.India) - XCTAssertEqual(locale.languageIdentifier, "ur") - XCTAssertEqual(locale.localeIdentifier, "ur_IN") + func test__language_identifier_for_Spanish_UnitedStates() { + locale = .Spanish(.UnitedStates) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_US") } - func test__language_identifier_for_Croatian_Croatia() { - locale = .Croatian(.Croatia) - XCTAssertEqual(locale.languageIdentifier, "hr") - XCTAssertEqual(locale.localeIdentifier, "hr_HR") + func test__language_identifier_for_Spanish_ElSalvador() { + locale = .Spanish(.ElSalvador) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_SV") } - func test__language_identifier_for_Croatian_BosniaHerzegovina() { - locale = .Croatian(.BosniaHerzegovina) - XCTAssertEqual(locale.languageIdentifier, "hr") - XCTAssertEqual(locale.localeIdentifier, "hr_BA") + func test__language_identifier_for_Spanish_Argentina() { + locale = .Spanish(.Argentina) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_AR") } - func test__language_identifier_for_Afrikaans_Namibia() { - locale = .Afrikaans(.Namibia) - XCTAssertEqual(locale.languageIdentifier, "af") - XCTAssertEqual(locale.localeIdentifier, "af_NA") + func test__language_identifier_for_Spanish_Ecuador() { + locale = .Spanish(.Ecuador) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_EC") } - func test__language_identifier_for_Afrikaans_SouthAfrica() { - locale = .Afrikaans(.SouthAfrica) - XCTAssertEqual(locale.languageIdentifier, "af") - XCTAssertEqual(locale.localeIdentifier, "af_ZA") + func test__language_identifier_for_Spanish_EquatorialGuinea() { + locale = .Spanish(.EquatorialGuinea) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_GQ") } - func test__language_identifier_for_Yoruba_Benin() { - locale = .Yoruba(.Benin) - XCTAssertEqual(locale.languageIdentifier, "yo") - XCTAssertEqual(locale.localeIdentifier, "yo_BJ") + func test__language_identifier_for_Spanish_Guatemala() { + locale = .Spanish(.Guatemala) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_GT") } - func test__language_identifier_for_Yoruba_Nigeria() { - locale = .Yoruba(.Nigeria) - XCTAssertEqual(locale.languageIdentifier, "yo") - XCTAssertEqual(locale.localeIdentifier, "yo_NG") + func test__language_identifier_for_Spanish_Cuba() { + locale = .Spanish(.Cuba) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_CU") } - func test__language_identifier_for_Bengali_Bangladesh() { - locale = .Bengali(.Bangladesh) - XCTAssertEqual(locale.languageIdentifier, "bn") - XCTAssertEqual(locale.localeIdentifier, "bn_BD") + func test__language_identifier_for_Spanish_DominicanRepublic() { + locale = .Spanish(.DominicanRepublic) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_DO") } - func test__language_identifier_for_Bengali_India() { - locale = .Bengali(.India) - XCTAssertEqual(locale.languageIdentifier, "bn") - XCTAssertEqual(locale.localeIdentifier, "bn_IN") + func test__language_identifier_for_Spanish_CostaRica() { + locale = .Spanish(.CostaRica) + XCTAssertEqual(locale.languageIdentifier, "es") + XCTAssertEqual(locale.localeIdentifier, "es_CR") } +} - func test__language_identifier_for_Greek_Cyprus() { - locale = .Greek(.Cyprus) - XCTAssertEqual(locale.languageIdentifier, "el") - XCTAssertEqual(locale.localeIdentifier, "el_CY") - } +class LocaleSwahiliLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_Greek_Greece() { - locale = .Greek(.Greece) - XCTAssertEqual(locale.languageIdentifier, "el") - XCTAssertEqual(locale.localeIdentifier, "el_GR") + var locale: Locale! + + func test__language_identifier_for_Swahili_CongoKinshasa() { + locale = .Swahili(.CongoKinshasa) + XCTAssertEqual(locale.languageIdentifier, "sw") + XCTAssertEqual(locale.localeIdentifier, "sw_CD") } - func test__language_identifier_for_Teso_Kenya() { - locale = .Teso(.Kenya) - XCTAssertEqual(locale.languageIdentifier, "teo") - XCTAssertEqual(locale.localeIdentifier, "teo_KE") + func test__language_identifier_for_Swahili_Tanzania() { + locale = .Swahili(.Tanzania) + XCTAssertEqual(locale.languageIdentifier, "sw") + XCTAssertEqual(locale.localeIdentifier, "sw_TZ") } - func test__language_identifier_for_Teso_Uganda() { - locale = .Teso(.Uganda) - XCTAssertEqual(locale.languageIdentifier, "teo") - XCTAssertEqual(locale.localeIdentifier, "teo_UG") + func test__language_identifier_for_Swahili_Kenya() { + locale = .Swahili(.Kenya) + XCTAssertEqual(locale.languageIdentifier, "sw") + XCTAssertEqual(locale.localeIdentifier, "sw_KE") } - func test__language_identifier_for_Korean_NorthKorea() { - locale = .Korean(.NorthKorea) - XCTAssertEqual(locale.languageIdentifier, "ko") - XCTAssertEqual(locale.localeIdentifier, "ko_KP") + func test__language_identifier_for_Swahili_Uganda() { + locale = .Swahili(.Uganda) + XCTAssertEqual(locale.languageIdentifier, "sw") + XCTAssertEqual(locale.localeIdentifier, "sw_UG") } +} - func test__language_identifier_for_Korean_SouthKorea() { - locale = .Korean(.SouthKorea) - XCTAssertEqual(locale.languageIdentifier, "ko") - XCTAssertEqual(locale.localeIdentifier, "ko_KR") +class LocaleSwedishLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_Swedish_Sweden() { + locale = .Swedish(.Sweden) + XCTAssertEqual(locale.languageIdentifier, "sv") + XCTAssertEqual(locale.localeIdentifier, "sv_SE") } - func test__language_identifier_for_Uzbek_Uzbekistan() { - locale = .Uzbek(.Uzbekistan) - XCTAssertEqual(locale.languageIdentifier, "uz") - XCTAssertEqual(locale.localeIdentifier, "uz_UZ") + func test__language_identifier_for_Swedish_ÅlandIslands() { + locale = .Swedish(.ÅlandIslands) + XCTAssertEqual(locale.languageIdentifier, "sv") + XCTAssertEqual(locale.localeIdentifier, "sv_AX") } - func test__language_identifier_for_Uzbek_Afghanistan() { - locale = .Uzbek(.Afghanistan) - XCTAssertEqual(locale.languageIdentifier, "uz") - XCTAssertEqual(locale.localeIdentifier, "uz_AF") + func test__language_identifier_for_Swedish_Finland() { + locale = .Swedish(.Finland) + XCTAssertEqual(locale.languageIdentifier, "sv") + XCTAssertEqual(locale.localeIdentifier, "sv_FI") } +} - func test__language_identifier_for_Ossetic_Georgia() { - locale = .Ossetic(.Georgia) - XCTAssertEqual(locale.languageIdentifier, "os") - XCTAssertEqual(locale.localeIdentifier, "os_GE") +class LocaleSwissGermanLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_SwissGerman_Switzerland() { + locale = .SwissGerman(.Switzerland) + XCTAssertEqual(locale.languageIdentifier, "gsw") + XCTAssertEqual(locale.localeIdentifier, "gsw_CH") } - func test__language_identifier_for_Ossetic_Russia() { - locale = .Ossetic(.Russia) - XCTAssertEqual(locale.languageIdentifier, "os") - XCTAssertEqual(locale.localeIdentifier, "os_RU") + func test__language_identifier_for_SwissGerman_France() { + locale = .SwissGerman(.France) + XCTAssertEqual(locale.languageIdentifier, "gsw") + XCTAssertEqual(locale.localeIdentifier, "gsw_FR") } - func test__language_identifier_for_Turkish_Cyprus() { - locale = .Turkish(.Cyprus) - XCTAssertEqual(locale.languageIdentifier, "tr") - XCTAssertEqual(locale.localeIdentifier, "tr_CY") + func test__language_identifier_for_SwissGerman_Liechtenstein() { + locale = .SwissGerman(.Liechtenstein) + XCTAssertEqual(locale.languageIdentifier, "gsw") + XCTAssertEqual(locale.localeIdentifier, "gsw_LI") } +} - func test__language_identifier_for_Turkish_Turkey() { - locale = .Turkish(.Turkey) - XCTAssertEqual(locale.languageIdentifier, "tr") - XCTAssertEqual(locale.localeIdentifier, "tr_TR") - } +class LocaleTamilLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_Ewe_Togo() { - locale = .Ewe(.Togo) - XCTAssertEqual(locale.languageIdentifier, "ee") - XCTAssertEqual(locale.localeIdentifier, "ee_TG") + var locale: Locale! + + func test__language_identifier_for_Tamil_India() { + locale = .Tamil(.India) + XCTAssertEqual(locale.languageIdentifier, "ta") + XCTAssertEqual(locale.localeIdentifier, "ta_IN") } - func test__language_identifier_for_Ewe_Ghana() { - locale = .Ewe(.Ghana) - XCTAssertEqual(locale.languageIdentifier, "ee") - XCTAssertEqual(locale.localeIdentifier, "ee_GH") + func test__language_identifier_for_Tamil_Singapore() { + locale = .Tamil(.Singapore) + XCTAssertEqual(locale.languageIdentifier, "ta") + XCTAssertEqual(locale.localeIdentifier, "ta_SG") } - func test__language_identifier_for_Romanian_Romania() { - locale = .Romanian(.Romania) - XCTAssertEqual(locale.languageIdentifier, "ro") - XCTAssertEqual(locale.localeIdentifier, "ro_RO") + func test__language_identifier_for_Tamil_Malaysia() { + locale = .Tamil(.Malaysia) + XCTAssertEqual(locale.languageIdentifier, "ta") + XCTAssertEqual(locale.localeIdentifier, "ta_MY") } - func test__language_identifier_for_Romanian_Moldova() { - locale = .Romanian(.Moldova) - XCTAssertEqual(locale.languageIdentifier, "ro") - XCTAssertEqual(locale.localeIdentifier, "ro_MD") + func test__language_identifier_for_Tamil_SriLanka() { + locale = .Tamil(.SriLanka) + XCTAssertEqual(locale.languageIdentifier, "ta") + XCTAssertEqual(locale.localeIdentifier, "ta_LK") } +} - func test__language_identifier_for_Tigrinya_Ethiopia() { - locale = .Tigrinya(.Ethiopia) - XCTAssertEqual(locale.languageIdentifier, "ti") - XCTAssertEqual(locale.localeIdentifier, "ti_ET") +class LocaleTesoLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_Teso_Kenya() { + locale = .Teso(.Kenya) + XCTAssertEqual(locale.languageIdentifier, "teo") + XCTAssertEqual(locale.localeIdentifier, "teo_KE") } - func test__language_identifier_for_Tigrinya_Eritrea() { - locale = .Tigrinya(.Eritrea) - XCTAssertEqual(locale.languageIdentifier, "ti") - XCTAssertEqual(locale.localeIdentifier, "ti_ER") + func test__language_identifier_for_Teso_Uganda() { + locale = .Teso(.Uganda) + XCTAssertEqual(locale.languageIdentifier, "teo") + XCTAssertEqual(locale.localeIdentifier, "teo_UG") } +} + +class LocaleTibetanLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! func test__language_identifier_for_Tibetan_India() { locale = .Tibetan(.India) @@ -4138,131 +4343,101 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.languageIdentifier, "bo") XCTAssertEqual(locale.localeIdentifier, "bo_CN") } +} - func test__language_identifier_for_CentralKurdish_Iraq() { - locale = .CentralKurdish(.Iraq) - XCTAssertEqual(locale.languageIdentifier, "ckb") - XCTAssertEqual(locale.localeIdentifier, "ckb_IQ") - } +class LocaleTigrinyaLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_CentralKurdish_Iran() { - locale = .CentralKurdish(.Iran) - XCTAssertEqual(locale.languageIdentifier, "ckb") - XCTAssertEqual(locale.localeIdentifier, "ckb_IR") - } + var locale: Locale! - func test__language_identifier_for_Masai_Tanzania() { - locale = .Masai(.Tanzania) - XCTAssertEqual(locale.languageIdentifier, "mas") - XCTAssertEqual(locale.localeIdentifier, "mas_TZ") + func test__language_identifier_for_Tigrinya_Ethiopia() { + locale = .Tigrinya(.Ethiopia) + XCTAssertEqual(locale.languageIdentifier, "ti") + XCTAssertEqual(locale.localeIdentifier, "ti_ET") } - func test__language_identifier_for_Masai_Kenya() { - locale = .Masai(.Kenya) - XCTAssertEqual(locale.languageIdentifier, "mas") - XCTAssertEqual(locale.localeIdentifier, "mas_KE") + func test__language_identifier_for_Tigrinya_Eritrea() { + locale = .Tigrinya(.Eritrea) + XCTAssertEqual(locale.languageIdentifier, "ti") + XCTAssertEqual(locale.localeIdentifier, "ti_ER") } +} - func test__language_identifier_for_Oromo_Ethiopia() { - locale = .Oromo(.Ethiopia) - XCTAssertEqual(locale.languageIdentifier, "om") - XCTAssertEqual(locale.localeIdentifier, "om_ET") - } +class LocaleTurkishLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_Oromo_Kenya() { - locale = .Oromo(.Kenya) - XCTAssertEqual(locale.languageIdentifier, "om") - XCTAssertEqual(locale.localeIdentifier, "om_KE") - } + var locale: Locale! - func test__language_identifier_for_Nepali_Nepal() { - locale = .Nepali(.Nepal) - XCTAssertEqual(locale.languageIdentifier, "ne") - XCTAssertEqual(locale.localeIdentifier, "ne_NP") + func test__language_identifier_for_Turkish_Cyprus() { + locale = .Turkish(.Cyprus) + XCTAssertEqual(locale.languageIdentifier, "tr") + XCTAssertEqual(locale.localeIdentifier, "tr_CY") } - func test__language_identifier_for_Nepali_India() { - locale = .Nepali(.India) - XCTAssertEqual(locale.languageIdentifier, "ne") - XCTAssertEqual(locale.localeIdentifier, "ne_IN") + func test__language_identifier_for_Turkish_Turkey() { + locale = .Turkish(.Turkey) + XCTAssertEqual(locale.languageIdentifier, "tr") + XCTAssertEqual(locale.localeIdentifier, "tr_TR") } +} - func test__language_identifier_for_Persian_Iran() { - locale = .Persian(.Iran) - XCTAssertEqual(locale.languageIdentifier, "fa") - XCTAssertEqual(locale.localeIdentifier, "fa_IR") - } +class LocaleUrduLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_Persian_Afghanistan() { - locale = .Persian(.Afghanistan) - XCTAssertEqual(locale.languageIdentifier, "fa") - XCTAssertEqual(locale.localeIdentifier, "fa_AF") - } + var locale: Locale! - func test__language_identifier_for_JolaFonyi() { - locale = .JolaFonyi - XCTAssertEqual(locale.languageIdentifier, "dyo") - XCTAssertEqual(locale.localeIdentifier, "dyo") + func test__language_identifier_for_Urdu_Pakistan() { + locale = .Urdu(.Pakistan) + XCTAssertEqual(locale.languageIdentifier, "ur") + XCTAssertEqual(locale.localeIdentifier, "ur_PK") } - func test__language_identifier_for_Soga() { - locale = .Soga - XCTAssertEqual(locale.languageIdentifier, "xog") - XCTAssertEqual(locale.localeIdentifier, "xog") + func test__language_identifier_for_Urdu_India() { + locale = .Urdu(.India) + XCTAssertEqual(locale.languageIdentifier, "ur") + XCTAssertEqual(locale.localeIdentifier, "ur_IN") } +} - func test__language_identifier_for_Rombo() { - locale = .Rombo - XCTAssertEqual(locale.languageIdentifier, "rof") - XCTAssertEqual(locale.localeIdentifier, "rof") - } +class LocaleUzbekLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_Manx() { - locale = .Manx - XCTAssertEqual(locale.languageIdentifier, "gv") - XCTAssertEqual(locale.localeIdentifier, "gv") - } + var locale: Locale! - func test__language_identifier_for_LowerSorbian() { - locale = .LowerSorbian - XCTAssertEqual(locale.languageIdentifier, "dsb") - XCTAssertEqual(locale.localeIdentifier, "dsb") + func test__language_identifier_for_Uzbek_Uzbekistan() { + locale = .Uzbek(.Uzbekistan) + XCTAssertEqual(locale.languageIdentifier, "uz") + XCTAssertEqual(locale.localeIdentifier, "uz_UZ") } - func test__language_identifier_for_Pashto() { - locale = .Pashto - XCTAssertEqual(locale.languageIdentifier, "ps") - XCTAssertEqual(locale.localeIdentifier, "ps") + func test__language_identifier_for_Uzbek_Afghanistan() { + locale = .Uzbek(.Afghanistan) + XCTAssertEqual(locale.languageIdentifier, "uz") + XCTAssertEqual(locale.localeIdentifier, "uz_AF") } +} - func test__language_identifier_for_CentralAtlasTamazight() { - locale = .CentralAtlasTamazight - XCTAssertEqual(locale.languageIdentifier, "tzm") - XCTAssertEqual(locale.localeIdentifier, "tzm") - } +class LocaleYorubaLanguageAutogeneratedTests: XCTestCase { - func test__language_identifier_for_Gusii() { - locale = .Gusii - XCTAssertEqual(locale.languageIdentifier, "guz") - XCTAssertEqual(locale.localeIdentifier, "guz") - } + var locale: Locale! - func test__language_identifier_for_Nama() { - locale = .Nama - XCTAssertEqual(locale.languageIdentifier, "naq") - XCTAssertEqual(locale.localeIdentifier, "naq") + func test__language_identifier_for_Yoruba_Benin() { + locale = .Yoruba(.Benin) + XCTAssertEqual(locale.languageIdentifier, "yo") + XCTAssertEqual(locale.localeIdentifier, "yo_BJ") } - func test__language_identifier_for_Tajik() { - locale = .Tajik - XCTAssertEqual(locale.languageIdentifier, "tg") - XCTAssertEqual(locale.localeIdentifier, "tg") + func test__language_identifier_for_Yoruba_Nigeria() { + locale = .Yoruba(.Nigeria) + XCTAssertEqual(locale.languageIdentifier, "yo") + XCTAssertEqual(locale.localeIdentifier, "yo_NG") } +} - func test__language_identifier_for_Kwasio() { - locale = .Kwasio - XCTAssertEqual(locale.languageIdentifier, "nmg") - XCTAssertEqual(locale.localeIdentifier, "nmg") +class LocaleAutogeneratedTests: XCTestCase { + + var locale: Locale! + + func test__language_identifier_for_Aghem() { + locale = .Aghem + XCTAssertEqual(locale.languageIdentifier, "agq") + XCTAssertEqual(locale.localeIdentifier, "agq") } func test__language_identifier_for_Akan() { @@ -4271,28 +4446,40 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.localeIdentifier, "ak") } - func test__language_identifier_for_Estonian() { - locale = .Estonian - XCTAssertEqual(locale.languageIdentifier, "et") - XCTAssertEqual(locale.localeIdentifier, "et") + func test__language_identifier_for_Amharic() { + locale = .Amharic + XCTAssertEqual(locale.languageIdentifier, "am") + XCTAssertEqual(locale.localeIdentifier, "am") + } + + func test__language_identifier_for_Armenian() { + locale = .Armenian + XCTAssertEqual(locale.languageIdentifier, "hy") + XCTAssertEqual(locale.localeIdentifier, "hy") + } + + func test__language_identifier_for_Assamese() { + locale = .Assamese + XCTAssertEqual(locale.languageIdentifier, "as") + XCTAssertEqual(locale.localeIdentifier, "as") } - func test__language_identifier_for_Colognian() { - locale = .Colognian - XCTAssertEqual(locale.languageIdentifier, "ksh") - XCTAssertEqual(locale.localeIdentifier, "ksh") + func test__language_identifier_for_Asu() { + locale = .Asu + XCTAssertEqual(locale.languageIdentifier, "asa") + XCTAssertEqual(locale.localeIdentifier, "asa") } - func test__language_identifier_for_Konkani() { - locale = .Konkani - XCTAssertEqual(locale.languageIdentifier, "kok") - XCTAssertEqual(locale.localeIdentifier, "kok") + func test__language_identifier_for_Azerbaijani() { + locale = .Azerbaijani + XCTAssertEqual(locale.languageIdentifier, "az") + XCTAssertEqual(locale.localeIdentifier, "az") } - func test__language_identifier_for_ScottishGaelic() { - locale = .ScottishGaelic - XCTAssertEqual(locale.languageIdentifier, "gd") - XCTAssertEqual(locale.localeIdentifier, "gd") + func test__language_identifier_for_Bafia() { + locale = .Bafia + XCTAssertEqual(locale.languageIdentifier, "ksf") + XCTAssertEqual(locale.localeIdentifier, "ksf") } func test__language_identifier_for_Bambara() { @@ -4301,10 +4488,40 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.localeIdentifier, "bm") } - func test__language_identifier_for_Lakota() { - locale = .Lakota - XCTAssertEqual(locale.languageIdentifier, "lkt") - XCTAssertEqual(locale.localeIdentifier, "lkt") + func test__language_identifier_for_Basaa() { + locale = .Basaa + XCTAssertEqual(locale.languageIdentifier, "bas") + XCTAssertEqual(locale.localeIdentifier, "bas") + } + + func test__language_identifier_for_Basque() { + locale = .Basque + XCTAssertEqual(locale.languageIdentifier, "eu") + XCTAssertEqual(locale.localeIdentifier, "eu") + } + + func test__language_identifier_for_Belarusian() { + locale = .Belarusian + XCTAssertEqual(locale.languageIdentifier, "be") + XCTAssertEqual(locale.localeIdentifier, "be") + } + + func test__language_identifier_for_Bemba() { + locale = .Bemba + XCTAssertEqual(locale.languageIdentifier, "bem") + XCTAssertEqual(locale.localeIdentifier, "bem") + } + + func test__language_identifier_for_Bena() { + locale = .Bena + XCTAssertEqual(locale.languageIdentifier, "bez") + XCTAssertEqual(locale.localeIdentifier, "bez") + } + + func test__language_identifier_for_Bodo() { + locale = .Bodo + XCTAssertEqual(locale.languageIdentifier, "brx") + XCTAssertEqual(locale.localeIdentifier, "brx") } func test__language_identifier_for_Bosnian() { @@ -4313,100 +4530,94 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.localeIdentifier, "bs") } - func test__language_identifier_for_Turkmen() { - locale = .Turkmen - XCTAssertEqual(locale.languageIdentifier, "tk") - XCTAssertEqual(locale.localeIdentifier, "tk") - } - - func test__language_identifier_for_Meta() { - locale = .Meta - XCTAssertEqual(locale.languageIdentifier, "mgo") - XCTAssertEqual(locale.localeIdentifier, "mgo") + func test__language_identifier_for_Breton() { + locale = .Breton + XCTAssertEqual(locale.languageIdentifier, "br") + XCTAssertEqual(locale.localeIdentifier, "br") } - func test__language_identifier_for_Sena() { - locale = .Sena - XCTAssertEqual(locale.languageIdentifier, "seh") - XCTAssertEqual(locale.localeIdentifier, "seh") + func test__language_identifier_for_Bulgarian() { + locale = .Bulgarian + XCTAssertEqual(locale.languageIdentifier, "bg") + XCTAssertEqual(locale.localeIdentifier, "bg") } - func test__language_identifier_for_Telugu() { - locale = .Telugu - XCTAssertEqual(locale.languageIdentifier, "te") - XCTAssertEqual(locale.localeIdentifier, "te") + func test__language_identifier_for_Burmese() { + locale = .Burmese + XCTAssertEqual(locale.languageIdentifier, "my") + XCTAssertEqual(locale.localeIdentifier, "my") } - func test__language_identifier_for_Icelandic() { - locale = .Icelandic - XCTAssertEqual(locale.languageIdentifier, "is") - XCTAssertEqual(locale.localeIdentifier, "is") + func test__language_identifier_for_CentralAtlasTamazight() { + locale = .CentralAtlasTamazight + XCTAssertEqual(locale.languageIdentifier, "tzm") + XCTAssertEqual(locale.localeIdentifier, "tzm") } - func test__language_identifier_for_Vunjo() { - locale = .Vunjo - XCTAssertEqual(locale.languageIdentifier, "vun") - XCTAssertEqual(locale.localeIdentifier, "vun") + func test__language_identifier_for_Cherokee() { + locale = .Cherokee + XCTAssertEqual(locale.languageIdentifier, "chr") + XCTAssertEqual(locale.localeIdentifier, "chr") } - func test__language_identifier_for_Finnish() { - locale = .Finnish - XCTAssertEqual(locale.languageIdentifier, "fi") - XCTAssertEqual(locale.localeIdentifier, "fi") + func test__language_identifier_for_Chiga() { + locale = .Chiga + XCTAssertEqual(locale.languageIdentifier, "cgg") + XCTAssertEqual(locale.localeIdentifier, "cgg") } - func test__language_identifier_for_Yangben() { - locale = .Yangben - XCTAssertEqual(locale.languageIdentifier, "yav") - XCTAssertEqual(locale.localeIdentifier, "yav") + func test__language_identifier_for_Colognian() { + locale = .Colognian + XCTAssertEqual(locale.languageIdentifier, "ksh") + XCTAssertEqual(locale.localeIdentifier, "ksh") } - func test__language_identifier_for_Sakha() { - locale = .Sakha - XCTAssertEqual(locale.languageIdentifier, "sah") - XCTAssertEqual(locale.localeIdentifier, "sah") + func test__language_identifier_for_Cornish() { + locale = .Cornish + XCTAssertEqual(locale.languageIdentifier, "kw") + XCTAssertEqual(locale.localeIdentifier, "kw") } - func test__language_identifier_for_Ngomba() { - locale = .Ngomba - XCTAssertEqual(locale.languageIdentifier, "jgo") - XCTAssertEqual(locale.localeIdentifier, "jgo") + func test__language_identifier_for_Czech() { + locale = .Czech + XCTAssertEqual(locale.languageIdentifier, "cs") + XCTAssertEqual(locale.localeIdentifier, "cs") } - func test__language_identifier_for_Friulian() { - locale = .Friulian - XCTAssertEqual(locale.languageIdentifier, "fur") - XCTAssertEqual(locale.localeIdentifier, "fur") + func test__language_identifier_for_Duala() { + locale = .Duala + XCTAssertEqual(locale.languageIdentifier, "dua") + XCTAssertEqual(locale.localeIdentifier, "dua") } - func test__language_identifier_for_Inuktitut() { - locale = .Inuktitut - XCTAssertEqual(locale.languageIdentifier, "iu") - XCTAssertEqual(locale.localeIdentifier, "iu") + func test__language_identifier_for_Dzongkha() { + locale = .Dzongkha + XCTAssertEqual(locale.languageIdentifier, "dz") + XCTAssertEqual(locale.localeIdentifier, "dz") } - func test__language_identifier_for_NorthNdebele() { - locale = .NorthNdebele - XCTAssertEqual(locale.languageIdentifier, "nd") - XCTAssertEqual(locale.localeIdentifier, "nd") + func test__language_identifier_for_Embu() { + locale = .Embu + XCTAssertEqual(locale.languageIdentifier, "ebu") + XCTAssertEqual(locale.localeIdentifier, "ebu") } - func test__language_identifier_for_Bulgarian() { - locale = .Bulgarian - XCTAssertEqual(locale.languageIdentifier, "bg") - XCTAssertEqual(locale.localeIdentifier, "bg") + func test__language_identifier_for_Estonian() { + locale = .Estonian + XCTAssertEqual(locale.languageIdentifier, "et") + XCTAssertEqual(locale.localeIdentifier, "et") } - func test__language_identifier_for_Nyankole() { - locale = .Nyankole - XCTAssertEqual(locale.languageIdentifier, "nyn") - XCTAssertEqual(locale.localeIdentifier, "nyn") + func test__language_identifier_for_Ewondo() { + locale = .Ewondo + XCTAssertEqual(locale.languageIdentifier, "ewo") + XCTAssertEqual(locale.localeIdentifier, "ewo") } - func test__language_identifier_for_Kabyle() { - locale = .Kabyle - XCTAssertEqual(locale.languageIdentifier, "kab") - XCTAssertEqual(locale.localeIdentifier, "kab") + func test__language_identifier_for_Faroese() { + locale = .Faroese + XCTAssertEqual(locale.languageIdentifier, "fo") + XCTAssertEqual(locale.localeIdentifier, "fo") } func test__language_identifier_for_Filipino() { @@ -4415,148 +4626,136 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.localeIdentifier, "fil") } - func test__language_identifier_for_Khmer() { - locale = .Khmer - XCTAssertEqual(locale.languageIdentifier, "km") - XCTAssertEqual(locale.localeIdentifier, "km") - } - - func test__language_identifier_for_Slovenian() { - locale = .Slovenian - XCTAssertEqual(locale.languageIdentifier, "sl") - XCTAssertEqual(locale.localeIdentifier, "sl") - } - - func test__language_identifier_for_Bemba() { - locale = .Bemba - XCTAssertEqual(locale.languageIdentifier, "bem") - XCTAssertEqual(locale.localeIdentifier, "bem") + func test__language_identifier_for_Finnish() { + locale = .Finnish + XCTAssertEqual(locale.languageIdentifier, "fi") + XCTAssertEqual(locale.localeIdentifier, "fi") } - func test__language_identifier_for_Sangu() { - locale = .Sangu - XCTAssertEqual(locale.languageIdentifier, "sbp") - XCTAssertEqual(locale.localeIdentifier, "sbp") + func test__language_identifier_for_Friulian() { + locale = .Friulian + XCTAssertEqual(locale.languageIdentifier, "fur") + XCTAssertEqual(locale.localeIdentifier, "fur") } - func test__language_identifier_for_Japanese() { - locale = .Japanese - XCTAssertEqual(locale.languageIdentifier, "ja") - XCTAssertEqual(locale.localeIdentifier, "ja") + func test__language_identifier_for_Galician() { + locale = .Galician + XCTAssertEqual(locale.languageIdentifier, "gl") + XCTAssertEqual(locale.localeIdentifier, "gl") } - func test__language_identifier_for_Kannada() { - locale = .Kannada - XCTAssertEqual(locale.languageIdentifier, "kn") - XCTAssertEqual(locale.localeIdentifier, "kn") + func test__language_identifier_for_Ganda() { + locale = .Ganda + XCTAssertEqual(locale.languageIdentifier, "lg") + XCTAssertEqual(locale.localeIdentifier, "lg") } - func test__language_identifier_for_Azerbaijani() { - locale = .Azerbaijani - XCTAssertEqual(locale.languageIdentifier, "az") - XCTAssertEqual(locale.localeIdentifier, "az") + func test__language_identifier_for_Georgian() { + locale = .Georgian + XCTAssertEqual(locale.languageIdentifier, "ka") + XCTAssertEqual(locale.localeIdentifier, "ka") } - func test__language_identifier_for_Shambala() { - locale = .Shambala - XCTAssertEqual(locale.languageIdentifier, "ksb") - XCTAssertEqual(locale.localeIdentifier, "ksb") + func test__language_identifier_for_Gujarati() { + locale = .Gujarati + XCTAssertEqual(locale.languageIdentifier, "gu") + XCTAssertEqual(locale.localeIdentifier, "gu") } - func test__language_identifier_for_Bafia() { - locale = .Bafia - XCTAssertEqual(locale.languageIdentifier, "ksf") - XCTAssertEqual(locale.localeIdentifier, "ksf") + func test__language_identifier_for_Gusii() { + locale = .Gusii + XCTAssertEqual(locale.languageIdentifier, "guz") + XCTAssertEqual(locale.localeIdentifier, "guz") } - func test__language_identifier_for_Kazakh() { - locale = .Kazakh - XCTAssertEqual(locale.languageIdentifier, "kk") - XCTAssertEqual(locale.localeIdentifier, "kk") + func test__language_identifier_for_Hawaiian() { + locale = .Hawaiian + XCTAssertEqual(locale.languageIdentifier, "haw") + XCTAssertEqual(locale.localeIdentifier, "haw") } - func test__language_identifier_for_Ngiemboon() { - locale = .Ngiemboon - XCTAssertEqual(locale.languageIdentifier, "nnh") - XCTAssertEqual(locale.localeIdentifier, "nnh") + func test__language_identifier_for_Hebrew() { + locale = .Hebrew + XCTAssertEqual(locale.languageIdentifier, "he") + XCTAssertEqual(locale.localeIdentifier, "he") } - func test__language_identifier_for_Chiga() { - locale = .Chiga - XCTAssertEqual(locale.languageIdentifier, "cgg") - XCTAssertEqual(locale.localeIdentifier, "cgg") + func test__language_identifier_for_Hindi() { + locale = .Hindi + XCTAssertEqual(locale.languageIdentifier, "hi") + XCTAssertEqual(locale.localeIdentifier, "hi") } - func test__language_identifier_for_Sango() { - locale = .Sango - XCTAssertEqual(locale.languageIdentifier, "sg") - XCTAssertEqual(locale.localeIdentifier, "sg") + func test__language_identifier_for_Hungarian() { + locale = .Hungarian + XCTAssertEqual(locale.languageIdentifier, "hu") + XCTAssertEqual(locale.localeIdentifier, "hu") } - func test__language_identifier_for_WesternFrisian() { - locale = .WesternFrisian - XCTAssertEqual(locale.languageIdentifier, "fy") - XCTAssertEqual(locale.localeIdentifier, "fy") + func test__language_identifier_for_Icelandic() { + locale = .Icelandic + XCTAssertEqual(locale.languageIdentifier, "is") + XCTAssertEqual(locale.localeIdentifier, "is") } - func test__language_identifier_for_Makonde() { - locale = .Makonde - XCTAssertEqual(locale.languageIdentifier, "kde") - XCTAssertEqual(locale.localeIdentifier, "kde") + func test__language_identifier_for_Igbo() { + locale = .Igbo + XCTAssertEqual(locale.languageIdentifier, "ig") + XCTAssertEqual(locale.localeIdentifier, "ig") } - func test__language_identifier_for_Ganda() { - locale = .Ganda - XCTAssertEqual(locale.languageIdentifier, "lg") - XCTAssertEqual(locale.localeIdentifier, "lg") + func test__language_identifier_for_InariSami() { + locale = .InariSami + XCTAssertEqual(locale.languageIdentifier, "smn") + XCTAssertEqual(locale.localeIdentifier, "smn") } - func test__language_identifier_for_Bodo() { - locale = .Bodo - XCTAssertEqual(locale.languageIdentifier, "brx") - XCTAssertEqual(locale.localeIdentifier, "brx") + func test__language_identifier_for_Indonesian() { + locale = .Indonesian + XCTAssertEqual(locale.languageIdentifier, "id") + XCTAssertEqual(locale.localeIdentifier, "id") } - func test__language_identifier_for_Polish() { - locale = .Polish - XCTAssertEqual(locale.languageIdentifier, "pl") - XCTAssertEqual(locale.localeIdentifier, "pl") + func test__language_identifier_for_Inuktitut() { + locale = .Inuktitut + XCTAssertEqual(locale.languageIdentifier, "iu") + XCTAssertEqual(locale.localeIdentifier, "iu") } - func test__language_identifier_for_Tongan() { - locale = .Tongan - XCTAssertEqual(locale.languageIdentifier, "to") - XCTAssertEqual(locale.localeIdentifier, "to") + func test__language_identifier_for_Irish() { + locale = .Irish + XCTAssertEqual(locale.languageIdentifier, "ga") + XCTAssertEqual(locale.localeIdentifier, "ga") } - func test__language_identifier_for_Bena() { - locale = .Bena - XCTAssertEqual(locale.languageIdentifier, "bez") - XCTAssertEqual(locale.localeIdentifier, "bez") + func test__language_identifier_for_Japanese() { + locale = .Japanese + XCTAssertEqual(locale.languageIdentifier, "ja") + XCTAssertEqual(locale.localeIdentifier, "ja") } - func test__language_identifier_for_Lithuanian() { - locale = .Lithuanian - XCTAssertEqual(locale.languageIdentifier, "lt") - XCTAssertEqual(locale.localeIdentifier, "lt") + func test__language_identifier_for_JolaFonyi() { + locale = .JolaFonyi + XCTAssertEqual(locale.languageIdentifier, "dyo") + XCTAssertEqual(locale.localeIdentifier, "dyo") } - func test__language_identifier_for_Morisyen() { - locale = .Morisyen - XCTAssertEqual(locale.languageIdentifier, "mfe") - XCTAssertEqual(locale.localeIdentifier, "mfe") + func test__language_identifier_for_Kabuverdianu() { + locale = .Kabuverdianu + XCTAssertEqual(locale.languageIdentifier, "kea") + XCTAssertEqual(locale.localeIdentifier, "kea") } - func test__language_identifier_for_Machame() { - locale = .Machame - XCTAssertEqual(locale.languageIdentifier, "jmc") - XCTAssertEqual(locale.localeIdentifier, "jmc") + func test__language_identifier_for_Kabyle() { + locale = .Kabyle + XCTAssertEqual(locale.languageIdentifier, "kab") + XCTAssertEqual(locale.localeIdentifier, "kab") } - func test__language_identifier_for_Kyrgyz() { - locale = .Kyrgyz - XCTAssertEqual(locale.languageIdentifier, "ky") - XCTAssertEqual(locale.localeIdentifier, "ky") + func test__language_identifier_for_Kako() { + locale = .Kako + XCTAssertEqual(locale.languageIdentifier, "kkj") + XCTAssertEqual(locale.localeIdentifier, "kkj") } func test__language_identifier_for_Kalaallisut() { @@ -4565,100 +4764,118 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.localeIdentifier, "kl") } - func test__language_identifier_for_Oriya() { - locale = .Oriya - XCTAssertEqual(locale.languageIdentifier, "or") - XCTAssertEqual(locale.localeIdentifier, "or") + func test__language_identifier_for_Kalenjin() { + locale = .Kalenjin + XCTAssertEqual(locale.languageIdentifier, "kln") + XCTAssertEqual(locale.localeIdentifier, "kln") } - func test__language_identifier_for_Belarusian() { - locale = .Belarusian - XCTAssertEqual(locale.languageIdentifier, "be") - XCTAssertEqual(locale.localeIdentifier, "be") + func test__language_identifier_for_Kamba() { + locale = .Kamba + XCTAssertEqual(locale.languageIdentifier, "kam") + XCTAssertEqual(locale.localeIdentifier, "kam") } - func test__language_identifier_for_Hebrew() { - locale = .Hebrew - XCTAssertEqual(locale.languageIdentifier, "he") - XCTAssertEqual(locale.localeIdentifier, "he") + func test__language_identifier_for_Kannada() { + locale = .Kannada + XCTAssertEqual(locale.languageIdentifier, "kn") + XCTAssertEqual(locale.localeIdentifier, "kn") } - func test__language_identifier_for_Mongolian() { - locale = .Mongolian - XCTAssertEqual(locale.languageIdentifier, "mn") - XCTAssertEqual(locale.localeIdentifier, "mn") + func test__language_identifier_for_Kashmiri() { + locale = .Kashmiri + XCTAssertEqual(locale.languageIdentifier, "ks") + XCTAssertEqual(locale.localeIdentifier, "ks") } - func test__language_identifier_for_Rwa() { - locale = .Rwa - XCTAssertEqual(locale.languageIdentifier, "rwk") - XCTAssertEqual(locale.localeIdentifier, "rwk") + func test__language_identifier_for_Kazakh() { + locale = .Kazakh + XCTAssertEqual(locale.languageIdentifier, "kk") + XCTAssertEqual(locale.localeIdentifier, "kk") } - func test__language_identifier_for_Mundang() { - locale = .Mundang - XCTAssertEqual(locale.languageIdentifier, "mua") - XCTAssertEqual(locale.localeIdentifier, "mua") + func test__language_identifier_for_Khmer() { + locale = .Khmer + XCTAssertEqual(locale.languageIdentifier, "km") + XCTAssertEqual(locale.localeIdentifier, "km") } - func test__language_identifier_for_Langi() { - locale = .Langi - XCTAssertEqual(locale.languageIdentifier, "lag") - XCTAssertEqual(locale.localeIdentifier, "lag") + func test__language_identifier_for_Kikuyu() { + locale = .Kikuyu + XCTAssertEqual(locale.languageIdentifier, "ki") + XCTAssertEqual(locale.localeIdentifier, "ki") } - func test__language_identifier_for_Duala() { - locale = .Duala - XCTAssertEqual(locale.languageIdentifier, "dua") - XCTAssertEqual(locale.localeIdentifier, "dua") + func test__language_identifier_for_Kinyarwanda() { + locale = .Kinyarwanda + XCTAssertEqual(locale.languageIdentifier, "rw") + XCTAssertEqual(locale.localeIdentifier, "rw") } - func test__language_identifier_for_Embu() { - locale = .Embu - XCTAssertEqual(locale.languageIdentifier, "ebu") - XCTAssertEqual(locale.localeIdentifier, "ebu") + func test__language_identifier_for_Konkani() { + locale = .Konkani + XCTAssertEqual(locale.languageIdentifier, "kok") + XCTAssertEqual(locale.localeIdentifier, "kok") } - func test__language_identifier_for_Kikuyu() { - locale = .Kikuyu - XCTAssertEqual(locale.languageIdentifier, "ki") - XCTAssertEqual(locale.localeIdentifier, "ki") + func test__language_identifier_for_KoyraChiini() { + locale = .KoyraChiini + XCTAssertEqual(locale.languageIdentifier, "khq") + XCTAssertEqual(locale.localeIdentifier, "khq") } - func test__language_identifier_for_Basque() { - locale = .Basque - XCTAssertEqual(locale.languageIdentifier, "eu") - XCTAssertEqual(locale.localeIdentifier, "eu") + func test__language_identifier_for_KoyraboroSenni() { + locale = .KoyraboroSenni + XCTAssertEqual(locale.languageIdentifier, "ses") + XCTAssertEqual(locale.localeIdentifier, "ses") } - func test__language_identifier_for_Gujarati() { - locale = .Gujarati - XCTAssertEqual(locale.languageIdentifier, "gu") - XCTAssertEqual(locale.localeIdentifier, "gu") + func test__language_identifier_for_Kwasio() { + locale = .Kwasio + XCTAssertEqual(locale.languageIdentifier, "nmg") + XCTAssertEqual(locale.localeIdentifier, "nmg") } - func test__language_identifier_for_Galician() { - locale = .Galician - XCTAssertEqual(locale.languageIdentifier, "gl") - XCTAssertEqual(locale.localeIdentifier, "gl") + func test__language_identifier_for_Kyrgyz() { + locale = .Kyrgyz + XCTAssertEqual(locale.languageIdentifier, "ky") + XCTAssertEqual(locale.localeIdentifier, "ky") } - func test__language_identifier_for_Vietnamese() { - locale = .Vietnamese - XCTAssertEqual(locale.languageIdentifier, "vi") - XCTAssertEqual(locale.localeIdentifier, "vi") + func test__language_identifier_for_Lakota() { + locale = .Lakota + XCTAssertEqual(locale.languageIdentifier, "lkt") + XCTAssertEqual(locale.localeIdentifier, "lkt") } - func test__language_identifier_for_Meru() { - locale = .Meru - XCTAssertEqual(locale.languageIdentifier, "mer") - XCTAssertEqual(locale.localeIdentifier, "mer") + func test__language_identifier_for_Langi() { + locale = .Langi + XCTAssertEqual(locale.languageIdentifier, "lag") + XCTAssertEqual(locale.localeIdentifier, "lag") + } + + func test__language_identifier_for_Lao() { + locale = .Lao + XCTAssertEqual(locale.languageIdentifier, "lo") + XCTAssertEqual(locale.localeIdentifier, "lo") + } + + func test__language_identifier_for_Latvian() { + locale = .Latvian + XCTAssertEqual(locale.languageIdentifier, "lv") + XCTAssertEqual(locale.localeIdentifier, "lv") + } + + func test__language_identifier_for_Lithuanian() { + locale = .Lithuanian + XCTAssertEqual(locale.languageIdentifier, "lt") + XCTAssertEqual(locale.localeIdentifier, "lt") } - func test__language_identifier_for_Malayalam() { - locale = .Malayalam - XCTAssertEqual(locale.languageIdentifier, "ml") - XCTAssertEqual(locale.localeIdentifier, "ml") + func test__language_identifier_for_LowerSorbian() { + locale = .LowerSorbian + XCTAssertEqual(locale.languageIdentifier, "dsb") + XCTAssertEqual(locale.localeIdentifier, "dsb") } func test__language_identifier_for_LubaKatanga() { @@ -4667,190 +4884,178 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.localeIdentifier, "lu") } - func test__language_identifier_for_Ukrainian() { - locale = .Ukrainian - XCTAssertEqual(locale.languageIdentifier, "uk") - XCTAssertEqual(locale.localeIdentifier, "uk") - } - - func test__language_identifier_for_Maltese() { - locale = .Maltese - XCTAssertEqual(locale.languageIdentifier, "mt") - XCTAssertEqual(locale.localeIdentifier, "mt") - } - - func test__language_identifier_for_Sinhala() { - locale = .Sinhala - XCTAssertEqual(locale.languageIdentifier, "si") - XCTAssertEqual(locale.localeIdentifier, "si") - } - func test__language_identifier_for_Luo() { locale = .Luo XCTAssertEqual(locale.languageIdentifier, "luo") XCTAssertEqual(locale.localeIdentifier, "luo") } - func test__language_identifier_for_Faroese() { - locale = .Faroese - XCTAssertEqual(locale.languageIdentifier, "fo") - XCTAssertEqual(locale.localeIdentifier, "fo") + func test__language_identifier_for_Luxembourgish() { + locale = .Luxembourgish + XCTAssertEqual(locale.languageIdentifier, "lb") + XCTAssertEqual(locale.localeIdentifier, "lb") } - func test__language_identifier_for_Zarma() { - locale = .Zarma - XCTAssertEqual(locale.languageIdentifier, "dje") - XCTAssertEqual(locale.localeIdentifier, "dje") + func test__language_identifier_for_Luyia() { + locale = .Luyia + XCTAssertEqual(locale.languageIdentifier, "luy") + XCTAssertEqual(locale.localeIdentifier, "luy") } - func test__language_identifier_for_Vai() { - locale = .Vai - XCTAssertEqual(locale.languageIdentifier, "vai") - XCTAssertEqual(locale.localeIdentifier, "vai") + func test__language_identifier_for_Macedonian() { + locale = .Macedonian + XCTAssertEqual(locale.languageIdentifier, "mk") + XCTAssertEqual(locale.localeIdentifier, "mk") } - func test__language_identifier_for_Taita() { - locale = .Taita - XCTAssertEqual(locale.languageIdentifier, "dav") - XCTAssertEqual(locale.localeIdentifier, "dav") + func test__language_identifier_for_Machame() { + locale = .Machame + XCTAssertEqual(locale.languageIdentifier, "jmc") + XCTAssertEqual(locale.localeIdentifier, "jmc") } - func test__language_identifier_for_Tachelhit() { - locale = .Tachelhit - XCTAssertEqual(locale.languageIdentifier, "shi") - XCTAssertEqual(locale.localeIdentifier, "shi") + func test__language_identifier_for_MakhuwaMeetto() { + locale = .MakhuwaMeetto + XCTAssertEqual(locale.languageIdentifier, "mgh") + XCTAssertEqual(locale.localeIdentifier, "mgh") } - func test__language_identifier_for_NorwegianNynorsk() { - locale = .NorwegianNynorsk - XCTAssertEqual(locale.languageIdentifier, "nn") - XCTAssertEqual(locale.localeIdentifier, "nn") + func test__language_identifier_for_Makonde() { + locale = .Makonde + XCTAssertEqual(locale.languageIdentifier, "kde") + XCTAssertEqual(locale.localeIdentifier, "kde") } - func test__language_identifier_for_Assamese() { - locale = .Assamese - XCTAssertEqual(locale.languageIdentifier, "as") - XCTAssertEqual(locale.localeIdentifier, "as") + func test__language_identifier_for_Malagasy() { + locale = .Malagasy + XCTAssertEqual(locale.languageIdentifier, "mg") + XCTAssertEqual(locale.localeIdentifier, "mg") } - func test__language_identifier_for_Latvian() { - locale = .Latvian - XCTAssertEqual(locale.languageIdentifier, "lv") - XCTAssertEqual(locale.localeIdentifier, "lv") + func test__language_identifier_for_Malayalam() { + locale = .Malayalam + XCTAssertEqual(locale.languageIdentifier, "ml") + XCTAssertEqual(locale.localeIdentifier, "ml") } - func test__language_identifier_for_Igbo() { - locale = .Igbo - XCTAssertEqual(locale.languageIdentifier, "ig") - XCTAssertEqual(locale.localeIdentifier, "ig") + func test__language_identifier_for_Maltese() { + locale = .Maltese + XCTAssertEqual(locale.languageIdentifier, "mt") + XCTAssertEqual(locale.localeIdentifier, "mt") } - func test__language_identifier_for_Kamba() { - locale = .Kamba - XCTAssertEqual(locale.languageIdentifier, "kam") - XCTAssertEqual(locale.localeIdentifier, "kam") + func test__language_identifier_for_Manx() { + locale = .Manx + XCTAssertEqual(locale.languageIdentifier, "gv") + XCTAssertEqual(locale.localeIdentifier, "gv") } - func test__language_identifier_for_Kako() { - locale = .Kako - XCTAssertEqual(locale.languageIdentifier, "kkj") - XCTAssertEqual(locale.localeIdentifier, "kkj") + func test__language_identifier_for_Marathi() { + locale = .Marathi + XCTAssertEqual(locale.languageIdentifier, "mr") + XCTAssertEqual(locale.localeIdentifier, "mr") } - func test__language_identifier_for_Lao() { - locale = .Lao - XCTAssertEqual(locale.languageIdentifier, "lo") - XCTAssertEqual(locale.localeIdentifier, "lo") + func test__language_identifier_for_Meru() { + locale = .Meru + XCTAssertEqual(locale.languageIdentifier, "mer") + XCTAssertEqual(locale.localeIdentifier, "mer") } - func test__language_identifier_for_Basaa() { - locale = .Basaa - XCTAssertEqual(locale.languageIdentifier, "bas") - XCTAssertEqual(locale.localeIdentifier, "bas") + func test__language_identifier_for_Meta() { + locale = .Meta + XCTAssertEqual(locale.languageIdentifier, "mgo") + XCTAssertEqual(locale.localeIdentifier, "mgo") } - func test__language_identifier_for_Nuer() { - locale = .Nuer - XCTAssertEqual(locale.languageIdentifier, "nus") - XCTAssertEqual(locale.localeIdentifier, "nus") + func test__language_identifier_for_Mongolian() { + locale = .Mongolian + XCTAssertEqual(locale.languageIdentifier, "mn") + XCTAssertEqual(locale.localeIdentifier, "mn") } - func test__language_identifier_for_Czech() { - locale = .Czech - XCTAssertEqual(locale.languageIdentifier, "cs") - XCTAssertEqual(locale.localeIdentifier, "cs") + func test__language_identifier_for_Morisyen() { + locale = .Morisyen + XCTAssertEqual(locale.languageIdentifier, "mfe") + XCTAssertEqual(locale.localeIdentifier, "mfe") } - func test__language_identifier_for_StandardMoroccanTamazight() { - locale = .StandardMoroccanTamazight - XCTAssertEqual(locale.languageIdentifier, "zgh") - XCTAssertEqual(locale.localeIdentifier, "zgh") + func test__language_identifier_for_Mundang() { + locale = .Mundang + XCTAssertEqual(locale.languageIdentifier, "mua") + XCTAssertEqual(locale.localeIdentifier, "mua") } - func test__language_identifier_for_Burmese() { - locale = .Burmese - XCTAssertEqual(locale.languageIdentifier, "my") - XCTAssertEqual(locale.localeIdentifier, "my") + func test__language_identifier_for_Nama() { + locale = .Nama + XCTAssertEqual(locale.languageIdentifier, "naq") + XCTAssertEqual(locale.localeIdentifier, "naq") } - func test__language_identifier_for_Romansh() { - locale = .Romansh - XCTAssertEqual(locale.languageIdentifier, "rm") - XCTAssertEqual(locale.localeIdentifier, "rm") + func test__language_identifier_for_Ngiemboon() { + locale = .Ngiemboon + XCTAssertEqual(locale.languageIdentifier, "nnh") + XCTAssertEqual(locale.localeIdentifier, "nnh") } - func test__language_identifier_for_Ewondo() { - locale = .Ewondo - XCTAssertEqual(locale.languageIdentifier, "ewo") - XCTAssertEqual(locale.localeIdentifier, "ewo") + func test__language_identifier_for_Ngomba() { + locale = .Ngomba + XCTAssertEqual(locale.languageIdentifier, "jgo") + XCTAssertEqual(locale.localeIdentifier, "jgo") } - func test__language_identifier_for_Amharic() { - locale = .Amharic - XCTAssertEqual(locale.languageIdentifier, "am") - XCTAssertEqual(locale.localeIdentifier, "am") + func test__language_identifier_for_NorthNdebele() { + locale = .NorthNdebele + XCTAssertEqual(locale.languageIdentifier, "nd") + XCTAssertEqual(locale.localeIdentifier, "nd") } - func test__language_identifier_for_Slovak() { - locale = .Slovak - XCTAssertEqual(locale.languageIdentifier, "sk") - XCTAssertEqual(locale.localeIdentifier, "sk") + func test__language_identifier_for_NorwegianNynorsk() { + locale = .NorwegianNynorsk + XCTAssertEqual(locale.languageIdentifier, "nn") + XCTAssertEqual(locale.localeIdentifier, "nn") } - func test__language_identifier_for_Kabuverdianu() { - locale = .Kabuverdianu - XCTAssertEqual(locale.languageIdentifier, "kea") - XCTAssertEqual(locale.localeIdentifier, "kea") + func test__language_identifier_for_Nuer() { + locale = .Nuer + XCTAssertEqual(locale.languageIdentifier, "nus") + XCTAssertEqual(locale.localeIdentifier, "nus") } - func test__language_identifier_for_Hungarian() { - locale = .Hungarian - XCTAssertEqual(locale.languageIdentifier, "hu") - XCTAssertEqual(locale.localeIdentifier, "hu") + func test__language_identifier_for_Nyankole() { + locale = .Nyankole + XCTAssertEqual(locale.languageIdentifier, "nyn") + XCTAssertEqual(locale.localeIdentifier, "nyn") } - func test__language_identifier_for_Breton() { - locale = .Breton - XCTAssertEqual(locale.languageIdentifier, "br") - XCTAssertEqual(locale.localeIdentifier, "br") + func test__language_identifier_for_Oriya() { + locale = .Oriya + XCTAssertEqual(locale.languageIdentifier, "or") + XCTAssertEqual(locale.localeIdentifier, "or") } - func test__language_identifier_for_Luyia() { - locale = .Luyia - XCTAssertEqual(locale.languageIdentifier, "luy") - XCTAssertEqual(locale.localeIdentifier, "luy") + func test__language_identifier_for_Pashto() { + locale = .Pashto + XCTAssertEqual(locale.languageIdentifier, "ps") + XCTAssertEqual(locale.localeIdentifier, "ps") } - func test__language_identifier_for_Luxembourgish() { - locale = .Luxembourgish - XCTAssertEqual(locale.languageIdentifier, "lb") - XCTAssertEqual(locale.localeIdentifier, "lb") + func test__language_identifier_for_Polish() { + locale = .Polish + XCTAssertEqual(locale.languageIdentifier, "pl") + XCTAssertEqual(locale.localeIdentifier, "pl") } - func test__language_identifier_for_Malagasy() { - locale = .Malagasy - XCTAssertEqual(locale.languageIdentifier, "mg") - XCTAssertEqual(locale.localeIdentifier, "mg") + func test__language_identifier_for_Romansh() { + locale = .Romansh + XCTAssertEqual(locale.languageIdentifier, "rm") + XCTAssertEqual(locale.localeIdentifier, "rm") + } + + func test__language_identifier_for_Rombo() { + locale = .Rombo + XCTAssertEqual(locale.languageIdentifier, "rof") + XCTAssertEqual(locale.localeIdentifier, "rof") } func test__language_identifier_for_Rundi() { @@ -4859,118 +5064,112 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.localeIdentifier, "rn") } - func test__language_identifier_for_KoyraChiini() { - locale = .KoyraChiini - XCTAssertEqual(locale.languageIdentifier, "khq") - XCTAssertEqual(locale.localeIdentifier, "khq") - } - - func test__language_identifier_for_Thai() { - locale = .Thai - XCTAssertEqual(locale.languageIdentifier, "th") - XCTAssertEqual(locale.localeIdentifier, "th") + func test__language_identifier_for_Rwa() { + locale = .Rwa + XCTAssertEqual(locale.languageIdentifier, "rwk") + XCTAssertEqual(locale.localeIdentifier, "rwk") } - func test__language_identifier_for_Zulu() { - locale = .Zulu - XCTAssertEqual(locale.languageIdentifier, "zu") - XCTAssertEqual(locale.localeIdentifier, "zu") + func test__language_identifier_for_Sakha() { + locale = .Sakha + XCTAssertEqual(locale.languageIdentifier, "sah") + XCTAssertEqual(locale.localeIdentifier, "sah") } - func test__language_identifier_for_Shona() { - locale = .Shona - XCTAssertEqual(locale.languageIdentifier, "sn") - XCTAssertEqual(locale.localeIdentifier, "sn") + func test__language_identifier_for_Samburu() { + locale = .Samburu + XCTAssertEqual(locale.languageIdentifier, "saq") + XCTAssertEqual(locale.localeIdentifier, "saq") } - func test__language_identifier_for_Armenian() { - locale = .Armenian - XCTAssertEqual(locale.languageIdentifier, "hy") - XCTAssertEqual(locale.localeIdentifier, "hy") + func test__language_identifier_for_Sango() { + locale = .Sango + XCTAssertEqual(locale.languageIdentifier, "sg") + XCTAssertEqual(locale.localeIdentifier, "sg") } - func test__language_identifier_for_Uyghur() { - locale = .Uyghur - XCTAssertEqual(locale.languageIdentifier, "ug") - XCTAssertEqual(locale.localeIdentifier, "ug") + func test__language_identifier_for_Sangu() { + locale = .Sangu + XCTAssertEqual(locale.languageIdentifier, "sbp") + XCTAssertEqual(locale.localeIdentifier, "sbp") } - func test__language_identifier_for_Irish() { - locale = .Irish - XCTAssertEqual(locale.languageIdentifier, "ga") - XCTAssertEqual(locale.localeIdentifier, "ga") + func test__language_identifier_for_ScottishGaelic() { + locale = .ScottishGaelic + XCTAssertEqual(locale.languageIdentifier, "gd") + XCTAssertEqual(locale.localeIdentifier, "gd") } - func test__language_identifier_for_Marathi() { - locale = .Marathi - XCTAssertEqual(locale.languageIdentifier, "mr") - XCTAssertEqual(locale.localeIdentifier, "mr") + func test__language_identifier_for_Sena() { + locale = .Sena + XCTAssertEqual(locale.languageIdentifier, "seh") + XCTAssertEqual(locale.localeIdentifier, "seh") } - func test__language_identifier_for_Macedonian() { - locale = .Macedonian - XCTAssertEqual(locale.languageIdentifier, "mk") - XCTAssertEqual(locale.localeIdentifier, "mk") + func test__language_identifier_for_Shambala() { + locale = .Shambala + XCTAssertEqual(locale.languageIdentifier, "ksb") + XCTAssertEqual(locale.localeIdentifier, "ksb") } - func test__language_identifier_for_Asu() { - locale = .Asu - XCTAssertEqual(locale.languageIdentifier, "asa") - XCTAssertEqual(locale.localeIdentifier, "asa") + func test__language_identifier_for_Shona() { + locale = .Shona + XCTAssertEqual(locale.languageIdentifier, "sn") + XCTAssertEqual(locale.localeIdentifier, "sn") } - func test__language_identifier_for_Georgian() { - locale = .Georgian - XCTAssertEqual(locale.languageIdentifier, "ka") - XCTAssertEqual(locale.localeIdentifier, "ka") + func test__language_identifier_for_SichuanYi() { + locale = .SichuanYi + XCTAssertEqual(locale.languageIdentifier, "ii") + XCTAssertEqual(locale.localeIdentifier, "ii") } - func test__language_identifier_for_Hawaiian() { - locale = .Hawaiian - XCTAssertEqual(locale.languageIdentifier, "haw") - XCTAssertEqual(locale.localeIdentifier, "haw") + func test__language_identifier_for_Sinhala() { + locale = .Sinhala + XCTAssertEqual(locale.languageIdentifier, "si") + XCTAssertEqual(locale.localeIdentifier, "si") } - func test__language_identifier_for_Walser() { - locale = .Walser - XCTAssertEqual(locale.languageIdentifier, "wae") - XCTAssertEqual(locale.localeIdentifier, "wae") + func test__language_identifier_for_Slovak() { + locale = .Slovak + XCTAssertEqual(locale.languageIdentifier, "sk") + XCTAssertEqual(locale.localeIdentifier, "sk") } - func test__language_identifier_for_Kashmiri() { - locale = .Kashmiri - XCTAssertEqual(locale.languageIdentifier, "ks") - XCTAssertEqual(locale.localeIdentifier, "ks") + func test__language_identifier_for_Slovenian() { + locale = .Slovenian + XCTAssertEqual(locale.languageIdentifier, "sl") + XCTAssertEqual(locale.localeIdentifier, "sl") } - func test__language_identifier_for_KoyraboroSenni() { - locale = .KoyraboroSenni - XCTAssertEqual(locale.languageIdentifier, "ses") - XCTAssertEqual(locale.localeIdentifier, "ses") + func test__language_identifier_for_Soga() { + locale = .Soga + XCTAssertEqual(locale.languageIdentifier, "xog") + XCTAssertEqual(locale.localeIdentifier, "xog") } - func test__language_identifier_for_Kinyarwanda() { - locale = .Kinyarwanda - XCTAssertEqual(locale.languageIdentifier, "rw") - XCTAssertEqual(locale.localeIdentifier, "rw") + func test__language_identifier_for_StandardMoroccanTamazight() { + locale = .StandardMoroccanTamazight + XCTAssertEqual(locale.languageIdentifier, "zgh") + XCTAssertEqual(locale.localeIdentifier, "zgh") } - func test__language_identifier_for_Dzongkha() { - locale = .Dzongkha - XCTAssertEqual(locale.languageIdentifier, "dz") - XCTAssertEqual(locale.localeIdentifier, "dz") + func test__language_identifier_for_Tachelhit() { + locale = .Tachelhit + XCTAssertEqual(locale.languageIdentifier, "shi") + XCTAssertEqual(locale.localeIdentifier, "shi") } - func test__language_identifier_for_Aghem() { - locale = .Aghem - XCTAssertEqual(locale.languageIdentifier, "agq") - XCTAssertEqual(locale.localeIdentifier, "agq") + func test__language_identifier_for_Taita() { + locale = .Taita + XCTAssertEqual(locale.languageIdentifier, "dav") + XCTAssertEqual(locale.localeIdentifier, "dav") } - func test__language_identifier_for_MakhuwaMeetto() { - locale = .MakhuwaMeetto - XCTAssertEqual(locale.languageIdentifier, "mgh") - XCTAssertEqual(locale.localeIdentifier, "mgh") + func test__language_identifier_for_Tajik() { + locale = .Tajik + XCTAssertEqual(locale.languageIdentifier, "tg") + XCTAssertEqual(locale.localeIdentifier, "tg") } func test__language_identifier_for_Tasawaq() { @@ -4979,40 +5178,34 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.localeIdentifier, "twq") } - func test__language_identifier_for_InariSami() { - locale = .InariSami - XCTAssertEqual(locale.languageIdentifier, "smn") - XCTAssertEqual(locale.localeIdentifier, "smn") - } - - func test__language_identifier_for_Yiddish() { - locale = .Yiddish - XCTAssertEqual(locale.languageIdentifier, "yi") - XCTAssertEqual(locale.localeIdentifier, "yi") + func test__language_identifier_for_Telugu() { + locale = .Telugu + XCTAssertEqual(locale.languageIdentifier, "te") + XCTAssertEqual(locale.localeIdentifier, "te") } - func test__language_identifier_for_SichuanYi() { - locale = .SichuanYi - XCTAssertEqual(locale.languageIdentifier, "ii") - XCTAssertEqual(locale.localeIdentifier, "ii") + func test__language_identifier_for_Thai() { + locale = .Thai + XCTAssertEqual(locale.languageIdentifier, "th") + XCTAssertEqual(locale.localeIdentifier, "th") } - func test__language_identifier_for_Hindi() { - locale = .Hindi - XCTAssertEqual(locale.languageIdentifier, "hi") - XCTAssertEqual(locale.localeIdentifier, "hi") + func test__language_identifier_for_Tongan() { + locale = .Tongan + XCTAssertEqual(locale.languageIdentifier, "to") + XCTAssertEqual(locale.localeIdentifier, "to") } - func test__language_identifier_for_Indonesian() { - locale = .Indonesian - XCTAssertEqual(locale.languageIdentifier, "id") - XCTAssertEqual(locale.localeIdentifier, "id") + func test__language_identifier_for_Turkmen() { + locale = .Turkmen + XCTAssertEqual(locale.languageIdentifier, "tk") + XCTAssertEqual(locale.localeIdentifier, "tk") } - func test__language_identifier_for_Samburu() { - locale = .Samburu - XCTAssertEqual(locale.languageIdentifier, "saq") - XCTAssertEqual(locale.localeIdentifier, "saq") + func test__language_identifier_for_Ukrainian() { + locale = .Ukrainian + XCTAssertEqual(locale.languageIdentifier, "uk") + XCTAssertEqual(locale.localeIdentifier, "uk") } func test__language_identifier_for_UpperSorbian() { @@ -5021,22 +5214,34 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.localeIdentifier, "hsb") } - func test__language_identifier_for_Kalenjin() { - locale = .Kalenjin - XCTAssertEqual(locale.languageIdentifier, "kln") - XCTAssertEqual(locale.localeIdentifier, "kln") + func test__language_identifier_for_Uyghur() { + locale = .Uyghur + XCTAssertEqual(locale.languageIdentifier, "ug") + XCTAssertEqual(locale.localeIdentifier, "ug") } - func test__language_identifier_for_Cherokee() { - locale = .Cherokee - XCTAssertEqual(locale.languageIdentifier, "chr") - XCTAssertEqual(locale.localeIdentifier, "chr") + func test__language_identifier_for_Vai() { + locale = .Vai + XCTAssertEqual(locale.languageIdentifier, "vai") + XCTAssertEqual(locale.localeIdentifier, "vai") } - func test__language_identifier_for_Cornish() { - locale = .Cornish - XCTAssertEqual(locale.languageIdentifier, "kw") - XCTAssertEqual(locale.localeIdentifier, "kw") + func test__language_identifier_for_Vietnamese() { + locale = .Vietnamese + XCTAssertEqual(locale.languageIdentifier, "vi") + XCTAssertEqual(locale.localeIdentifier, "vi") + } + + func test__language_identifier_for_Vunjo() { + locale = .Vunjo + XCTAssertEqual(locale.languageIdentifier, "vun") + XCTAssertEqual(locale.localeIdentifier, "vun") + } + + func test__language_identifier_for_Walser() { + locale = .Walser + XCTAssertEqual(locale.languageIdentifier, "wae") + XCTAssertEqual(locale.localeIdentifier, "wae") } func test__language_identifier_for_Welsh() { @@ -5044,4 +5249,34 @@ class LocaleAutogeneratedTests: XCTestCase { XCTAssertEqual(locale.languageIdentifier, "cy") XCTAssertEqual(locale.localeIdentifier, "cy") } + + func test__language_identifier_for_WesternFrisian() { + locale = .WesternFrisian + XCTAssertEqual(locale.languageIdentifier, "fy") + XCTAssertEqual(locale.localeIdentifier, "fy") + } + + func test__language_identifier_for_Yangben() { + locale = .Yangben + XCTAssertEqual(locale.languageIdentifier, "yav") + XCTAssertEqual(locale.localeIdentifier, "yav") + } + + func test__language_identifier_for_Yiddish() { + locale = .Yiddish + XCTAssertEqual(locale.languageIdentifier, "yi") + XCTAssertEqual(locale.localeIdentifier, "yi") + } + + func test__language_identifier_for_Zarma() { + locale = .Zarma + XCTAssertEqual(locale.languageIdentifier, "dje") + XCTAssertEqual(locale.localeIdentifier, "dje") + } + + func test__language_identifier_for_Zulu() { + locale = .Zulu + XCTAssertEqual(locale.languageIdentifier, "zu") + XCTAssertEqual(locale.localeIdentifier, "zu") + } } From e5bca1eb9c10082ffb1a7633550c7d8e1f4ade34 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 18:11:42 +0000 Subject: [PATCH 19/24] [MNY-24]: Updates README --- README.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3a953aa..8493562 100644 --- a/README.md +++ b/README.md @@ -23,19 +23,19 @@ print("I'll give \(money) to charity.”) will print out -> I'll give $ 100.00 to charity +> I'll give $100.00 to charity when the region is set to United States -> I'll give £ 100.00 to charity +> I'll give £100.00 to charity when the region is set to United Kingdom -> I'll give CN¥ 100.00 to charity +> I'll give CN¥100.00 to charity when the region is set to China -You get the idea. +You get the idea. See [Localized Formatting][] for more info. `Money` is `IntegerLiteralConvertible` and `FloatLiteralConvertible`. Which means values can be initialized using literal `Int`s and `Double`s as shown in these code snippets. @@ -70,12 +70,52 @@ Of course, `Money` supports the usual suspects of decimal arithmetic operators, ```swift let dollars = USD(minorUnits: 3250) let yuen = JPY(minorUnits: 3000) -let bitcoin = BTC(minorUnits: 5000) -print(“You have \(dollars), \(yuen) and \(bitcoin) Satoshis”) +print(“You have \(dollars) and \(yuen)”) ``` -> You have $ 32.50, JP¥ 3,000 and 0.00005 Satoshis +> You have $32.50 and ¥3,000 + +## Localized Formatting + +When displaying money values, it is important that they be correctly localized for the user. In general use the `Money` type to always work in currency of the user’s current locale. + +When printing a `MoneyType` value, the `.description` uses the current local and `NSNumberFormattingStyle.CurrencyStyle`, in conjunction with [`NSNumberFormatter`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSNumberFormatter_Class/index.html). + +```swift +let money: Money = 99.99 +print("She has \(money.formattedWithStyle(.CurrencyPluralStyle))") +``` + +For an American in Russia, this would print out: +>She has 99,99 Russian roubles + +### Understanding Locale + +A *locale* is the codification of associated regional linguistic attributes. A locale varies by language and region. Each locale has an [identifier](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), which is the concatenation of language, country and modifier codes. The language code is two or three lowercase letters. English is `en`, French is `fr`. There is a long list. Some languages are spoken in more than one country, in which case a country code is appended (with an underscore). For example, English in the United States is `en_US`, which is the default locale in the iOS Simulator. English in the United Kingdom is `en_GB`. In total, `NSLocale` has support for ~ 730 distinct locales. + +Lastly, a locale identifier can be modified, say for example to set the currency code to “USD”, for Portuguese speaking user in Brazil, the locale identifier would be `pt_BR@currency=USD`. + +### Formatting for specific Locale + +To formate a string of a specific currency, say `JPY` but for a specific locale we can use the `Locale` enum. This is auto-generated by Money’s build system, and allows specification of a locale without resorting to *hazardous* string variables. + +```swift +let money: Money = 99.99 +print("She has \(money.formattedWithStyle(.CurrencyPluralStyle, forLocale: .Chinese(.China)))") +``` + +Now, for our American in Russia, (or any user with a region set to Russia) we get: +>She has 99.99俄罗斯卢布 + +In this case, because our type is `Money`, and the user’s region is set to Russia, we’re working with `RUB` currency. But equally, if we need money in a specific currency, we can. + +```swift +let dollars: AUD = 29.99 +print("You’ll need \(dollars.formattedWithStyle(.CurrencyPluralStyle, forLocale: .SwissGerman(.France)))") +``` +Regardless of the user’s current locale, this will print out: +>You’ll need 29.99 Auschtralischi Dollar ##  Pay From c29e8ca8cff8521aa87150810b6b4d4bca697f15 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 23:31:53 +0000 Subject: [PATCH 20/24] [MNY-24]: Fixes spelling mistakes in the README --- README.md | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8493562..739a43b 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ Money is a Swift framework for iOS, watchOS, tvOS and OS X. It provides types and functionality to represent, calculate and convert money in the 298 [ISO currencies](https://en.wikipedia.org/wiki/ISO_4217). +— + ## Usage The Money framework defines the type `Money`, which represents money in the device’s current locale. The following code: @@ -63,7 +65,19 @@ let money = pounds + euros Of course, `Money` supports the usual suspects of decimal arithmetic operators, so you can add, subtract, multiply, divide values of the same type, and values with `Int` and `Double` with the expected limitations. -## Minor Units +## Convenience initializers + +`Money` (and [Decimal NumberType](friends)) can be initialized with `Int`s (and friends) and`Double`s. + +```swift +let anIntegerFromSomewhereElse: Int = getAnInteger() +let money = Money(anIntegerFromSomewhereElse) + +let aDoubleFromSomewhere: Double = getAnotherDouble() +let pounds = GBP(aDoubleFromSomewhere) +``` + +### Minor Units `Money` can be initialized using the smallest units of currency: @@ -78,9 +92,11 @@ print(“You have \(dollars) and \(yuen)”) ## Localized Formatting -When displaying money values, it is important that they be correctly localized for the user. In general use the `Money` type to always work in currency of the user’s current locale. +When displaying money values, it is important that they be correctly localized for the user. In general, it’s best to use the `Money` type to always work in currency of the user’s current locale. + +When printing a `MoneyType` value, the `.description` uses the current locale with `.CurrencyStyle` number style, in conjunction with [`NSNumberFormatter`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSNumberFormatter_Class/index.html). The code snippets throughout this README uses `.description` whenever the value of money is printed. -When printing a `MoneyType` value, the `.description` uses the current local and `NSNumberFormattingStyle.CurrencyStyle`, in conjunction with [`NSNumberFormatter`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSNumberFormatter_Class/index.html). +However, to specify a different style for the number formatter, use the `formattedWithStyle` method, like this: ```swift let money: Money = 99.99 @@ -90,15 +106,21 @@ print("She has \(money.formattedWithStyle(.CurrencyPluralStyle))") For an American in Russia, this would print out: >She has 99,99 Russian roubles -### Understanding Locale +### Working with Locales + +A *locale* is the codification of associated regional and linguistic attributes. A locale varies by language and region. Each locale has an [identifier](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), which is the concatenation of language, country and modifier codes. -A *locale* is the codification of associated regional linguistic attributes. A locale varies by language and region. Each locale has an [identifier](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), which is the concatenation of language, country and modifier codes. The language code is two or three lowercase letters. English is `en`, French is `fr`. There is a long list. Some languages are spoken in more than one country, in which case a country code is appended (with an underscore). For example, English in the United States is `en_US`, which is the default locale in the iOS Simulator. English in the United Kingdom is `en_GB`. In total, `NSLocale` has support for ~ 730 distinct locales. +The language code is two or three lowercase letters. English is `en`, French is `fr`. There is a [long list](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). Some languages are spoken in more than one country, in which case a country code (two uppercase letters) is appended (with an underscore). For example, English in the United States is `en_US`, which is the default locale in the iOS Simulator. English in the United Kingdom is `en_GB`. Lastly, a locale identifier can be modified, say for example to set the currency code to “USD”, for Portuguese speaking user in Brazil, the locale identifier would be `pt_BR@currency=USD`. +In total, `NSLocale` has support for ~ 730 distinct locales. Typically when creating a specific `NSLocale` it is done with the locale identifier. The `NSLocale` is like a dictionary with an `objectForKey` method which returns `AnyObject!`. + ### Formatting for specific Locale -To formate a string of a specific currency, say `JPY` but for a specific locale we can use the `Locale` enum. This is auto-generated by Money’s build system, and allows specification of a locale without resorting to *hazardous* string variables. +I think `NSLocale` is an amazing class, but it’s very easy to make mistakes, and not that easy to construct. Therefore, to support arbitrary locales, but remove the need for framework consumers to construct locale identifiers, a new `Locale` type is provided. This is an enum which means that it is type safe, and indexable for code completion in Xcode. Its cases are all the languages which `NSLocale` supports. For those languages which are spoken in more than one country, there is an associated value of country names of only those counties. + +To format a string of a specific currency, say `JPY`, but for a specific locale we can use the `Locale` enum. The following code uses `Locale.Chinese(.China)` to represent the `"zh_CN"` locale. ```swift let money: Money = 99.99 From f2e42f4624eeaa38dd9d5c40ff836b7e11b268af Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 23:33:04 +0000 Subject: [PATCH 21/24] [MNY-24]: Updates README for custom currency protocol --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 739a43b..05c68a3 100644 --- a/README.md +++ b/README.md @@ -291,7 +291,7 @@ Lets imagine we’re making *Hive.app* - where you compete with your friends to To create a custom currency, just conform to `CurrencyType`. ```swift -protocol HiveCurrencyType: CurrencyType { } +protocol HiveCurrencyType: CustomCurrencyType { } extension Currency { final class Bee: HiveCurrencyType { From 7ee3180a9101155c9d3aee2da0f253d44245b766 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 23:36:43 +0000 Subject: [PATCH 22/24] [MNY-24]: Sorts out horizontal lines --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 05c68a3..dab9b50 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Money is a Swift framework for iOS, watchOS, tvOS and OS X. It provides types and functionality to represent, calculate and convert money in the 298 [ISO currencies](https://en.wikipedia.org/wiki/ISO_4217). -— +--- ## Usage @@ -335,6 +335,8 @@ pod ‘Money’ At of writing there are some issues with the CocoaDocs generator for pure Swift 2 projects. This means that the project doesn’t have a page/docs in CocoaPods sites, however they are available through Xcode. +--- + ## Architectural style Swift is designed to have a focus on safety, enabled primarily through strong typing. This framework fully embraces this ethos and uses generics heavily to achieve this goal. From 62462f340d116f264515d727a467d71c4000c8e5 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 23:40:13 +0000 Subject: [PATCH 23/24] [MNY-24]: Removes an internal link which was broken. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dab9b50..7c4ef0c 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Of course, `Money` supports the usual suspects of decimal arithmetic operators, ## Convenience initializers -`Money` (and [Decimal NumberType](friends)) can be initialized with `Int`s (and friends) and`Double`s. +`Money` (and its friends) can be initialized with `Int`s (and friends) and`Double`s. ```swift let anIntegerFromSomewhereElse: Int = getAnInteger() From 9faba9ff6e7413caf0f07d053a93d23aac7df203 Mon Sep 17 00:00:00 2001 From: Daniel Thorpe Date: Mon, 23 Nov 2015 23:47:29 +0000 Subject: [PATCH 24/24] [MNY-24]: More README tweaks. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7c4ef0c..2999b1a 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ In total, `NSLocale` has support for ~ 730 distinct locales. Typically when crea I think `NSLocale` is an amazing class, but it’s very easy to make mistakes, and not that easy to construct. Therefore, to support arbitrary locales, but remove the need for framework consumers to construct locale identifiers, a new `Locale` type is provided. This is an enum which means that it is type safe, and indexable for code completion in Xcode. Its cases are all the languages which `NSLocale` supports. For those languages which are spoken in more than one country, there is an associated value of country names of only those counties. -To format a string of a specific currency, say `JPY`, but for a specific locale we can use the `Locale` enum. The following code uses `Locale.Chinese(.China)` to represent the `"zh_CN"` locale. +To format money for a specific locale we can use the `Locale` enum. The following code uses `Locale.Chinese(.China)` to represent the `"zh_CN"` locale. ```swift let money: Money = 99.99 @@ -130,14 +130,14 @@ print("She has \(money.formattedWithStyle(.CurrencyPluralStyle, forLocale: .Chin Now, for our American in Russia, (or any user with a region set to Russia) we get: >She has 99.99俄罗斯卢布 -In this case, because our type is `Money`, and the user’s region is set to Russia, we’re working with `RUB` currency. But equally, if we need money in a specific currency, we can. +In this case, because our type is `Money`, and the user’s region is set to Russia, we’re working with `RUB` currency. But equally, if we need money in a specific currency, we can. Here’s Australian dollars, for a SwissGerman speaking user, in France. ```swift -let dollars: AUD = 29.99 -print("You’ll need \(dollars.formattedWithStyle(.CurrencyPluralStyle, forLocale: .SwissGerman(.France)))") +let dollars: AUD = 39.99 +print("You’ll need \((dollars / 2.5).formattedWithStyle(.CurrencyPluralStyle, forLocale: .SwissGerman(.France)))") ``` Regardless of the user’s current locale, this will print out: ->You’ll need 29.99 Auschtralischi Dollar +>You’ll need 16.00 Auschtralischi Dollar ##  Pay