Skip to content

Commit e4e47d1

Browse files
committed
ASCII char classes: a few more tests
1 parent 2015ec9 commit e4e47d1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/std/ascii.zig

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,18 +219,21 @@ test "ASCII character classes" {
219219
try testing.expect(isAlphanumeric('Z'));
220220
try testing.expect(isAlphanumeric('z'));
221221
try testing.expect(isAlphanumeric('5'));
222-
try testing.expect(isAlphanumeric('5'));
222+
try testing.expect(isAlphanumeric('a'));
223223
try testing.expect(!isAlphanumeric('!'));
224224

225225
try testing.expect(!isAlphabetic('5'));
226226
try testing.expect(isAlphabetic('c'));
227-
try testing.expect(!isAlphabetic('5'));
227+
try testing.expect(!isAlphabetic('@'));
228+
try testing.expect(isAlphabetic('Z'));
228229

229230
try testing.expect(isWhitespace(' '));
230231
try testing.expect(isWhitespace('\t'));
231232
try testing.expect(isWhitespace('\r'));
232233
try testing.expect(isWhitespace('\n'));
234+
try testing.expect(isWhitespace(control_code.ff));
233235
try testing.expect(!isWhitespace('.'));
236+
try testing.expect(!isWhitespace(control_code.us));
234237

235238
try testing.expect(!isHex('g'));
236239
try testing.expect(isHex('b'));

0 commit comments

Comments
 (0)