Compare function test