summaryrefslogtreecommitdiff
path: root/test/slgrow.myr
blob: 03929798622cb2814632751eaeed14e828ef2d57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* checks that our slice grow function works. exits with 42. */
use std

const main = {
	var sl

	sl = std.slalloc(42)
	sl[0] = 12
	std.slgrow(&sl, 123)
	sl[122] = 30
	std.exit(sl[0] + sl[122])
}