summaryrefslogtreecommitdiff
path: root/ext/XS
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-06-11 13:55:12 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-06-11 13:55:12 +0000
commitdeec275f317b7ba568cf64f11f21be48566283ed (patch)
tree2f44c1500d817de48d712d75e86251fc1473e880 /ext/XS
parenta4ad7ea05de803d33a8b0d9fb85c159a8df86562 (diff)
downloadperl-deec275f317b7ba568cf64f11f21be48566283ed.tar.gz
Trying to printf Perl-specific datatypes using printf
(with perlio or stdio) is folly, says Hugo. p4raw-id: //depot/perl@17189
Diffstat (limited to 'ext/XS')
-rw-r--r--ext/XS/APItest/APItest.pm3
-rw-r--r--ext/XS/APItest/APItest.xs18
-rw-r--r--ext/XS/APItest/t/printf.t16
3 files changed, 3 insertions, 34 deletions
diff --git a/ext/XS/APItest/APItest.pm b/ext/XS/APItest/APItest.pm
index 2a01152437..bd8463bd80 100644
--- a/ext/XS/APItest/APItest.pm
+++ b/ext/XS/APItest/APItest.pm
@@ -12,9 +12,8 @@ use base qw/ DynaLoader Exporter /;
# 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';
diff --git a/ext/XS/APItest/APItest.xs b/ext/XS/APItest/APItest.xs
index a24e7fb982..085198ace4 100644
--- a/ext/XS/APItest/APItest.xs
+++ b/ext/XS/APItest/APItest.xs
@@ -35,24 +35,6 @@ print_long_double()
#endif
void
-print_nv(val)
- NV val
- CODE:
- printf("%5.3Vf\n",val);
-
-void
-print_iv(val)
- IV val
- CODE:
- printf("%Vd\n",val);
-
-void
-print_uv(val)
- UV val
- CODE:
- printf("%Vu\n",val);
-
-void
print_int(val)
int val
CODE:
diff --git a/ext/XS/APItest/t/printf.t b/ext/XS/APItest/t/printf.t
index 6010b88926..a17267de7b 100644
--- a/ext/XS/APItest/t/printf.t
+++ b/ext/XS/APItest/t/printf.t
@@ -8,7 +8,7 @@ BEGIN {
}
}
-use Test::More tests => 15;
+use Test::More tests => 11;
BEGIN { use_ok('XS::APItest') };
@@ -31,10 +31,6 @@ print_int(3);
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";
@@ -43,7 +39,7 @@ print "# Test output by reading from file\n";
# 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");
@@ -55,11 +51,3 @@ SKIP: {
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");
-}
-