tests for compare functions