Skip to content

Commit ec53149

Browse files
Sah, NandeshwarSah, Nandeshwar
authored andcommitted
Renamed function Odd<Type> -> Odd<Type>Wht
1 parent 856969e commit ec53149

File tree

5 files changed

+114
-114
lines changed

5 files changed

+114
-114
lines changed

fp/odd.go

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,101 @@
11
package fp
22

3-
// OddInt Returns true if n is odd
4-
func OddInt(v int) bool {
3+
// OddIntWht Returns true if n is odd
4+
func OddIntWht(v int) bool {
55
return v%2 != 0
66
}
77

8-
// OddIntPtr Returns true if n is odd
9-
func OddIntPtr(v *int) bool {
8+
// OddIntWhtPtr Returns true if n is odd
9+
func OddIntWhtPtr(v *int) bool {
1010
return *v%2 != 0
1111
}
1212

13-
// OddInt64 Returns true if n is odd
14-
func OddInt64(v int64) bool {
13+
// OddInt64Wht Returns true if n is odd
14+
func OddInt64Wht(v int64) bool {
1515
return v%2 != 0
1616
}
1717

18-
// OddInt64Ptr Returns true if n is odd
19-
func OddInt64Ptr(v *int64) bool {
18+
// OddInt64WhtPtr Returns true if n is odd
19+
func OddInt64WhtPtr(v *int64) bool {
2020
return *v%2 != 0
2121
}
2222

23-
// OddInt32 Returns true if n is odd
24-
func OddInt32(v int32) bool {
23+
// OddInt32Wht Returns true if n is odd
24+
func OddInt32Wht(v int32) bool {
2525
return v%2 != 0
2626
}
2727

28-
// OddInt32Ptr Returns true if n is odd
29-
func OddInt32Ptr(v *int32) bool {
28+
// OddInt32WhtPtr Returns true if n is odd
29+
func OddInt32WhtPtr(v *int32) bool {
3030
return *v%2 != 0
3131
}
3232

33-
// OddInt16 Returns true if n is odd
34-
func OddInt16(v int16) bool {
33+
// OddInt16Wht Returns true if n is odd
34+
func OddInt16Wht(v int16) bool {
3535
return v%2 != 0
3636
}
3737

38-
// OddInt16Ptr Returns true if n is odd
39-
func OddInt16Ptr(v *int16) bool {
38+
// OddInt16WhtPtr Returns true if n is odd
39+
func OddInt16WhtPtr(v *int16) bool {
4040
return *v%2 != 0
4141
}
4242

43-
// OddInt8 Returns true if n is odd
44-
func OddInt8(v int8) bool {
43+
// OddInt8Wht Returns true if n is odd
44+
func OddInt8Wht(v int8) bool {
4545
return v%2 != 0
4646
}
4747

48-
// OddInt8Ptr Returns true if n is odd
49-
func OddInt8Ptr(v *int8) bool {
48+
// OddInt8WhtPtr Returns true if n is odd
49+
func OddInt8WhtPtr(v *int8) bool {
5050
return *v%2 != 0
5151
}
5252

53-
// OddUint Returns true if n is odd
54-
func OddUint(v uint) bool {
53+
// OddUintWht Returns true if n is odd
54+
func OddUintWht(v uint) bool {
5555
return v%2 != 0
5656
}
5757

58-
// OddUintPtr Returns true if n is odd
59-
func OddUintPtr(v *uint) bool {
58+
// OddUintWhtPtr Returns true if n is odd
59+
func OddUintWhtPtr(v *uint) bool {
6060
return *v%2 != 0
6161
}
6262

63-
// OddUint64 Returns true if n is odd
64-
func OddUint64(v uint64) bool {
63+
// OddUint64Wht Returns true if n is odd
64+
func OddUint64Wht(v uint64) bool {
6565
return v%2 != 0
6666
}
6767

68-
// OddUint64Ptr Returns true if n is odd
69-
func OddUint64Ptr(v *uint64) bool {
68+
// OddUint64WhtPtr Returns true if n is odd
69+
func OddUint64WhtPtr(v *uint64) bool {
7070
return *v%2 != 0
7171
}
7272

73-
// OddUint32 Returns true if n is odd
74-
func OddUint32(v uint32) bool {
73+
// OddUint32Wht Returns true if n is odd
74+
func OddUint32Wht(v uint32) bool {
7575
return v%2 != 0
7676
}
7777

78-
// OddUint32Ptr Returns true if n is odd
79-
func OddUint32Ptr(v *uint32) bool {
78+
// OddUint32WhtPtr Returns true if n is odd
79+
func OddUint32WhtPtr(v *uint32) bool {
8080
return *v%2 != 0
8181
}
8282

83-
// OddUint16 Returns true if n is odd
84-
func OddUint16(v uint16) bool {
83+
// OddUint16Wht Returns true if n is odd
84+
func OddUint16Wht(v uint16) bool {
8585
return v%2 != 0
8686
}
8787

88-
// OddUint16Ptr Returns true if n is odd
89-
func OddUint16Ptr(v *uint16) bool {
88+
// OddUint16WhtPtr Returns true if n is odd
89+
func OddUint16WhtPtr(v *uint16) bool {
9090
return *v%2 != 0
9191
}
9292

93-
// OddUint8 Returns true if n is odd
94-
func OddUint8(v uint8) bool {
93+
// OddUint8Wht Returns true if n is odd
94+
func OddUint8Wht(v uint8) bool {
9595
return v%2 != 0
9696
}
9797

98-
// OddUint8Ptr Returns true if n is odd
99-
func OddUint8Ptr(v *uint8) bool {
98+
// OddUint8WhtPtr Returns true if n is odd
99+
func OddUint8WhtPtr(v *uint8) bool {
100100
return *v%2 != 0
101101
}

fp/odd_test.go

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -7,191 +7,191 @@ import (
77
)
88

99
func TestOddInt(t *testing.T) {
10-
r := OddInt(11)
10+
r := OddIntWht(11)
1111
if !r {
12-
t.Errorf("OddInt failed. Expected=true, actual=false")
12+
t.Errorf("OddIntWht failed. Expected=true, actual=false")
1313
t.Errorf(reflect.String.String())
1414
}
1515

16-
r = OddInt(2)
16+
r = OddIntWht(2)
1717
if r {
18-
t.Errorf("OddInt failed. Expected=false, actual=true")
18+
t.Errorf("OddIntWht failed. Expected=false, actual=true")
1919
}
2020

2121
var three int = 3
22-
rPtr := OddIntPtr(&three)
22+
rPtr := OddIntWhtPtr(&three)
2323
if !rPtr {
24-
t.Errorf("OddIntPtr failed. Expected=true, actual=false")
24+
t.Errorf("OddIntWhtPtr failed. Expected=true, actual=false")
2525
}
2626
}
2727

2828
func TestOddInt64(t *testing.T) {
29-
r := OddInt64(11)
29+
r := OddInt64Wht(11)
3030
if !r {
31-
t.Errorf("OddInt64 failed. Expected=true, actual=false")
31+
t.Errorf("OddInt64Wht failed. Expected=true, actual=false")
3232
t.Errorf(reflect.String.String())
3333
}
3434

35-
r = OddInt64(2)
35+
r = OddInt64Wht(2)
3636
if r {
37-
t.Errorf("OddInt64 failed. Expected=false, actual=true")
37+
t.Errorf("OddInt64Wht failed. Expected=false, actual=true")
3838
}
3939

4040
var three int64 = 3
41-
rPtr := OddInt64Ptr(&three)
41+
rPtr := OddInt64WhtPtr(&three)
4242
if !rPtr {
43-
t.Errorf("OddInt64Ptr failed. Expected=true, actual=false")
43+
t.Errorf("OddInt64WhtPtr failed. Expected=true, actual=false")
4444
}
4545
}
4646

4747
func TestOddInt32(t *testing.T) {
48-
r := OddInt32(11)
48+
r := OddInt32Wht(11)
4949
if !r {
50-
t.Errorf("OddInt32 failed. Expected=true, actual=false")
50+
t.Errorf("OddInt32Wht failed. Expected=true, actual=false")
5151
t.Errorf(reflect.String.String())
5252
}
5353

54-
r = OddInt32(2)
54+
r = OddInt32Wht(2)
5555
if r {
56-
t.Errorf("OddInt32 failed. Expected=false, actual=true")
56+
t.Errorf("OddInt32Wht failed. Expected=false, actual=true")
5757
}
5858

5959
var three int32 = 3
60-
rPtr := OddInt32Ptr(&three)
60+
rPtr := OddInt32WhtPtr(&three)
6161
if !rPtr {
62-
t.Errorf("OddInt32Ptr failed. Expected=true, actual=false")
62+
t.Errorf("OddInt32WhtPtr failed. Expected=true, actual=false")
6363
}
6464
}
6565

6666
func TestOddInt16(t *testing.T) {
67-
r := OddInt16(11)
67+
r := OddInt16Wht(11)
6868
if !r {
69-
t.Errorf("OddInt16 failed. Expected=true, actual=false")
69+
t.Errorf("OddInt16Wht failed. Expected=true, actual=false")
7070
t.Errorf(reflect.String.String())
7171
}
7272

73-
r = OddInt16(2)
73+
r = OddInt16Wht(2)
7474
if r {
75-
t.Errorf("OddInt16 failed. Expected=false, actual=true")
75+
t.Errorf("OddInt16Wht failed. Expected=false, actual=true")
7676
}
7777

7878
var three int16 = 3
79-
rPtr := OddInt16Ptr(&three)
79+
rPtr := OddInt16WhtPtr(&three)
8080
if !rPtr {
81-
t.Errorf("OddInt16Ptr failed. Expected=true, actual=false")
81+
t.Errorf("OddInt16WhtPtr failed. Expected=true, actual=false")
8282
}
8383
}
8484

8585
func TestOddInt8(t *testing.T) {
86-
r := OddInt8(11)
86+
r := OddInt8Wht(11)
8787
if !r {
88-
t.Errorf("OddInt8 failed. Expected=true, actual=false")
88+
t.Errorf("OddInt8Wht failed. Expected=true, actual=false")
8989
t.Errorf(reflect.String.String())
9090
}
9191

92-
r = OddInt8(2)
92+
r = OddInt8Wht(2)
9393
if r {
94-
t.Errorf("OddInt8 failed. Expected=false, actual=true")
94+
t.Errorf("OddInt8Wht failed. Expected=false, actual=true")
9595
}
9696

9797
var three int8 = 3
98-
rPtr := OddInt8Ptr(&three)
98+
rPtr := OddInt8WhtPtr(&three)
9999
if !rPtr {
100-
t.Errorf("OddInt8Ptr failed. Expected=true, actual=false")
100+
t.Errorf("OddInt8WhtPtr failed. Expected=true, actual=false")
101101
}
102102
}
103103

104104
func TestOddUint(t *testing.T) {
105-
r := OddUint(11)
105+
r := OddUintWht(11)
106106
if !r {
107-
t.Errorf("OddUint failed. Expected=true, actual=false")
107+
t.Errorf("OddUintWht failed. Expected=true, actual=false")
108108
t.Errorf(reflect.String.String())
109109
}
110110

111-
r = OddUint(2)
111+
r = OddUintWht(2)
112112
if r {
113-
t.Errorf("OddUint failed. Expected=false, actual=true")
113+
t.Errorf("OddUintWht failed. Expected=false, actual=true")
114114
}
115115

116116
var three uint = 3
117-
rPtr := OddUintPtr(&three)
117+
rPtr := OddUintWhtPtr(&three)
118118
if !rPtr {
119-
t.Errorf("OddUintPtr failed. Expected=true, actual=false")
119+
t.Errorf("OddUintWhtPtr failed. Expected=true, actual=false")
120120
}
121121
}
122122

123123
func TestOddUint64(t *testing.T) {
124-
r := OddUint64(11)
124+
r := OddUint64Wht(11)
125125
if !r {
126-
t.Errorf("OddUint64 failed. Expected=true, actual=false")
126+
t.Errorf("OddUint64Wht failed. Expected=true, actual=false")
127127
t.Errorf(reflect.String.String())
128128
}
129129

130-
r = OddUint64(2)
130+
r = OddUint64Wht(2)
131131
if r {
132-
t.Errorf("OddUint64 failed. Expected=false, actual=true")
132+
t.Errorf("OddUint64Wht failed. Expected=false, actual=true")
133133
}
134134

135135
var three uint64 = 3
136-
rPtr := OddUint64Ptr(&three)
136+
rPtr := OddUint64WhtPtr(&three)
137137
if !rPtr {
138-
t.Errorf("OddUint64Ptr failed. Expected=true, actual=false")
138+
t.Errorf("OddUint64WhtPtr failed. Expected=true, actual=false")
139139
}
140140
}
141141

142142
func TestOddUint32(t *testing.T) {
143-
r := OddUint32(11)
143+
r := OddUint32Wht(11)
144144
if !r {
145-
t.Errorf("OddUint32 failed. Expected=true, actual=false")
145+
t.Errorf("OddUint32Wht failed. Expected=true, actual=false")
146146
t.Errorf(reflect.String.String())
147147
}
148148

149-
r = OddUint32(2)
149+
r = OddUint32Wht(2)
150150
if r {
151-
t.Errorf("OddUint32 failed. Expected=false, actual=true")
151+
t.Errorf("OddUint32Wht failed. Expected=false, actual=true")
152152
}
153153

154154
var three uint32 = 3
155-
rPtr := OddUint32Ptr(&three)
155+
rPtr := OddUint32WhtPtr(&three)
156156
if !rPtr {
157-
t.Errorf("OddUint32Ptr failed. Expected=true, actual=false")
157+
t.Errorf("OddUint32WhtPtr failed. Expected=true, actual=false")
158158
}
159159
}
160160

161161
func TestOddUint16(t *testing.T) {
162-
r := OddUint16(11)
162+
r := OddUint16Wht(11)
163163
if !r {
164-
t.Errorf("OddUint16 failed. Expected=true, actual=false")
164+
t.Errorf("OddUint16Wht failed. Expected=true, actual=false")
165165
t.Errorf(reflect.String.String())
166166
}
167167

168-
r = OddUint16(2)
168+
r = OddUint16Wht(2)
169169
if r {
170-
t.Errorf("OddUint16 failed. Expected=false, actual=true")
170+
t.Errorf("OddUint16Wht failed. Expected=false, actual=true")
171171
}
172172

173173
var three uint16 = 3
174-
rPtr := OddUint16Ptr(&three)
174+
rPtr := OddUint16WhtPtr(&three)
175175
if !rPtr {
176-
t.Errorf("OddUint16Ptr failed. Expected=true, actual=false")
176+
t.Errorf("OddUint16WhtPtr failed. Expected=true, actual=false")
177177
}
178178
}
179179

180180
func TestOddUint8(t *testing.T) {
181-
r := OddUint8(11)
181+
r := OddUint8Wht(11)
182182
if !r {
183-
t.Errorf("OddUint8 failed. Expected=true, actual=false")
183+
t.Errorf("OddUint8Wht failed. Expected=true, actual=false")
184184
t.Errorf(reflect.String.String())
185185
}
186186

187-
r = OddUint8(2)
187+
r = OddUint8Wht(2)
188188
if r {
189-
t.Errorf("OddUint8 failed. Expected=false, actual=true")
189+
t.Errorf("OddUint8Wht failed. Expected=false, actual=true")
190190
}
191191

192192
var three uint8 = 3
193-
rPtr := OddUint8Ptr(&three)
193+
rPtr := OddUint8WhtPtr(&three)
194194
if !rPtr {
195-
t.Errorf("OddUint8Ptr failed. Expected=true, actual=false")
195+
t.Errorf("OddUint8WhtPtr failed. Expected=true, actual=false")
196196
}
197197
}

0 commit comments

Comments
 (0)