Skip to content

Commit

Permalink
Unit Tests + CHANGELOG for SwiftGen#56
Browse files Browse the repository at this point in the history
  • Loading branch information
AliSoftware committed Nov 22, 2015
1 parent ef7fdd4 commit 0866531
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 25 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
_You can add translations to your own templates by using the `string.translation` variable._
[@MrAlek](https://github.com/MrAlek), [#58](https://github.com/AliSoftware/SwiftGen/issues/58), [#60](https://github.com/AliSoftware/SwiftGen/pull/60)

#### Fixes

* Fix an issue with the colors template due to an Apple Bug when building in Release and with WMO enabled.
[#56](https://github.com/AliSoftware/SwiftGen/issues/58)

## 0.7.1

#### Fixes
Expand Down
16 changes: 7 additions & 9 deletions UnitTests/expected/Colors-File-CustomName.swift.out
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,14 @@ extension UIColor {
/// Alpha: 80% <br/> (0xffffffcc)
case Translucent

static let rgbaValues: [XCTColors:UInt32] = [
.ArticleBody : 0x339666ff,
.ArticleFootnote : 0xff66ccff,
.ArticleTitle : 0x33fe66ff,
.Cyan_Color : 0xff66ccff,
.Translucent : 0xffffffcc,
]

var rgbaValue: UInt32! {
return XCTColors.rgbaValues[self]
switch self {
case .ArticleBody: return 0x339666ff
case .ArticleFootnote: return 0xff66ccff
case .ArticleTitle: return 0x33fe66ff
case .Cyan_Color: return 0xff66ccff
case .Translucent: return 0xffffffcc
}
}
}

Expand Down
16 changes: 7 additions & 9 deletions UnitTests/expected/Colors-File-Defaults.swift.out
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,14 @@ extension UIColor {
/// Alpha: 80% <br/> (0xffffffcc)
case Translucent

static let rgbaValues: [Name:UInt32] = [
.ArticleBody : 0x339666ff,
.ArticleFootnote : 0xff66ccff,
.ArticleTitle : 0x33fe66ff,
.Cyan_Color : 0xff66ccff,
.Translucent : 0xffffffcc,
]

var rgbaValue: UInt32! {
return Name.rgbaValues[self]
switch self {
case .ArticleBody: return 0x339666ff
case .ArticleFootnote: return 0xff66ccff
case .ArticleTitle: return 0x33fe66ff
case .Cyan_Color: return 0xff66ccff
case .Translucent: return 0xffffffcc
}
}
}

Expand Down
12 changes: 5 additions & 7 deletions UnitTests/expected/Colors-List-Defaults.swift.out
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ extension UIColor {
/// Alpha: 100% <br/> (0x999999ff)
case Text_Body_Color

static let rgbaValues: [Name:UInt32] = [
.ArticleBackground : 0xffcc0099,
.ArticleTitle : 0x996600ff,
.Text_Body_Color : 0x999999ff,
]

var rgbaValue: UInt32! {
return Name.rgbaValues[self]
switch self {
case .ArticleBackground: return 0xffcc0099
case .ArticleTitle: return 0x996600ff
case .Text_Body_Color: return 0x999999ff
}
}
}

Expand Down

0 comments on commit 0866531

Please sign in to comment.