Skip to content

Commit a381c8a

Browse files
committed
Dev: add UIntTest
1 parent 21c32ce commit a381c8a

3 files changed

Lines changed: 55 additions & 3 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
}
1010

1111
dependencies {
12-
classpath "com.android.tools.build:gradle:3.5.1"
12+
classpath 'com.android.tools.build:gradle:3.6.0'
1313
classpath "com.readdle.android.swift:gradle:1.3.2"
1414
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1515
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Aug 29 12:50:13 EEST 2019
1+
#Tue Feb 25 22:04:52 EET 2020
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
//
2+
// Created by Andrew on 2/4/18.
3+
//
4+
5+
import Foundation
6+
7+
public protocol UIntTestProtocol {
8+
func uintZero() -> UInt
9+
func uintMax() -> UInt
10+
func uintMin() -> UInt
11+
func uintOptional() -> UInt?
12+
func uintOptionalNil() -> UInt?
13+
}
14+
15+
public struct UIntTestStruct: Codable, Hashable, UIntTestProtocol {
16+
17+
let zero = UInt.zero
18+
let max = UInt.max
19+
let min = UInt.min
20+
let optional: UInt? = UInt.zero
21+
let optionalNil: UInt? = nil
22+
23+
public init() {}
24+
25+
public func uintZero() -> UInt {
26+
return zero
27+
}
28+
29+
public func uintMax() -> UInt {
30+
return max
31+
}
32+
33+
public func uintMin() -> UInt {
34+
return min
35+
}
36+
37+
public func uintOptional() -> UInt? {
38+
return optional
39+
}
40+
41+
public func uintOptionalNil() -> UInt? {
42+
return optionalNil
43+
}
44+
45+
public func testUIntTestProtocol(testProtocol: UIntTestProtocol) -> Bool {
46+
return testProtocol.uintZero() == zero &&
47+
testProtocol.uintMax() == max &&
48+
testProtocol.uintMin() == min &&
49+
testProtocol.uintOptional() == optional &&
50+
testProtocol.uintOptionalNil() == optionalNil
51+
}
52+
}

0 commit comments

Comments
 (0)