[perl #115796] T_BOOL failure example
T_ENUM
T_BOOL
T_BOOL_2
+ T_BOOL_OUT
T_U_INT
T_SHORT
T_U_SHORT
OUTPUT:
in
+void
+T_BOOL_OUT( out, in )
+ bool out
+ bool in
+ CODE:
+ out = in;
+ OUTPUT:
+ out
## T_U_INT
}
}
-use Test::More tests => 144;
+use Test::More tests => 146;
use strict;
use warnings;
ok( !eval { T_BOOL_2(undef); 1 } );
}
+{
+ my ($in, $out);
+ $in = 1;
+ T_BOOL_OUT($out, $in);
+ ok($out, "T_BOOL_OUT, true in");
+ $in = 0;
+ T_BOOL_OUT($out, $in);
+ ok(!$out, "T_BOOL_OUT, false in");
+}
+
# T_U_SHORT aka U16
note("T_U_SHORT");
is( T_U_SHORT(32000), 32000);