Functional tests on detecting min/max.