Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

Rewrite for Xcode 9 & Swift 3.2 #84

Open
wants to merge 22 commits into
base: development
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0753ad6
[MNY-79]: Removes old sources
danthorpe Sep 15, 2017
1c210a9
[MNY-79]: Adds new files with support for basic functions
danthorpe Sep 15, 2017
75c63f3
[MNY-79]: Reorgs tests; adds Comparable
danthorpe Sep 15, 2017
56449a8
[MNY-79]: Removes unneeded overrides
danthorpe Sep 15, 2017
c739d7b
[MNY-79]: Adds division operator and more floating point conformance
danthorpe Sep 20, 2017
88aff2b
[MNY-79]: Adds tests for ISOMoney
danthorpe Sep 20, 2017
a6bdee0
[MNY-79]: Adds currencies & money
danthorpe Sep 20, 2017
3452b07
[MNY-79]: Moves BaseCurrency
danthorpe Sep 20, 2017
b465429
[MNY-79]: Updates fastlane
danthorpe Sep 20, 2017
4cdd71b
[MNY-79]: Fixies iOS currencySymbol issue.
danthorpe Sep 20, 2017
202ef80
[MNY-79]: Fixes AppleTV sdk version in fastlane
danthorpe Sep 20, 2017
385fadc
[MNY-79]: Adds init(minorUnits:)
danthorpe Sep 21, 2017
cd9c72d
[MNY-79]: Adds amount property
danthorpe Sep 21, 2017
dd2f3d9
[MNY-79]: Makes types public
danthorpe Sep 21, 2017
795ac15
[MNY-79]: Adds formatting styles
danthorpe Sep 24, 2017
7e06233
[MNY-79]: Fixes Mac tests
danthorpe Sep 24, 2017
bd4d2f4
[MNY-79]: Fixes issue with extra )
danthorpe Sep 27, 2017
bd1b6f5
[MNY-79]: Adds a failing test where the number formatter scale is not…
danthorpe Sep 27, 2017
08d79ee
[MNY-79]: Fixes failing test for the currency maximum fraction digits
danthorpe Sep 27, 2017
2987735
[MNY-79]: Fixes issue with fractional units
danthorpe Sep 27, 2017
ed9ae11
[MNY-79]: Removes `.device` currency
danthorpe Oct 1, 2017
49d693d
[MNY-79]: Works around intValue NSDecimalNumber bug
danthorpe Feb 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[MNY-79]: Fixes Mac tests
  • Loading branch information
danthorpe committed Sep 24, 2017
commit 7e06233b4b0b5250d4ed49a5fb7fdd36e34b013e
12 changes: 9 additions & 3 deletions Tests/MoneyFormattingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,31 @@ extension MoneyTestCase {

func test__description() {
money = 10
let result: String = money.formatted()
#if os(OSX)
let result: String = money.formatted(forLocaleId: "en_GB")
XCTAssertEqual(result, "£10")
#elseif os(iOS)
let result: String = money.formatted(forLocaleId: "en_US")
XCTAssertEqual(result, "$10")
#endif
}
}

extension MoneyTestCase {

func test__iso_description() {
gbp = 10
let result: String = gbp.formatted()
let result: String = gbp.formatted(forLocaleId: "en_GB")
XCTAssertEqual(result, "£10.00")
}

#if os(iOS)
func test__iso_description_spain() {
gbp = 10
let result: String = gbp.formatted(forLocaleId: "es_ES")
// Note that for Spanish from Spain, the decimal point indicator is a comma,
// and the currency symbol is placed after the numbers.
XCTAssertEqual(result, "10,00 £")
}

#endif
}