Replaced lambda assertions with assert_less and assert_greater