Which testing module is being used? Test behave the way you are expecting, but Test::More and Test::Simple expect the first argument to be either true or false and the second (optional) argument to be a name for the test.
My guess is that h2xs has the test harness using Test::More.
Comment on Re: Understanding h2xs's "ok" subroutine