# PRE: redundant redundant-load-balance
#
#  Nested redundant blocks.
#
#
uint32 count1
uint32 count2
uint32 count3
uint32 count4

count1 = 0
count2 = 0
count3 = 0
count4 = 0

redundant {
	redundant-load-balance {
		group {
			count1 += 1
			fail
		}
		group {
			count2 += 1
			fail
		}
		group {
			count3 += 1
			fail
		}
		group {
			count4 += 1
			fail
		}
	}

	#
	#  All of the above fails, so we fail over to "ok".
	#
	ok
}

if (!ok) {
	test_fail
	return
}

if (!(count1 == 1)) {
	test_fail
}

if (!(count2 == 1)) {
	test_fail
	return
}

if (!(count3 == 1)) {
	test_fail
	return
}

if (!(count4 == 1)) {
	test_fail
	return
}

success
