Skip to content

Commit b363c1a

Browse files
lint: replace assert_eq with assert
1 parent 04d81a7 commit b363c1a

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

tests/src/lib.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -140,27 +140,27 @@ mod tests {
140140

141141
#[test]
142142
fn str_works() {
143-
assert_eq!(run_php("str.php"), "str works");
143+
assert!(run_php("str.php") == "str works");
144144
}
145145

146146
#[test]
147147
fn string_works() {
148-
assert_eq!(run_php("string.php"), "string works");
148+
assert!(run_php("string.php") == "string works");
149149
}
150150

151151
#[test]
152152
fn bool_works() {
153-
assert_eq!(run_php("bool.php"), "true false");
153+
assert!(run_php("bool.php") == "true false");
154154
}
155155

156156
#[test]
157157
fn number_signed_works() {
158-
assert_eq!(run_php("number_signed.php"), "-12 0 12");
158+
assert!(run_php("number_signed.php") == "-12 0 12");
159159
}
160160

161161
#[test]
162162
fn number_unsigned_works() {
163-
assert_eq!(run_php("number_unsigned.php"), "0 12 invalid");
163+
assert!(run_php("number_unsigned.php") == "0 12 invalid");
164164
}
165165

166166
#[test]
@@ -170,57 +170,57 @@ mod tests {
170170
.split_whitespace()
171171
.map(|a| a.parse::<f32>().unwrap())
172172
.collect();
173-
assert_eq!(floats, vec![-1.2, 0.0, 1.2]);
173+
assert!(floats == vec![-1.2, 0.0, 1.2]);
174174
}
175175

176176
#[test]
177177
fn array_works() {
178-
assert_eq!(run_php("array.php"), "a b c");
178+
assert!(run_php("array.php") == "a b c");
179179
}
180180

181181
#[test]
182182
fn array_assoc_works() {
183183
let output = run_php("array_assoc.php");
184-
assert_eq!(output.contains("first=1"), true);
185-
assert_eq!(output.contains("second=2"), true);
186-
assert_eq!(output.contains("third=3"), true);
184+
assert!(output.contains("first=1"));
185+
assert!(output.contains("second=2"));
186+
assert!(output.contains("third=3"));
187187
}
188188

189189
#[test]
190190
fn binary_works() {
191-
assert_eq!(run_php("binary.php"), "1 2 3 4 5");
191+
assert!(run_php("binary.php") = "1 2 3 4 5");
192192
}
193193

194194
#[test]
195195
fn nullable_works() {
196-
assert_eq!(run_php("nullable.php"), "null not_null");
196+
assert!(run_php("nullable.php") == "null not_null");
197197
}
198198

199199
#[test]
200200
fn object_works() {
201201
let output = run_php("object.php");
202-
assert_eq!(output.contains("first=1"), true);
203-
assert_eq!(output.contains("second=2"), true);
204-
assert_eq!(output.contains("third=3"), true);
202+
assert!(output.contains("first=1"));
203+
assert!(output.contains("second=2"));
204+
assert!(output.contains("third=3"));
205205
}
206206

207207
#[test]
208208
fn closure_works() {
209-
assert_eq!(run_php("closure.php"), "closure works");
209+
assert!(run_php("closure.php") == "closure works");
210210
}
211211

212212
#[test]
213213
fn closure_once_works() {
214-
assert_eq!(run_php("closure_once.php"), "closure works once");
214+
assert!(run_php("closure_once.php") == "closure works once");
215215
}
216216

217217
#[test]
218218
fn callable_works() {
219-
assert_eq!(run_php("callable.php"), "callable works");
219+
assert!(run_php("callable.php") == "callable works");
220220
}
221221

222222
#[test]
223223
fn class_works() {
224-
assert_eq!(run_php("class.php"), "class works");
224+
assert!(run_php("class.php") == "class works");
225225
}
226226
}

0 commit comments

Comments
 (0)