blob: 415bb2344b13346a7ae14b3b30b12e4ec1d14554 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
const std = @import("std");
const expect = std.testing.expect;
test "coerce to optionals" {
const x: ?i32 = 1234;
const y: ?i32 = null;
try expect(x.? == 1234);
try expect(y == null);
}
// test
|