summaryrefslogtreecommitdiff
path: root/test/ptrcmp.myr
blob: 931c4ae098b4213d289e2d16f2f7df3faa5289ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std

const main = {
	var a, b, v1, v2

	v1 = 42
	v2 = 42
	a = &v1
	b = &v1
	std.assert(a == b, "pointers should be equal, but weren't\n")
	a = &v1
	b = &v2
	std.assert(a != b, "pointers weren't equal, but should be\n")
	std.exit(0)
}