@@ -68,6 +68,7 @@
Loading
68 68
        }
69 69
    }
70 70
71 +
    //We are promoting Int to Double in the case where we are comparing these two types
71 72
    public static func isEqual(_ lhs: Any?, _ rhs: Persistable?) -> Bool {
72 73
        if lhs == nil && rhs == nil {
73 74
            return true
@@ -96,6 +97,7 @@
Loading
96 97
        }
97 98
    }
98 99
100 +
    //We are promoting Int to Double in the case where we are comparing these two types
99 101
    public static func isLessOrEqual(_ lhs: Any?, _ rhs: Persistable?) -> Bool {
100 102
        if lhs == nil && rhs == nil {
101 103
            return true
@@ -123,6 +125,7 @@
Loading
123 125
        }
124 126
    }
125 127
128 +
    //We are promoting Int to Double in the case where we are comparing these two types
126 129
    public static func isLessThan(_ lhs: Any?, _ rhs: Persistable?) -> Bool {
127 130
        if lhs == nil && rhs == nil {
128 131
            return false
@@ -150,6 +153,7 @@
Loading
150 153
        }
151 154
    }
152 155
156 +
    //We are promoting Int to Double in the case where we are comparing these two types
153 157
    public static func isGreaterOrEqual(_ lhs: Any?, _ rhs: Persistable?) -> Bool {
154 158
        if lhs == nil && rhs == nil {
155 159
            return true
@@ -177,6 +181,7 @@
Loading
177 181
        }
178 182
    }
179 183
184 +
    //We are promoting Int to Double in the case where we are comparing these two types
180 185
    public static func isGreaterThan(_ lhs: Any?, _ rhs: Persistable?) -> Bool {
181 186
        if lhs == nil && rhs == nil {
182 187
            return false
@@ -204,38 +209,10 @@
Loading
204 209
        }
205 210
    }
206 211
207 -
    public static func isBetween(_ start: Persistable, _ end: Persistable, _ rhs: Any?) -> Bool {
208 -
        if rhs == nil {
209 -
            return false
210 -
        }
211 -
        switch (start, end, rhs) {
212 -
        //case Bool Removed
213 -
        case let (start, end, rhs) as (Temporal.Date, Temporal.Date, Temporal.Date):
214 -
            return start <= rhs && rhs <= end
215 -
        case let (start, end, rhs) as (Temporal.DateTime, Temporal.DateTime, Temporal.DateTime):
216 -
            return start <= rhs && rhs <= end
217 -
        case let (start, end, rhs) as (Temporal.Time, Temporal.Time, Temporal.Time):
218 -
            return start <= rhs && rhs <= end
219 -
        case let (start, end, rhs) as (Int, Int, Int):
220 -
            return start <= rhs && rhs <= end
221 -
        case let (start, end, rhs) as (Int, Int, Double):
222 -
            return Double(start) <= rhs && rhs <= Double(end)
223 -
        case let (start, end, rhs) as (Int, Double, Int):
224 -
            return start <= rhs && Double(rhs) <= end
225 -
        case let (start, end, rhs) as (Int, Double, Double):
226 -
            return Double(start) <= rhs && rhs <= end
227 -
        case let (start, end, rhs) as (Double, Int, Int):
228 -
            return start <= Double(rhs) && rhs <= end
229 -
        case let (start, end, rhs) as (Double, Int, Double):
230 -
            return start <= rhs && rhs <= Double(end)
231 -
        case let (start, end, rhs) as (Double, Double, Int):
232 -
            return start <= Double(rhs) && Double(rhs) <= end
233 -
        case let (start, end, rhs) as (Double, Double, Double):
234 -
            return start <= rhs && rhs <= end
235 -
        case let (start, end, rhs) as (String, String, String):
236 -
            return start <= rhs && rhs <= end
237 -
        default:
212 +
    public static func isBetween(_ start: Persistable, _ end: Persistable, _ value: Any?) -> Bool {
213 +
        if value == nil {
238 214
            return false
239 215
        }
216 +
        return isGreaterOrEqual(value, start) && isLessOrEqual(value, end)
240 217
    }
241 218
}
Files Coverage
Amplify 45.52%
AmplifyPlugins 67.66%
AmplifyTestApp 44.44%
AmplifyTestCommon 25.61%
AmplifyTests 91.38%
Project Totals (791 files) 66.24%
20144
Predictions_plugin_unit_test
20142
build_test_amplify
20148
DataStore_plugin_unit_test
20150
Auth_plugin_unit_test
20146
Storage_plugin_unit_test
20145
Analytics_plugin_unit_test
20149
Predictions_plugin_unit_test

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading