|
16 | 16 | </a> |
17 | 17 |
|
18 | 18 | <a href="https://codecov.io/gh/atomicgo/assert"> |
19 | | -<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-123-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end --> |
| 19 | +<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-136-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end --> |
20 | 20 | </a> |
21 | 21 |
|
22 | 22 | <a href="https://opensource.org/licenses/MIT" target="_blank"> |
@@ -73,109 +73,127 @@ Package assert provides a set of assertion functions. |
73 | 73 |
|
74 | 74 | ## Index |
75 | 75 |
|
76 | | -- [func Contains[T any](s []T, v T) bool](<#func-contains>) |
77 | | -- [func ContainsAll[T any](s []T, v []T) bool](<#func-containsall>) |
78 | | -- [func ContainsAny[T any](s []T, v []T) bool](<#func-containsany>) |
79 | | -- [func ContainsNone[T any](s []T, v []T) bool](<#func-containsnone>) |
| 76 | +- [func Contains(a any, b any) bool](<#func-contains>) |
| 77 | +- [func ContainsAll[T any](a T, v []T) bool](<#func-containsall>) |
| 78 | +- [func ContainsAny[T any](a T, v []T) bool](<#func-containsany>) |
| 79 | +- [func ContainsNone[T any](a T, v []T) bool](<#func-containsnone>) |
80 | 80 | - [func Equal[T any](a, b T) bool](<#func-equal>) |
81 | 81 | - [func Implements(a, iface any) bool](<#func-implements>) |
82 | 82 | - [func Kind(a any, kind reflect.Kind) bool](<#func-kind>) |
| 83 | +- [func Lowercase(s string) bool](<#func-lowercase>) |
83 | 84 | - [func Nil(a any) bool](<#func-nil>) |
84 | 85 | - [func Number(a any) bool](<#func-number>) |
85 | 86 | - [func Panic(f func()) (panicked bool)](<#func-panic>) |
86 | 87 | - [func Unique[T any](s []T) bool](<#func-unique>) |
| 88 | +- [func Uppercase(s string) bool](<#func-uppercase>) |
87 | 89 | - [func Zero(a any) bool](<#func-zero>) |
88 | 90 |
|
89 | 91 |
|
90 | | -## func [Contains](<https://github.com/atomicgo/assert/blob/main/assert.go#L91>) |
| 92 | +## func [Contains](<https://github.com/atomicgo/assert/blob/main/assert.go#L93>) |
91 | 93 |
|
92 | 94 | ```go |
93 | | -func Contains[T any](s []T, v T) bool |
| 95 | +func Contains(a any, b any) bool |
94 | 96 | ``` |
95 | 97 |
|
96 | | -Contains returns true if the slice contains the value. Items are considered equal if they are deep equal. |
| 98 | +Contains returns true if a contains b. |
97 | 99 |
|
98 | | -## func [ContainsAll](<https://github.com/atomicgo/assert/blob/main/assert.go#L104>) |
| 100 | +## func [ContainsAll](<https://github.com/atomicgo/assert/blob/main/assert.go#L113>) |
99 | 101 |
|
100 | 102 | ```go |
101 | | -func ContainsAll[T any](s []T, v []T) bool |
| 103 | +func ContainsAll[T any](a T, v []T) bool |
102 | 104 | ``` |
103 | 105 |
|
104 | | -ContainsAll returns true if the slice contains all the values. Items are considered equal if they are deep equal. |
| 106 | +ContainsAll returns true if all values are contained in a. |
105 | 107 |
|
106 | 108 | ## func [ContainsAny](<https://github.com/atomicgo/assert/blob/main/assert.go#L124>) |
107 | 109 |
|
108 | 110 | ```go |
109 | | -func ContainsAny[T any](s []T, v []T) bool |
| 111 | +func ContainsAny[T any](a T, v []T) bool |
110 | 112 | ``` |
111 | 113 |
|
112 | | -ContainsAny returns true if the slice contains any of the values. Items are considered equal if they are deep equal. |
| 114 | +ContainsAny returns true if any of the values are contained in a. |
113 | 115 |
|
114 | | -## func [ContainsNone](<https://github.com/atomicgo/assert/blob/main/assert.go#L139>) |
| 116 | +## func [ContainsNone](<https://github.com/atomicgo/assert/blob/main/assert.go#L135>) |
115 | 117 |
|
116 | 118 | ```go |
117 | | -func ContainsNone[T any](s []T, v []T) bool |
| 119 | +func ContainsNone[T any](a T, v []T) bool |
118 | 120 | ``` |
119 | 121 |
|
120 | | -ContainsNone returns true if the slice contains none of the values. Items are considered equal if they are deep equal. |
| 122 | +ContainsNone returns true if none of the values are contained in a. |
121 | 123 |
|
122 | | -## func [Equal](<https://github.com/atomicgo/assert/blob/main/assert.go#L6>) |
| 124 | +## func [Equal](<https://github.com/atomicgo/assert/blob/main/assert.go#L9>) |
123 | 125 |
|
124 | 126 | ```go |
125 | 127 | func Equal[T any](a, b T) bool |
126 | 128 | ``` |
127 | 129 |
|
128 | 130 | Equal compares two values and returns true if they are equal. |
129 | 131 |
|
130 | | -## func [Implements](<https://github.com/atomicgo/assert/blob/main/assert.go#L50>) |
| 132 | +## func [Implements](<https://github.com/atomicgo/assert/blob/main/assert.go#L53>) |
131 | 133 |
|
132 | 134 | ```go |
133 | 135 | func Implements(a, iface any) bool |
134 | 136 | ``` |
135 | 137 |
|
136 | 138 | Implements returns true if the value implements the interface. |
137 | 139 |
|
138 | | -## func [Kind](<https://github.com/atomicgo/assert/blob/main/assert.go#L11>) |
| 140 | +## func [Kind](<https://github.com/atomicgo/assert/blob/main/assert.go#L14>) |
139 | 141 |
|
140 | 142 | ```go |
141 | 143 | func Kind(a any, kind reflect.Kind) bool |
142 | 144 | ``` |
143 | 145 |
|
144 | 146 | Kind returns true if the value is of the given kind. |
145 | 147 |
|
146 | | -## func [Nil](<https://github.com/atomicgo/assert/blob/main/assert.go#L16>) |
| 148 | +## func [Lowercase](<https://github.com/atomicgo/assert/blob/main/assert.go#L151>) |
| 149 | + |
| 150 | +```go |
| 151 | +func Lowercase(s string) bool |
| 152 | +``` |
| 153 | + |
| 154 | +Lowercase returns true if the string is lowercase. |
| 155 | + |
| 156 | +## func [Nil](<https://github.com/atomicgo/assert/blob/main/assert.go#L19>) |
147 | 157 |
|
148 | 158 | ```go |
149 | 159 | func Nil(a any) bool |
150 | 160 | ``` |
151 | 161 |
|
152 | 162 | Nil returns true if the value is nil. |
153 | 163 |
|
154 | | -## func [Number](<https://github.com/atomicgo/assert/blob/main/assert.go#L30>) |
| 164 | +## func [Number](<https://github.com/atomicgo/assert/blob/main/assert.go#L33>) |
155 | 165 |
|
156 | 166 | ```go |
157 | 167 | func Number(a any) bool |
158 | 168 | ``` |
159 | 169 |
|
160 | 170 | Number returns true if the value is a number. |
161 | 171 |
|
162 | | -## func [Panic](<https://github.com/atomicgo/assert/blob/main/assert.go#L64>) |
| 172 | +## func [Panic](<https://github.com/atomicgo/assert/blob/main/assert.go#L67>) |
163 | 173 |
|
164 | 174 | ```go |
165 | 175 | func Panic(f func()) (panicked bool) |
166 | 176 | ``` |
167 | 177 |
|
168 | 178 | Panic returns true if the function panics. |
169 | 179 |
|
170 | | -## func [Unique](<https://github.com/atomicgo/assert/blob/main/assert.go#L76>) |
| 180 | +## func [Unique](<https://github.com/atomicgo/assert/blob/main/assert.go#L79>) |
171 | 181 |
|
172 | 182 | ```go |
173 | 183 | func Unique[T any](s []T) bool |
174 | 184 | ``` |
175 | 185 |
|
176 | 186 | Unique returns true if the slice contains unique values. Items are considered unique if they are not deep equal. |
177 | 187 |
|
178 | | -## func [Zero](<https://github.com/atomicgo/assert/blob/main/assert.go#L45>) |
| 188 | +## func [Uppercase](<https://github.com/atomicgo/assert/blob/main/assert.go#L146>) |
| 189 | + |
| 190 | +```go |
| 191 | +func Uppercase(s string) bool |
| 192 | +``` |
| 193 | + |
| 194 | +Uppercase returns true if the string is uppercase. |
| 195 | + |
| 196 | +## func [Zero](<https://github.com/atomicgo/assert/blob/main/assert.go#L48>) |
179 | 197 |
|
180 | 198 | ```go |
181 | 199 | func Zero(a any) bool |
|
0 commit comments