converted more tests from Perl to C IV