fn multret1(i int, j int) (int, int) {
	return if i > j { i, 10 } else { 10, j }
}

fn multret2(i int, j int) (int, int) {
	return match i > j {
		true { i, 10 }
		false { 10, j }
	}
}

fn multret3(i int, j int) (int, int) {
	if i > j {
		return i, 10
	} else {
		return 10, j
	}
}

fn multret4(i int, j int) (int, int) {
	match i > j {
		true { return i, 10 }
		false { return 10, j }
	}
}

fn fn_multi_return_test() { // from fn_multi_return_test.v
	mut a, mut b := 0, 0

	a, b = multret1(3, 14)
	assert a == 10
	assert b == 14

	a, b = multret2(3, 14)
	assert a == 10
	assert b == 14

	a, b = multret3(3, 14)
	assert a == 10
	assert b == 14

	a, b = multret4(3, 14)
	assert a == 10
	assert b == 14
}

struct Zoo {
mut:
	a int
	b int
}

fn cross_assign_of_struct_test() { // from cross_assign_test.v
	mut x := Zoo{
		a: 1
		b: 2
	}
	x.a, x.b = x.b, x.a
	// println(x)
	assert x.a == 2
	assert x.b == 1
}


fn main() {
	fn_multi_return_test()
	cross_assign_of_struct_test()
}
