From e761956782bf9a8092ffa801bf25463dae991fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 9 Jul 2015 08:17:35 +0200 Subject: [PATCH] Xcode 7.0 beta 3 does not require explicit raw value for String enums. --- .../SQLiteValueConvertible/RawRepresentableTests.swift | 6 +++--- GRDB/DatabaseValueConvertible.swift | 6 +++--- README.md | 6 +++--- TODO.md | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/GRDB Tests/SQLiteValueConvertible/RawRepresentableTests.swift b/GRDB Tests/SQLiteValueConvertible/RawRepresentableTests.swift index f04ad2b42..c0a854cde 100644 --- a/GRDB Tests/SQLiteValueConvertible/RawRepresentableTests.swift +++ b/GRDB Tests/SQLiteValueConvertible/RawRepresentableTests.swift @@ -32,9 +32,9 @@ enum Color : Int { } enum Grape : String { - case Chardonnay = "Chardonnay" - case Merlot = "Merlot" - case Riesling = "Riesling" + case Chardonnay + case Merlot + case Riesling } extension Color : DatabaseIntRepresentable { } diff --git a/GRDB/DatabaseValueConvertible.swift b/GRDB/DatabaseValueConvertible.swift index 597e2dc4f..66b270518 100644 --- a/GRDB/DatabaseValueConvertible.swift +++ b/GRDB/DatabaseValueConvertible.swift @@ -278,9 +278,9 @@ DatabaseValueConvertible adoption. // A String enum: enum Color : String { - case Red = "red" - case White = "white" - case Rose = "rose" + case Red + case White + case Rose } // Declare DatabaseIntRepresentable adoption: diff --git a/README.md b/README.md index 61c184986..9a04df4a2 100644 --- a/README.md +++ b/README.md @@ -302,9 +302,9 @@ enum Color : Int { } enum Grape : String { - case Chardonnay = "Chardonnay" - case Merlot = "Merlot" - case Riesling = "Riesling" + case Chardonnay + case Merlot + case Riesling } ``` diff --git a/TODO.md b/TODO.md index 361be7265..5c9ad69b8 100644 --- a/TODO.md +++ b/TODO.md @@ -8,6 +8,6 @@ - [ ] Test for the item above - [X] When one forgets to set the primaryKey in setDatabaseValue(_:column:), he has issues later deleting or updating. It's difficult to know why the delete fails. - [ ] Test for the item above -- [ ] Beta 3: remove strings behind enum cases: "If an element of an enum with string raw type does not have an explicit raw value, it will default to the text of the enum’s name". +- [X] Beta 3: remove strings behind enum cases: "If an element of an enum with string raw type does not have an explicit raw value, it will default to the text of the enum’s name". - [ ] Beta 3: leading dot is now possible: foo\n.bar\n.baz -- [ ] Beta 3: "Errors trapped by a try! expression, or unhandled at the top level of a script or playground, now display the error value in the trap message" +- [ ] Beta 3: "Errors trapped by a try! expression, or unhandled at the top level of a script or playground, now display the error value in the trap message". RowModelError are OK. Test DatabaseError.