master
1const expect = @import("std").testing.expect;
2
3test "@intFromPtr and @ptrFromInt" {
4 const ptr: *i32 = @ptrFromInt(0xdeadbee0);
5 const addr = @intFromPtr(ptr);
6 try expect(@TypeOf(addr) == usize);
7 try expect(addr == 0xdeadbee0);
8}
9
10// test