Improved unit test for bn_cmp_eq