# Do not simply export all your public functions/methods/constants.
# Export everything since these functions are only used by a test script
-our @EXPORT = qw( print_double print_nv print_iv print_int
+our @EXPORT = qw( print_double print_int print_long
print_float print_long_double have_long_double
- print_uv print_long
);
our $VERSION = '0.01';
}
}
-use Test::More tests => 15;
+use Test::More tests => 11;
BEGIN { use_ok('XS::APItest') };
print_long(4);
print_float(4);
print_long_double() if $ldok; # val=7 hardwired
-print_iv(2);
-print_iv(-2);
-print_uv(3);
-print_nv(6);
# Now redirect STDOUT and read from the file
ok open(STDOUT, ">&", $oldout), "restore STDOUT";
# now test the output
my @output = map { chomp; $_ } <$foo>;
close $foo;
-ok @output >= 9, "captured at least nine output lines";
+ok @output >= 4, "captured at least four output lines";
is($output[0], "5.000", "print_double");
is($output[1], "3", "print_int");
is($output[4], "7.000", "print_long_double");
}
-SKIP: {
- skip "No perlio", 4 unless $Config{useperlio};
- is($output[5], "2", "print_iv positive");
- is($output[6], "-2", "print_iv negative");
- is($output[7], "3", "print_uv");
- is($output[8], "6.000", "print_nv");
-}
-