diff --git a/.fastlane/Fastfile b/.fastlane/Fastfile index 5425360..a3c642f 100644 --- a/.fastlane/Fastfile +++ b/.fastlane/Fastfile @@ -1,28 +1,37 @@ -before_all do |lane| - carthage -end - platform :ios do desc "Runs all the tests" lane :test do - xctest scheme: 'Money-iOS', - sdk: 'iphonesimulator', - destination: 'platform=iOS Simulator,name=iPhone 6,OS=9.1', - destination_timeout: 120, - derivedDataPath: '.ci/xcodebuild-data' + + carthage( + platform: "iOS" + ) + + scan( + scheme: "Money-iOS", + output_directory: ".ci/xcodebuild-data/", + xcargs: "-derivedDataPath .ci/xcodebuild-data/" + ) + end - + end platform :mac do desc "Runs all the tests" lane :test do - xctest scheme: 'Money-OSX', - sdk: 'macosx', - destination: 'platform=OS X', - derivedDataPath: '.ci/xcodebuild-data' + + carthage( + platform: "Mac" + ) + + scan( + scheme: "Money-OSX", + output_directory: ".ci/xcodebuild-data/", + xcargs: "-derivedDataPath .ci/xcodebuild-data/" + ) + end end diff --git a/.gitignore b/.gitignore index 0121b32..f2fad38 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ Carthage/Build .fastlane/report.xml .ci/xcodebuild-data/* *.coverage.txt +docs diff --git a/.jazzy.yaml b/.jazzy.yaml new file mode 100644 index 0000000..3e6f7c7 --- /dev/null +++ b/.jazzy.yaml @@ -0,0 +1,127 @@ +author_name: Daniel Thorpe +author_url: http://danthorpe.me +module_name: Money +module_version: 1.4.0 +github_url: https://github.com/danthorpe/Money +readme: README.md +podspec: Money.podspec + +swift_version: 2.1 +xcodebuild-arguments: -scheme,Money-iOS + +custom_categories: + - name: Decimals + children: + - DecimalNumberType + - DecimalNumberBehaviorType + - DecimalNumberBehavior + - _Decimal + - Decimal + - BankersDecimal + - _DecimalCoder + + - name: Currency + children: + - CurrencyType + - CustomCurrencyType + - ISOCurrencyType + - CryptoCurrencyType + - Currency + + - name: Money + children: + - MoneyType + - _Money + - _MoneyCoder + - Money + + - name: Foreign Exchange + children: + - MoneyPairType + - FXProviderType + - FXLocalProviderType + - FXRemoteProviderType + - CurrencyMarketTransactionType + - CryptoCurrencyMarketTransactionType + - FXQuote + - FXQuoteCoder + - FXTransaction + - FXTransactionCoder + - FXError + - FXRemoteProvider + - Yahoo + - OpenExchangeRatesAppID + - _OpenExchangeRates + - _ForeverFreeOpenExchangeRates + - CurrencyMarketTransactionKind + + - name: Bitcoin + children: + - BitcoinCurrencyType + - BTC + - XBT + - CEXSupportedFiatCurrencyType + - CEXBuy + - CEXSell + + - name: Pay + children: + - PaymentSummaryItemType + - PaymentSummaryItem + - PaymentSummaryItemCoder + - PKPaymentRequest + + - name: Locale + children: + - LocaleType + - CountryType + - LanguageType + - NSLocale + - Locale + - AfrikaansSpeakingCountry + - AlbanianSpeakingCountry + - ArabicSpeakingCountry + - BengaliSpeakingCountry + - CatalanSpeakingCountry + - CentralKurdishSpeakingCountry + - ChineseSpeakingCountry + - CroatianSpeakingCountry + - DanishSpeakingCountry + - DutchSpeakingCountry + - EnglishSpeakingCountry + - EweSpeakingCountry + - FrenchSpeakingCountry + - FulahSpeakingCountry + - GermanSpeakingCountry + - GreekSpeakingCountry + - HausaSpeakingCountry + - ItalianSpeakingCountry + - KoreanSpeakingCountry + - LingalaSpeakingCountry + - MalaySpeakingCountry + - MasaiSpeakingCountry + - NepaliSpeakingCountry + - NorthernSamiSpeakingCountry + - NorwegianBokmålSpeakingCountry + - OromoSpeakingCountry + - OsseticSpeakingCountry + - PersianSpeakingCountry + - PortugueseSpeakingCountry + - PunjabiSpeakingCountry + - QuechuaSpeakingCountry + - RomanianSpeakingCountry + - RussianSpeakingCountry + - SerbianSpeakingCountry + - SomaliSpeakingCountry + - SpanishSpeakingCountry + - SwahiliSpeakingCountry + - SwedishSpeakingCountry + - SwissGermanSpeakingCountry + - TamilSpeakingCountry + - TesoSpeakingCountry + - TibetanSpeakingCountry + - TigrinyaSpeakingCountry + - TurkishSpeakingCountry + - UrduSpeakingCountry + - UzbekSpeakingCountry + - YorubaSpeakingCountry diff --git a/CHANGELOG.md b/CHANGELOG.md index cacb02f..5a8d70d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 1.4.0 +1. [[MNY-25](https://github.com/danthorpe/Money/pull/25)]: Adds convenience initializers to `DecimalNumberType` for `Int` (including all the variants) and `Double` parameters. Although not technically needed, (as it’s integer and float convertible) this makes it a lot easier to construct `Money` types. +2. [[MNY-24](https://github.com/danthorpe/Money/pull/26)]: Refactors the localized string formatting APIs. Fixed a few bugs which may have rendered string incorrectly formatted in some locales. Also added the ability to format `MoneyType` values using specific language and country locales. See the README for more info. +3. [[MNY-27](https://github.com/danthorpe/Money/pull/27)]: Finally got Jazzy to generate the documentation, and have created a config for the project. Hopefully now CocoaDocs will correctly parse the framework and generate docs. Documentation coverage is 96%. + # 1.3.0 1. [[MNY-21](https://github.com/danthorpe/Money/pull/21), [MNY-22](https://github.com/danthorpe/Money/pull/22)]: Adds support for initializing `MoneyType`s with minor units. Thanks to [@jlalvarez18](https://github.com/jlalvarez18). 2. [[MNY-23](https://github.com/danthorpe/Money/pull/23)]: Adds some convenience extensions to create  pay payment requests using an array of `PaymentSummaryItem` which is a new type generic over `MoneyType`. This is only available on iOS, and it allows consumers to use `Money` directly with  pay APIs. 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 }() } 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 + diff --git a/Gemfile.lock b/Gemfile.lock index adb4302..a260f26 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -13,7 +13,7 @@ GEM extlib (>= 0.9.15) multi_json (>= 1.0.0) babosa (1.0.2) - cert (1.2.2) + cert (1.2.3) fastlane_core (>= 0.19.0, < 1.0.0) spaceship (>= 0.6.0) claide (0.9.1) @@ -21,7 +21,7 @@ GEM colored (1.2) commander (4.3.5) highline (~> 1.7.2) - credentials_manager (0.10.0) + credentials_manager (0.11.0) colored highline (>= 1.7.1) security @@ -31,8 +31,6 @@ GEM fastlane_core (>= 0.19.0, < 1.0.0) plist (~> 3.1.0) spaceship (>= 0.14.0, <= 1.0.0) - domain_name (0.5.25) - unf (>= 0.0.5, < 1.0.0) dotenv (2.0.2) excon (0.45.4) extlib (0.9.16) @@ -42,37 +40,35 @@ GEM faraday (>= 0.7.4, < 0.10) fastimage (1.6.8) addressable (~> 2.3, >= 2.3.5) - fastlane (1.39.0) + fastlane (1.41.1) addressable (~> 2.3.8) - cert (>= 1.1.0, < 2.0.0) + cert (>= 1.2.3, < 2.0.0) credentials_manager (>= 0.10.0, < 1.0.0) - deliver (>= 1.5.0, < 2.0.0) - fastlane_core (>= 0.26.1, < 1.0.0) - frameit (>= 2.2.2, < 3.0.0) - gym (>= 1.1.1, < 2.0.0) + deliver (>= 1.5.1, < 2.0.0) + fastlane_core (>= 0.26.3, < 1.0.0) + frameit (>= 2.3.0, < 3.0.0) + gym (>= 1.1.5, < 2.0.0) krausefx-shenzhen (>= 0.14.6) - pbxplorer (~> 1.0.0) - pem (>= 1.0.0, < 2.0.0) - pilot (>= 1.0.0, < 2.0.0) + pem (>= 1.0.1, < 2.0.0) + pilot (>= 1.0.1, < 2.0.0) plist (~> 3.1.0) produce (>= 1.0.0, < 2.0.0) - rest-client (~> 1.8.0) - scan (>= 0.2.1, < 1.0.0) + scan (>= 0.3.0, < 1.0.0) sigh (>= 1.1.3, < 2.0.0) slack-notifier (~> 1.3) - snapshot (>= 1.0.4, < 2.0.0) - spaceship (>= 0.14.0, < 1.0.0) + snapshot (>= 1.1.1, < 2.0.0) + spaceship (>= 0.14.2, < 1.0.0) supply (>= 0.2.1, < 1.0.0) terminal-notifier (~> 1.6.2) terminal-table (~> 1.4.5) xcode-install (~> 1.0.1) xcodeproj (>= 0.20, < 1.0.0) xcpretty (>= 0.2.1) - fastlane_core (0.26.1) + fastlane_core (0.26.5) babosa colored commander (>= 4.3.5) - credentials_manager (>= 0.8.2, < 1.0.0) + credentials_manager (>= 0.11.0, < 1.0.0) excon (~> 0.45.0) highline (>= 1.7.2) json @@ -104,15 +100,13 @@ GEM memoist (~> 0.12) multi_json (~> 1.11) signet (~> 0.6) - gym (1.1.5) + gym (1.1.6) fastlane_core (>= 0.25.0, < 1.0.0) plist rubyzip (>= 1.1.7) terminal-table xcpretty (>= 0.2.1) highline (1.7.8) - http-cookie (1.0.2) - domain_name (~> 0.5) i18n (0.7.0) json (1.8.3) jwt (1.5.2) @@ -136,17 +130,14 @@ GEM multi_json (~> 1.10) memoist (0.12.0) method_source (0.8.2) - mime-types (2.6.2) mini_magick (4.0.4) - minitest (5.8.2) + minitest (5.8.3) multi_json (1.11.2) multi_xml (0.5.5) multipart-post (2.0.0) net-sftp (2.1.2) net-ssh (>= 2.6.5) net-ssh (3.0.1) - netrc (0.11.0) - pbxplorer (1.0.0) pem (1.0.1) fastlane_core (>= 0.21.0, < 1.0.0) spaceship (>= 0.12.0, < 1.0.0) @@ -163,14 +154,10 @@ GEM coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - rest-client (1.8.0) - http-cookie (>= 1.0.2, < 2.0) - mime-types (>= 1.16, < 3.0) - netrc (~> 0.7) retriable (1.4.1) rouge (1.10.1) rubyzip (1.1.7) - scan (0.2.1) + scan (0.3.1) fastlane_core (>= 0.25.3, < 1.0.0) slack-notifier (~> 1.3) terminal-table @@ -196,7 +183,7 @@ GEM fastlane_core (>= 0.21.0, < 1.0.0) plist (~> 3.1.0) xcpretty (>= 0.2.1) - spaceship (0.14.1) + spaceship (0.14.2) colored credentials_manager (>= 0.9.0) faraday (~> 0.9) @@ -205,8 +192,8 @@ GEM multi_xml (~> 0.5) plist (~> 3.1) pry - supply (0.2.1) - credentials_manager (>= 0.8.2) + supply (0.2.2) + credentials_manager (>= 0.10.0) fastlane_core (>= 0.19.0) google-api-client (~> 0.8.6) terminal-notifier (1.6.3) @@ -214,9 +201,6 @@ GEM thread_safe (0.3.5) tzinfo (1.2.2) thread_safe (~> 0.1) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.1) xcode-install (1.0.1) claide (~> 0.9.1) spaceship (>= 0.13.0, < 1.0.0) diff --git a/Money.podspec b/Money.podspec index 26f2b7c..1808768 100644 --- a/Money.podspec +++ b/Money.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Money" - s.version = "1.3.0" + s.version = "1.4.0" s.summary = "Swift types for working with Money." s.description = <<-DESC diff --git a/Money.xcodeproj/project.pbxproj b/Money.xcodeproj/project.pbxproj index c7a6e14..72535d6 100644 --- a/Money.xcodeproj/project.pbxproj +++ b/Money.xcodeproj/project.pbxproj @@ -21,6 +21,19 @@ /* 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 */; }; + 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 */; }; + 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 */; }; @@ -187,6 +200,10 @@ /* 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 = ""; }; 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 = ""; }; @@ -401,11 +418,14 @@ isa = PBXGroup; children = ( 65DD22AD1BFA10DF0054F62D /* Troll.png */, + 65579FC51C0288A300C3F8C7 /* AutogeneratedTests.swift */, 65DD22A01BFA10DF0054F62D /* BitcoinTests.swift */, + 65579F8B1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift */, 65DD22A11BFA10DF0054F62D /* DecimalTests.swift */, 65DD22A71BFA10DF0054F62D /* FXOpenExchangeRatesTests.swift */, 65DD22A81BFA10DF0054F62D /* FXTests.swift */, 65DD22A91BFA10DF0054F62D /* FXYahooTests.swift */, + 6553909C1C037A1A00610C6F /* LocaleTests.swift */, 65DD22AA1BFA10DF0054F62D /* MoneyTests.swift */, 65DD22AB1BFA10DF0054F62D /* NSDecimalNumberTests.swift */, 65DD22AC1BFA10DF0054F62D /* NSDecimalTests.swift */, @@ -438,6 +458,7 @@ children = ( 65DEE3271BFA0F370043A718 /* Autogenerated.swift */, 65DEE3281BFA0F370043A718 /* Currency.swift */, + 65579FB51C0228EB00C3F8C7 /* Locale.swift */, 65DEE3331BFA0F370043A718 /* Money.swift */, 65DEE3341BFA0F370043A718 /* Support.swift */, 65DEE3291BFA0F370043A718 /* Decimal */, @@ -778,10 +799,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; @@ -844,6 +866,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 */, @@ -867,11 +890,14 @@ 65DD22C11BFA10F30054F62D /* FXTests.swift in Sources */, 65DD22C51BFA10F30054F62D /* NSDecimalTests.swift in Sources */, 65DD22C31BFA10F30054F62D /* MoneyTests.swift in Sources */, + 65579F8C1C01F0C100C3F8C7 /* DecimalNumberTypeTests.swift in Sources */, 65DD22C61BFA10F60054F62D /* ApplePayTests.swift in Sources */, 65DD22C01BFA10F30054F62D /* FXOpenExchangeRatesTests.swift in Sources */, 65DD22C21BFA10F30054F62D /* FXYahooTests.swift in Sources */, 65DD22C41BFA10F30054F62D /* NSDecimalNumberTests.swift in Sources */, 65DD22BF1BFA10F30054F62D /* DecimalTests.swift in Sources */, + 65579FC61C0288A300C3F8C7 /* AutogeneratedTests.swift in Sources */, + 6553909D1C037A1A00610C6F /* LocaleTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -886,6 +912,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 */, @@ -905,6 +932,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 */, @@ -917,6 +945,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 */, @@ -924,6 +953,8 @@ 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 */, ); runOnlyForDeploymentPostprocessing = 0; @@ -939,6 +970,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 */, @@ -951,6 +983,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 */, @@ -958,6 +991,8 @@ 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 */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Money.xcodeproj/xcshareddata/xcbaselines/65B92ADC1BE0E4A700F82024.xcbaseline/0D32C110-9E81-4857-87B2-283B1C66329A.plist b/Money.xcodeproj/xcshareddata/xcbaselines/65B92ADC1BE0E4A700F82024.xcbaseline/0D32C110-9E81-4857-87B2-283B1C66329A.plist new file mode 100644 index 0000000..4bac043 --- /dev/null +++ b/Money.xcodeproj/xcshareddata/xcbaselines/65B92ADC1BE0E4A700F82024.xcbaseline/0D32C110-9E81-4857-87B2-283B1C66329A.plist @@ -0,0 +1,32 @@ + + + + + classNames + + DecimalNumberTypeTests + + testPerformanceInitDouble() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.020856 + baselineIntegrationDisplayName + 22 Nov 2015, 13:09:55 + + + testPerformanceInitInt() + + com.apple.XCTPerformanceMetric_WallClockTime + + baselineAverage + 0.018283 + baselineIntegrationDisplayName + 22 Nov 2015, 13:09:55 + + + + + + diff --git a/Money.xcodeproj/xcshareddata/xcbaselines/65B92ADC1BE0E4A700F82024.xcbaseline/Info.plist b/Money.xcodeproj/xcshareddata/xcbaselines/65B92ADC1BE0E4A700F82024.xcbaseline/Info.plist new file mode 100644 index 0000000..0a50199 --- /dev/null +++ b/Money.xcodeproj/xcshareddata/xcbaselines/65B92ADC1BE0E4A700F82024.xcbaseline/Info.plist @@ -0,0 +1,40 @@ + + + + + runDestinationsByUUID + + 0D32C110-9E81-4857-87B2-283B1C66329A + + localComputer + + busSpeedInMHz + 100 + cpuCount + 1 + cpuKind + 6-Core Intel Xeon E5 + cpuSpeedInMHz + 3500 + logicalCPUCoresPerPackage + 12 + modelCode + MacPro6,1 + physicalCPUCoresPerPackage + 6 + platformIdentifier + com.apple.platform.macosx + + targetArchitecture + x86_64 + targetDevice + + modelCode + iPhone7,2 + platformIdentifier + com.apple.platform.iphonesimulator + + + + + diff --git a/Money/Shared/Autogenerated.swift b/Money/Shared/Autogenerated.swift index 4887ccd..f9d89d8 100644 --- a/Money/Shared/Autogenerated.swift +++ b/Money/Shared/Autogenerated.swift @@ -29,1497 +29,1796 @@ extension Currency { /// Currency ADP - public final class ADP: Currency.Base, _CurrencyType { + public final class ADP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ADP public static var sharedInstance = ADP(code: "ADP") } /// Currency AED - public final class AED: Currency.Base, _CurrencyType { + public final class AED: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.AED public static var sharedInstance = AED(code: "AED") } /// Currency AFA - public final class AFA: Currency.Base, _CurrencyType { + public final class AFA: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.AFA public static var sharedInstance = AFA(code: "AFA") } /// Currency AFN - public final class AFN: Currency.Base, _CurrencyType { + public final class AFN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.AFN public static var sharedInstance = AFN(code: "AFN") } /// Currency ALK - public final class ALK: Currency.Base, _CurrencyType { + public final class ALK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ALK public static var sharedInstance = ALK(code: "ALK") } /// Currency ALL - public final class ALL: Currency.Base, _CurrencyType { + public final class ALL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ALL public static var sharedInstance = ALL(code: "ALL") } /// Currency AMD - public final class AMD: Currency.Base, _CurrencyType { + public final class AMD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.AMD public static var sharedInstance = AMD(code: "AMD") } /// Currency ANG - public final class ANG: Currency.Base, _CurrencyType { + public final class ANG: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ANG public static var sharedInstance = ANG(code: "ANG") } /// Currency AOA - public final class AOA: Currency.Base, _CurrencyType { + public final class AOA: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.AOA public static var sharedInstance = AOA(code: "AOA") } /// Currency AOK - public final class AOK: Currency.Base, _CurrencyType { + public final class AOK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.AOK public static var sharedInstance = AOK(code: "AOK") } /// Currency AON - public final class AON: Currency.Base, _CurrencyType { + public final class AON: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.AON public static var sharedInstance = AON(code: "AON") } /// Currency AOR - public final class AOR: Currency.Base, _CurrencyType { + public final class AOR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.AOR public static var sharedInstance = AOR(code: "AOR") } /// Currency ARA - public final class ARA: Currency.Base, _CurrencyType { + public final class ARA: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ARA public static var sharedInstance = ARA(code: "ARA") } /// Currency ARL - public final class ARL: Currency.Base, _CurrencyType { + public final class ARL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ARL public static var sharedInstance = ARL(code: "ARL") } /// Currency ARM - public final class ARM: Currency.Base, _CurrencyType { + public final class ARM: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ARM public static var sharedInstance = ARM(code: "ARM") } /// Currency ARP - public final class ARP: Currency.Base, _CurrencyType { + public final class ARP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ARP public static var sharedInstance = ARP(code: "ARP") } /// Currency ARS - public final class ARS: Currency.Base, _CurrencyType { + public final class ARS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ARS public static var sharedInstance = ARS(code: "ARS") } /// Currency ATS - public final class ATS: Currency.Base, _CurrencyType { + public final class ATS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ATS public static var sharedInstance = ATS(code: "ATS") } /// Currency AUD - public final class AUD: Currency.Base, _CurrencyType { + public final class AUD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.AUD public static var sharedInstance = AUD(code: "AUD") } /// Currency AWG - public final class AWG: Currency.Base, _CurrencyType { + public final class AWG: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.AWG public static var sharedInstance = AWG(code: "AWG") } /// Currency AZM - public final class AZM: Currency.Base, _CurrencyType { + public final class AZM: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.AZM public static var sharedInstance = AZM(code: "AZM") } /// Currency AZN - public final class AZN: Currency.Base, _CurrencyType { + public final class AZN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.AZN public static var sharedInstance = AZN(code: "AZN") } /// Currency BAD - public final class BAD: Currency.Base, _CurrencyType { + public final class BAD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BAD public static var sharedInstance = BAD(code: "BAD") } /// Currency BAM - public final class BAM: Currency.Base, _CurrencyType { + public final class BAM: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BAM public static var sharedInstance = BAM(code: "BAM") } /// Currency BAN - public final class BAN: Currency.Base, _CurrencyType { + public final class BAN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BAN public static var sharedInstance = BAN(code: "BAN") } /// Currency BBD - public final class BBD: Currency.Base, _CurrencyType { + public final class BBD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BBD public static var sharedInstance = BBD(code: "BBD") } /// Currency BDT - public final class BDT: Currency.Base, _CurrencyType { + public final class BDT: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BDT public static var sharedInstance = BDT(code: "BDT") } /// Currency BEC - public final class BEC: Currency.Base, _CurrencyType { + public final class BEC: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BEC public static var sharedInstance = BEC(code: "BEC") } /// Currency BEF - public final class BEF: Currency.Base, _CurrencyType { + public final class BEF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BEF public static var sharedInstance = BEF(code: "BEF") } /// Currency BEL - public final class BEL: Currency.Base, _CurrencyType { + public final class BEL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BEL public static var sharedInstance = BEL(code: "BEL") } /// Currency BGL - public final class BGL: Currency.Base, _CurrencyType { + public final class BGL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BGL public static var sharedInstance = BGL(code: "BGL") } /// Currency BGM - public final class BGM: Currency.Base, _CurrencyType { + public final class BGM: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BGM public static var sharedInstance = BGM(code: "BGM") } /// Currency BGN - public final class BGN: Currency.Base, _CurrencyType { + public final class BGN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BGN public static var sharedInstance = BGN(code: "BGN") } /// Currency BGO - public final class BGO: Currency.Base, _CurrencyType { + public final class BGO: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BGO public static var sharedInstance = BGO(code: "BGO") } /// Currency BHD - public final class BHD: Currency.Base, _CurrencyType { + public final class BHD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BHD public static var sharedInstance = BHD(code: "BHD") } /// Currency BIF - public final class BIF: Currency.Base, _CurrencyType { + public final class BIF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BIF public static var sharedInstance = BIF(code: "BIF") } /// Currency BMD - public final class BMD: Currency.Base, _CurrencyType { + public final class BMD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BMD public static var sharedInstance = BMD(code: "BMD") } /// Currency BND - public final class BND: Currency.Base, _CurrencyType { + public final class BND: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BND public static var sharedInstance = BND(code: "BND") } /// Currency BOB - public final class BOB: Currency.Base, _CurrencyType { + public final class BOB: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BOB public static var sharedInstance = BOB(code: "BOB") } /// Currency BOL - public final class BOL: Currency.Base, _CurrencyType { + public final class BOL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BOL public static var sharedInstance = BOL(code: "BOL") } /// Currency BOP - public final class BOP: Currency.Base, _CurrencyType { + public final class BOP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BOP public static var sharedInstance = BOP(code: "BOP") } /// Currency BOV - public final class BOV: Currency.Base, _CurrencyType { + public final class BOV: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BOV public static var sharedInstance = BOV(code: "BOV") } /// Currency BRB - public final class BRB: Currency.Base, _CurrencyType { + public final class BRB: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BRB public static var sharedInstance = BRB(code: "BRB") } /// Currency BRC - public final class BRC: Currency.Base, _CurrencyType { + public final class BRC: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BRC public static var sharedInstance = BRC(code: "BRC") } /// Currency BRE - public final class BRE: Currency.Base, _CurrencyType { + public final class BRE: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BRE public static var sharedInstance = BRE(code: "BRE") } /// Currency BRL - public final class BRL: Currency.Base, _CurrencyType { + public final class BRL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BRL public static var sharedInstance = BRL(code: "BRL") } /// Currency BRN - public final class BRN: Currency.Base, _CurrencyType { + public final class BRN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BRN public static var sharedInstance = BRN(code: "BRN") } /// Currency BRR - public final class BRR: Currency.Base, _CurrencyType { + public final class BRR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BRR public static var sharedInstance = BRR(code: "BRR") } /// Currency BRZ - public final class BRZ: Currency.Base, _CurrencyType { + public final class BRZ: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BRZ public static var sharedInstance = BRZ(code: "BRZ") } /// Currency BSD - public final class BSD: Currency.Base, _CurrencyType { + public final class BSD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BSD public static var sharedInstance = BSD(code: "BSD") } /// Currency BTN - public final class BTN: Currency.Base, _CurrencyType { + public final class BTN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BTN public static var sharedInstance = BTN(code: "BTN") } /// Currency BUK - public final class BUK: Currency.Base, _CurrencyType { + public final class BUK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BUK public static var sharedInstance = BUK(code: "BUK") } /// Currency BWP - public final class BWP: Currency.Base, _CurrencyType { + public final class BWP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BWP public static var sharedInstance = BWP(code: "BWP") } /// Currency BYB - public final class BYB: Currency.Base, _CurrencyType { + public final class BYB: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BYB public static var sharedInstance = BYB(code: "BYB") } /// Currency BYR - public final class BYR: Currency.Base, _CurrencyType { + public final class BYR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BYR public static var sharedInstance = BYR(code: "BYR") } /// Currency BZD - public final class BZD: Currency.Base, _CurrencyType { + public final class BZD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.BZD public static var sharedInstance = BZD(code: "BZD") } /// Currency CAD - public final class CAD: Currency.Base, _CurrencyType { + public final class CAD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CAD public static var sharedInstance = CAD(code: "CAD") } /// Currency CDF - public final class CDF: Currency.Base, _CurrencyType { + public final class CDF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CDF public static var sharedInstance = CDF(code: "CDF") } /// Currency CHE - public final class CHE: Currency.Base, _CurrencyType { + public final class CHE: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CHE public static var sharedInstance = CHE(code: "CHE") } /// Currency CHF - public final class CHF: Currency.Base, _CurrencyType { + public final class CHF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CHF public static var sharedInstance = CHF(code: "CHF") } /// Currency CHW - public final class CHW: Currency.Base, _CurrencyType { + public final class CHW: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CHW public static var sharedInstance = CHW(code: "CHW") } /// Currency CLE - public final class CLE: Currency.Base, _CurrencyType { + public final class CLE: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CLE public static var sharedInstance = CLE(code: "CLE") } /// Currency CLF - public final class CLF: Currency.Base, _CurrencyType { + public final class CLF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CLF public static var sharedInstance = CLF(code: "CLF") } /// Currency CLP - public final class CLP: Currency.Base, _CurrencyType { + public final class CLP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CLP public static var sharedInstance = CLP(code: "CLP") } /// Currency CNX - public final class CNX: Currency.Base, _CurrencyType { + public final class CNX: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CNX public static var sharedInstance = CNX(code: "CNX") } /// Currency CNY - public final class CNY: Currency.Base, _CurrencyType { + public final class CNY: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CNY public static var sharedInstance = CNY(code: "CNY") } /// Currency COP - public final class COP: Currency.Base, _CurrencyType { + public final class COP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.COP public static var sharedInstance = COP(code: "COP") } /// Currency COU - public final class COU: Currency.Base, _CurrencyType { + public final class COU: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.COU public static var sharedInstance = COU(code: "COU") } /// Currency CRC - public final class CRC: Currency.Base, _CurrencyType { + public final class CRC: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CRC public static var sharedInstance = CRC(code: "CRC") } /// Currency CSD - public final class CSD: Currency.Base, _CurrencyType { + public final class CSD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CSD public static var sharedInstance = CSD(code: "CSD") } /// Currency CSK - public final class CSK: Currency.Base, _CurrencyType { + public final class CSK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CSK public static var sharedInstance = CSK(code: "CSK") } /// Currency CUC - public final class CUC: Currency.Base, _CurrencyType { + public final class CUC: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CUC public static var sharedInstance = CUC(code: "CUC") } /// Currency CUP - public final class CUP: Currency.Base, _CurrencyType { + public final class CUP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CUP public static var sharedInstance = CUP(code: "CUP") } /// Currency CVE - public final class CVE: Currency.Base, _CurrencyType { + public final class CVE: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CVE public static var sharedInstance = CVE(code: "CVE") } /// Currency CYP - public final class CYP: Currency.Base, _CurrencyType { + public final class CYP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CYP public static var sharedInstance = CYP(code: "CYP") } /// Currency CZK - public final class CZK: Currency.Base, _CurrencyType { + public final class CZK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.CZK public static var sharedInstance = CZK(code: "CZK") } /// Currency DDM - public final class DDM: Currency.Base, _CurrencyType { + public final class DDM: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.DDM public static var sharedInstance = DDM(code: "DDM") } /// Currency DEM - public final class DEM: Currency.Base, _CurrencyType { + public final class DEM: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.DEM public static var sharedInstance = DEM(code: "DEM") } /// Currency DJF - public final class DJF: Currency.Base, _CurrencyType { + public final class DJF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.DJF public static var sharedInstance = DJF(code: "DJF") } /// Currency DKK - public final class DKK: Currency.Base, _CurrencyType { + public final class DKK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.DKK public static var sharedInstance = DKK(code: "DKK") } /// Currency DOP - public final class DOP: Currency.Base, _CurrencyType { + public final class DOP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.DOP public static var sharedInstance = DOP(code: "DOP") } /// Currency DZD - public final class DZD: Currency.Base, _CurrencyType { + public final class DZD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.DZD public static var sharedInstance = DZD(code: "DZD") } /// Currency ECS - public final class ECS: Currency.Base, _CurrencyType { + public final class ECS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ECS public static var sharedInstance = ECS(code: "ECS") } /// Currency ECV - public final class ECV: Currency.Base, _CurrencyType { + public final class ECV: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ECV public static var sharedInstance = ECV(code: "ECV") } /// Currency EEK - public final class EEK: Currency.Base, _CurrencyType { + public final class EEK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.EEK public static var sharedInstance = EEK(code: "EEK") } /// Currency EGP - public final class EGP: Currency.Base, _CurrencyType { + public final class EGP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.EGP public static var sharedInstance = EGP(code: "EGP") } /// Currency EQE - public final class EQE: Currency.Base, _CurrencyType { + public final class EQE: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.EQE public static var sharedInstance = EQE(code: "EQE") } /// Currency ERN - public final class ERN: Currency.Base, _CurrencyType { + public final class ERN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ERN public static var sharedInstance = ERN(code: "ERN") } /// Currency ESA - public final class ESA: Currency.Base, _CurrencyType { + public final class ESA: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ESA public static var sharedInstance = ESA(code: "ESA") } /// Currency ESB - public final class ESB: Currency.Base, _CurrencyType { + public final class ESB: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ESB public static var sharedInstance = ESB(code: "ESB") } /// Currency ESP - public final class ESP: Currency.Base, _CurrencyType { + public final class ESP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ESP public static var sharedInstance = ESP(code: "ESP") } /// Currency ETB - public final class ETB: Currency.Base, _CurrencyType { + public final class ETB: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ETB public static var sharedInstance = ETB(code: "ETB") } /// Currency EUR - public final class EUR: Currency.Base, _CurrencyType { + public final class EUR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.EUR public static var sharedInstance = EUR(code: "EUR") } /// Currency FIM - public final class FIM: Currency.Base, _CurrencyType { + public final class FIM: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.FIM public static var sharedInstance = FIM(code: "FIM") } /// Currency FJD - public final class FJD: Currency.Base, _CurrencyType { + public final class FJD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.FJD public static var sharedInstance = FJD(code: "FJD") } /// Currency FKP - public final class FKP: Currency.Base, _CurrencyType { + public final class FKP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.FKP public static var sharedInstance = FKP(code: "FKP") } /// Currency FRF - public final class FRF: Currency.Base, _CurrencyType { + public final class FRF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.FRF public static var sharedInstance = FRF(code: "FRF") } /// Currency GBP - public final class GBP: Currency.Base, _CurrencyType { + public final class GBP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GBP public static var sharedInstance = GBP(code: "GBP") } /// Currency GEK - public final class GEK: Currency.Base, _CurrencyType { + public final class GEK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GEK public static var sharedInstance = GEK(code: "GEK") } /// Currency GEL - public final class GEL: Currency.Base, _CurrencyType { + public final class GEL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GEL public static var sharedInstance = GEL(code: "GEL") } /// Currency GHC - public final class GHC: Currency.Base, _CurrencyType { + public final class GHC: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GHC public static var sharedInstance = GHC(code: "GHC") } /// Currency GHS - public final class GHS: Currency.Base, _CurrencyType { + public final class GHS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GHS public static var sharedInstance = GHS(code: "GHS") } /// Currency GIP - public final class GIP: Currency.Base, _CurrencyType { + public final class GIP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GIP public static var sharedInstance = GIP(code: "GIP") } /// Currency GMD - public final class GMD: Currency.Base, _CurrencyType { + public final class GMD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GMD public static var sharedInstance = GMD(code: "GMD") } /// Currency GNF - public final class GNF: Currency.Base, _CurrencyType { + public final class GNF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GNF public static var sharedInstance = GNF(code: "GNF") } /// Currency GNS - public final class GNS: Currency.Base, _CurrencyType { + public final class GNS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GNS public static var sharedInstance = GNS(code: "GNS") } /// Currency GQE - public final class GQE: Currency.Base, _CurrencyType { + public final class GQE: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GQE public static var sharedInstance = GQE(code: "GQE") } /// Currency GRD - public final class GRD: Currency.Base, _CurrencyType { + public final class GRD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GRD public static var sharedInstance = GRD(code: "GRD") } /// Currency GTQ - public final class GTQ: Currency.Base, _CurrencyType { + public final class GTQ: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GTQ public static var sharedInstance = GTQ(code: "GTQ") } /// Currency GWE - public final class GWE: Currency.Base, _CurrencyType { + public final class GWE: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GWE public static var sharedInstance = GWE(code: "GWE") } /// Currency GWP - public final class GWP: Currency.Base, _CurrencyType { + public final class GWP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GWP public static var sharedInstance = GWP(code: "GWP") } /// Currency GYD - public final class GYD: Currency.Base, _CurrencyType { + public final class GYD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.GYD public static var sharedInstance = GYD(code: "GYD") } /// Currency HKD - public final class HKD: Currency.Base, _CurrencyType { + public final class HKD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.HKD public static var sharedInstance = HKD(code: "HKD") } /// Currency HNL - public final class HNL: Currency.Base, _CurrencyType { + public final class HNL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.HNL public static var sharedInstance = HNL(code: "HNL") } /// Currency HRD - public final class HRD: Currency.Base, _CurrencyType { + public final class HRD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.HRD public static var sharedInstance = HRD(code: "HRD") } /// Currency HRK - public final class HRK: Currency.Base, _CurrencyType { + public final class HRK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.HRK public static var sharedInstance = HRK(code: "HRK") } /// Currency HTG - public final class HTG: Currency.Base, _CurrencyType { + public final class HTG: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.HTG public static var sharedInstance = HTG(code: "HTG") } /// Currency HUF - public final class HUF: Currency.Base, _CurrencyType { + public final class HUF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.HUF public static var sharedInstance = HUF(code: "HUF") } /// Currency IDR - public final class IDR: Currency.Base, _CurrencyType { + public final class IDR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.IDR public static var sharedInstance = IDR(code: "IDR") } /// Currency IEP - public final class IEP: Currency.Base, _CurrencyType { + public final class IEP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.IEP public static var sharedInstance = IEP(code: "IEP") } /// Currency ILP - public final class ILP: Currency.Base, _CurrencyType { + public final class ILP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ILP public static var sharedInstance = ILP(code: "ILP") } /// Currency ILR - public final class ILR: Currency.Base, _CurrencyType { + public final class ILR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ILR public static var sharedInstance = ILR(code: "ILR") } /// Currency ILS - public final class ILS: Currency.Base, _CurrencyType { + public final class ILS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ILS public static var sharedInstance = ILS(code: "ILS") } /// Currency INR - public final class INR: Currency.Base, _CurrencyType { + public final class INR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.INR public static var sharedInstance = INR(code: "INR") } /// Currency IQD - public final class IQD: Currency.Base, _CurrencyType { + public final class IQD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.IQD public static var sharedInstance = IQD(code: "IQD") } /// Currency IRR - public final class IRR: Currency.Base, _CurrencyType { + public final class IRR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.IRR public static var sharedInstance = IRR(code: "IRR") } /// Currency ISJ - public final class ISJ: Currency.Base, _CurrencyType { + public final class ISJ: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ISJ public static var sharedInstance = ISJ(code: "ISJ") } /// Currency ISK - public final class ISK: Currency.Base, _CurrencyType { + public final class ISK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ISK public static var sharedInstance = ISK(code: "ISK") } /// Currency ITL - public final class ITL: Currency.Base, _CurrencyType { + public final class ITL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ITL public static var sharedInstance = ITL(code: "ITL") } /// Currency JMD - public final class JMD: Currency.Base, _CurrencyType { + public final class JMD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.JMD public static var sharedInstance = JMD(code: "JMD") } /// Currency JOD - public final class JOD: Currency.Base, _CurrencyType { + public final class JOD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.JOD public static var sharedInstance = JOD(code: "JOD") } /// Currency JPY - public final class JPY: Currency.Base, _CurrencyType { + public final class JPY: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.JPY public static var sharedInstance = JPY(code: "JPY") } /// Currency KES - public final class KES: Currency.Base, _CurrencyType { + public final class KES: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.KES public static var sharedInstance = KES(code: "KES") } /// Currency KGS - public final class KGS: Currency.Base, _CurrencyType { + public final class KGS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.KGS public static var sharedInstance = KGS(code: "KGS") } /// Currency KHR - public final class KHR: Currency.Base, _CurrencyType { + public final class KHR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.KHR public static var sharedInstance = KHR(code: "KHR") } /// Currency KMF - public final class KMF: Currency.Base, _CurrencyType { + public final class KMF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.KMF public static var sharedInstance = KMF(code: "KMF") } /// Currency KPW - public final class KPW: Currency.Base, _CurrencyType { + public final class KPW: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.KPW public static var sharedInstance = KPW(code: "KPW") } /// Currency KRH - public final class KRH: Currency.Base, _CurrencyType { + public final class KRH: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.KRH public static var sharedInstance = KRH(code: "KRH") } /// Currency KRO - public final class KRO: Currency.Base, _CurrencyType { + public final class KRO: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.KRO public static var sharedInstance = KRO(code: "KRO") } /// Currency KRW - public final class KRW: Currency.Base, _CurrencyType { + public final class KRW: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.KRW public static var sharedInstance = KRW(code: "KRW") } /// Currency KWD - public final class KWD: Currency.Base, _CurrencyType { + public final class KWD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.KWD public static var sharedInstance = KWD(code: "KWD") } /// Currency KYD - public final class KYD: Currency.Base, _CurrencyType { + public final class KYD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.KYD public static var sharedInstance = KYD(code: "KYD") } /// Currency KZT - public final class KZT: Currency.Base, _CurrencyType { + public final class KZT: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.KZT public static var sharedInstance = KZT(code: "KZT") } /// Currency LAK - public final class LAK: Currency.Base, _CurrencyType { + public final class LAK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LAK public static var sharedInstance = LAK(code: "LAK") } /// Currency LBP - public final class LBP: Currency.Base, _CurrencyType { + public final class LBP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LBP public static var sharedInstance = LBP(code: "LBP") } /// Currency LKR - public final class LKR: Currency.Base, _CurrencyType { + public final class LKR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LKR public static var sharedInstance = LKR(code: "LKR") } /// Currency LRD - public final class LRD: Currency.Base, _CurrencyType { + public final class LRD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LRD public static var sharedInstance = LRD(code: "LRD") } /// Currency LSL - public final class LSL: Currency.Base, _CurrencyType { + public final class LSL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LSL public static var sharedInstance = LSL(code: "LSL") } /// Currency LSM - public final class LSM: Currency.Base, _CurrencyType { + public final class LSM: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LSM public static var sharedInstance = LSM(code: "LSM") } /// Currency LTL - public final class LTL: Currency.Base, _CurrencyType { + public final class LTL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LTL public static var sharedInstance = LTL(code: "LTL") } /// Currency LTT - public final class LTT: Currency.Base, _CurrencyType { + public final class LTT: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LTT public static var sharedInstance = LTT(code: "LTT") } /// Currency LUC - public final class LUC: Currency.Base, _CurrencyType { + public final class LUC: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LUC public static var sharedInstance = LUC(code: "LUC") } /// Currency LUF - public final class LUF: Currency.Base, _CurrencyType { + public final class LUF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LUF public static var sharedInstance = LUF(code: "LUF") } /// Currency LUL - public final class LUL: Currency.Base, _CurrencyType { + public final class LUL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LUL public static var sharedInstance = LUL(code: "LUL") } /// Currency LVL - public final class LVL: Currency.Base, _CurrencyType { + public final class LVL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LVL public static var sharedInstance = LVL(code: "LVL") } /// Currency LVR - public final class LVR: Currency.Base, _CurrencyType { + public final class LVR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LVR public static var sharedInstance = LVR(code: "LVR") } /// Currency LYD - public final class LYD: Currency.Base, _CurrencyType { + public final class LYD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.LYD public static var sharedInstance = LYD(code: "LYD") } /// Currency MAD - public final class MAD: Currency.Base, _CurrencyType { + public final class MAD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MAD public static var sharedInstance = MAD(code: "MAD") } /// Currency MAF - public final class MAF: Currency.Base, _CurrencyType { + public final class MAF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MAF public static var sharedInstance = MAF(code: "MAF") } /// Currency MCF - public final class MCF: Currency.Base, _CurrencyType { + public final class MCF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MCF public static var sharedInstance = MCF(code: "MCF") } /// Currency MDC - public final class MDC: Currency.Base, _CurrencyType { + public final class MDC: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MDC public static var sharedInstance = MDC(code: "MDC") } /// Currency MDL - public final class MDL: Currency.Base, _CurrencyType { + public final class MDL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MDL public static var sharedInstance = MDL(code: "MDL") } /// Currency MGA - public final class MGA: Currency.Base, _CurrencyType { + public final class MGA: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MGA public static var sharedInstance = MGA(code: "MGA") } /// Currency MGF - public final class MGF: Currency.Base, _CurrencyType { + public final class MGF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MGF public static var sharedInstance = MGF(code: "MGF") } /// Currency MKD - public final class MKD: Currency.Base, _CurrencyType { + public final class MKD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MKD public static var sharedInstance = MKD(code: "MKD") } /// Currency MKN - public final class MKN: Currency.Base, _CurrencyType { + public final class MKN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MKN public static var sharedInstance = MKN(code: "MKN") } /// Currency MLF - public final class MLF: Currency.Base, _CurrencyType { + public final class MLF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MLF public static var sharedInstance = MLF(code: "MLF") } /// Currency MMK - public final class MMK: Currency.Base, _CurrencyType { + public final class MMK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MMK public static var sharedInstance = MMK(code: "MMK") } /// Currency MNT - public final class MNT: Currency.Base, _CurrencyType { + public final class MNT: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MNT public static var sharedInstance = MNT(code: "MNT") } /// Currency MOP - public final class MOP: Currency.Base, _CurrencyType { + public final class MOP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MOP public static var sharedInstance = MOP(code: "MOP") } /// Currency MRO - public final class MRO: Currency.Base, _CurrencyType { + public final class MRO: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MRO public static var sharedInstance = MRO(code: "MRO") } /// Currency MTL - public final class MTL: Currency.Base, _CurrencyType { + public final class MTL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MTL public static var sharedInstance = MTL(code: "MTL") } /// Currency MTP - public final class MTP: Currency.Base, _CurrencyType { + public final class MTP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MTP public static var sharedInstance = MTP(code: "MTP") } /// Currency MUR - public final class MUR: Currency.Base, _CurrencyType { + public final class MUR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MUR public static var sharedInstance = MUR(code: "MUR") } /// Currency MVP - public final class MVP: Currency.Base, _CurrencyType { + public final class MVP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MVP public static var sharedInstance = MVP(code: "MVP") } /// Currency MVR - public final class MVR: Currency.Base, _CurrencyType { + public final class MVR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MVR public static var sharedInstance = MVR(code: "MVR") } /// Currency MWK - public final class MWK: Currency.Base, _CurrencyType { + public final class MWK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MWK public static var sharedInstance = MWK(code: "MWK") } /// Currency MXN - public final class MXN: Currency.Base, _CurrencyType { + public final class MXN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MXN public static var sharedInstance = MXN(code: "MXN") } /// Currency MXP - public final class MXP: Currency.Base, _CurrencyType { + public final class MXP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MXP public static var sharedInstance = MXP(code: "MXP") } /// Currency MXV - public final class MXV: Currency.Base, _CurrencyType { + public final class MXV: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MXV public static var sharedInstance = MXV(code: "MXV") } /// Currency MYR - public final class MYR: Currency.Base, _CurrencyType { + public final class MYR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MYR public static var sharedInstance = MYR(code: "MYR") } /// Currency MZE - public final class MZE: Currency.Base, _CurrencyType { + public final class MZE: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MZE public static var sharedInstance = MZE(code: "MZE") } /// Currency MZM - public final class MZM: Currency.Base, _CurrencyType { + public final class MZM: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MZM public static var sharedInstance = MZM(code: "MZM") } /// Currency MZN - public final class MZN: Currency.Base, _CurrencyType { + public final class MZN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.MZN public static var sharedInstance = MZN(code: "MZN") } /// Currency NAD - public final class NAD: Currency.Base, _CurrencyType { + public final class NAD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.NAD public static var sharedInstance = NAD(code: "NAD") } /// Currency NGN - public final class NGN: Currency.Base, _CurrencyType { + public final class NGN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.NGN public static var sharedInstance = NGN(code: "NGN") } /// Currency NIC - public final class NIC: Currency.Base, _CurrencyType { + public final class NIC: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.NIC public static var sharedInstance = NIC(code: "NIC") } /// Currency NIO - public final class NIO: Currency.Base, _CurrencyType { + public final class NIO: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.NIO public static var sharedInstance = NIO(code: "NIO") } /// Currency NLG - public final class NLG: Currency.Base, _CurrencyType { + public final class NLG: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.NLG public static var sharedInstance = NLG(code: "NLG") } /// Currency NOK - public final class NOK: Currency.Base, _CurrencyType { + public final class NOK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.NOK public static var sharedInstance = NOK(code: "NOK") } /// Currency NPR - public final class NPR: Currency.Base, _CurrencyType { + public final class NPR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.NPR public static var sharedInstance = NPR(code: "NPR") } /// Currency NZD - public final class NZD: Currency.Base, _CurrencyType { + public final class NZD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.NZD public static var sharedInstance = NZD(code: "NZD") } /// Currency OMR - public final class OMR: Currency.Base, _CurrencyType { + public final class OMR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.OMR public static var sharedInstance = OMR(code: "OMR") } /// Currency PAB - public final class PAB: Currency.Base, _CurrencyType { + public final class PAB: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.PAB public static var sharedInstance = PAB(code: "PAB") } /// Currency PEI - public final class PEI: Currency.Base, _CurrencyType { + public final class PEI: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.PEI public static var sharedInstance = PEI(code: "PEI") } /// Currency PEN - public final class PEN: Currency.Base, _CurrencyType { + public final class PEN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.PEN public static var sharedInstance = PEN(code: "PEN") } /// Currency PES - public final class PES: Currency.Base, _CurrencyType { + public final class PES: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.PES public static var sharedInstance = PES(code: "PES") } /// Currency PGK - public final class PGK: Currency.Base, _CurrencyType { + public final class PGK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.PGK public static var sharedInstance = PGK(code: "PGK") } /// Currency PHP - public final class PHP: Currency.Base, _CurrencyType { + public final class PHP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.PHP public static var sharedInstance = PHP(code: "PHP") } /// Currency PKR - public final class PKR: Currency.Base, _CurrencyType { + public final class PKR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.PKR public static var sharedInstance = PKR(code: "PKR") } /// Currency PLN - public final class PLN: Currency.Base, _CurrencyType { + public final class PLN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.PLN public static var sharedInstance = PLN(code: "PLN") } /// Currency PLZ - public final class PLZ: Currency.Base, _CurrencyType { + public final class PLZ: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.PLZ public static var sharedInstance = PLZ(code: "PLZ") } /// Currency PTE - public final class PTE: Currency.Base, _CurrencyType { + public final class PTE: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.PTE public static var sharedInstance = PTE(code: "PTE") } /// Currency PYG - public final class PYG: Currency.Base, _CurrencyType { + public final class PYG: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.PYG public static var sharedInstance = PYG(code: "PYG") } /// Currency QAR - public final class QAR: Currency.Base, _CurrencyType { + public final class QAR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.QAR public static var sharedInstance = QAR(code: "QAR") } /// Currency RHD - public final class RHD: Currency.Base, _CurrencyType { + public final class RHD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.RHD public static var sharedInstance = RHD(code: "RHD") } /// Currency ROL - public final class ROL: Currency.Base, _CurrencyType { + public final class ROL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ROL public static var sharedInstance = ROL(code: "ROL") } /// Currency RON - public final class RON: Currency.Base, _CurrencyType { + public final class RON: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.RON public static var sharedInstance = RON(code: "RON") } /// Currency RSD - public final class RSD: Currency.Base, _CurrencyType { + public final class RSD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.RSD public static var sharedInstance = RSD(code: "RSD") } /// Currency RUB - public final class RUB: Currency.Base, _CurrencyType { + public final class RUB: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.RUB public static var sharedInstance = RUB(code: "RUB") } /// Currency RUR - public final class RUR: Currency.Base, _CurrencyType { + public final class RUR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.RUR public static var sharedInstance = RUR(code: "RUR") } /// Currency RWF - public final class RWF: Currency.Base, _CurrencyType { + public final class RWF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.RWF public static var sharedInstance = RWF(code: "RWF") } /// Currency SAR - public final class SAR: Currency.Base, _CurrencyType { + public final class SAR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SAR public static var sharedInstance = SAR(code: "SAR") } /// Currency SBD - public final class SBD: Currency.Base, _CurrencyType { + public final class SBD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SBD public static var sharedInstance = SBD(code: "SBD") } /// Currency SCR - public final class SCR: Currency.Base, _CurrencyType { + public final class SCR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SCR public static var sharedInstance = SCR(code: "SCR") } /// Currency SDD - public final class SDD: Currency.Base, _CurrencyType { + public final class SDD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SDD public static var sharedInstance = SDD(code: "SDD") } /// Currency SDG - public final class SDG: Currency.Base, _CurrencyType { + public final class SDG: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SDG public static var sharedInstance = SDG(code: "SDG") } /// Currency SDP - public final class SDP: Currency.Base, _CurrencyType { + public final class SDP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SDP public static var sharedInstance = SDP(code: "SDP") } /// Currency SEK - public final class SEK: Currency.Base, _CurrencyType { + public final class SEK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SEK public static var sharedInstance = SEK(code: "SEK") } /// Currency SGD - public final class SGD: Currency.Base, _CurrencyType { + public final class SGD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SGD public static var sharedInstance = SGD(code: "SGD") } /// Currency SHP - public final class SHP: Currency.Base, _CurrencyType { + public final class SHP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SHP public static var sharedInstance = SHP(code: "SHP") } /// Currency SIT - public final class SIT: Currency.Base, _CurrencyType { + public final class SIT: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SIT public static var sharedInstance = SIT(code: "SIT") } /// Currency SKK - public final class SKK: Currency.Base, _CurrencyType { + public final class SKK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SKK public static var sharedInstance = SKK(code: "SKK") } /// Currency SLL - public final class SLL: Currency.Base, _CurrencyType { + public final class SLL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SLL public static var sharedInstance = SLL(code: "SLL") } /// Currency SOS - public final class SOS: Currency.Base, _CurrencyType { + public final class SOS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SOS public static var sharedInstance = SOS(code: "SOS") } /// Currency SRD - public final class SRD: Currency.Base, _CurrencyType { + public final class SRD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SRD public static var sharedInstance = SRD(code: "SRD") } /// Currency SRG - public final class SRG: Currency.Base, _CurrencyType { + public final class SRG: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SRG public static var sharedInstance = SRG(code: "SRG") } /// Currency SSP - public final class SSP: Currency.Base, _CurrencyType { + public final class SSP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SSP public static var sharedInstance = SSP(code: "SSP") } /// Currency STD - public final class STD: Currency.Base, _CurrencyType { + public final class STD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.STD public static var sharedInstance = STD(code: "STD") } /// Currency SUR - public final class SUR: Currency.Base, _CurrencyType { + public final class SUR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SUR public static var sharedInstance = SUR(code: "SUR") } /// Currency SVC - public final class SVC: Currency.Base, _CurrencyType { + public final class SVC: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SVC public static var sharedInstance = SVC(code: "SVC") } /// Currency SYP - public final class SYP: Currency.Base, _CurrencyType { + public final class SYP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SYP public static var sharedInstance = SYP(code: "SYP") } /// Currency SZL - public final class SZL: Currency.Base, _CurrencyType { + public final class SZL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.SZL public static var sharedInstance = SZL(code: "SZL") } /// Currency THB - public final class THB: Currency.Base, _CurrencyType { + public final class THB: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.THB public static var sharedInstance = THB(code: "THB") } /// Currency TJR - public final class TJR: Currency.Base, _CurrencyType { + public final class TJR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.TJR public static var sharedInstance = TJR(code: "TJR") } /// Currency TJS - public final class TJS: Currency.Base, _CurrencyType { + public final class TJS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.TJS public static var sharedInstance = TJS(code: "TJS") } /// Currency TMM - public final class TMM: Currency.Base, _CurrencyType { + public final class TMM: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.TMM public static var sharedInstance = TMM(code: "TMM") } /// Currency TMT - public final class TMT: Currency.Base, _CurrencyType { + public final class TMT: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.TMT public static var sharedInstance = TMT(code: "TMT") } /// Currency TND - public final class TND: Currency.Base, _CurrencyType { + public final class TND: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.TND public static var sharedInstance = TND(code: "TND") } /// Currency TOP - public final class TOP: Currency.Base, _CurrencyType { + public final class TOP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.TOP public static var sharedInstance = TOP(code: "TOP") } /// Currency TPE - public final class TPE: Currency.Base, _CurrencyType { + public final class TPE: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.TPE public static var sharedInstance = TPE(code: "TPE") } /// Currency TRL - public final class TRL: Currency.Base, _CurrencyType { + public final class TRL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.TRL public static var sharedInstance = TRL(code: "TRL") } /// Currency TRY - public final class TRY: Currency.Base, _CurrencyType { + public final class TRY: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.TRY public static var sharedInstance = TRY(code: "TRY") } /// Currency TTD - public final class TTD: Currency.Base, _CurrencyType { + public final class TTD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.TTD public static var sharedInstance = TTD(code: "TTD") } /// Currency TWD - public final class TWD: Currency.Base, _CurrencyType { + public final class TWD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.TWD public static var sharedInstance = TWD(code: "TWD") } /// Currency TZS - public final class TZS: Currency.Base, _CurrencyType { + public final class TZS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.TZS public static var sharedInstance = TZS(code: "TZS") } /// Currency UAH - public final class UAH: Currency.Base, _CurrencyType { + public final class UAH: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.UAH public static var sharedInstance = UAH(code: "UAH") } /// Currency UAK - public final class UAK: Currency.Base, _CurrencyType { + public final class UAK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.UAK public static var sharedInstance = UAK(code: "UAK") } /// Currency UGS - public final class UGS: Currency.Base, _CurrencyType { + public final class UGS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.UGS public static var sharedInstance = UGS(code: "UGS") } /// Currency UGX - public final class UGX: Currency.Base, _CurrencyType { + public final class UGX: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.UGX public static var sharedInstance = UGX(code: "UGX") } /// Currency USD - public final class USD: Currency.Base, _CurrencyType { + public final class USD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.USD public static var sharedInstance = USD(code: "USD") } /// Currency USN - public final class USN: Currency.Base, _CurrencyType { + public final class USN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.USN public static var sharedInstance = USN(code: "USN") } /// Currency USS - public final class USS: Currency.Base, _CurrencyType { + public final class USS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.USS public static var sharedInstance = USS(code: "USS") } /// Currency UYI - public final class UYI: Currency.Base, _CurrencyType { + public final class UYI: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.UYI public static var sharedInstance = UYI(code: "UYI") } /// Currency UYP - public final class UYP: Currency.Base, _CurrencyType { + public final class UYP: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.UYP public static var sharedInstance = UYP(code: "UYP") } /// Currency UYU - public final class UYU: Currency.Base, _CurrencyType { + public final class UYU: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.UYU public static var sharedInstance = UYU(code: "UYU") } /// Currency UZS - public final class UZS: Currency.Base, _CurrencyType { + public final class UZS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.UZS public static var sharedInstance = UZS(code: "UZS") } /// Currency VEB - public final class VEB: Currency.Base, _CurrencyType { + public final class VEB: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.VEB public static var sharedInstance = VEB(code: "VEB") } /// Currency VEF - public final class VEF: Currency.Base, _CurrencyType { + public final class VEF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.VEF public static var sharedInstance = VEF(code: "VEF") } /// Currency VND - public final class VND: Currency.Base, _CurrencyType { + public final class VND: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.VND public static var sharedInstance = VND(code: "VND") } /// Currency VNN - public final class VNN: Currency.Base, _CurrencyType { + public final class VNN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.VNN public static var sharedInstance = VNN(code: "VNN") } /// Currency VUV - public final class VUV: Currency.Base, _CurrencyType { + public final class VUV: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.VUV public static var sharedInstance = VUV(code: "VUV") } /// Currency WST - public final class WST: Currency.Base, _CurrencyType { + public final class WST: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.WST public static var sharedInstance = WST(code: "WST") } /// Currency XAF - public final class XAF: Currency.Base, _CurrencyType { + public final class XAF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XAF public static var sharedInstance = XAF(code: "XAF") } /// Currency XAG - public final class XAG: Currency.Base, _CurrencyType { + public final class XAG: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XAG public static var sharedInstance = XAG(code: "XAG") } /// Currency XAU - public final class XAU: Currency.Base, _CurrencyType { + public final class XAU: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XAU public static var sharedInstance = XAU(code: "XAU") } /// Currency XBA - public final class XBA: Currency.Base, _CurrencyType { + public final class XBA: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XBA public static var sharedInstance = XBA(code: "XBA") } /// Currency XBB - public final class XBB: Currency.Base, _CurrencyType { + public final class XBB: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XBB public static var sharedInstance = XBB(code: "XBB") } /// Currency XBC - public final class XBC: Currency.Base, _CurrencyType { + public final class XBC: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XBC public static var sharedInstance = XBC(code: "XBC") } /// Currency XBD - public final class XBD: Currency.Base, _CurrencyType { + public final class XBD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XBD public static var sharedInstance = XBD(code: "XBD") } /// Currency XCD - public final class XCD: Currency.Base, _CurrencyType { + public final class XCD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XCD public static var sharedInstance = XCD(code: "XCD") } /// Currency XDR - public final class XDR: Currency.Base, _CurrencyType { + public final class XDR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XDR public static var sharedInstance = XDR(code: "XDR") } /// Currency XEU - public final class XEU: Currency.Base, _CurrencyType { + public final class XEU: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XEU public static var sharedInstance = XEU(code: "XEU") } /// Currency XFO - public final class XFO: Currency.Base, _CurrencyType { + public final class XFO: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XFO public static var sharedInstance = XFO(code: "XFO") } /// Currency XFU - public final class XFU: Currency.Base, _CurrencyType { + public final class XFU: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XFU public static var sharedInstance = XFU(code: "XFU") } /// Currency XOF - public final class XOF: Currency.Base, _CurrencyType { + public final class XOF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XOF public static var sharedInstance = XOF(code: "XOF") } /// Currency XPD - public final class XPD: Currency.Base, _CurrencyType { + public final class XPD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XPD public static var sharedInstance = XPD(code: "XPD") } /// Currency XPF - public final class XPF: Currency.Base, _CurrencyType { + public final class XPF: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XPF public static var sharedInstance = XPF(code: "XPF") } /// Currency XPT - public final class XPT: Currency.Base, _CurrencyType { + public final class XPT: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XPT public static var sharedInstance = XPT(code: "XPT") } /// Currency XRE - public final class XRE: Currency.Base, _CurrencyType { + public final class XRE: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XRE public static var sharedInstance = XRE(code: "XRE") } /// Currency XSU - public final class XSU: Currency.Base, _CurrencyType { + public final class XSU: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XSU public static var sharedInstance = XSU(code: "XSU") } /// Currency XTS - public final class XTS: Currency.Base, _CurrencyType { + public final class XTS: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XTS public static var sharedInstance = XTS(code: "XTS") } /// Currency XUA - public final class XUA: Currency.Base, _CurrencyType { + public final class XUA: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XUA public static var sharedInstance = XUA(code: "XUA") } /// Currency XXX - public final class XXX: Currency.Base, _CurrencyType { + public final class XXX: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.XXX public static var sharedInstance = XXX(code: "XXX") } /// Currency YDD - public final class YDD: Currency.Base, _CurrencyType { + public final class YDD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.YDD public static var sharedInstance = YDD(code: "YDD") } /// Currency YER - public final class YER: Currency.Base, _CurrencyType { + public final class YER: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.YER public static var sharedInstance = YER(code: "YER") } /// Currency YUD - public final class YUD: Currency.Base, _CurrencyType { + public final class YUD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.YUD public static var sharedInstance = YUD(code: "YUD") } /// Currency YUM - public final class YUM: Currency.Base, _CurrencyType { + public final class YUM: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.YUM public static var sharedInstance = YUM(code: "YUM") } /// Currency YUN - public final class YUN: Currency.Base, _CurrencyType { + public final class YUN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.YUN public static var sharedInstance = YUN(code: "YUN") } /// Currency YUR - public final class YUR: Currency.Base, _CurrencyType { + public final class YUR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.YUR public static var sharedInstance = YUR(code: "YUR") } /// Currency ZAL - public final class ZAL: Currency.Base, _CurrencyType { + public final class ZAL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ZAL public static var sharedInstance = ZAL(code: "ZAL") } /// Currency ZAR - public final class ZAR: Currency.Base, _CurrencyType { + public final class ZAR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ZAR public static var sharedInstance = ZAR(code: "ZAR") } /// Currency ZMK - public final class ZMK: Currency.Base, _CurrencyType { + public final class ZMK: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ZMK public static var sharedInstance = ZMK(code: "ZMK") } /// Currency ZMW - public final class ZMW: Currency.Base, _CurrencyType { + public final class ZMW: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ZMW public static var sharedInstance = ZMW(code: "ZMW") } /// Currency ZRN - public final class ZRN: Currency.Base, _CurrencyType { + public final class ZRN: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ZRN public static var sharedInstance = ZRN(code: "ZRN") } /// Currency ZRZ - public final class ZRZ: Currency.Base, _CurrencyType { + public final class ZRZ: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ZRZ public static var sharedInstance = ZRZ(code: "ZRZ") } /// Currency ZWL - public final class ZWL: Currency.Base, _CurrencyType { + public final class ZWL: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ZWL public static var sharedInstance = ZWL(code: "ZWL") } /// Currency ZWR - public final class ZWR: Currency.Base, _CurrencyType { + public final class ZWR: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ZWR public static var sharedInstance = ZWR(code: "ZWR") } /// Currency ZWD - public final class ZWD: Currency.Base, _CurrencyType { + public final class ZWD: Currency.Base, ISOCurrencyType { + /// - returns: lazy shared instance for Currency.ZWD public static var sharedInstance = ZWD(code: "ZWD") } } @@ -2123,3 +2422,3408 @@ public typealias ZWL = _Money public typealias ZWR = _Money /// ZWD Money public typealias ZWD = _Money + + +// MARK: - Country Types + +/** + An enum of countries which speak Afrikaans. +*/ +public enum AfrikaansSpeakingCountry: CountryType { + + /// Namibia is a country which speaks Afrikaans. + case Namibia + /// South Africa is a country which speaks Afrikaans. + case SouthAfrica + + /// - returns: an Array of all the countries which speak Afrikaans + public static let all: [AfrikaansSpeakingCountry] = [ .Namibia, .SouthAfrica ] + + /// - returns: the country identifier of a specific Afrikaans speaking country. + public var countryIdentifier: String { + switch self { + case .Namibia: + return "NA" + case .SouthAfrica: + return "ZA" + } + } +} + +/** + An enum of countries which speak Albanian. +*/ +public enum AlbanianSpeakingCountry: CountryType { + + /// Albania is a country which speaks Albanian. + case Albania + /// Macedonia is a country which speaks Albanian. + case Macedonia + /// Kosovo is a country which speaks Albanian. + case Kosovo + + /// - returns: an Array of all the countries which speak Albanian + public static let all: [AlbanianSpeakingCountry] = [ .Albania, .Macedonia, .Kosovo ] + + /// - returns: the country identifier of a specific Albanian speaking country. + public var countryIdentifier: String { + switch self { + case .Albania: + return "AL" + case .Macedonia: + return "MK" + case .Kosovo: + return "XK" + } + } +} + +/** + An enum of countries which speak Arabic. +*/ +public enum ArabicSpeakingCountry: CountryType { + + /// World is a country which speaks Arabic. + case World + /// United Arab Emirates is a country which speaks Arabic. + case UnitedArabEmirates + /// Bahrain is a country which speaks Arabic. + case Bahrain + /// Djibouti is a country which speaks Arabic. + case Djibouti + /// Algeria is a country which speaks Arabic. + case Algeria + /// Egypt is a country which speaks Arabic. + case Egypt + /// Western Sahara is a country which speaks Arabic. + case WesternSahara + /// Eritrea is a country which speaks Arabic. + case Eritrea + /// Israel is a country which speaks Arabic. + case Israel + /// Iraq is a country which speaks Arabic. + case Iraq + /// Jordan is a country which speaks Arabic. + case Jordan + /// Comoros is a country which speaks Arabic. + case Comoros + /// Kuwait is a country which speaks Arabic. + case Kuwait + /// Lebanon is a country which speaks Arabic. + case Lebanon + /// Libya is a country which speaks Arabic. + case Libya + /// Morocco is a country which speaks Arabic. + case Morocco + /// Mauritania is a country which speaks Arabic. + case Mauritania + /// Oman is a country which speaks Arabic. + case Oman + /// Palestinian Territories is a country which speaks Arabic. + case PalestinianTerritories + /// Qatar is a country which speaks Arabic. + case Qatar + /// Saudi Arabia is a country which speaks Arabic. + case SaudiArabia + /// Sudan is a country which speaks Arabic. + case Sudan + /// Somalia is a country which speaks Arabic. + case Somalia + /// South Sudan is a country which speaks Arabic. + case SouthSudan + /// Syria is a country which speaks Arabic. + case Syria + /// Chad is a country which speaks Arabic. + case Chad + /// Tunisia is a country which speaks Arabic. + case Tunisia + /// Yemen is a country which speaks Arabic. + case Yemen + + /// - returns: an Array of all the countries which speak Arabic + 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 ] + + /// - returns: the country identifier of a specific Arabic speaking country. + 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" + } + } +} + +/** + An enum of countries which speak Bengali. +*/ +public enum BengaliSpeakingCountry: CountryType { + + /// Bangladesh is a country which speaks Bengali. + case Bangladesh + /// India is a country which speaks Bengali. + case India + + /// - returns: an Array of all the countries which speak Bengali + public static let all: [BengaliSpeakingCountry] = [ .Bangladesh, .India ] + + /// - returns: the country identifier of a specific Bengali speaking country. + public var countryIdentifier: String { + switch self { + case .Bangladesh: + return "BD" + case .India: + return "IN" + } + } +} + +/** + An enum of countries which speak Catalan. +*/ +public enum CatalanSpeakingCountry: CountryType { + + /// Andorra is a country which speaks Catalan. + case Andorra + /// Spain is a country which speaks Catalan. + case Spain + /// France is a country which speaks Catalan. + case France + /// Italy is a country which speaks Catalan. + case Italy + + /// - returns: an Array of all the countries which speak Catalan + public static let all: [CatalanSpeakingCountry] = [ .Andorra, .Spain, .France, .Italy ] + + /// - returns: the country identifier of a specific Catalan speaking country. + public var countryIdentifier: String { + switch self { + case .Andorra: + return "AD" + case .Spain: + return "ES" + case .France: + return "FR" + case .Italy: + return "IT" + } + } +} + +/** + An enum of countries which speak Central Kurdish. +*/ +public enum CentralKurdishSpeakingCountry: CountryType { + + /// Iraq is a country which speaks Central Kurdish. + case Iraq + /// Iran is a country which speaks Central Kurdish. + case Iran + + /// - returns: an Array of all the countries which speak Central Kurdish + public static let all: [CentralKurdishSpeakingCountry] = [ .Iraq, .Iran ] + + /// - returns: the country identifier of a specific Central Kurdish speaking country. + public var countryIdentifier: String { + switch self { + case .Iraq: + return "IQ" + case .Iran: + return "IR" + } + } +} + +/** + An enum of countries which speak Chinese. +*/ +public enum ChineseSpeakingCountry: CountryType { + + /// China is a country which speaks Chinese. + case China + /// Hong Kong SAR China is a country which speaks Chinese. + case HongKongSarChina + /// Macau SAR China is a country which speaks Chinese. + case MacauSarChina + /// Singapore is a country which speaks Chinese. + case Singapore + /// Taiwan is a country which speaks Chinese. + case Taiwan + + /// - returns: an Array of all the countries which speak Chinese + public static let all: [ChineseSpeakingCountry] = [ .China, .HongKongSarChina, .MacauSarChina, .Singapore, .Taiwan ] + + /// - returns: the country identifier of a specific Chinese speaking country. + 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" + } + } +} + +/** + An enum of countries which speak Croatian. +*/ +public enum CroatianSpeakingCountry: CountryType { + + /// Bosnia & Herzegovina is a country which speaks Croatian. + case BosniaHerzegovina + /// Croatia is a country which speaks Croatian. + case Croatia + + /// - returns: an Array of all the countries which speak Croatian + public static let all: [CroatianSpeakingCountry] = [ .BosniaHerzegovina, .Croatia ] + + /// - returns: the country identifier of a specific Croatian speaking country. + public var countryIdentifier: String { + switch self { + case .BosniaHerzegovina: + return "BA" + case .Croatia: + return "HR" + } + } +} + +/** + An enum of countries which speak Danish. +*/ +public enum DanishSpeakingCountry: CountryType { + + /// Denmark is a country which speaks Danish. + case Denmark + /// Greenland is a country which speaks Danish. + case Greenland + + /// - returns: an Array of all the countries which speak Danish + public static let all: [DanishSpeakingCountry] = [ .Denmark, .Greenland ] + + /// - returns: the country identifier of a specific Danish speaking country. + public var countryIdentifier: String { + switch self { + case .Denmark: + return "DK" + case .Greenland: + return "GL" + } + } +} + +/** + An enum of countries which speak Dutch. +*/ +public enum DutchSpeakingCountry: CountryType { + + /// Aruba is a country which speaks Dutch. + case Aruba + /// Belgium is a country which speaks Dutch. + case Belgium + /// Caribbean Netherlands is a country which speaks Dutch. + case CaribbeanNetherlands + /// Curaçao is a country which speaks Dutch. + case Curaçao + /// Netherlands is a country which speaks Dutch. + case Netherlands + /// Suriname is a country which speaks Dutch. + case Suriname + /// Sint Maarten is a country which speaks Dutch. + case SintMaarten + + /// - returns: an Array of all the countries which speak Dutch + public static let all: [DutchSpeakingCountry] = [ .Aruba, .Belgium, .CaribbeanNetherlands, .Curaçao, .Netherlands, .Suriname, .SintMaarten ] + + /// - returns: the country identifier of a specific Dutch speaking country. + 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" + } + } +} + +/** + An enum of countries which speak English. +*/ +public enum EnglishSpeakingCountry: CountryType { + + /// World is a country which speaks English. + case World + /// Europe is a country which speaks English. + case Europe + /// Andorra is a country which speaks English. + case Andorra + /// Antigua & Barbuda is a country which speaks English. + case AntiguaBarbuda + /// Anguilla is a country which speaks English. + case Anguilla + /// Albania is a country which speaks English. + case Albania + /// American Samoa is a country which speaks English. + case AmericanSamoa + /// Austria is a country which speaks English. + case Austria + /// Australia is a country which speaks English. + case Australia + /// Bosnia & Herzegovina is a country which speaks English. + case BosniaHerzegovina + /// Barbados is a country which speaks English. + case Barbados + /// Belgium is a country which speaks English. + case Belgium + /// Bermuda is a country which speaks English. + case Bermuda + /// Bahamas is a country which speaks English. + case Bahamas + /// Botswana is a country which speaks English. + case Botswana + /// Belize is a country which speaks English. + case Belize + /// Canada is a country which speaks English. + case Canada + /// Cocos (Keeling) Islands is a country which speaks English. + case CocosKeelingIslands + /// Switzerland is a country which speaks English. + case Switzerland + /// Cook Islands is a country which speaks English. + case CookIslands + /// Cameroon is a country which speaks English. + case Cameroon + /// Christmas Island is a country which speaks English. + case ChristmasIsland + /// Cyprus is a country which speaks English. + case Cyprus + /// Czech Republic is a country which speaks English. + case CzechRepublic + /// Germany is a country which speaks English. + case Germany + /// Diego Garcia is a country which speaks English. + case DiegoGarcia + /// Denmark is a country which speaks English. + case Denmark + /// Dominica is a country which speaks English. + case Dominica + /// Estonia is a country which speaks English. + case Estonia + /// Eritrea is a country which speaks English. + case Eritrea + /// Spain is a country which speaks English. + case Spain + /// Finland is a country which speaks English. + case Finland + /// Fiji is a country which speaks English. + case Fiji + /// Falkland Islands is a country which speaks English. + case FalklandIslands + /// Micronesia is a country which speaks English. + case Micronesia + /// France is a country which speaks English. + case France + /// United Kingdom is a country which speaks English. + case UnitedKingdom + /// Grenada is a country which speaks English. + case Grenada + /// Guernsey is a country which speaks English. + case Guernsey + /// Ghana is a country which speaks English. + case Ghana + /// Gibraltar is a country which speaks English. + case Gibraltar + /// Gambia is a country which speaks English. + case Gambia + /// Greece is a country which speaks English. + case Greece + /// Guam is a country which speaks English. + case Guam + /// Guyana is a country which speaks English. + case Guyana + /// Hong Kong SAR China is a country which speaks English. + case HongKongSarChina + /// Croatia is a country which speaks English. + case Croatia + /// Hungary is a country which speaks English. + case Hungary + /// Ireland is a country which speaks English. + case Ireland + /// Israel is a country which speaks English. + case Israel + /// Isle of Man is a country which speaks English. + case IsleOfMan + /// India is a country which speaks English. + case India + /// British Indian Ocean Territory is a country which speaks English. + case BritishIndianOceanTerritory + /// Iceland is a country which speaks English. + case Iceland + /// Italy is a country which speaks English. + case Italy + /// Jersey is a country which speaks English. + case Jersey + /// Jamaica is a country which speaks English. + case Jamaica + /// Kenya is a country which speaks English. + case Kenya + /// Kiribati is a country which speaks English. + case Kiribati + /// St. Kitts & Nevis is a country which speaks English. + case StKittsNevis + /// Cayman Islands is a country which speaks English. + case CaymanIslands + /// St. Lucia is a country which speaks English. + case StLucia + /// Liberia is a country which speaks English. + case Liberia + /// Lesotho is a country which speaks English. + case Lesotho + /// Lithuania is a country which speaks English. + case Lithuania + /// Luxembourg is a country which speaks English. + case Luxembourg + /// Latvia is a country which speaks English. + case Latvia + /// Montenegro is a country which speaks English. + case Montenegro + /// Madagascar is a country which speaks English. + case Madagascar + /// Marshall Islands is a country which speaks English. + case MarshallIslands + /// Macau SAR China is a country which speaks English. + case MacauSarChina + /// Northern Mariana Islands is a country which speaks English. + case NorthernMarianaIslands + /// Montserrat is a country which speaks English. + case Montserrat + /// Malta is a country which speaks English. + case Malta + /// Mauritius is a country which speaks English. + case Mauritius + /// Malawi is a country which speaks English. + case Malawi + /// Malaysia is a country which speaks English. + case Malaysia + /// Namibia is a country which speaks English. + case Namibia + /// Norfolk Island is a country which speaks English. + case NorfolkIsland + /// Nigeria is a country which speaks English. + case Nigeria + /// Netherlands is a country which speaks English. + case Netherlands + /// Norway is a country which speaks English. + case Norway + /// Nauru is a country which speaks English. + case Nauru + /// Niue is a country which speaks English. + case Niue + /// New Zealand is a country which speaks English. + case NewZealand + /// Papua New Guinea is a country which speaks English. + case PapuaNewGuinea + /// Philippines is a country which speaks English. + case Philippines + /// Pakistan is a country which speaks English. + case Pakistan + /// Poland is a country which speaks English. + case Poland + /// Pitcairn Islands is a country which speaks English. + case PitcairnIslands + /// Puerto Rico is a country which speaks English. + case PuertoRico + /// Portugal is a country which speaks English. + case Portugal + /// Palau is a country which speaks English. + case Palau + /// Romania is a country which speaks English. + case Romania + /// Russia is a country which speaks English. + case Russia + /// Rwanda is a country which speaks English. + case Rwanda + /// Solomon Islands is a country which speaks English. + case SolomonIslands + /// Seychelles is a country which speaks English. + case Seychelles + /// Sudan is a country which speaks English. + case Sudan + /// Sweden is a country which speaks English. + case Sweden + /// Singapore is a country which speaks English. + case Singapore + /// St. Helena is a country which speaks English. + case StHelena + /// Slovenia is a country which speaks English. + case Slovenia + /// Slovakia is a country which speaks English. + case Slovakia + /// Sierra Leone is a country which speaks English. + case SierraLeone + /// South Sudan is a country which speaks English. + case SouthSudan + /// Sint Maarten is a country which speaks English. + case SintMaarten + /// Swaziland is a country which speaks English. + case Swaziland + /// Turks & Caicos Islands is a country which speaks English. + case TurksCaicosIslands + /// Tokelau is a country which speaks English. + case Tokelau + /// Tonga is a country which speaks English. + case Tonga + /// Turkey is a country which speaks English. + case Turkey + /// Trinidad & Tobago is a country which speaks English. + case TrinidadTobago + /// Tuvalu is a country which speaks English. + case Tuvalu + /// Tanzania is a country which speaks English. + case Tanzania + /// Uganda is a country which speaks English. + case Uganda + /// U.S. Outlying Islands is a country which speaks English. + case USOutlyingIslands + /// United States is a country which speaks English. + case UnitedStates + /// St. Vincent & Grenadines is a country which speaks English. + case StVincentGrenadines + /// British Virgin Islands is a country which speaks English. + case BritishVirginIslands + /// U.S. Virgin Islands is a country which speaks English. + case USVirginIslands + /// Vanuatu is a country which speaks English. + case Vanuatu + /// Samoa is a country which speaks English. + case Samoa + /// South Africa is a country which speaks English. + case SouthAfrica + /// Zambia is a country which speaks English. + case Zambia + /// Zimbabwe is a country which speaks English. + case Zimbabwe + + /// - returns: an Array of all the countries which speak English + 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 ] + + /// - returns: the country identifier of a specific English speaking country. + 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" + } + } +} + +/** + An enum of countries which speak Ewe. +*/ +public enum EweSpeakingCountry: CountryType { + + /// Ghana is a country which speaks Ewe. + case Ghana + /// Togo is a country which speaks Ewe. + case Togo + + /// - returns: an Array of all the countries which speak Ewe + public static let all: [EweSpeakingCountry] = [ .Ghana, .Togo ] + + /// - returns: the country identifier of a specific Ewe speaking country. + public var countryIdentifier: String { + switch self { + case .Ghana: + return "GH" + case .Togo: + return "TG" + } + } +} + +/** + An enum of countries which speak French. +*/ +public enum FrenchSpeakingCountry: CountryType { + + /// Belgium is a country which speaks French. + case Belgium + /// Burkina Faso is a country which speaks French. + case BurkinaFaso + /// Burundi is a country which speaks French. + case Burundi + /// Benin is a country which speaks French. + case Benin + /// St. Barthélemy is a country which speaks French. + case StBarthélemy + /// Canada is a country which speaks French. + case Canada + /// Congo - Kinshasa is a country which speaks French. + case CongoKinshasa + /// Central African Republic is a country which speaks French. + case CentralAfricanRepublic + /// Congo - Brazzaville is a country which speaks French. + case CongoBrazzaville + /// Switzerland is a country which speaks French. + case Switzerland + /// Côte d’Ivoire is a country which speaks French. + case CôteDivoire + /// Cameroon is a country which speaks French. + case Cameroon + /// Djibouti is a country which speaks French. + case Djibouti + /// Algeria is a country which speaks French. + case Algeria + /// France is a country which speaks French. + case France + /// Gabon is a country which speaks French. + case Gabon + /// French Guiana is a country which speaks French. + case FrenchGuiana + /// Guinea is a country which speaks French. + case Guinea + /// Guadeloupe is a country which speaks French. + case Guadeloupe + /// Equatorial Guinea is a country which speaks French. + case EquatorialGuinea + /// Haiti is a country which speaks French. + case Haiti + /// Comoros is a country which speaks French. + case Comoros + /// Luxembourg is a country which speaks French. + case Luxembourg + /// Morocco is a country which speaks French. + case Morocco + /// Monaco is a country which speaks French. + case Monaco + /// St. Martin is a country which speaks French. + case StMartin + /// Madagascar is a country which speaks French. + case Madagascar + /// Mali is a country which speaks French. + case Mali + /// Martinique is a country which speaks French. + case Martinique + /// Mauritania is a country which speaks French. + case Mauritania + /// Mauritius is a country which speaks French. + case Mauritius + /// New Caledonia is a country which speaks French. + case NewCaledonia + /// Niger is a country which speaks French. + case Niger + /// French Polynesia is a country which speaks French. + case FrenchPolynesia + /// St. Pierre & Miquelon is a country which speaks French. + case StPierreMiquelon + /// Réunion is a country which speaks French. + case Réunion + /// Rwanda is a country which speaks French. + case Rwanda + /// Seychelles is a country which speaks French. + case Seychelles + /// Senegal is a country which speaks French. + case Senegal + /// Syria is a country which speaks French. + case Syria + /// Chad is a country which speaks French. + case Chad + /// Togo is a country which speaks French. + case Togo + /// Tunisia is a country which speaks French. + case Tunisia + /// Vanuatu is a country which speaks French. + case Vanuatu + /// Wallis & Futuna is a country which speaks French. + case WallisFutuna + /// Mayotte is a country which speaks French. + case Mayotte + + /// - returns: an Array of all the countries which speak French + 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 ] + + /// - returns: the country identifier of a specific French speaking country. + 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" + } + } +} + +/** + An enum of countries which speak Fulah. +*/ +public enum FulahSpeakingCountry: CountryType { + + /// Cameroon is a country which speaks Fulah. + case Cameroon + /// Guinea is a country which speaks Fulah. + case Guinea + /// Mauritania is a country which speaks Fulah. + case Mauritania + /// Senegal is a country which speaks Fulah. + case Senegal + + /// - returns: an Array of all the countries which speak Fulah + public static let all: [FulahSpeakingCountry] = [ .Cameroon, .Guinea, .Mauritania, .Senegal ] + + /// - returns: the country identifier of a specific Fulah speaking country. + public var countryIdentifier: String { + switch self { + case .Cameroon: + return "CM" + case .Guinea: + return "GN" + case .Mauritania: + return "MR" + case .Senegal: + return "SN" + } + } +} + +/** + An enum of countries which speak German. +*/ +public enum GermanSpeakingCountry: CountryType { + + /// Austria is a country which speaks German. + case Austria + /// Belgium is a country which speaks German. + case Belgium + /// Switzerland is a country which speaks German. + case Switzerland + /// Germany is a country which speaks German. + case Germany + /// Liechtenstein is a country which speaks German. + case Liechtenstein + /// Luxembourg is a country which speaks German. + case Luxembourg + + /// - returns: an Array of all the countries which speak German + public static let all: [GermanSpeakingCountry] = [ .Austria, .Belgium, .Switzerland, .Germany, .Liechtenstein, .Luxembourg ] + + /// - returns: the country identifier of a specific German speaking country. + 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" + } + } +} + +/** + An enum of countries which speak Greek. +*/ +public enum GreekSpeakingCountry: CountryType { + + /// Cyprus is a country which speaks Greek. + case Cyprus + /// Greece is a country which speaks Greek. + case Greece + + /// - returns: an Array of all the countries which speak Greek + public static let all: [GreekSpeakingCountry] = [ .Cyprus, .Greece ] + + /// - returns: the country identifier of a specific Greek speaking country. + public var countryIdentifier: String { + switch self { + case .Cyprus: + return "CY" + case .Greece: + return "GR" + } + } +} + +/** + An enum of countries which speak Hausa. +*/ +public enum HausaSpeakingCountry: CountryType { + + /// Ghana is a country which speaks Hausa. + case Ghana + /// Niger is a country which speaks Hausa. + case Niger + /// Nigeria is a country which speaks Hausa. + case Nigeria + + /// - returns: an Array of all the countries which speak Hausa + public static let all: [HausaSpeakingCountry] = [ .Ghana, .Niger, .Nigeria ] + + /// - returns: the country identifier of a specific Hausa speaking country. + public var countryIdentifier: String { + switch self { + case .Ghana: + return "GH" + case .Niger: + return "NE" + case .Nigeria: + return "NG" + } + } +} + +/** + An enum of countries which speak Italian. +*/ +public enum ItalianSpeakingCountry: CountryType { + + /// Switzerland is a country which speaks Italian. + case Switzerland + /// Italy is a country which speaks Italian. + case Italy + /// San Marino is a country which speaks Italian. + case SanMarino + + /// - returns: an Array of all the countries which speak Italian + public static let all: [ItalianSpeakingCountry] = [ .Switzerland, .Italy, .SanMarino ] + + /// - returns: the country identifier of a specific Italian speaking country. + public var countryIdentifier: String { + switch self { + case .Switzerland: + return "CH" + case .Italy: + return "IT" + case .SanMarino: + return "SM" + } + } +} + +/** + An enum of countries which speak Korean. +*/ +public enum KoreanSpeakingCountry: CountryType { + + /// North Korea is a country which speaks Korean. + case NorthKorea + /// South Korea is a country which speaks Korean. + case SouthKorea + + /// - returns: an Array of all the countries which speak Korean + public static let all: [KoreanSpeakingCountry] = [ .NorthKorea, .SouthKorea ] + + /// - returns: the country identifier of a specific Korean speaking country. + public var countryIdentifier: String { + switch self { + case .NorthKorea: + return "KP" + case .SouthKorea: + return "KR" + } + } +} + +/** + An enum of countries which speak Lingala. +*/ +public enum LingalaSpeakingCountry: CountryType { + + /// Angola is a country which speaks Lingala. + case Angola + /// Congo - Kinshasa is a country which speaks Lingala. + case CongoKinshasa + /// Central African Republic is a country which speaks Lingala. + case CentralAfricanRepublic + /// Congo - Brazzaville is a country which speaks Lingala. + case CongoBrazzaville + + /// - returns: an Array of all the countries which speak Lingala + public static let all: [LingalaSpeakingCountry] = [ .Angola, .CongoKinshasa, .CentralAfricanRepublic, .CongoBrazzaville ] + + /// - returns: the country identifier of a specific Lingala speaking country. + public var countryIdentifier: String { + switch self { + case .Angola: + return "AO" + case .CongoKinshasa: + return "CD" + case .CentralAfricanRepublic: + return "CF" + case .CongoBrazzaville: + return "CG" + } + } +} + +/** + An enum of countries which speak Malay. +*/ +public enum MalaySpeakingCountry: CountryType { + + /// Brunei is a country which speaks Malay. + case Brunei + /// Malaysia is a country which speaks Malay. + case Malaysia + /// Singapore is a country which speaks Malay. + case Singapore + + /// - returns: an Array of all the countries which speak Malay + public static let all: [MalaySpeakingCountry] = [ .Brunei, .Malaysia, .Singapore ] + + /// - returns: the country identifier of a specific Malay speaking country. + public var countryIdentifier: String { + switch self { + case .Brunei: + return "BN" + case .Malaysia: + return "MY" + case .Singapore: + return "SG" + } + } +} + +/** + An enum of countries which speak Masai. +*/ +public enum MasaiSpeakingCountry: CountryType { + + /// Kenya is a country which speaks Masai. + case Kenya + /// Tanzania is a country which speaks Masai. + case Tanzania + + /// - returns: an Array of all the countries which speak Masai + public static let all: [MasaiSpeakingCountry] = [ .Kenya, .Tanzania ] + + /// - returns: the country identifier of a specific Masai speaking country. + public var countryIdentifier: String { + switch self { + case .Kenya: + return "KE" + case .Tanzania: + return "TZ" + } + } +} + +/** + An enum of countries which speak Nepali. +*/ +public enum NepaliSpeakingCountry: CountryType { + + /// India is a country which speaks Nepali. + case India + /// Nepal is a country which speaks Nepali. + case Nepal + + /// - returns: an Array of all the countries which speak Nepali + public static let all: [NepaliSpeakingCountry] = [ .India, .Nepal ] + + /// - returns: the country identifier of a specific Nepali speaking country. + public var countryIdentifier: String { + switch self { + case .India: + return "IN" + case .Nepal: + return "NP" + } + } +} + +/** + An enum of countries which speak Northern Sami. +*/ +public enum NorthernSamiSpeakingCountry: CountryType { + + /// Finland is a country which speaks Northern Sami. + case Finland + /// Norway is a country which speaks Northern Sami. + case Norway + /// Sweden is a country which speaks Northern Sami. + case Sweden + + /// - returns: an Array of all the countries which speak Northern Sami + public static let all: [NorthernSamiSpeakingCountry] = [ .Finland, .Norway, .Sweden ] + + /// - returns: the country identifier of a specific Northern Sami speaking country. + public var countryIdentifier: String { + switch self { + case .Finland: + return "FI" + case .Norway: + return "NO" + case .Sweden: + return "SE" + } + } +} + +/** + An enum of countries which speak Norwegian Bokmål. +*/ +public enum NorwegianBokmålSpeakingCountry: CountryType { + + /// Norway is a country which speaks Norwegian Bokmål. + case Norway + /// Svalbard & Jan Mayen is a country which speaks Norwegian Bokmål. + case SvalbardJanMayen + + /// - returns: an Array of all the countries which speak Norwegian Bokmål + public static let all: [NorwegianBokmålSpeakingCountry] = [ .Norway, .SvalbardJanMayen ] + + /// - returns: the country identifier of a specific Norwegian Bokmål speaking country. + public var countryIdentifier: String { + switch self { + case .Norway: + return "NO" + case .SvalbardJanMayen: + return "SJ" + } + } +} + +/** + An enum of countries which speak Oromo. +*/ +public enum OromoSpeakingCountry: CountryType { + + /// Ethiopia is a country which speaks Oromo. + case Ethiopia + /// Kenya is a country which speaks Oromo. + case Kenya + + /// - returns: an Array of all the countries which speak Oromo + public static let all: [OromoSpeakingCountry] = [ .Ethiopia, .Kenya ] + + /// - returns: the country identifier of a specific Oromo speaking country. + public var countryIdentifier: String { + switch self { + case .Ethiopia: + return "ET" + case .Kenya: + return "KE" + } + } +} + +/** + An enum of countries which speak Ossetic. +*/ +public enum OsseticSpeakingCountry: CountryType { + + /// Georgia is a country which speaks Ossetic. + case Georgia + /// Russia is a country which speaks Ossetic. + case Russia + + /// - returns: an Array of all the countries which speak Ossetic + public static let all: [OsseticSpeakingCountry] = [ .Georgia, .Russia ] + + /// - returns: the country identifier of a specific Ossetic speaking country. + public var countryIdentifier: String { + switch self { + case .Georgia: + return "GE" + case .Russia: + return "RU" + } + } +} + +/** + An enum of countries which speak Persian. +*/ +public enum PersianSpeakingCountry: CountryType { + + /// Afghanistan is a country which speaks Persian. + case Afghanistan + /// Iran is a country which speaks Persian. + case Iran + + /// - returns: an Array of all the countries which speak Persian + public static let all: [PersianSpeakingCountry] = [ .Afghanistan, .Iran ] + + /// - returns: the country identifier of a specific Persian speaking country. + public var countryIdentifier: String { + switch self { + case .Afghanistan: + return "AF" + case .Iran: + return "IR" + } + } +} + +/** + An enum of countries which speak Portuguese. +*/ +public enum PortugueseSpeakingCountry: CountryType { + + /// Angola is a country which speaks Portuguese. + case Angola + /// Brazil is a country which speaks Portuguese. + case Brazil + /// Cape Verde is a country which speaks Portuguese. + case CapeVerde + /// Guinea-Bissau is a country which speaks Portuguese. + case GuineaBissau + /// Macau SAR China is a country which speaks Portuguese. + case MacauSarChina + /// Mozambique is a country which speaks Portuguese. + case Mozambique + /// Portugal is a country which speaks Portuguese. + case Portugal + /// São Tomé & Príncipe is a country which speaks Portuguese. + case SãoToméPríncipe + /// Timor-Leste is a country which speaks Portuguese. + case TimorLeste + + /// - returns: an Array of all the countries which speak Portuguese + public static let all: [PortugueseSpeakingCountry] = [ .Angola, .Brazil, .CapeVerde, .GuineaBissau, .MacauSarChina, .Mozambique, .Portugal, .SãoToméPríncipe, .TimorLeste ] + + /// - returns: the country identifier of a specific Portuguese speaking country. + 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" + } + } +} + +/** + An enum of countries which speak Punjabi. +*/ +public enum PunjabiSpeakingCountry: CountryType { + + /// India is a country which speaks Punjabi. + case India + /// Pakistan is a country which speaks Punjabi. + case Pakistan + + /// - returns: an Array of all the countries which speak Punjabi + public static let all: [PunjabiSpeakingCountry] = [ .India, .Pakistan ] + + /// - returns: the country identifier of a specific Punjabi speaking country. + public var countryIdentifier: String { + switch self { + case .India: + return "IN" + case .Pakistan: + return "PK" + } + } +} + +/** + An enum of countries which speak Quechua. +*/ +public enum QuechuaSpeakingCountry: CountryType { + + /// Bolivia is a country which speaks Quechua. + case Bolivia + /// Ecuador is a country which speaks Quechua. + case Ecuador + /// Peru is a country which speaks Quechua. + case Peru + + /// - returns: an Array of all the countries which speak Quechua + public static let all: [QuechuaSpeakingCountry] = [ .Bolivia, .Ecuador, .Peru ] + + /// - returns: the country identifier of a specific Quechua speaking country. + public var countryIdentifier: String { + switch self { + case .Bolivia: + return "BO" + case .Ecuador: + return "EC" + case .Peru: + return "PE" + } + } +} + +/** + An enum of countries which speak Romanian. +*/ +public enum RomanianSpeakingCountry: CountryType { + + /// Moldova is a country which speaks Romanian. + case Moldova + /// Romania is a country which speaks Romanian. + case Romania + + /// - returns: an Array of all the countries which speak Romanian + public static let all: [RomanianSpeakingCountry] = [ .Moldova, .Romania ] + + /// - returns: the country identifier of a specific Romanian speaking country. + public var countryIdentifier: String { + switch self { + case .Moldova: + return "MD" + case .Romania: + return "RO" + } + } +} + +/** + An enum of countries which speak Russian. +*/ +public enum RussianSpeakingCountry: CountryType { + + /// Belarus is a country which speaks Russian. + case Belarus + /// Kyrgyzstan is a country which speaks Russian. + case Kyrgyzstan + /// Kazakhstan is a country which speaks Russian. + case Kazakhstan + /// Moldova is a country which speaks Russian. + case Moldova + /// Russia is a country which speaks Russian. + case Russia + /// Ukraine is a country which speaks Russian. + case Ukraine + + /// - returns: an Array of all the countries which speak Russian + public static let all: [RussianSpeakingCountry] = [ .Belarus, .Kyrgyzstan, .Kazakhstan, .Moldova, .Russia, .Ukraine ] + + /// - returns: the country identifier of a specific Russian speaking country. + 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" + } + } +} + +/** + An enum of countries which speak Serbian. +*/ +public enum SerbianSpeakingCountry: CountryType { + + /// Bosnia & Herzegovina is a country which speaks Serbian. + case BosniaHerzegovina + /// Montenegro is a country which speaks Serbian. + case Montenegro + /// Serbia is a country which speaks Serbian. + case Serbia + /// Kosovo is a country which speaks Serbian. + case Kosovo + + /// - returns: an Array of all the countries which speak Serbian + public static let all: [SerbianSpeakingCountry] = [ .BosniaHerzegovina, .Montenegro, .Serbia, .Kosovo ] + + /// - returns: the country identifier of a specific Serbian speaking country. + public var countryIdentifier: String { + switch self { + case .BosniaHerzegovina: + return "BA" + case .Montenegro: + return "ME" + case .Serbia: + return "RS" + case .Kosovo: + return "XK" + } + } +} + +/** + An enum of countries which speak Somali. +*/ +public enum SomaliSpeakingCountry: CountryType { + + /// Djibouti is a country which speaks Somali. + case Djibouti + /// Ethiopia is a country which speaks Somali. + case Ethiopia + /// Kenya is a country which speaks Somali. + case Kenya + /// Somalia is a country which speaks Somali. + case Somalia + + /// - returns: an Array of all the countries which speak Somali + public static let all: [SomaliSpeakingCountry] = [ .Djibouti, .Ethiopia, .Kenya, .Somalia ] + + /// - returns: the country identifier of a specific Somali speaking country. + public var countryIdentifier: String { + switch self { + case .Djibouti: + return "DJ" + case .Ethiopia: + return "ET" + case .Kenya: + return "KE" + case .Somalia: + return "SO" + } + } +} + +/** + An enum of countries which speak Spanish. +*/ +public enum SpanishSpeakingCountry: CountryType { + + /// Latin America is a country which speaks Spanish. + case LatinAmerica + /// Argentina is a country which speaks Spanish. + case Argentina + /// Bolivia is a country which speaks Spanish. + case Bolivia + /// Chile is a country which speaks Spanish. + case Chile + /// Colombia is a country which speaks Spanish. + case Colombia + /// Costa Rica is a country which speaks Spanish. + case CostaRica + /// Cuba is a country which speaks Spanish. + case Cuba + /// Dominican Republic is a country which speaks Spanish. + case DominicanRepublic + /// Ceuta & Melilla is a country which speaks Spanish. + case CeutaMelilla + /// Ecuador is a country which speaks Spanish. + case Ecuador + /// Spain is a country which speaks Spanish. + case Spain + /// Equatorial Guinea is a country which speaks Spanish. + case EquatorialGuinea + /// Guatemala is a country which speaks Spanish. + case Guatemala + /// Honduras is a country which speaks Spanish. + case Honduras + /// Canary Islands is a country which speaks Spanish. + case CanaryIslands + /// Mexico is a country which speaks Spanish. + case Mexico + /// Nicaragua is a country which speaks Spanish. + case Nicaragua + /// Panama is a country which speaks Spanish. + case Panama + /// Peru is a country which speaks Spanish. + case Peru + /// Philippines is a country which speaks Spanish. + case Philippines + /// Puerto Rico is a country which speaks Spanish. + case PuertoRico + /// Paraguay is a country which speaks Spanish. + case Paraguay + /// El Salvador is a country which speaks Spanish. + case ElSalvador + /// United States is a country which speaks Spanish. + case UnitedStates + /// Uruguay is a country which speaks Spanish. + case Uruguay + /// Venezuela is a country which speaks Spanish. + case Venezuela + + /// - returns: an Array of all the countries which speak Spanish + 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 ] + + /// - returns: the country identifier of a specific Spanish speaking country. + 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" + } + } +} + +/** + An enum of countries which speak Swahili. +*/ +public enum SwahiliSpeakingCountry: CountryType { + + /// Congo - Kinshasa is a country which speaks Swahili. + case CongoKinshasa + /// Kenya is a country which speaks Swahili. + case Kenya + /// Tanzania is a country which speaks Swahili. + case Tanzania + /// Uganda is a country which speaks Swahili. + case Uganda + + /// - returns: an Array of all the countries which speak Swahili + public static let all: [SwahiliSpeakingCountry] = [ .CongoKinshasa, .Kenya, .Tanzania, .Uganda ] + + /// - returns: the country identifier of a specific Swahili speaking country. + public var countryIdentifier: String { + switch self { + case .CongoKinshasa: + return "CD" + case .Kenya: + return "KE" + case .Tanzania: + return "TZ" + case .Uganda: + return "UG" + } + } +} + +/** + An enum of countries which speak Swedish. +*/ +public enum SwedishSpeakingCountry: CountryType { + + /// Åland Islands is a country which speaks Swedish. + case ÅlandIslands + /// Finland is a country which speaks Swedish. + case Finland + /// Sweden is a country which speaks Swedish. + case Sweden + + /// - returns: an Array of all the countries which speak Swedish + public static let all: [SwedishSpeakingCountry] = [ .ÅlandIslands, .Finland, .Sweden ] + + /// - returns: the country identifier of a specific Swedish speaking country. + public var countryIdentifier: String { + switch self { + case .ÅlandIslands: + return "AX" + case .Finland: + return "FI" + case .Sweden: + return "SE" + } + } +} + +/** + An enum of countries which speak Swiss German. +*/ +public enum SwissGermanSpeakingCountry: CountryType { + + /// Switzerland is a country which speaks Swiss German. + case Switzerland + /// France is a country which speaks Swiss German. + case France + /// Liechtenstein is a country which speaks Swiss German. + case Liechtenstein + + /// - returns: an Array of all the countries which speak Swiss German + public static let all: [SwissGermanSpeakingCountry] = [ .Switzerland, .France, .Liechtenstein ] + + /// - returns: the country identifier of a specific Swiss German speaking country. + public var countryIdentifier: String { + switch self { + case .Switzerland: + return "CH" + case .France: + return "FR" + case .Liechtenstein: + return "LI" + } + } +} + +/** + An enum of countries which speak Tamil. +*/ +public enum TamilSpeakingCountry: CountryType { + + /// India is a country which speaks Tamil. + case India + /// Sri Lanka is a country which speaks Tamil. + case SriLanka + /// Malaysia is a country which speaks Tamil. + case Malaysia + /// Singapore is a country which speaks Tamil. + case Singapore + + /// - returns: an Array of all the countries which speak Tamil + public static let all: [TamilSpeakingCountry] = [ .India, .SriLanka, .Malaysia, .Singapore ] + + /// - returns: the country identifier of a specific Tamil speaking country. + public var countryIdentifier: String { + switch self { + case .India: + return "IN" + case .SriLanka: + return "LK" + case .Malaysia: + return "MY" + case .Singapore: + return "SG" + } + } +} + +/** + An enum of countries which speak Teso. +*/ +public enum TesoSpeakingCountry: CountryType { + + /// Kenya is a country which speaks Teso. + case Kenya + /// Uganda is a country which speaks Teso. + case Uganda + + /// - returns: an Array of all the countries which speak Teso + public static let all: [TesoSpeakingCountry] = [ .Kenya, .Uganda ] + + /// - returns: the country identifier of a specific Teso speaking country. + public var countryIdentifier: String { + switch self { + case .Kenya: + return "KE" + case .Uganda: + return "UG" + } + } +} + +/** + An enum of countries which speak Tibetan. +*/ +public enum TibetanSpeakingCountry: CountryType { + + /// China is a country which speaks Tibetan. + case China + /// India is a country which speaks Tibetan. + case India + + /// - returns: an Array of all the countries which speak Tibetan + public static let all: [TibetanSpeakingCountry] = [ .China, .India ] + + /// - returns: the country identifier of a specific Tibetan speaking country. + public var countryIdentifier: String { + switch self { + case .China: + return "CN" + case .India: + return "IN" + } + } +} + +/** + An enum of countries which speak Tigrinya. +*/ +public enum TigrinyaSpeakingCountry: CountryType { + + /// Eritrea is a country which speaks Tigrinya. + case Eritrea + /// Ethiopia is a country which speaks Tigrinya. + case Ethiopia + + /// - returns: an Array of all the countries which speak Tigrinya + public static let all: [TigrinyaSpeakingCountry] = [ .Eritrea, .Ethiopia ] + + /// - returns: the country identifier of a specific Tigrinya speaking country. + public var countryIdentifier: String { + switch self { + case .Eritrea: + return "ER" + case .Ethiopia: + return "ET" + } + } +} + +/** + An enum of countries which speak Turkish. +*/ +public enum TurkishSpeakingCountry: CountryType { + + /// Cyprus is a country which speaks Turkish. + case Cyprus + /// Turkey is a country which speaks Turkish. + case Turkey + + /// - returns: an Array of all the countries which speak Turkish + public static let all: [TurkishSpeakingCountry] = [ .Cyprus, .Turkey ] + + /// - returns: the country identifier of a specific Turkish speaking country. + public var countryIdentifier: String { + switch self { + case .Cyprus: + return "CY" + case .Turkey: + return "TR" + } + } +} + +/** + An enum of countries which speak Urdu. +*/ +public enum UrduSpeakingCountry: CountryType { + + /// India is a country which speaks Urdu. + case India + /// Pakistan is a country which speaks Urdu. + case Pakistan + + /// - returns: an Array of all the countries which speak Urdu + public static let all: [UrduSpeakingCountry] = [ .India, .Pakistan ] + + /// - returns: the country identifier of a specific Urdu speaking country. + public var countryIdentifier: String { + switch self { + case .India: + return "IN" + case .Pakistan: + return "PK" + } + } +} + +/** + An enum of countries which speak Uzbek. +*/ +public enum UzbekSpeakingCountry: CountryType { + + /// Afghanistan is a country which speaks Uzbek. + case Afghanistan + /// Uzbekistan is a country which speaks Uzbek. + case Uzbekistan + + /// - returns: an Array of all the countries which speak Uzbek + public static let all: [UzbekSpeakingCountry] = [ .Afghanistan, .Uzbekistan ] + + /// - returns: the country identifier of a specific Uzbek speaking country. + public var countryIdentifier: String { + switch self { + case .Afghanistan: + return "AF" + case .Uzbekistan: + return "UZ" + } + } +} + +/** + An enum of countries which speak Yoruba. +*/ +public enum YorubaSpeakingCountry: CountryType { + + /// Benin is a country which speaks Yoruba. + case Benin + /// Nigeria is a country which speaks Yoruba. + case Nigeria + + /// - returns: an Array of all the countries which speak Yoruba + public static let all: [YorubaSpeakingCountry] = [ .Benin, .Nigeria ] + + /// - returns: the country identifier of a specific Yoruba speaking country. + public var countryIdentifier: String { + switch self { + case .Benin: + return "BJ" + case .Nigeria: + return "NG" + } + } +} + +// MARK: - Locale + +/** + +Locale is an enum for type safe representation +of locale identifiers. Its cases are languages +in US English. For languages which are spoken +in more than one country, an associated value +of the country should be provided. For example + +```swift +let locale: Locale = .French(.France) +``` +*/ +public enum Locale { + + /** + ### Afrikaans + - requires: AfrikaansSpeakingCountry + */ + case Afrikaans(AfrikaansSpeakingCountry) + + /// ### Aghem + case Aghem + + /// ### Akan + case Akan + + /** + ### Albanian + - requires: AlbanianSpeakingCountry + */ + case Albanian(AlbanianSpeakingCountry) + + /// ### Amharic + case Amharic + + /** + ### Arabic + - requires: ArabicSpeakingCountry + */ + case Arabic(ArabicSpeakingCountry) + + /// ### Armenian + case Armenian + + /// ### Assamese + case Assamese + + /// ### Asu + case Asu + + /// ### Azerbaijani + case Azerbaijani + + /// ### Bafia + case Bafia + + /// ### Bambara + case Bambara + + /// ### Basaa + case Basaa + + /// ### Basque + case Basque + + /// ### Belarusian + case Belarusian + + /// ### Bemba + case Bemba + + /// ### Bena + case Bena + + /** + ### Bengali + - requires: BengaliSpeakingCountry + */ + case Bengali(BengaliSpeakingCountry) + + /// ### Bodo + case Bodo + + /// ### Bosnian + case Bosnian + + /// ### Breton + case Breton + + /// ### Bulgarian + case Bulgarian + + /// ### Burmese + case Burmese + + /** + ### Catalan + - requires: CatalanSpeakingCountry + */ + case Catalan(CatalanSpeakingCountry) + + /// ### Central Atlas Tamazight + case CentralAtlasTamazight + + /** + ### Central Kurdish + - requires: CentralKurdishSpeakingCountry + */ + case CentralKurdish(CentralKurdishSpeakingCountry) + + /// ### Cherokee + case Cherokee + + /// ### Chiga + case Chiga + + /** + ### Chinese + - requires: ChineseSpeakingCountry + */ + case Chinese(ChineseSpeakingCountry) + + /// ### Colognian + case Colognian + + /// ### Cornish + case Cornish + + /** + ### Croatian + - requires: CroatianSpeakingCountry + */ + case Croatian(CroatianSpeakingCountry) + + /// ### Czech + case Czech + + /** + ### Danish + - requires: DanishSpeakingCountry + */ + case Danish(DanishSpeakingCountry) + + /// ### Duala + case Duala + + /** + ### Dutch + - requires: DutchSpeakingCountry + */ + case Dutch(DutchSpeakingCountry) + + /// ### Dzongkha + case Dzongkha + + /// ### Embu + case Embu + + /** + ### English + - requires: EnglishSpeakingCountry + */ + case English(EnglishSpeakingCountry) + + /// ### Estonian + case Estonian + + /** + ### Ewe + - requires: EweSpeakingCountry + */ + case Ewe(EweSpeakingCountry) + + /// ### Ewondo + case Ewondo + + /// ### Faroese + case Faroese + + /// ### Filipino + case Filipino + + /// ### Finnish + case Finnish + + /** + ### French + - requires: FrenchSpeakingCountry + */ + case French(FrenchSpeakingCountry) + + /// ### Friulian + case Friulian + + /** + ### Fulah + - requires: FulahSpeakingCountry + */ + case Fulah(FulahSpeakingCountry) + + /// ### Galician + case Galician + + /// ### Ganda + case Ganda + + /// ### Georgian + case Georgian + + /** + ### German + - requires: GermanSpeakingCountry + */ + case German(GermanSpeakingCountry) + + /** + ### Greek + - requires: GreekSpeakingCountry + */ + case Greek(GreekSpeakingCountry) + + /// ### Gujarati + case Gujarati + + /// ### Gusii + case Gusii + + /** + ### Hausa + - requires: HausaSpeakingCountry + */ + case Hausa(HausaSpeakingCountry) + + /// ### Hawaiian + case Hawaiian + + /// ### Hebrew + case Hebrew + + /// ### Hindi + case Hindi + + /// ### Hungarian + case Hungarian + + /// ### Icelandic + case Icelandic + + /// ### Igbo + case Igbo + + /// ### Inari Sami + case InariSami + + /// ### Indonesian + case Indonesian + + /// ### Inuktitut + case Inuktitut + + /// ### Irish + case Irish + + /** + ### Italian + - requires: ItalianSpeakingCountry + */ + case Italian(ItalianSpeakingCountry) + + /// ### Japanese + case Japanese + + /// ### Jola-Fonyi + case JolaFonyi + + /// ### Kabuverdianu + case Kabuverdianu + + /// ### Kabyle + case Kabyle + + /// ### Kako + case Kako + + /// ### Kalaallisut + case Kalaallisut + + /// ### Kalenjin + case Kalenjin + + /// ### Kamba + case Kamba + + /// ### Kannada + case Kannada + + /// ### Kashmiri + case Kashmiri + + /// ### Kazakh + case Kazakh + + /// ### Khmer + case Khmer + + /// ### Kikuyu + case Kikuyu + + /// ### Kinyarwanda + case Kinyarwanda + + /// ### Konkani + case Konkani + + /** + ### Korean + - requires: KoreanSpeakingCountry + */ + case Korean(KoreanSpeakingCountry) + + /// ### Koyra Chiini + case KoyraChiini + + /// ### Koyraboro Senni + case KoyraboroSenni + + /// ### Kwasio + case Kwasio + + /// ### Kyrgyz + case Kyrgyz + + /// ### Lakota + case Lakota + + /// ### Langi + case Langi + + /// ### Lao + case Lao + + /// ### Latvian + case Latvian + + /** + ### Lingala + - requires: LingalaSpeakingCountry + */ + case Lingala(LingalaSpeakingCountry) + + /// ### Lithuanian + case Lithuanian + + /// ### Lower Sorbian + case LowerSorbian + + /// ### Luba-Katanga + case LubaKatanga + + /// ### Luo + case Luo + + /// ### Luxembourgish + case Luxembourgish + + /// ### Luyia + case Luyia + + /// ### Macedonian + case Macedonian + + /// ### Machame + case Machame + + /// ### Makhuwa-Meetto + case MakhuwaMeetto + + /// ### Makonde + case Makonde + + /// ### Malagasy + case Malagasy + + /** + ### Malay + - requires: MalaySpeakingCountry + */ + case Malay(MalaySpeakingCountry) + + /// ### Malayalam + case Malayalam + + /// ### Maltese + case Maltese + + /// ### Manx + case Manx + + /// ### Marathi + case Marathi + + /** + ### Masai + - requires: MasaiSpeakingCountry + */ + case Masai(MasaiSpeakingCountry) + + /// ### Meru + case Meru + + /// ### Metaʼ + case Meta + + /// ### Mongolian + case Mongolian + + /// ### Morisyen + case Morisyen + + /// ### Mundang + case Mundang + + /// ### Nama + case Nama + + /** + ### Nepali + - requires: NepaliSpeakingCountry + */ + case Nepali(NepaliSpeakingCountry) + + /// ### Ngiemboon + case Ngiemboon + + /// ### Ngomba + case Ngomba + + /// ### North Ndebele + case NorthNdebele + + /** + ### Northern Sami + - requires: NorthernSamiSpeakingCountry + */ + case NorthernSami(NorthernSamiSpeakingCountry) + + /** + ### Norwegian Bokmål + - requires: NorwegianBokmålSpeakingCountry + */ + case NorwegianBokmål(NorwegianBokmålSpeakingCountry) + + /// ### Norwegian Nynorsk + case NorwegianNynorsk + + /// ### Nuer + case Nuer + + /// ### Nyankole + case Nyankole + + /// ### Oriya + case Oriya + + /** + ### Oromo + - requires: OromoSpeakingCountry + */ + case Oromo(OromoSpeakingCountry) + + /** + ### Ossetic + - requires: OsseticSpeakingCountry + */ + case Ossetic(OsseticSpeakingCountry) + + /// ### Pashto + case Pashto + + /** + ### Persian + - requires: PersianSpeakingCountry + */ + case Persian(PersianSpeakingCountry) + + /// ### Polish + case Polish + + /** + ### Portuguese + - requires: PortugueseSpeakingCountry + */ + case Portuguese(PortugueseSpeakingCountry) + + /** + ### Punjabi + - requires: PunjabiSpeakingCountry + */ + case Punjabi(PunjabiSpeakingCountry) + + /** + ### Quechua + - requires: QuechuaSpeakingCountry + */ + case Quechua(QuechuaSpeakingCountry) + + /** + ### Romanian + - requires: RomanianSpeakingCountry + */ + case Romanian(RomanianSpeakingCountry) + + /// ### Romansh + case Romansh + + /// ### Rombo + case Rombo + + /// ### Rundi + case Rundi + + /** + ### Russian + - requires: RussianSpeakingCountry + */ + case Russian(RussianSpeakingCountry) + + /// ### Rwa + case Rwa + + /// ### Sakha + case Sakha + + /// ### Samburu + case Samburu + + /// ### Sango + case Sango + + /// ### Sangu + case Sangu + + /// ### Scottish Gaelic + case ScottishGaelic + + /// ### Sena + case Sena + + /** + ### Serbian + - requires: SerbianSpeakingCountry + */ + case Serbian(SerbianSpeakingCountry) + + /// ### Shambala + case Shambala + + /// ### Shona + case Shona + + /// ### Sichuan Yi + case SichuanYi + + /// ### Sinhala + case Sinhala + + /// ### Slovak + case Slovak + + /// ### Slovenian + case Slovenian + + /// ### Soga + case Soga + + /** + ### Somali + - requires: SomaliSpeakingCountry + */ + case Somali(SomaliSpeakingCountry) + + /** + ### Spanish + - requires: SpanishSpeakingCountry + */ + case Spanish(SpanishSpeakingCountry) + + /// ### Standard Moroccan Tamazight + case StandardMoroccanTamazight + + /** + ### Swahili + - requires: SwahiliSpeakingCountry + */ + case Swahili(SwahiliSpeakingCountry) + + /** + ### Swedish + - requires: SwedishSpeakingCountry + */ + case Swedish(SwedishSpeakingCountry) + + /** + ### Swiss German + - requires: SwissGermanSpeakingCountry + */ + case SwissGerman(SwissGermanSpeakingCountry) + + /// ### Tachelhit + case Tachelhit + + /// ### Taita + case Taita + + /// ### Tajik + case Tajik + + /** + ### Tamil + - requires: TamilSpeakingCountry + */ + case Tamil(TamilSpeakingCountry) + + /// ### Tasawaq + case Tasawaq + + /// ### Telugu + case Telugu + + /** + ### Teso + - requires: TesoSpeakingCountry + */ + case Teso(TesoSpeakingCountry) + + /// ### Thai + case Thai + + /** + ### Tibetan + - requires: TibetanSpeakingCountry + */ + case Tibetan(TibetanSpeakingCountry) + + /** + ### Tigrinya + - requires: TigrinyaSpeakingCountry + */ + case Tigrinya(TigrinyaSpeakingCountry) + + /// ### Tongan + case Tongan + + /** + ### Turkish + - requires: TurkishSpeakingCountry + */ + case Turkish(TurkishSpeakingCountry) + + /// ### Turkmen + case Turkmen + + /// ### Ukrainian + case Ukrainian + + /// ### Upper Sorbian + case UpperSorbian + + /** + ### Urdu + - requires: UrduSpeakingCountry + */ + case Urdu(UrduSpeakingCountry) + + /// ### Uyghur + case Uyghur + + /** + ### Uzbek + - requires: UzbekSpeakingCountry + */ + case Uzbek(UzbekSpeakingCountry) + + /// ### Vai + case Vai + + /// ### Vietnamese + case Vietnamese + + /// ### Vunjo + case Vunjo + + /// ### Walser + case Walser + + /// ### Welsh + case Welsh + + /// ### Western Frisian + case WesternFrisian + + /// ### Yangben + case Yangben + + /// ### Yiddish + case Yiddish + + /** + ### Yoruba + - requires: YorubaSpeakingCountry + */ + case Yoruba(YorubaSpeakingCountry) + + /// ### Zarma + case Zarma + + /// ### Zulu + case Zulu +} + +/** + Locale conforms to LanguageType. +*/ +extension Locale: LanguageType { + + /// - returns: the lanauge identifier as a String. + 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" + } + } +} + +/** + Locale conforms to CountryType. +*/ +extension Locale: CountryType { + + /// - returns: the country identifier as a String. + 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/Currency.swift b/Money/Shared/Currency.swift index 9f4a534..681335a 100644 --- a/Money/Shared/Currency.swift +++ b/Money/Shared/Currency.swift @@ -45,18 +45,26 @@ 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 } + /// The currency symbol + static var symbol: String? { 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 @@ -76,29 +84,90 @@ public extension CurrencyType { } } +internal extension CurrencyType { + + static func formattedWithStyle(style: NSNumberFormatterStyle, forLocale locale: NSLocale) -> NSDecimalNumber -> String { + __formatter.reset() + __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 + __formatter.maximumFractionDigits = formatter.maximumFractionDigits + + } + return { __formatter.stringFromNumber($0)! } + } +} + + /** - `_CurrencyType` is a refinement of `CurrencyType` so that - autogenerated currencies can be created. + Custom currency types should refine CustomCurrencyType. + + This is to benefit from default implementations of string + formatting. */ -public protocol _CurrencyType: CurrencyType { +public protocol CustomCurrencyType: CurrencyType { } + +public extension CustomCurrencyType { + + /** + Use the provided locale identifier to format a supplied NSDecimalNumber. + + - returns: a NSDecimalNumber -> String closure. + */ + static func formattedWithStyle(style: NSNumberFormatterStyle, forLocaleId localeId: String) -> NSDecimalNumber -> String { + let locale = NSLocale(localeIdentifier: NSLocale.canonicalLocaleIdentifierFromString(localeId)) + return formattedWithStyle(style, forLocale: locale) + } + /** + Use the provided Local to format a supplied NSDecimalNumber. + + - returns: a NSDecimalNumber -> String closure. + */ + static func formattedWithStyle(style: NSNumberFormatterStyle, forLocale locale: Locale) -> NSDecimalNumber -> String { + return formattedWithStyle(style, forLocaleId: locale.localeIdentifier) + } +} + +/** + Crypto currency types (Bitcoin etc) should refine CryptoCurrencyType. + + This is to benefit from default implementations. +*/ +public protocol CryptoCurrencyType: CustomCurrencyType { } + +/** + `ISOCurrencyType` is a refinement of `CurrencyType` so that + the ISO currencies can be autogenerated. +*/ +public protocol ISOCurrencyType: CurrencyType { + + /** + A shared instance of the currency. Note that static + variables are lazily created. + */ static var sharedInstance: Self { get } - var _locale: NSLocale { get } + /// - returns: the currency code + var _code: String { get } + /// - returns: a number formatter for the currency in the current locale. var _formatter: NSNumberFormatter { get } } -public extension _CurrencyType { +public extension ISOCurrencyType { /// The currency code static var code: String { - return formatter.currencyCode - } - - /// The currency symbol - static var symbol: String { - return formatter.currencySymbol + return sharedInstance._code } /// The currency scale @@ -110,6 +179,28 @@ public extension _CurrencyType { static var formatter: NSNumberFormatter { return sharedInstance._formatter } + + /** + Use the provided locale identifier to format a supplied NSDecimalNumber. + + - returns: a NSDecimalNumber -> String closure. + */ + 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) + } + + /** + Use the provided Local to format a supplied NSDecimalNumber. + + - returns: a NSDecimalNumber -> String closure. + */ + 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) + } } /** @@ -129,21 +220,23 @@ 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 + + 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 + }() + + 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) } } @@ -154,14 +247,7 @@ 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/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/Decimal/DecimalNumberType.swift b/Money/Shared/Decimal/DecimalNumberType.swift index fee336c..df35e48 100644 --- a/Money/Shared/Decimal/DecimalNumberType.swift +++ b/Money/Shared/Decimal/DecimalNumberType.swift @@ -232,13 +232,74 @@ public extension DecimalNumberType where DecimalStorageType == NSDecimalNumber { return storage.hashValue } - /** - Initialize a new value using a `FloatLiteralType` + /// Initialize a new decimal with an `Int`. + /// - parameter value: an `Int`. + /// - returns: an initialized `DecimalNumberType`. + init(_ value: Int) { + switch value { + case 0: + self.init(storage: NSDecimalNumber.zero()) + case 1: + self.init(storage: NSDecimalNumber.one()) + default: + self.init(storage: NSDecimalNumber(integerLiteral: value).decimalNumberByRoundingAccordingToBehavior(DecimalNumberBehavior.decimalNumberBehaviors)) + } + } - - parameter floatLiteral: a `FloatLiteralType` for the system, probably `Double`. - */ - init(floatLiteral value: Swift.FloatLiteralType) { - self.init(storage: NSDecimalNumber(floatLiteral: value).decimalNumberByRoundingAccordingToBehavior(DecimalNumberBehavior.decimalNumberBehaviors)) + /// Initialize a new decimal with an `UInt8`. + /// - parameter value: an `UInt8`. + /// - returns: an initialized `DecimalNumberType`. + init(_ value: UInt8) { + self.init(Int(value)) + } + + /// Initialize a new decimal with an `Int8`. + /// - parameter value: an `Int8`. + /// - returns: an initialized `DecimalNumberType`. + init(_ value: Int8) { + self.init(Int(value)) + } + + /// Initialize a new decimal with an `UInt16`. + /// - parameter value: an `UInt16`. + /// - returns: an initialized `DecimalNumberType`. + init(_ value: UInt16) { + self.init(Int(value)) + } + + /// Initialize a new decimal with an `Int16`. + /// - parameter value: an `Int16`. + /// - returns: an initialized `DecimalNumberType`. + init(_ value: Int16) { + self.init(Int(value)) + } + + /// Initialize a new decimal with an `UInt32`. + /// - parameter value: an `UInt32`. + /// - returns: an initialized `DecimalNumberType`. + init(_ value: UInt32) { + self.init(Int(value)) + } + + /// Initialize a new decimal with an `Int32`. + /// - parameter value: an `Int32`. + /// - returns: an initialized `DecimalNumberType`. + init(_ value: Int32) { + self.init(Int(value)) + } + + /// Initialize a new decimal with an `UInt64`. + /// - parameter value: an `UInt64`. + /// - returns: an initialized `DecimalNumberType`. + init(_ value: UInt64) { + self.init(Int(value)) + } + + /// Initialize a new decimal with an `Int64`. + /// - parameter value: an `Int64`. + /// - returns: an initialized `DecimalNumberType`. + init(_ value: Int64) { + self.init(Int(value)) } /** @@ -247,14 +308,30 @@ public extension DecimalNumberType where DecimalStorageType == NSDecimalNumber { - parameter integerLiteral: a `IntegerLiteralType` for the system, probably `Int`. */ init(integerLiteral value: Swift.IntegerLiteralType) { - switch value { - case 0: - self.init(storage: NSDecimalNumber.zero()) - case 1: - self.init(storage: NSDecimalNumber.one()) - default: - self.init(storage: NSDecimalNumber(integerLiteral: value).decimalNumberByRoundingAccordingToBehavior(DecimalNumberBehavior.decimalNumberBehaviors)) - } + self.init(value) + } + + /// Initialize a new decimal with an `Double`. + /// - parameter value: an `Double`. + /// - returns: an initialized `DecimalNumberType`. + init(_ value: Double) { + self.init(storage: NSDecimalNumber(floatLiteral: value).decimalNumberByRoundingAccordingToBehavior(DecimalNumberBehavior.decimalNumberBehaviors)) + } + + /// Initialize a new decimal with a `Float`. + /// - parameter value: an `Float`. + /// - returns: an initialized `DecimalNumberType`. + init(_ value: Float) { + self.init(Double(value)) + } + + /** + Initialize a new value using a `FloatLiteralType` + + - parameter floatLiteral: a `FloatLiteralType` for the system, probably `Double`. + */ + init(floatLiteral value: Swift.FloatLiteralType) { + self.init(value) } /** diff --git a/Money/Shared/Decimal/NSDecimalExtensions.swift b/Money/Shared/Decimal/NSDecimalExtensions.swift index 68edfb0..95fad6a 100644 --- a/Money/Shared/Decimal/NSDecimalExtensions.swift +++ b/Money/Shared/Decimal/NSDecimalExtensions.swift @@ -35,16 +35,19 @@ public func ==(var lhs: NSDecimal, var rhs: NSDecimal) -> Bool { // MARK: - Comparable +extension NSDecimal: Comparable { } + public func <(var lhs: NSDecimal, var rhs: NSDecimal) -> Bool { return NSDecimalCompare(&lhs, &rhs) == .OrderedAscending } /** # NSDecimal Extension + This is an extension on NSDecimal to support `DecimalNumberType` and `Decimal`. */ -extension NSDecimal: Comparable { +internal extension NSDecimal { /** Static function to get the `NSDecimal` representation of @@ -52,7 +55,7 @@ extension NSDecimal: Comparable { - returns: a `NSDecimal` of zero. */ - public static func zero() -> NSDecimal { + static func zero() -> NSDecimal { return NSDecimalNumber.zero().decimalValue } @@ -62,7 +65,7 @@ extension NSDecimal: Comparable { - returns: a `NSDecimal` of one. */ - public static func one() -> NSDecimal { + static func one() -> NSDecimal { return NSDecimalNumber.one().decimalValue } @@ -72,7 +75,7 @@ extension NSDecimal: Comparable { - returns: a `Bool` if the value is below zero. */ - public var isNegative: Bool { + var isNegative: Bool { return self < NSDecimal.zero() } @@ -88,7 +91,7 @@ extension NSDecimal: Comparable { - returns: a `NSDecimal`. */ @warn_unused_result - public func subtract(var rhs: NSDecimal, withRoundingMode roundingMode: NSRoundingMode) -> NSDecimal { + func subtract(var rhs: NSDecimal, withRoundingMode roundingMode: NSRoundingMode) -> NSDecimal { var lhs = self var result = NSDecimal() NSDecimalSubtract(&result, &lhs, &rhs, roundingMode) @@ -103,7 +106,7 @@ extension NSDecimal: Comparable { - returns: a `NSDecimal`. */ @warn_unused_result - public func add(var rhs: NSDecimal, withRoundingMode roundingMode: NSRoundingMode) -> NSDecimal { + func add(var rhs: NSDecimal, withRoundingMode roundingMode: NSRoundingMode) -> NSDecimal { var lhs = self var result = NSDecimal() NSDecimalAdd(&result, &lhs, &rhs, roundingMode) @@ -118,7 +121,7 @@ extension NSDecimal: Comparable { - returns: a `NSDecimal`. */ @warn_unused_result - public func multiplyBy(var rhs: NSDecimal, withRoundingMode roundingMode: NSRoundingMode) -> NSDecimal { + func multiplyBy(var rhs: NSDecimal, withRoundingMode roundingMode: NSRoundingMode) -> NSDecimal { var lhs = self var result = NSDecimal() NSDecimalMultiply(&result, &lhs, &rhs, roundingMode) @@ -133,7 +136,7 @@ extension NSDecimal: Comparable { - returns: a `NSDecimal`. */ @warn_unused_result - public func divideBy(var rhs: NSDecimal, withRoundingMode roundingMode: NSRoundingMode) -> NSDecimal { + func divideBy(var rhs: NSDecimal, withRoundingMode roundingMode: NSRoundingMode) -> NSDecimal { var lhs = self var result = NSDecimal() NSDecimalDivide(&result, &lhs, &rhs, roundingMode) @@ -146,7 +149,7 @@ extension NSDecimal: Comparable { - parameter roundingMode: the NSRoundingMode to use for the calculation. - returns: a `NSDecimal`. */ - public func negateWithRoundingMode(roundingMode: NSRoundingMode) -> NSDecimal { + func negateWithRoundingMode(roundingMode: NSRoundingMode) -> NSDecimal { let negativeOne = NSDecimal.zero().subtract(NSDecimal.one(), withRoundingMode: roundingMode) let result = multiplyBy(negativeOne, withRoundingMode: roundingMode) return result @@ -160,7 +163,7 @@ extension NSDecimal: Comparable { - returns: a `NSDecimal`. */ @warn_unused_result - public func remainder(_rhs: NSDecimal, withRoundingMode roundingMode: NSRoundingMode) -> NSDecimal { + func remainder(_rhs: NSDecimal, withRoundingMode roundingMode: NSRoundingMode) -> NSDecimal { let lhs = NSDecimalNumber(decimal: self) let rhs = NSDecimalNumber(decimal: _rhs) let behaviors = NSDecimalNumberHandler(roundingMode: roundingMode, scale: 38, raiseOnExactness: false, raiseOnOverflow: false, raiseOnUnderflow: false, raiseOnDivideByZero: true) diff --git a/Money/Shared/Decimal/NSDecimalNumberExtensions.swift b/Money/Shared/Decimal/NSDecimalNumberExtensions.swift index 5924844..23244b8 100644 --- a/Money/Shared/Decimal/NSDecimalNumberExtensions.swift +++ b/Money/Shared/Decimal/NSDecimalNumberExtensions.swift @@ -35,6 +35,8 @@ public func ==(lhs: NSDecimalNumber, rhs: NSDecimalNumber) -> Bool { // MARK: - Comparable +extension NSDecimalNumber: Comparable { } + public func <(lhs: NSDecimalNumber, rhs: NSDecimalNumber) -> Bool { return lhs.compare(rhs) == .OrderedAscending } @@ -48,9 +50,9 @@ public func <(lhs: NSDecimalNumber, rhs: NSDecimalNumber) -> Bool { because it is a framework class which cannot be made final, and the protocol has functions which return Self. */ -extension NSDecimalNumber: Comparable { +internal extension NSDecimalNumber { - public var isNegative: Bool { + var isNegative: Bool { return self < NSDecimalNumber.zero() } @@ -62,7 +64,7 @@ extension NSDecimalNumber: Comparable { - returns: a `NSDecimalNumber`. */ @warn_unused_result - public func subtract(other: NSDecimalNumber, withBehaviors behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { + func subtract(other: NSDecimalNumber, withBehaviors behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { return decimalNumberBySubtracting(other, withBehavior: behaviors) } @@ -74,7 +76,7 @@ extension NSDecimalNumber: Comparable { - returns: a `NSDecimalNumber`. */ @warn_unused_result - public func add(other: NSDecimalNumber, withBehaviors behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { + func add(other: NSDecimalNumber, withBehaviors behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { return decimalNumberByAdding(other, withBehavior: behaviors) } @@ -85,7 +87,7 @@ extension NSDecimalNumber: Comparable { - returns: another instance of this type. */ @warn_unused_result - public func multiplyByPowerOf10(index: Int, withBehaviors behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { + func multiplyByPowerOf10(index: Int, withBehaviors behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { return decimalNumberByMultiplyingByPowerOf10(Int16(index), withBehavior: behaviors) } @@ -97,7 +99,7 @@ extension NSDecimalNumber: Comparable { - returns: a `NSDecimalNumber`. */ @warn_unused_result - public func multiplyBy(other: NSDecimalNumber, withBehaviors behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { + func multiplyBy(other: NSDecimalNumber, withBehaviors behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { return decimalNumberByMultiplyingBy(other, withBehavior: behaviors) } @@ -109,7 +111,7 @@ extension NSDecimalNumber: Comparable { - returns: a `NSDecimalNumber`. */ @warn_unused_result - public func divideBy(other: NSDecimalNumber, withBehaviors behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { + func divideBy(other: NSDecimalNumber, withBehaviors behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { return decimalNumberByDividingBy(other, withBehavior: behaviors) } @@ -119,7 +121,7 @@ extension NSDecimalNumber: Comparable { - parameter behaviors: an optional NSDecimalNumberBehaviors? - returns: a `NSDecimalNumber`. */ - public func negateWithBehaviors(behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { + func negateWithBehaviors(behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { let negativeOne = NSDecimalNumber(mantissa: 1, exponent: 0, isNegative: true) let result = decimalNumberByMultiplyingBy(negativeOne, withBehavior: behaviors) return result @@ -133,7 +135,7 @@ extension NSDecimalNumber: Comparable { - returns: a `NSDecimalNumber`. */ @warn_unused_result - public func remainder(other: NSDecimalNumber, withBehaviors behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { + func remainder(other: NSDecimalNumber, withBehaviors behaviors: NSDecimalNumberBehaviors?) -> NSDecimalNumber { let roundingMode: NSRoundingMode = Int(isNegative) ^ Int(other.isNegative) ? .RoundUp : .RoundDown let roundingBehaviors = NSDecimalNumberHandler(roundingMode: roundingMode, scale: 0, raiseOnExactness: false, raiseOnOverflow: false, raiseOnUnderflow: false, raiseOnDivideByZero: false) let quotient = divideBy(other, withBehaviors: roundingBehaviors) diff --git a/Money/Shared/FX/Bitcoin.swift b/Money/Shared/FX/Bitcoin.swift index 6856e7c..2586f37 100644 --- a/Money/Shared/FX/Bitcoin.swift +++ b/Money/Shared/FX/Bitcoin.swift @@ -1,4 +1,4 @@ -// + // // Bitcoin.swift // Money // @@ -31,28 +31,42 @@ import SwiftyJSON // MARK: - Bitcoin Currency -protocol BitcoinCurrencyType: CryptoCurrencyType { } +/** + # Bitcoin Currency Type + + BitcoinCurrencyType is a refinement of CryptoCurrencyType, + which allows type restriction when working with Bitcoin. +*/ +public protocol BitcoinCurrencyType: CryptoCurrencyType { } -extension Currency { +public extension Currency { /** # Currency.XBT This is the ISO 4217 currency code, however at the moment it is unofficial. + + unicode \u{20bf} was accepted as the Bitcoin currency + symbol in November. However, it's not yet available + on Apple platforms. Ƀ is a popular alternative + which is available. + */ - public struct XBT: BitcoinCurrencyType { + struct XBT: BitcoinCurrencyType { + + /// - returns: the proposed ISO 4217 currency code public static let code = "XBT" - /// unicode \u{20bf} was accepted as the Bitcoin currency - /// symbol in November - public static let symbol = "Ƀ" + /// The smallest unit of Bitcoin is the Satoshi /// - see: https://en.bitcoin.it/wiki/Satoshi_(unit) public static let scale: Int = 8 + + /// - returns: a configured NSNumberFormatter public static let formatter: NSNumberFormatter = { let fmtr = NSNumberFormatter() fmtr.numberStyle = .CurrencyStyle fmtr.maximumFractionDigits = scale - fmtr.currencySymbol = symbol + fmtr.currencySymbol = "Ƀ" return fmtr }() } @@ -62,33 +76,53 @@ extension Currency { This is the common code used for Bitcoin, although it can never become the ISO standard as BT is the country code for Bhutan. */ - public struct BTC: BitcoinCurrencyType { + struct BTC: BitcoinCurrencyType { public static let code = "BTC" - public static let symbol = Currency.XBT.symbol public static let scale = Currency.XBT.scale public static let formatter = Currency.XBT.formatter } } +/// The proposed ISO 4217 Bitcoin MoneyType public typealias XBT = _Money + +/// The most commonly used Bitcoin MoneyType public typealias BTC = _Money // MARK - cex.io FX -public protocol CEXSupportedFiatCurrencyType: CurrencyType { +/** + CEX.io Supported fiat currencies + + CEX only supports USD, EUR and RUB. + + - see: https://cex.io +*/ +public protocol CEXSupportedFiatCurrencyType: ISOCurrencyType { + + /** + CEX.io charge a percentage based commission with FX transactions. + - returns: a BankersDecimal representing the % commission. + */ static var cex_commissionPercentage: BankersDecimal { get } } extension Currency.USD: CEXSupportedFiatCurrencyType { + + /// - returns: the commission charged for USD transactions, a BankersDecimal public static let cex_commissionPercentage: BankersDecimal = 0.2 } extension Currency.EUR: CEXSupportedFiatCurrencyType { + + /// - returns: the commission charged for EUR transactions, a BankersDecimal public static let cex_commissionPercentage: BankersDecimal = 0.2 } extension Currency.RUB: CEXSupportedFiatCurrencyType { + + /// - returns: the commission charged for RUB transactions, a BankersDecimal public static let cex_commissionPercentage: BankersDecimal = 0 } @@ -160,7 +194,36 @@ class _CEX.quote(1_000) { transaction in + // etc. + } + ``` + + The above sample represents buying US$1,000 worth of BTC using CEX.io. +*/ public final class CEXBuy: _CEX<_CEXBuy> { } + + /** + Represents the sale of bitcoin using CEX.io. + + Usage is entirely type based - there is nothing to initialize. It is + generic over USD, EUR or RUB, no other currency types. For example. + + ```swift + CEXBuy.quote(10) { transaction in + // etc. + } + ``` + + The above sample represents selling 10 bitcoins for euros using CEX.io. + */ public final class CEXSell: _CEX<_CEXSell> { } diff --git a/Money/Shared/FX/FX.swift b/Money/Shared/FX/FX.swift index cde32e3..54bf23c 100644 --- a/Money/Shared/FX/FX.swift +++ b/Money/Shared/FX/FX.swift @@ -30,8 +30,6 @@ import ValueCoding import Result import SwiftyJSON -// MARK: - Currency Markets - /** # MoneyPairType Used to represent currency pairs. @@ -47,26 +45,53 @@ public protocol MoneyPairType { typealias CounterMoney: MoneyType } +/** + An enum to define the transaction from the perspective + of the user. i.e. either a buy or sell. +*/ public enum CurrencyMarketTransactionKind { - case Buy, Sell + /// User is performing a buy transaction + case Buy + /// User is performing a sell transaction + case Sell } +/** + A protocol to define a currency market transaction. It refines + MoneyPairType. It exposes the kind of transaction as a property. +*/ public protocol CurrencyMarketTransactionType: MoneyPairType { + + /// - returns: the transactionKind, a CurrencyMarketTransactionKind static var transactionKind: CurrencyMarketTransactionKind { get } } +/** + A protocol to define a crypto currency market transaction. It refines + CurrencyMarketTransactionType, and adds a new typealias for the FiatCurrency. + + By crypto currency market transaction, we refer to a currency exchange + involving a crypto currency, such as bitcoin, or litecoin or similar. + + A Fiat Currency is a currency which is maintained by a national bank, such as + USD, or EUR. + + Typrically a crypto currency market transaction is where the user is purchasing + bitcoin with USD, or selling bitcoin for USD. +*/ public protocol CryptoCurrencyMarketTransactionType: CurrencyMarketTransactionType { - typealias FiatCurrency: CurrencyType + typealias FiatCurrency: ISOCurrencyType } -// MARK: - FX Types - /** # Quote Represents an FX quote with a rate and commision percentage. By default the percentage is 0. */ -public struct FXQuote { +public struct FXQuote: ValueCoding { + + /// The Coder required for ValueCoding + public typealias Coder = FXQuoteCoder /// The exchange rate, stored as a `BankersDecimal`. public let rate: BankersDecimal @@ -114,6 +139,17 @@ public struct FXQuote { } } +/** + FXTransaction is a generic value type which represents a + foreign currency transaction. It is generic over two + MoneyType. + + There are some restrictions on the two generic types, to support + the mathematics and ValueCoding. However, essentially, if you use + _Money then these are limitations are all met. + + - see: MoneyPairType +*/ public struct FXTransaction: MoneyPairType { + Counter.DecimalStorageType == BankersDecimal.DecimalStorageType>: MoneyPairType, ValueCoding { + public typealias Coder = FXTransactionCoder public typealias BaseMoney = Base public typealias CounterMoney = Counter + /// - returns: the BaseMoney value. public let base: BaseMoney + + /// - returns: the BaseMoney commission. public let commission: BaseMoney + + /// - returns: the rate, a BankersDecimal. public let rate: BankersDecimal + + /// - returns: the CounterMoney value. public let counter: CounterMoney internal init(base: BaseMoney, commission: BaseMoney, rate: BankersDecimal, counter: CounterMoney) { @@ -139,6 +183,16 @@ public struct FXTransaction) -> Result } -// MARK: - FXRemoteProviderType Extension - extension FXRemoteProviderType { /** @@ -349,8 +396,6 @@ extension FXRemoteProviderType where } } -// MARK: - FX Network Client - internal class FXServiceProviderNetworkClient { let session: NSURLSession @@ -368,6 +413,10 @@ internal class FXServiceProviderNetworkClient { } } +/** + A trivial generic class suitable for subclassing for FX remote providers. + It automatically sets up the typealias for MoneyPairType. +*/ public class FXRemoteProvider { public typealias BaseMoney = B public typealias CounterMoney = T @@ -375,18 +424,19 @@ public class FXRemoteProvider { // MARK: - ValueCoding -extension FXQuote: ValueCoding { - public typealias Coder = FXQuoteCoder -} - +/** + A CodingType which codes FXQuote +*/ public final class FXQuoteCoder: NSObject, NSCoding, CodingType { enum Keys: String { case Rate = "rate" case Percentage = "percentage" } + /// The value being encoded or decoded public let value: FXQuote + /// Initialized with an FXQuote public required init(_ v: FXQuote) { value = v } @@ -403,9 +453,6 @@ public final class FXQuoteCoder: NSObject, NSCoding, CodingType { } } -extension FXTransaction: ValueCoding { - public typealias Coder = FXTransactionCoder -} private enum FXTransactionCoderKeys: String { case Base = "base" @@ -414,6 +461,9 @@ private enum FXTransactionCoderKeys: String { case Counter = "counter" } +/** + A CodingType which codes FXTransaction +*/ public final class FXTransactionCoder: NSObject, NSCoding, CodingType { + /// The value being encoded or decoded public let value: FXTransaction + /// Initialized with an FXTransaction public required init(_ v: FXTransaction) { value = v } diff --git a/Money/Shared/Locale.swift b/Money/Shared/Locale.swift new file mode 100644 index 0000000..eb7b4bd --- /dev/null +++ b/Money/Shared/Locale.swift @@ -0,0 +1,97 @@ +// +// Locale.swift +// Money +// +// Created by Daniel Thorpe on 22/11/2015. +// +// + +import Foundation + +internal let __formatter = NSNumberFormatter() + +/** + LanguageType provides an interface to retrieve + a language identifier. +*/ +public protocol LanguageType { + + /// - returns: the language identifier as a String + var languageIdentifier: String { get } +} + +/** + CountryType provides an interface to retrieve + a country identifier. + */ +public protocol CountryType { + + /// - returns: the country identifier as a String + var countryIdentifier: String { get } +} + +/** + LocaleType provides an interface to retrieve + a locale identifier. + */ +public protocol LocaleType { + + /// - returns: the locale identifier as a String + var localeIdentifier: String { get } +} + +/** + LocaleType extension for types which also conform to + LanguageType and CountryType. + */ +extension LocaleType where Self: LanguageType, Self: CountryType { + + /** + Default implementation of localeIdentifier, where + if a country identifier is not empty, it is appended to the + language identifier, with an underscore. + - returns: the locale identifier as a String + */ + public var localeIdentifier: String { + guard !countryIdentifier.isEmpty else { + return languageIdentifier + } + return "\(languageIdentifier)_\(countryIdentifier)" + } +} + +/** + Convenience currency related properties on NSLocale +*/ +public extension NSLocale { + + /// - returns: a String? for the currency code. + var currencyCode: String? { + return objectForKey(NSLocaleCurrencyCode) as? String + } + + /// - returns: a String? for the currency symbol. + var currencySymbol: String? { + return objectForKey(NSLocaleCurrencySymbol) as? String + } + + /// - returns: a String? for the currency grouping separator. + var currencyGroupingSeparator: String? { + return objectForKey(NSLocaleGroupingSeparator) as? String + } + + /// - returns: a String? for the currency decimal separator. + 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 diff --git a/Money/Shared/Money.swift b/Money/Shared/Money.swift index ea11e21..a80b7d7 100644 --- a/Money/Shared/Money.swift +++ b/Money/Shared/Money.swift @@ -51,13 +51,67 @@ public protocol MoneyType: DecimalNumberType, ValueCoding { init(minorUnits: IntegerLiteralType) } -// MARK: - MoneyType Extension +public extension MoneyType { + + /// - returns: a String for the currency's international code. + var currencyCode: String { + return Currency.code + } + + /// - returns: a String for the currency's symbol in the current locale. + var currencySymbol: String? { + return Currency.symbol + } +} 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 for + the current locale. + + 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. + + - 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) + } + + /** + + ### Formatted String for specific Locale + + 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. + + These are `.CurrencyISOCodeStyle`, `.CurrencyPluralStyle`, and + `.CurrencyAccountingStyle`. + + - 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) + } } public extension MoneyType where DecimalStorageType == BankersDecimal.DecimalStorageType { @@ -233,11 +287,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 +296,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 +325,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/Money/iOS/ApplePay.swift b/Money/iOS/ApplePay.swift index ae46720..a1ba3e9 100644 --- a/Money/iOS/ApplePay.swift +++ b/Money/iOS/ApplePay.swift @@ -28,7 +28,7 @@ import Foundation import PassKit import ValueCoding -// MARK: - Apple Pay equivalent types +// MARK: - Pay equivalent types /** @@ -165,7 +165,7 @@ public final class PaymentSummaryItemCoder 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](#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. @@ -63,19 +65,79 @@ 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 its 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: ```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 and ¥3,000 + +## Localized Formatting + +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. + +However, to specify a different style for the number formatter, use the `formattedWithStyle` method, like this: + +```swift +let money: Money = 99.99 +print("She has \(money.formattedWithStyle(.CurrencyPluralStyle))") ``` -> You have $ 32.50, JP¥ 3,000 and 0.00005 Satoshis +For an American in Russia, this would print out: +>She has 99,99 Russian roubles + +### 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. + +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 + +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 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 +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. Here’s Australian dollars, for a SwissGerman speaking user, in France. + +```swift +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 16.00 Auschtralischi Dollar ##  Pay @@ -229,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 { @@ -273,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. diff --git a/Supporting Files/Generate.swift b/Supporting Files/Generate.swift index 25af364..db80ab0 100755 --- a/Supporting Files/Generate.swift +++ b/Supporting Files/Generate.swift @@ -13,6 +13,38 @@ 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 caseNameValue: String { + return ".\(name)" + } + + var protocolName: String { + return "\(name)\(Self.typeName)Type" + } +} + +/// MARK: - Currency Info + func createMoneyTypeForCurrency(code: String) -> String { return "_Money" } @@ -58,7 +90,8 @@ 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(" /// - returns: lazy shared instance for Currency.\(code)") line(" public static var sharedInstance = \(code)(code: \"\(code)\")") line(" }") } @@ -74,7 +107,374 @@ func createMoneyTypes(line: Writer) { } } -func generate(outputPath: String) { +/// 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 countryIds = Set() + + var description: String { + return "\(id): \(displayName) -> \(countryIds)" + } + + 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 LanguagesById = Dictionary +typealias CountriesById = Dictionary + +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) + } + + if let languageId = languageId, var country = country { + country.langaugeIds.insert(languageId) + _countriesById.updateValue(country, forKey: country.id) + } + } + + self.languagesById = _languagesById + self.countriesById = _countriesById + + countries = ([Country])(countriesById.values).sort { $0.langaugeIds.count > $1.langaugeIds.count } + languages = ([Language])(languagesById.values).sort { $0.countryIds.count > $1.countryIds.count } + + languagesWithLessThanTwoCountries = languages.filter({ $0.countryIds.count < 2 }).sort() + languagesWithMoreThanOneCountry = languages.filter({ $0.countryIds.count > 1 }).sort() + } +} + +let info = LocaleInfo() + +func createLanguageSpeakingCountry(line: Writer, language: Language) { + let name = language.languageSpeakingCountryEnumName + + line("") + line("/**") + line(" An enum of countries which speak \(language.displayName).") + line("*/") + line("public enum \(name): CountryType {") + + let _countries = language.countryIds.sort().flatMap({ info.countriesById[$0] }) + + // Write the cases + line("") + for country in _countries { + line(" /// \(country.displayName) is a country which speaks \(language.displayName).") + line(" case \(country.name)") + } + + + // Write a static constant for all + let caseNames = _countries.map { $0.caseNameValue } + let joinedCaseNames = caseNames.joinWithSeparator(", ") + line("") + line(" /// - returns: an Array of all the countries which speak \(language.displayName)") + line(" public static let all: [\(name)] = [ \(joinedCaseNames) ]") + + line("") + line(" /// - returns: the country identifier of a specific \(language.displayName) speaking country.") + 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: Writer) { + line("") + line("// MARK: - Country Types") + for language in info.languagesWithMoreThanOneCountry { + createLanguageSpeakingCountry(line, language: language) + } +} + +func createLocale(line: Writer) { + line("") + line("// MARK: - Locale") + + do { + line("") + line("/**") + line("") + line("Locale is an enum for type safe representation ") + line("of locale identifiers. Its cases are languages ") + line("in US English. For languages which are spoken ") + line("in more than one country, an associated value ") + line("of the country should be provided. For example ") + line("") + line("```swift") + line("let locale: Locale = .French(.France)") + line("```") + line("*/") + line("public enum Locale {") + + for language in info.languages.sort() { + line("") + if language.countryIds.count > 1 { + line(" /**") + line(" ### \(language.displayName)") + line(" - requires: \(language.languageSpeakingCountryEnumName)") + line(" */") + line(" case \(language.name)(\(language.languageSpeakingCountryEnumName))") + } + else { + line(" /// ### \(language.displayName)") + line(" case \(language.name)") + } + } + + line("}") // End of enum + } + + // Add extension for LanguageType protocol + do { + line("") + line("/**") + line(" Locale conforms to LanguageType.") + line("*/") + line("extension Locale: LanguageType {") + line("") + line(" /// - returns: the lanauge identifier as a String.") + line(" public var languageIdentifier: String {") + line(" switch self {") + + 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(" }") // End of switch + line(" }") // End of var + line("}") // End of extension + } + + // Add extension for CountryType protocol + do { + line("") + line("/**") + line(" Locale conforms to CountryType.") + line("*/") + line("extension Locale: CountryType {") + line("") + line(" /// - returns: the country identifier as a String.") + line(" public var countryIdentifier: String {") + line(" switch self {") + + let caseNames = info.languagesWithLessThanTwoCountries.map { $0.caseNameValue } + let joinedCaseNames = caseNames.joinWithSeparator(", ") + line(" case \(joinedCaseNames):") + line(" return \"\"") + + for language in info.languagesWithMoreThanOneCountry { + line(" case .\(language.name)(let country):") + line(" return country.countryIdentifier") + } + + line(" }") // End of switch + line(" }") // End of var + line("}") // End of extension + } + + // 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(line) + + // Create the Locale enum + createLocale(line) + +} + +// 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)AutogeneratedTests: XCTestCase {") + content(line) + line("}") +} + +func createTestForCountryIdentifierFromCountryCaseName(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 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] }) { + createTestForCountryIdentifierFromCountryCaseName(line, country: country) + } + } +} + +func createUnitTestsForLanguageSpeakingCountries(line: Writer) { + line("") + line("// MARK: - Country Types Tests") + for language in info.languagesWithMoreThanOneCountry { + 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") + + 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.languagesWithLessThanTwoCountries { + createUnitTestsForLocaleWithLanguage(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)") @@ -95,17 +495,56 @@ func generate(outputPath: String) { outputStream.open() createFrontMatter(writeLine) + + createExtensionFor("Currency", writer: writeLine, content: createCurrencyTypes) write("\n") createMoneyTypes(writeLine) + write("\n") + 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) + + createUnitTestsForLanguageSpeakingCountries(writeLine) + + createUnitTestsForLocale(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/Supporting Files/Money.xcconfig b/Supporting Files/Money.xcconfig index 850e0bd..ddb677f 100644 --- a/Supporting Files/Money.xcconfig +++ b/Supporting Files/Money.xcconfig @@ -6,7 +6,7 @@ // // -MONEY_VERSION = 1.3.0 +MONEY_VERSION = 1.4.0 APPLICATION_EXTENSION_API_ONLY = YES INFOPLIST_FILE = $(SRCROOT)/Supporting Files/Info.plist diff --git a/Tests/Shared/AutogeneratedTests.swift b/Tests/Shared/AutogeneratedTests.swift new file mode 100644 index 0000000..aab9117 --- /dev/null +++ b/Tests/Shared/AutogeneratedTests.swift @@ -0,0 +1,5282 @@ +// +// 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 AfrikaansSpeakingCountryAutogeneratedTests: 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 AlbanianSpeakingCountryAutogeneratedTests: 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 ArabicSpeakingCountryAutogeneratedTests: 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 BengaliSpeakingCountryAutogeneratedTests: 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 CatalanSpeakingCountryAutogeneratedTests: 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 CentralKurdishSpeakingCountryAutogeneratedTests: 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 ChineseSpeakingCountryAutogeneratedTests: 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 CroatianSpeakingCountryAutogeneratedTests: 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 DanishSpeakingCountryAutogeneratedTests: 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 DutchSpeakingCountryAutogeneratedTests: 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 EnglishSpeakingCountryAutogeneratedTests: 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 EweSpeakingCountryAutogeneratedTests: 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 FrenchSpeakingCountryAutogeneratedTests: 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 FulahSpeakingCountryAutogeneratedTests: 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 GermanSpeakingCountryAutogeneratedTests: 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 GreekSpeakingCountryAutogeneratedTests: 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 HausaSpeakingCountryAutogeneratedTests: 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 ItalianSpeakingCountryAutogeneratedTests: 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 KoreanSpeakingCountryAutogeneratedTests: 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 LingalaSpeakingCountryAutogeneratedTests: 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 MalaySpeakingCountryAutogeneratedTests: 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 MasaiSpeakingCountryAutogeneratedTests: 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 NepaliSpeakingCountryAutogeneratedTests: 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 NorthernSamiSpeakingCountryAutogeneratedTests: 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ålSpeakingCountryAutogeneratedTests: 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 OromoSpeakingCountryAutogeneratedTests: 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 OsseticSpeakingCountryAutogeneratedTests: 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 PersianSpeakingCountryAutogeneratedTests: 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 PortugueseSpeakingCountryAutogeneratedTests: 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 PunjabiSpeakingCountryAutogeneratedTests: 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 QuechuaSpeakingCountryAutogeneratedTests: 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 RomanianSpeakingCountryAutogeneratedTests: 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 RussianSpeakingCountryAutogeneratedTests: 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 SerbianSpeakingCountryAutogeneratedTests: 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 SomaliSpeakingCountryAutogeneratedTests: 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 SpanishSpeakingCountryAutogeneratedTests: 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 SwahiliSpeakingCountryAutogeneratedTests: 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 SwedishSpeakingCountryAutogeneratedTests: 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 SwissGermanSpeakingCountryAutogeneratedTests: 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 TamilSpeakingCountryAutogeneratedTests: 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 TesoSpeakingCountryAutogeneratedTests: 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 TibetanSpeakingCountryAutogeneratedTests: 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 TigrinyaSpeakingCountryAutogeneratedTests: 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 TurkishSpeakingCountryAutogeneratedTests: 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 UrduSpeakingCountryAutogeneratedTests: 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 UzbekSpeakingCountryAutogeneratedTests: 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 YorubaSpeakingCountryAutogeneratedTests: 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") + } +} + +// MARK: - Locale Tests + +class LocaleAfrikaansLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleAlbanianLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleArabicLanguageAutogeneratedTests: XCTestCase { + + 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_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") + } +} + +class LocaleBengaliLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleCatalanLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleCentralKurdishLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleChineseLanguageAutogeneratedTests: XCTestCase { + + 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_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") + } +} + +class LocaleCroatianLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleDanishLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleDutchLanguageAutogeneratedTests: XCTestCase { + + 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_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") + } +} + +class LocaleEnglishLanguageAutogeneratedTests: 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") + } +} + +class LocaleEweLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleFrenchLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +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_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") + } +} + +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_NorwegianBokmål_Norway() { + locale = .NorwegianBokmål(.Norway) + XCTAssertEqual(locale.languageIdentifier, "nb") + XCTAssertEqual(locale.localeIdentifier, "nb_NO") + } +} + +class LocaleOromoLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleOsseticLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocalePersianLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocalePortugueseLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocalePunjabiLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleQuechuaLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleRomanianLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +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_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") + } +} + +class LocaleSerbianLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleSomaliLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleSpanishLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleSwahiliLanguageAutogeneratedTests: XCTestCase { + + 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_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") + } +} + +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_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") + } +} + +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_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") + } +} + +class LocaleTamilLanguageAutogeneratedTests: XCTestCase { + + 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_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") + } +} + +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_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) + 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") + } +} + +class LocaleTigrinyaLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleTurkishLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleUrduLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleUzbekLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +class LocaleYorubaLanguageAutogeneratedTests: XCTestCase { + + var locale: Locale! + + 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") + } +} + +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() { + locale = .Akan + XCTAssertEqual(locale.languageIdentifier, "ak") + XCTAssertEqual(locale.localeIdentifier, "ak") + } + + 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_Asu() { + locale = .Asu + XCTAssertEqual(locale.languageIdentifier, "asa") + XCTAssertEqual(locale.localeIdentifier, "asa") + } + + func test__language_identifier_for_Azerbaijani() { + locale = .Azerbaijani + XCTAssertEqual(locale.languageIdentifier, "az") + XCTAssertEqual(locale.localeIdentifier, "az") + } + + func test__language_identifier_for_Bafia() { + locale = .Bafia + XCTAssertEqual(locale.languageIdentifier, "ksf") + XCTAssertEqual(locale.localeIdentifier, "ksf") + } + + func test__language_identifier_for_Bambara() { + locale = .Bambara + XCTAssertEqual(locale.languageIdentifier, "bm") + XCTAssertEqual(locale.localeIdentifier, "bm") + } + + 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() { + locale = .Bosnian + XCTAssertEqual(locale.languageIdentifier, "bs") + XCTAssertEqual(locale.localeIdentifier, "bs") + } + + func test__language_identifier_for_Breton() { + locale = .Breton + XCTAssertEqual(locale.languageIdentifier, "br") + XCTAssertEqual(locale.localeIdentifier, "br") + } + + func test__language_identifier_for_Bulgarian() { + locale = .Bulgarian + XCTAssertEqual(locale.languageIdentifier, "bg") + XCTAssertEqual(locale.localeIdentifier, "bg") + } + + func test__language_identifier_for_Burmese() { + locale = .Burmese + XCTAssertEqual(locale.languageIdentifier, "my") + XCTAssertEqual(locale.localeIdentifier, "my") + } + + func test__language_identifier_for_CentralAtlasTamazight() { + locale = .CentralAtlasTamazight + XCTAssertEqual(locale.languageIdentifier, "tzm") + XCTAssertEqual(locale.localeIdentifier, "tzm") + } + + func test__language_identifier_for_Cherokee() { + locale = .Cherokee + XCTAssertEqual(locale.languageIdentifier, "chr") + XCTAssertEqual(locale.localeIdentifier, "chr") + } + + func test__language_identifier_for_Chiga() { + locale = .Chiga + XCTAssertEqual(locale.languageIdentifier, "cgg") + XCTAssertEqual(locale.localeIdentifier, "cgg") + } + + func test__language_identifier_for_Colognian() { + locale = .Colognian + XCTAssertEqual(locale.languageIdentifier, "ksh") + XCTAssertEqual(locale.localeIdentifier, "ksh") + } + + func test__language_identifier_for_Cornish() { + locale = .Cornish + XCTAssertEqual(locale.languageIdentifier, "kw") + XCTAssertEqual(locale.localeIdentifier, "kw") + } + + func test__language_identifier_for_Czech() { + locale = .Czech + XCTAssertEqual(locale.languageIdentifier, "cs") + XCTAssertEqual(locale.localeIdentifier, "cs") + } + + func test__language_identifier_for_Duala() { + locale = .Duala + XCTAssertEqual(locale.languageIdentifier, "dua") + XCTAssertEqual(locale.localeIdentifier, "dua") + } + + func test__language_identifier_for_Dzongkha() { + locale = .Dzongkha + XCTAssertEqual(locale.languageIdentifier, "dz") + XCTAssertEqual(locale.localeIdentifier, "dz") + } + + func test__language_identifier_for_Embu() { + locale = .Embu + XCTAssertEqual(locale.languageIdentifier, "ebu") + XCTAssertEqual(locale.localeIdentifier, "ebu") + } + + func test__language_identifier_for_Estonian() { + locale = .Estonian + XCTAssertEqual(locale.languageIdentifier, "et") + XCTAssertEqual(locale.localeIdentifier, "et") + } + + func test__language_identifier_for_Ewondo() { + locale = .Ewondo + XCTAssertEqual(locale.languageIdentifier, "ewo") + XCTAssertEqual(locale.localeIdentifier, "ewo") + } + + func test__language_identifier_for_Faroese() { + locale = .Faroese + XCTAssertEqual(locale.languageIdentifier, "fo") + XCTAssertEqual(locale.localeIdentifier, "fo") + } + + func test__language_identifier_for_Filipino() { + locale = .Filipino + XCTAssertEqual(locale.languageIdentifier, "fil") + XCTAssertEqual(locale.localeIdentifier, "fil") + } + + func test__language_identifier_for_Finnish() { + locale = .Finnish + XCTAssertEqual(locale.languageIdentifier, "fi") + XCTAssertEqual(locale.localeIdentifier, "fi") + } + + func test__language_identifier_for_Friulian() { + locale = .Friulian + XCTAssertEqual(locale.languageIdentifier, "fur") + XCTAssertEqual(locale.localeIdentifier, "fur") + } + + func test__language_identifier_for_Galician() { + locale = .Galician + XCTAssertEqual(locale.languageIdentifier, "gl") + XCTAssertEqual(locale.localeIdentifier, "gl") + } + + func test__language_identifier_for_Ganda() { + locale = .Ganda + XCTAssertEqual(locale.languageIdentifier, "lg") + XCTAssertEqual(locale.localeIdentifier, "lg") + } + + func test__language_identifier_for_Georgian() { + locale = .Georgian + XCTAssertEqual(locale.languageIdentifier, "ka") + XCTAssertEqual(locale.localeIdentifier, "ka") + } + + func test__language_identifier_for_Gujarati() { + locale = .Gujarati + XCTAssertEqual(locale.languageIdentifier, "gu") + XCTAssertEqual(locale.localeIdentifier, "gu") + } + + func test__language_identifier_for_Gusii() { + locale = .Gusii + XCTAssertEqual(locale.languageIdentifier, "guz") + XCTAssertEqual(locale.localeIdentifier, "guz") + } + + func test__language_identifier_for_Hawaiian() { + locale = .Hawaiian + XCTAssertEqual(locale.languageIdentifier, "haw") + XCTAssertEqual(locale.localeIdentifier, "haw") + } + + func test__language_identifier_for_Hebrew() { + locale = .Hebrew + XCTAssertEqual(locale.languageIdentifier, "he") + XCTAssertEqual(locale.localeIdentifier, "he") + } + + func test__language_identifier_for_Hindi() { + locale = .Hindi + XCTAssertEqual(locale.languageIdentifier, "hi") + XCTAssertEqual(locale.localeIdentifier, "hi") + } + + func test__language_identifier_for_Hungarian() { + locale = .Hungarian + XCTAssertEqual(locale.languageIdentifier, "hu") + XCTAssertEqual(locale.localeIdentifier, "hu") + } + + func test__language_identifier_for_Icelandic() { + locale = .Icelandic + XCTAssertEqual(locale.languageIdentifier, "is") + XCTAssertEqual(locale.localeIdentifier, "is") + } + + func test__language_identifier_for_Igbo() { + locale = .Igbo + XCTAssertEqual(locale.languageIdentifier, "ig") + XCTAssertEqual(locale.localeIdentifier, "ig") + } + + func test__language_identifier_for_InariSami() { + locale = .InariSami + XCTAssertEqual(locale.languageIdentifier, "smn") + XCTAssertEqual(locale.localeIdentifier, "smn") + } + + func test__language_identifier_for_Indonesian() { + locale = .Indonesian + XCTAssertEqual(locale.languageIdentifier, "id") + XCTAssertEqual(locale.localeIdentifier, "id") + } + + func test__language_identifier_for_Inuktitut() { + locale = .Inuktitut + XCTAssertEqual(locale.languageIdentifier, "iu") + XCTAssertEqual(locale.localeIdentifier, "iu") + } + + func test__language_identifier_for_Irish() { + locale = .Irish + XCTAssertEqual(locale.languageIdentifier, "ga") + XCTAssertEqual(locale.localeIdentifier, "ga") + } + + func test__language_identifier_for_Japanese() { + locale = .Japanese + XCTAssertEqual(locale.languageIdentifier, "ja") + XCTAssertEqual(locale.localeIdentifier, "ja") + } + + func test__language_identifier_for_JolaFonyi() { + locale = .JolaFonyi + XCTAssertEqual(locale.languageIdentifier, "dyo") + XCTAssertEqual(locale.localeIdentifier, "dyo") + } + + func test__language_identifier_for_Kabuverdianu() { + locale = .Kabuverdianu + XCTAssertEqual(locale.languageIdentifier, "kea") + XCTAssertEqual(locale.localeIdentifier, "kea") + } + + func test__language_identifier_for_Kabyle() { + locale = .Kabyle + XCTAssertEqual(locale.languageIdentifier, "kab") + XCTAssertEqual(locale.localeIdentifier, "kab") + } + + func test__language_identifier_for_Kako() { + locale = .Kako + XCTAssertEqual(locale.languageIdentifier, "kkj") + XCTAssertEqual(locale.localeIdentifier, "kkj") + } + + func test__language_identifier_for_Kalaallisut() { + locale = .Kalaallisut + XCTAssertEqual(locale.languageIdentifier, "kl") + XCTAssertEqual(locale.localeIdentifier, "kl") + } + + func test__language_identifier_for_Kalenjin() { + locale = .Kalenjin + XCTAssertEqual(locale.languageIdentifier, "kln") + XCTAssertEqual(locale.localeIdentifier, "kln") + } + + func test__language_identifier_for_Kamba() { + locale = .Kamba + XCTAssertEqual(locale.languageIdentifier, "kam") + XCTAssertEqual(locale.localeIdentifier, "kam") + } + + func test__language_identifier_for_Kannada() { + locale = .Kannada + XCTAssertEqual(locale.languageIdentifier, "kn") + XCTAssertEqual(locale.localeIdentifier, "kn") + } + + func test__language_identifier_for_Kashmiri() { + locale = .Kashmiri + XCTAssertEqual(locale.languageIdentifier, "ks") + XCTAssertEqual(locale.localeIdentifier, "ks") + } + + func test__language_identifier_for_Kazakh() { + locale = .Kazakh + XCTAssertEqual(locale.languageIdentifier, "kk") + XCTAssertEqual(locale.localeIdentifier, "kk") + } + + func test__language_identifier_for_Khmer() { + locale = .Khmer + XCTAssertEqual(locale.languageIdentifier, "km") + XCTAssertEqual(locale.localeIdentifier, "km") + } + + func test__language_identifier_for_Kikuyu() { + locale = .Kikuyu + XCTAssertEqual(locale.languageIdentifier, "ki") + XCTAssertEqual(locale.localeIdentifier, "ki") + } + + func test__language_identifier_for_Kinyarwanda() { + locale = .Kinyarwanda + XCTAssertEqual(locale.languageIdentifier, "rw") + XCTAssertEqual(locale.localeIdentifier, "rw") + } + + func test__language_identifier_for_Konkani() { + locale = .Konkani + XCTAssertEqual(locale.languageIdentifier, "kok") + XCTAssertEqual(locale.localeIdentifier, "kok") + } + + func test__language_identifier_for_KoyraChiini() { + locale = .KoyraChiini + XCTAssertEqual(locale.languageIdentifier, "khq") + XCTAssertEqual(locale.localeIdentifier, "khq") + } + + func test__language_identifier_for_KoyraboroSenni() { + locale = .KoyraboroSenni + XCTAssertEqual(locale.languageIdentifier, "ses") + XCTAssertEqual(locale.localeIdentifier, "ses") + } + + func test__language_identifier_for_Kwasio() { + locale = .Kwasio + XCTAssertEqual(locale.languageIdentifier, "nmg") + XCTAssertEqual(locale.localeIdentifier, "nmg") + } + + func test__language_identifier_for_Kyrgyz() { + locale = .Kyrgyz + XCTAssertEqual(locale.languageIdentifier, "ky") + XCTAssertEqual(locale.localeIdentifier, "ky") + } + + func test__language_identifier_for_Lakota() { + locale = .Lakota + XCTAssertEqual(locale.languageIdentifier, "lkt") + XCTAssertEqual(locale.localeIdentifier, "lkt") + } + + 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_LowerSorbian() { + locale = .LowerSorbian + XCTAssertEqual(locale.languageIdentifier, "dsb") + XCTAssertEqual(locale.localeIdentifier, "dsb") + } + + func test__language_identifier_for_LubaKatanga() { + locale = .LubaKatanga + XCTAssertEqual(locale.languageIdentifier, "lu") + XCTAssertEqual(locale.localeIdentifier, "lu") + } + + func test__language_identifier_for_Luo() { + locale = .Luo + XCTAssertEqual(locale.languageIdentifier, "luo") + XCTAssertEqual(locale.localeIdentifier, "luo") + } + + func test__language_identifier_for_Luxembourgish() { + locale = .Luxembourgish + XCTAssertEqual(locale.languageIdentifier, "lb") + XCTAssertEqual(locale.localeIdentifier, "lb") + } + + func test__language_identifier_for_Luyia() { + locale = .Luyia + XCTAssertEqual(locale.languageIdentifier, "luy") + XCTAssertEqual(locale.localeIdentifier, "luy") + } + + func test__language_identifier_for_Macedonian() { + locale = .Macedonian + XCTAssertEqual(locale.languageIdentifier, "mk") + XCTAssertEqual(locale.localeIdentifier, "mk") + } + + func test__language_identifier_for_Machame() { + locale = .Machame + XCTAssertEqual(locale.languageIdentifier, "jmc") + XCTAssertEqual(locale.localeIdentifier, "jmc") + } + + func test__language_identifier_for_MakhuwaMeetto() { + locale = .MakhuwaMeetto + XCTAssertEqual(locale.languageIdentifier, "mgh") + XCTAssertEqual(locale.localeIdentifier, "mgh") + } + + func test__language_identifier_for_Makonde() { + locale = .Makonde + XCTAssertEqual(locale.languageIdentifier, "kde") + XCTAssertEqual(locale.localeIdentifier, "kde") + } + + func test__language_identifier_for_Malagasy() { + locale = .Malagasy + XCTAssertEqual(locale.languageIdentifier, "mg") + XCTAssertEqual(locale.localeIdentifier, "mg") + } + + func test__language_identifier_for_Malayalam() { + locale = .Malayalam + XCTAssertEqual(locale.languageIdentifier, "ml") + XCTAssertEqual(locale.localeIdentifier, "ml") + } + + func test__language_identifier_for_Maltese() { + locale = .Maltese + XCTAssertEqual(locale.languageIdentifier, "mt") + XCTAssertEqual(locale.localeIdentifier, "mt") + } + + func test__language_identifier_for_Manx() { + locale = .Manx + XCTAssertEqual(locale.languageIdentifier, "gv") + XCTAssertEqual(locale.localeIdentifier, "gv") + } + + func test__language_identifier_for_Marathi() { + locale = .Marathi + XCTAssertEqual(locale.languageIdentifier, "mr") + XCTAssertEqual(locale.localeIdentifier, "mr") + } + + func test__language_identifier_for_Meru() { + locale = .Meru + XCTAssertEqual(locale.languageIdentifier, "mer") + XCTAssertEqual(locale.localeIdentifier, "mer") + } + + func test__language_identifier_for_Meta() { + locale = .Meta + XCTAssertEqual(locale.languageIdentifier, "mgo") + XCTAssertEqual(locale.localeIdentifier, "mgo") + } + + func test__language_identifier_for_Mongolian() { + locale = .Mongolian + XCTAssertEqual(locale.languageIdentifier, "mn") + XCTAssertEqual(locale.localeIdentifier, "mn") + } + + func test__language_identifier_for_Morisyen() { + locale = .Morisyen + XCTAssertEqual(locale.languageIdentifier, "mfe") + XCTAssertEqual(locale.localeIdentifier, "mfe") + } + + func test__language_identifier_for_Mundang() { + locale = .Mundang + XCTAssertEqual(locale.languageIdentifier, "mua") + XCTAssertEqual(locale.localeIdentifier, "mua") + } + + func test__language_identifier_for_Nama() { + locale = .Nama + XCTAssertEqual(locale.languageIdentifier, "naq") + XCTAssertEqual(locale.localeIdentifier, "naq") + } + + func test__language_identifier_for_Ngiemboon() { + locale = .Ngiemboon + XCTAssertEqual(locale.languageIdentifier, "nnh") + XCTAssertEqual(locale.localeIdentifier, "nnh") + } + + func test__language_identifier_for_Ngomba() { + locale = .Ngomba + XCTAssertEqual(locale.languageIdentifier, "jgo") + XCTAssertEqual(locale.localeIdentifier, "jgo") + } + + func test__language_identifier_for_NorthNdebele() { + locale = .NorthNdebele + XCTAssertEqual(locale.languageIdentifier, "nd") + XCTAssertEqual(locale.localeIdentifier, "nd") + } + + func test__language_identifier_for_NorwegianNynorsk() { + locale = .NorwegianNynorsk + XCTAssertEqual(locale.languageIdentifier, "nn") + XCTAssertEqual(locale.localeIdentifier, "nn") + } + + func test__language_identifier_for_Nuer() { + locale = .Nuer + XCTAssertEqual(locale.languageIdentifier, "nus") + XCTAssertEqual(locale.localeIdentifier, "nus") + } + + func test__language_identifier_for_Nyankole() { + locale = .Nyankole + XCTAssertEqual(locale.languageIdentifier, "nyn") + XCTAssertEqual(locale.localeIdentifier, "nyn") + } + + func test__language_identifier_for_Oriya() { + locale = .Oriya + XCTAssertEqual(locale.languageIdentifier, "or") + XCTAssertEqual(locale.localeIdentifier, "or") + } + + func test__language_identifier_for_Pashto() { + locale = .Pashto + XCTAssertEqual(locale.languageIdentifier, "ps") + XCTAssertEqual(locale.localeIdentifier, "ps") + } + + func test__language_identifier_for_Polish() { + locale = .Polish + XCTAssertEqual(locale.languageIdentifier, "pl") + XCTAssertEqual(locale.localeIdentifier, "pl") + } + + 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() { + locale = .Rundi + XCTAssertEqual(locale.languageIdentifier, "rn") + XCTAssertEqual(locale.localeIdentifier, "rn") + } + + func test__language_identifier_for_Rwa() { + locale = .Rwa + XCTAssertEqual(locale.languageIdentifier, "rwk") + XCTAssertEqual(locale.localeIdentifier, "rwk") + } + + func test__language_identifier_for_Sakha() { + locale = .Sakha + XCTAssertEqual(locale.languageIdentifier, "sah") + XCTAssertEqual(locale.localeIdentifier, "sah") + } + + func test__language_identifier_for_Samburu() { + locale = .Samburu + XCTAssertEqual(locale.languageIdentifier, "saq") + XCTAssertEqual(locale.localeIdentifier, "saq") + } + + func test__language_identifier_for_Sango() { + locale = .Sango + XCTAssertEqual(locale.languageIdentifier, "sg") + XCTAssertEqual(locale.localeIdentifier, "sg") + } + + func test__language_identifier_for_Sangu() { + locale = .Sangu + XCTAssertEqual(locale.languageIdentifier, "sbp") + XCTAssertEqual(locale.localeIdentifier, "sbp") + } + + func test__language_identifier_for_ScottishGaelic() { + locale = .ScottishGaelic + XCTAssertEqual(locale.languageIdentifier, "gd") + XCTAssertEqual(locale.localeIdentifier, "gd") + } + + func test__language_identifier_for_Sena() { + locale = .Sena + XCTAssertEqual(locale.languageIdentifier, "seh") + XCTAssertEqual(locale.localeIdentifier, "seh") + } + + func test__language_identifier_for_Shambala() { + locale = .Shambala + XCTAssertEqual(locale.languageIdentifier, "ksb") + XCTAssertEqual(locale.localeIdentifier, "ksb") + } + + func test__language_identifier_for_Shona() { + locale = .Shona + XCTAssertEqual(locale.languageIdentifier, "sn") + XCTAssertEqual(locale.localeIdentifier, "sn") + } + + func test__language_identifier_for_SichuanYi() { + locale = .SichuanYi + XCTAssertEqual(locale.languageIdentifier, "ii") + XCTAssertEqual(locale.localeIdentifier, "ii") + } + + func test__language_identifier_for_Sinhala() { + locale = .Sinhala + XCTAssertEqual(locale.languageIdentifier, "si") + XCTAssertEqual(locale.localeIdentifier, "si") + } + + func test__language_identifier_for_Slovak() { + locale = .Slovak + XCTAssertEqual(locale.languageIdentifier, "sk") + XCTAssertEqual(locale.localeIdentifier, "sk") + } + + func test__language_identifier_for_Slovenian() { + locale = .Slovenian + XCTAssertEqual(locale.languageIdentifier, "sl") + XCTAssertEqual(locale.localeIdentifier, "sl") + } + + func test__language_identifier_for_Soga() { + locale = .Soga + XCTAssertEqual(locale.languageIdentifier, "xog") + XCTAssertEqual(locale.localeIdentifier, "xog") + } + + func test__language_identifier_for_StandardMoroccanTamazight() { + locale = .StandardMoroccanTamazight + XCTAssertEqual(locale.languageIdentifier, "zgh") + XCTAssertEqual(locale.localeIdentifier, "zgh") + } + + func test__language_identifier_for_Tachelhit() { + locale = .Tachelhit + XCTAssertEqual(locale.languageIdentifier, "shi") + XCTAssertEqual(locale.localeIdentifier, "shi") + } + + func test__language_identifier_for_Taita() { + locale = .Taita + XCTAssertEqual(locale.languageIdentifier, "dav") + XCTAssertEqual(locale.localeIdentifier, "dav") + } + + func test__language_identifier_for_Tajik() { + locale = .Tajik + XCTAssertEqual(locale.languageIdentifier, "tg") + XCTAssertEqual(locale.localeIdentifier, "tg") + } + + func test__language_identifier_for_Tasawaq() { + locale = .Tasawaq + XCTAssertEqual(locale.languageIdentifier, "twq") + XCTAssertEqual(locale.localeIdentifier, "twq") + } + + func test__language_identifier_for_Telugu() { + locale = .Telugu + XCTAssertEqual(locale.languageIdentifier, "te") + XCTAssertEqual(locale.localeIdentifier, "te") + } + + func test__language_identifier_for_Thai() { + locale = .Thai + XCTAssertEqual(locale.languageIdentifier, "th") + XCTAssertEqual(locale.localeIdentifier, "th") + } + + func test__language_identifier_for_Tongan() { + locale = .Tongan + XCTAssertEqual(locale.languageIdentifier, "to") + XCTAssertEqual(locale.localeIdentifier, "to") + } + + func test__language_identifier_for_Turkmen() { + locale = .Turkmen + XCTAssertEqual(locale.languageIdentifier, "tk") + XCTAssertEqual(locale.localeIdentifier, "tk") + } + + func test__language_identifier_for_Ukrainian() { + locale = .Ukrainian + XCTAssertEqual(locale.languageIdentifier, "uk") + XCTAssertEqual(locale.localeIdentifier, "uk") + } + + func test__language_identifier_for_UpperSorbian() { + locale = .UpperSorbian + XCTAssertEqual(locale.languageIdentifier, "hsb") + XCTAssertEqual(locale.localeIdentifier, "hsb") + } + + func test__language_identifier_for_Uyghur() { + locale = .Uyghur + XCTAssertEqual(locale.languageIdentifier, "ug") + XCTAssertEqual(locale.localeIdentifier, "ug") + } + + func test__language_identifier_for_Vai() { + locale = .Vai + XCTAssertEqual(locale.languageIdentifier, "vai") + XCTAssertEqual(locale.localeIdentifier, "vai") + } + + 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() { + locale = .Welsh + 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") + } +} diff --git a/Tests/Shared/DecimalNumberTypeTests.swift b/Tests/Shared/DecimalNumberTypeTests.swift new file mode 100644 index 0000000..86c1c5b --- /dev/null +++ b/Tests/Shared/DecimalNumberTypeTests.swift @@ -0,0 +1,122 @@ +// +// DecimalNumberTypeTests.swift +// Money +// +// Created by Daniel Thorpe on 22/11/2015. +// +// + +import XCTest +@testable import Money + +class DecimalNumberTypeTests: XCTestCase { + + var decimal: Decimal! + var money: Money! + + func test__init_with_int() { + let value: Int = 10 + decimal = Decimal(value) + money = Money(value) + XCTAssertEqual(decimal, 10) + XCTAssertEqual(money, 10) + } + + func test__init_with_uint8() { + let value: UInt8 = 10 + decimal = Decimal(value) + money = Money(value) + XCTAssertEqual(decimal, 10) + XCTAssertEqual(money, 10) + } + + func test__init_with_int8() { + let value: Int8 = 10 + decimal = Decimal(value) + money = Money(value) + XCTAssertEqual(decimal, 10) + XCTAssertEqual(money, 10) + } + + func test__init_with_uint16() { + let value: UInt16 = 10 + decimal = Decimal(value) + money = Money(value) + XCTAssertEqual(decimal, 10) + XCTAssertEqual(money, 10) + } + + func test__init_with_int16() { + let value: Int16 = 10 + decimal = Decimal(value) + money = Money(value) + XCTAssertEqual(decimal, 10) + XCTAssertEqual(money, 10) + } + + func test__init_with_uint32() { + let value: UInt32 = 10 + decimal = Decimal(value) + money = Money(value) + XCTAssertEqual(decimal, 10) + XCTAssertEqual(money, 10) + } + + func test__init_with_int32() { + let value: Int32 = 10 + decimal = Decimal(value) + money = Money(value) + XCTAssertEqual(decimal, 10) + XCTAssertEqual(money, 10) + } + + func test__init_with_uint64() { + let value: UInt64 = 10 + decimal = Decimal(value) + money = Money(value) + XCTAssertEqual(decimal, 10) + XCTAssertEqual(money, 10) + } + + func test__init_with_int64() { + let value: Int64 = 10 + decimal = Decimal(value) + money = Money(value) + XCTAssertEqual(decimal, 10) + XCTAssertEqual(money, 10) + } + + func test__init_with_float() { + let value: Float = 9.0 + decimal = Decimal(value) + money = Money(value) + XCTAssertEqual(decimal, 9.0) + XCTAssertEqual(money, 9.00) + } + + func test__init_with_double() { + let value: Double = 9.999 + decimal = Decimal(value) + money = Money(value) + XCTAssertEqual(decimal, 9.999) + XCTAssertEqual(money, 10.00) + } + + func testPerformanceInitInt() { + self.measureBlock { + for value in 1...10_000 { + self.money = Money(value) + } + } + } + + func testPerformanceInitDouble() { + let value: Double = 9.99 + self.measureBlock { + for _ in 1...10_000 { + self.money = Money(value) + } + } + } + +} 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/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 f7867eb..99deb86 100644 --- a/Tests/Shared/MoneyTests.swift +++ b/Tests/Shared/MoneyTests.swift @@ -21,9 +21,30 @@ 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! + var btc: BTC! + + override func tearDown() { + super.tearDown() + money = nil + gbp = nil + usd = nil + cad = nil + eur = nil + jpy = nil + btc = nil + } +} + +class MoneyInitializerTests: MoneyTests { func test__money_initialize_with__nothing() { money = Money() @@ -44,6 +65,11 @@ class MoneyInitializerTests: XCTestCase { money = 10 XCTAssertEqual(money.negative, -10) } + + func test__money_amount() { + money = 10 + XCTAssertEqual(money.amount, NSDecimalNumber(integer: 10)) + } } class MoneyEqualityTests: XCTestCase { @@ -223,56 +249,102 @@ 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 = 32_000 + btc = 0.002_007 + } 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) + XCTAssertEqual(gbp.currencyCode, "GBP") + XCTAssertEqual(gbp.currencySymbol, "£") + XCTAssertEqual(gbp.description, "£100.00") + } + + func test__usd_formatted_with_style() { + XCTAssertEqual(usd.currencyCode, "USD") + let formatted = usd.formattedWithStyle(.CurrencyStyle, forLocale: .English(.UnitedStates)) + XCTAssertEqual(formatted, "$99.00") } - 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__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(Currency.CAD.symbol, "CA$") - XCTAssertEqual(cad.description, "CA$ 102.01") - XCTAssertEqual(Currency.CAD.formatter.numberStyle, NSNumberFormatterStyle.CurrencyStyle) + XCTAssertEqual(cad.currencyCode, "CAD") + XCTAssertEqual(cad.description, "CA$102.01") } 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) + XCTAssertEqual(aud.currencyCode, "AUD") + XCTAssertEqual(aud.description, "A$100.00") } 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) + XCTAssertEqual(eur.currencyCode, "EUR") + XCTAssertEqual(eur.description, "€249.50") } 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) + XCTAssertEqual(jpy.currencyCode, "JPY") + XCTAssertEqual(JPY.Currency.scale, 0) + if NSLocale.currentLocale().localeIdentifier == "en_US" { + XCTAssertEqual(jpy.description, "¥32,000") + } + else { + 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 { + + override func setUp() { + super.setUp() + gbp = 100 + usd = 99 + cad = 102.01 + aud = 99.999 + eur = 249.499 + jpy = 32_000 + } + + // Tests assume a en_GB test environment + func test__locale_identifier_equals_current_locale() { + 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_Spanish_Spain() { + let result = gbp.formattedWithStyle(.CurrencyStyle, forLocale: .Spanish(.Spain)) + XCTAssertEqual(result, "100,00 GBP") + } + + func test__formatted_for_English_UnitedKingdom() { + let result = gbp.formattedWithStyle(.CurrencyStyle, forLocale: .English(.UnitedKingdom)) + XCTAssertEqual(result, "£100.00") } }