This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add id and outid methods to B::PADLIST
[perl5.git] / ext / B / t / b.t
CommitLineData
ccc418af
GS
1#!./perl
2
3BEGIN {
74517a3a 4 unshift @INC, 't';
9cd8f857
NC
5 require Config;
6 if (($Config::Config{'extensions'} !~ /\bB\b/) ){
7 print "1..0 # Skip -- Perl configured without B module\n";
8 exit 0;
9 }
ccc418af
GS
10}
11
12$| = 1;
13use warnings;
14use strict;
f9a20969 15use Test::More;
ccc418af 16
c5f0f3aa 17BEGIN { use_ok( 'B' ); }
ccc418af 18
08c6f5ec 19
87a42246
MS
20package Testing::Symtable;
21use vars qw($This @That %wibble $moo %moo);
22my $not_a_sym = 'moo';
ccc418af 23
87a42246
MS
24sub moo { 42 }
25sub car { 23 }
ccc418af 26
f70490b9 27
87a42246
MS
28package Testing::Symtable::Foo;
29sub yarrow { "Hock" }
f70490b9 30
87a42246
MS
31package Testing::Symtable::Bar;
32sub hock { "yarrow" }
9b86dfa2 33
87a42246
MS
34package main;
35use vars qw(%Subs);
36local %Subs = ();
37B::walksymtable(\%Testing::Symtable::, 'find_syms', sub { $_[0] =~ /Foo/ },
38 'Testing::Symtable::');
ccc418af 39
87a42246
MS
40sub B::GV::find_syms {
41 my($symbol) = @_;
de3f1649 42
87a42246 43 $main::Subs{$symbol->STASH->NAME . '::' . $symbol->NAME}++;
cfe9256d 44}
ccc418af 45
87a42246
MS
46my @syms = map { 'Testing::Symtable::'.$_ } qw(This That wibble moo car
47 BEGIN);
48push @syms, "Testing::Symtable::Foo::yarrow";
ccc418af 49
87a42246 50# Make sure we hit all the expected symbols.
c5f0f3aa 51ok( join('', sort @syms) eq join('', sort keys %Subs), 'all symbols found' );
1e1dbab6 52
87a42246 53# Make sure we only hit them each once.
c5f0f3aa
RGS
54ok( (!grep $_ != 1, values %Subs), '...and found once' );
55
56# Tests for MAGIC / MOREMAGIC
57ok( B::svref_2object(\$.)->MAGIC->TYPE eq "\0", '$. has \0 magic' );
58{
59 my $e = '';
60 local $SIG{__DIE__} = sub { $e = $_[0] };
61 # Used to dump core, bug #16828
62 eval { B::svref_2object(\$.)->MAGIC->MOREMAGIC->TYPE; };
63 like( $e, qr/Can't call method "TYPE" on an undefined value/,
64 '$. has no more magic' );
65}
01b509b0 66
de64752d
NC
67{
68 my $pie = 'Good';
69 # This needs to be a package variable, as vars in the pad have some flags.
70 my $r = B::svref_2object(\$::data2);
71 is($r->FLAGS(), 0, "uninitialised package variable has flags of 0");
72 is($r->SvTYPE(), 0, "uninitialised package variable has type 0");
73 is($r->POK(), 0, "POK false");
74 is($r->ROK(), 0, "ROK false");
75 is($r->MAGICAL(), 0, "MAGICAL false");
76 $::data2 = $pie;
77 isnt($r->FLAGS(), 0, "initialised package variable has nonzero flags");
78 isnt($r->SvTYPE(), 0, "initialised package variable has nonzero type");
79 isnt($r->POK(), 0, "POK true");
80 is($r->ROK(), 0, "ROK false");
81 is($r->MAGICAL(), 0, "MAGICAL false");
82
83 $::data2 = substr $pie, 0, 1;
84 isnt($r->FLAGS(), 0, "initialised package variable has nonzero flags");
85 isnt($r->SvTYPE(), 0, "initialised package variable has nonzero type");
86 isnt($r->POK(), 0, "POK true");
87 is($r->ROK(), 0, "ROK false");
88 is($r->MAGICAL(), 0, "MAGICAL true");
89
90 $::data2 = \$pie;
91 isnt($r->FLAGS(), 0, "initialised package variable has nonzero flags");
92 isnt($r->SvTYPE(), 0, "initialised package variable has nonzero type");
93 is($r->POK(), 0, "POK false");
94 isnt($r->ROK(), 0, "ROK true");
95 is($r->MAGICAL(), 0, "MAGICAL false");
96
97 is($r->REFCNT(), 1, "Reference count is 1");
98 {
99 my $ref = \$::data2;
100 is($r->REFCNT(), 2, "Second reference");
101 }
102 is($r->REFCNT(), 1, "Reference count is 1");
103
104}
105
5c35adbb
NC
106my $r = qr/foo/;
107my $obj = B::svref_2object($r);
108my $regexp = ($] < 5.011) ? $obj->MAGIC : $obj;
109ok($regexp->precomp() eq 'foo', 'Get string from qr//');
110like($regexp->REGEX(), qr/\d+/, "REGEX() returns numeric value");
1f306347 111like($regexp->compflags, qr/^\d+\z/, "compflags returns numeric value");
4a31a506
FC
112is B::svref_2object(qr/(?{time})/)->qr_anoncv->ROOT->first->name, 'qr',
113 'qr_anoncv';
01b509b0
SP
114my $iv = 1;
115my $iv_ref = B::svref_2object(\$iv);
116is(ref $iv_ref, "B::IV", "Test B:IV return from svref_2object");
117is($iv_ref->REFCNT, 1, "Test B::IV->REFCNT");
118# Flag tests are needed still
119#diag $iv_ref->FLAGS();
120my $iv_ret = $iv_ref->object_2svref();
121is(ref $iv_ret, "SCALAR", "Test object_2svref() return is SCALAR");
122is($$iv_ret, $iv, "Test object_2svref()");
123is($iv_ref->int_value, $iv, "Test int_value()");
124is($iv_ref->IV, $iv, "Test IV()");
125is($iv_ref->IVX(), $iv, "Test IVX()");
126is($iv_ref->UVX(), $iv, "Test UVX()");
f046b1bd
NC
127is(eval { $iv_ref->RV() }, undef, 'Test RV() on IV');
128like($@, qr/argument is not SvROK/, 'Test RV() IV');
129$iv = \"Pie";
130my $val = eval { $iv_ref->RV() };
131is(ref $val, 'B::PV', 'Test RV() on a reference');
132is($val->PV(), 'Pie', 'Value expected');
133is($@, '', "Test RV()");
01b509b0
SP
134
135my $pv = "Foo";
136my $pv_ref = B::svref_2object(\$pv);
137is(ref $pv_ref, "B::PV", "Test B::PV return from svref_2object");
138is($pv_ref->REFCNT, 1, "Test B::PV->REFCNT");
139# Flag tests are needed still
140#diag $pv_ref->FLAGS();
141my $pv_ret = $pv_ref->object_2svref();
142is(ref $pv_ret, "SCALAR", "Test object_2svref() return is SCALAR");
143is($$pv_ret, $pv, "Test object_2svref()");
144is($pv_ref->PV(), $pv, "Test PV()");
f046b1bd
NC
145is(eval { $pv_ref->RV() }, undef, 'Test RV() on PV');
146like($@, qr/argument is not SvROK/, 'Test RV() on PV');
01b509b0 147is($pv_ref->PVX(), $pv, "Test PVX()");
f046b1bd
NC
148$pv = \"Pie";
149$val = eval { $pv_ref->RV() };
150is(ref $val, 'B::PV', 'Test RV() on a reference');
151is($val->PV(), 'Pie', 'Value expected');
152is($@, '', "Test RV()");
01b509b0
SP
153
154my $nv = 1.1;
155my $nv_ref = B::svref_2object(\$nv);
156is(ref $nv_ref, "B::NV", "Test B::NV return from svref_2object");
157is($nv_ref->REFCNT, 1, "Test B::NV->REFCNT");
158# Flag tests are needed still
159#diag $nv_ref->FLAGS();
160my $nv_ret = $nv_ref->object_2svref();
161is(ref $nv_ret, "SCALAR", "Test object_2svref() return is SCALAR");
162is($$nv_ret, $nv, "Test object_2svref()");
163is($nv_ref->NV, $nv, "Test NV()");
164is($nv_ref->NVX(), $nv, "Test NVX()");
f046b1bd
NC
165is(eval { $nv_ref->RV() }, undef, 'Test RV() on NV');
166like($@, qr/Can't locate object method "RV" via package "B::NV"/,
167 'Test RV() on NV');
01b509b0
SP
168
169my $null = undef;
170my $null_ref = B::svref_2object(\$null);
171is(ref $null_ref, "B::NULL", "Test B::NULL return from svref_2object");
172is($null_ref->REFCNT, 1, "Test B::NULL->REFCNT");
173# Flag tests are needed still
174#diag $null_ref->FLAGS();
175my $null_ret = $nv_ref->object_2svref();
176is(ref $null_ret, "SCALAR", "Test object_2svref() return is SCALAR");
177is($$null_ret, $nv, "Test object_2svref()");
178
4df7f6af 179my $RV_class = $] >= 5.011 ? 'B::IV' : 'B::RV';
01b509b0
SP
180my $cv = sub{ 1; };
181my $cv_ref = B::svref_2object(\$cv);
4df7f6af
NC
182is($cv_ref->REFCNT, 1, "Test $RV_class->REFCNT");
183is(ref $cv_ref, "$RV_class",
184 "Test $RV_class return from svref_2object - code");
01b509b0
SP
185my $cv_ret = $cv_ref->object_2svref();
186is(ref $cv_ret, "REF", "Test object_2svref() return is REF");
187is($$cv_ret, $cv, "Test object_2svref()");
188
189my $av = [];
190my $av_ref = B::svref_2object(\$av);
4df7f6af
NC
191is(ref $av_ref, "$RV_class",
192 "Test $RV_class return from svref_2object - array");
01b509b0
SP
193
194my $hv = [];
195my $hv_ref = B::svref_2object(\$hv);
4df7f6af
NC
196is(ref $hv_ref, "$RV_class",
197 "Test $RV_class return from svref_2object - hash");
01b509b0
SP
198
199local *gv = *STDOUT;
200my $gv_ref = B::svref_2object(\*gv);
201is(ref $gv_ref, "B::GV", "Test B::GV return from svref_2object");
202ok(! $gv_ref->is_empty(), "Test is_empty()");
711fbbf0 203ok($gv_ref->isGV_with_GP(), "Test isGV_with_GP()");
01b509b0
SP
204is($gv_ref->NAME(), "gv", "Test NAME()");
205is($gv_ref->SAFENAME(), "gv", "Test SAFENAME()");
206like($gv_ref->FILE(), qr/b\.t$/, "Testing FILE()");
de64752d
NC
207is($gv_ref->SvTYPE(), B::SVt_PVGV, "Test SvTYPE()");
208is($gv_ref->FLAGS() & B::SVTYPEMASK, B::SVt_PVGV, "Test SVTYPEMASK");
bb1efdce
FC
209is($gv_ref->GPFLAGS & B::GPf_ALIASED_SV, 0, 'GPFLAGS are unset');
210{
211 local *gv = \my $x;
212 is($gv_ref->GPFLAGS & B::GPf_ALIASED_SV, B::GPf_ALIASED_SV,
213 'GPFLAGS gets GPf_ALIASED_SV set');
214}
2da668d2
SP
215
216# The following return B::SPECIALs.
217is(ref B::sv_yes(), "B::SPECIAL", "B::sv_yes()");
218is(ref B::sv_no(), "B::SPECIAL", "B::sv_no()");
219is(ref B::sv_undef(), "B::SPECIAL", "B::sv_undef()");
220
221# More utility functions
222is(B::ppname(0), "pp_null", "Testing ppname (this might break if opnames.h is changed)");
223is(B::opnumber("null"), 0, "Testing opnumber with opname (null)");
224is(B::opnumber("pp_null"), 0, "Testing opnumber with opname (pp_null)");
b45732d6
NC
225{
226 my $hash = B::hash("wibble");
227 like($hash, qr/\A0x[0-9a-f]+\z/, "Testing B::hash(\"wibble\")");
228 unlike($hash, qr/\A0x0+\z/, "Testing B::hash(\"wibble\")");
229
bb1ca2d4
YO
230 SKIP: {
231 skip "Nulls don't hash to the same bucket regardless of length with this PERL_HASH implementation", 20
232 if B::hash("") ne B::hash("\0" x 19);
233 like(B::hash("\0" x $_), qr/\A0x0+\z/, "Testing B::hash(\"0\" x $_)")
234 for 0..19;
235 }
8c5b7c71
NC
236
237 $hash = eval {B::hash(chr 256)};
238 is($hash, undef, "B::hash() refuses non-octets");
239 like($@, qr/^Wide character in subroutine entry/);
240
241 $hash = B::hash(chr 163);
242 my $str = chr(163) . chr 256;
243 chop $str;
244 is(B::hash($str), $hash, 'B::hash() with chr 128-256 is well-behaved');
b45732d6 245}
f9a20969
NC
246{
247 is(B::cstring(undef), '0', "Testing B::cstring(undef)");
248 is(B::perlstring(undef), '0', "Testing B::perlstring(undef)");
249
250 my @common = map {eval $_, $_}
574fde55
NC
251 '"wibble"', '"\""', '"\'"', '"\\\\"', '"\\n\\r\\t\\b\\a\\f"', '"\000"',
252 '"\000\000"', '"\000Bing\000"', ord 'N' == 78 ? '"\\177"' : ();
f9a20969
NC
253
254 my $oct = sprintf "\\%03o", ord '?';
255 my @tests = (@common, '$_', '"$_"', '@_', '"@_"', '??N', qq{"$oct?N"},
256 ord 'N' == 78 ? (chr 11, '"\v"'): ());
257 while (my ($test, $expect) = splice @tests, 0, 2) {
258 is(B::cstring($test), $expect, "B::cstring($expect)");
259 }
260
261 @tests = (@common, '$_', '"\$_"', '@_', '"\@_"', '??N', '"??N"',
262 chr 256, '"\x{100}"', chr 65536, '"\x{10000}"',
263 ord 'N' == 78 ? (chr 11, '"\013"'): ());
264 while (my ($test, $expect) = splice @tests, 0, 2) {
265 is(B::perlstring($test), $expect, "B::perlstring($expect)");
266 utf8::upgrade $test;
267 $expect =~ s/\\b/\\x\{8\}/g;
268 $expect =~ s/\\([0-7]{3})/sprintf "\\x\{%x\}", oct $1/eg;
269 is(B::perlstring($test), $expect, "B::perlstring($expect) (Unicode)");
270 }
271}
01c3a485 272{
574fde55
NC
273 my @tests = ((map {eval(qq{"$_"}), $_} '\\n', '\\r', '\\t',
274 '\\b', '\\a', '\\f', '\\000', '\\\'', '?'), '"', '"',
275 ord 'N' == 78 ? (chr 11, '\v', "\177", '\\177') : ());
01c3a485
NC
276
277 while (my ($test, $expect) = splice @tests, 0, 2) {
278 is(B::cchar($test), "'${expect}'", "B::cchar(qq{$expect})");
279 }
280}
281
2da668d2
SP
282is(B::class(bless {}, "Wibble::Bibble"), "Bibble", "Testing B::class()");
283is(B::cast_I32(3.14), 3, "Testing B::cast_I32()");
32b17be1
DM
284is(B::opnumber("chop"), $] >= 5.015 ? 39 : 38,
285 "Testing opnumber with opname (chop)");
5ce57cc0
JJ
286
287{
288 no warnings 'once';
289 my $sg = B::sub_generation();
e1a479c5 290 *UNIVERSAL::hand_waving = sub { };
5ce57cc0
JJ
291 ok( $sg < B::sub_generation, "sub_generation increments" );
292}
293
3aaeec97 294like( B::amagic_generation, qr/^\d+\z/, "amagic_generation" );
f9a20969 295
fdbd1d64
NC
296is(B::svref_2object(sub {})->ROOT->ppaddr, 'PL_ppaddr[OP_LEAVESUB]',
297 'OP->ppaddr');
298
512ba29b
FC
299# This one crashes from perl 5.8.9 to B 1.24 (perl 5.13.6):
300B::svref_2object(sub{y/\x{100}//})->ROOT->first->first->sibling->sv;
301ok 1, 'B knows that UTF trans is a padop in 5.8.9, not an svop';
302
b852bf25 303{
619dadb5
FC
304 my $o = B::svref_2object(sub{0;0})->ROOT->first->first;
305 # Make sure we are testing what we think we are testing. If these two
306 # fail, tweak the test to find a nulled cop a different way.
307 is $o->name, "null", 'first op of sub{0;0} is a null';
308 is B::ppname($o->targ),'pp_nextstate','first op of sub{0;0} was a cop';
309 # Test its class
310 is B::class($o), "COP", 'nulled cops are of class COP';
311}
312
313{
b852bf25
FR
314 format FOO =
315foo
316.
317 my $f = B::svref_2object(*FOO{FORMAT});
318 isa_ok $f, 'B::FM';
319 can_ok $f, 'LINES';
320}
321
d9cd2aeb
FC
322is B::safename("\cLAST_FH"), "^LAST_FH", 'basic safename test';
323
a60c099b 324my $sub1 = sub {die};
99225839
FC
325{ no warnings 'once'; no strict; *Peel:: = *{"Pe\0e\x{142}::"} }
326my $sub2 = eval 'package Peel; sub {die}';
a60c099b 327my $cop = B::svref_2object($sub1)->ROOT->first->first;
99225839 328my $bobby = B::svref_2object($sub2)->ROOT->first->first;
a60c099b
FC
329is $cop->stash->object_2svref, \%main::, 'COP->stash';
330is $cop->stashpv, 'main', 'COP->stashpv';
82aeefe1
DM
331
332SKIP: {
333 skip "no nulls in packages before 5.17", 1 if $] < 5.017;
334 is $bobby->stashpv, "Pe\0e\x{142}", 'COP->stashpv with utf8 and nulls';
335}
336
337SKIP: {
338 skip "no stashoff", 2 if $] < 5.017 || !$Config::Config{useithreads};
99225839
FC
339 like $cop->stashoff, qr/^[1-9]\d*\z/a, 'COP->stashoff';
340 isnt $cop->stashoff, $bobby->stashoff,
341 'different COP->stashoff for different stashes';
a60c099b
FC
342}
343
429ba3b2
FC
344my $pmop = B::svref_2object(sub{ qr/fit/ })->ROOT->first->first->sibling;
345$regexp = $pmop->pmregexp;
346is B::class($regexp), 'REGEXP', 'B::PMOP::pmregexp returns a regexp';
347is $regexp->precomp, 'fit', 'pmregexp returns the right regexp';
348
71324a3b
DM
349
350# Test $B::overlay
351{
352 my $methods = {
353 BINOP => [ qw(last) ],
354 COP => [ qw(arybase cop_seq file filegv hints hints_hash io
355 label line stash stashpv
356 stashoff warnings) ],
357 LISTOP => [ qw(children) ],
358 LOGOP => [ qw(other) ],
359 LOOP => [ qw(lastop nextop redoop) ],
360 OP => [ qw(desc flags name next opt ppaddr private sibling
361 size spare targ type) ],
362 PADOP => [ qw(gv padix sv) ],
363 PMOP => [ qw(code_list pmflags pmoffset pmreplroot pmreplstart pmstash pmstashpv precomp reflags) ],
364 PVOP => [ qw(pv) ],
365 SVOP => [ qw(gv sv) ],
366 UNOP => [ qw(first) ],
367 };
368
369 my $overlay = {};
370 my $op = B::svref_2object(sub { my $x = 1 })->ROOT;
371
372 for my $class (sort keys %$methods) {
373 for my $meth (@{$methods->{$class}}) {
374 my $full = "B::${class}::$meth";
375 die "Duplicate method '$full'\n"
376 if grep $_ eq $full, @{$overlay->{$meth}};
377 push @{$overlay->{$meth}}, "B::${class}::$meth";
378 }
379 }
380
381 {
382 local $B::overlay; # suppress 'used once' warning
383 local $B::overlay = { $$op => $overlay };
384
385 for my $class (sort keys %$methods) {
386 bless $op, "B::$class"; # naughty
387 for my $meth (@{$methods->{$class}}) {
388 if ($op->can($meth)) {
389 my $list = $op->$meth;
390 ok(defined $list
391 && ref($list) eq "ARRAY"
392 && grep($_ eq "B::${class}::$meth", @$list),
393 "overlay: B::$class $meth");
394 }
395 else {
396 pass("overlay: B::$class $meth (skipped; no method)");
397 }
398 }
399 }
400 }
401 # B::overlay should be disabled again here
402 is($op->name, "leavesub", "overlay: orig name");
403}
404
486b1e7f
TC
405{ # [perl #118525]
406 {
407 sub foo {}
408 my $cv = B::svref_2object(\&foo);
409 ok($cv, "make a B::CV from a non-anon sub reference");
410 isa_ok($cv, "B::CV");
411 my $gv = $cv->GV;
412 ok($gv, "we get a GV from a GV on a normal sub");
413 isa_ok($gv, "B::GV");
414 is($gv->NAME, "foo", "check the GV name");
415 SKIP:
416 { # do we need these version checks?
417 skip "no HEK before 5.18", 1 if $] < 5.018;
418 is($cv->NAME_HEK, undef, "no hek for a global sub");
419 }
420 }
421
422SKIP:
423 {
424 skip "no HEK before 5.18", 4 if $] < 5.018;
425 eval <<'EOS'
426 {
427 use feature 'lexical_subs';
428 no warnings 'experimental::lexical_subs';
429 my sub bar {};
430 my $cv = B::svref_2object(\&bar);
431 ok($cv, "make a B::CV from a lexical sub reference");
432 isa_ok($cv, "B::CV");
486b1e7f
TC
433 my $hek = $cv->NAME_HEK;
434 is($hek, "bar", "check the NAME_HEK");
ae77754a
FC
435 my $gv = $cv->GV;
436 isa_ok($gv, "B::GV", "GV on a lexical sub");
486b1e7f
TC
437 }
438 1;
439EOS
440 or die "lexical_subs test failed to compile: $@";
441 }
442}
443
cc54be84 444{ # [perl #120535]
cc54be84
TC
445 my %h = ( "\x{100}" => 1 );
446 my $b = B::svref_2object(\%h);
447 my ($k, $v) = $b->ARRAY;
448 is($k, "\x{100}", "check utf8 preserved by B::HV::ARRAY");
449}
450
29e61fd9
DM
451# test op_parent
452
453SKIP: {
454 unless ($Config::Config{ccflags} =~ /PERL_OP_PARENT/) {
455 skip "op_parent only present with -DPERL_OP_PARENT builds", 6;
456 }
457 my $lineseq = B::svref_2object(sub{my $x = 1})->ROOT->first;
458 is ($lineseq->type, B::opnumber('lineseq'),
459 'op_parent: top op is lineseq');
460 my $first = $lineseq->first;
461 my $second = $first->sibling;
462 is(ref $second->sibling, "B::NULL", 'op_parent: second sibling is null');
463 is($first->lastsib, 0 , 'op_parent: first sibling: !lastsib');
464 is($second->lastsib, 1, 'op_parent: second sibling: lastsib');
465 is($$lineseq, ${$first->parent}, 'op_parent: first sibling okay');
466 is($$lineseq, ${$second->parent}, 'op_parent: second sibling okay');
467}
468
469
3a23d767
DM
470# make sure ->sv, -gv methods do the right thing on threaded builds
471{
472
473 # for some reason B::walkoptree only likes a sub name, not a code ref
474 my ($gv, $sv);
475 sub gvsv_const {
476 # make the early pad slots something unlike a threaded const or
477 # gvsv
478 my ($dummy1, $dummy2, $dummy3, $dummy4) = qw(foo1 foo2 foo3 foo4);
479 my $self = shift;
480 if ($self->name eq 'gvsv') {
481 $gv = $self->gv;
482 }
483 elsif ($self->name eq 'const') {
484 $sv = $self->sv;
485 }
486 };
487
488 B::walkoptree(B::svref_2object(sub {our $x = 1})->ROOT, "::gvsv_const");
489 ok(defined $gv, "gvsv->gv seen");
490 ok(defined $sv, "const->sv seen");
491 if ($Config::Config{useithreads}) {
492 # should get NULLs
493 is(ref($gv), "B::SPECIAL", "gvsv->gv is special");
494 is(ref($sv), "B::SPECIAL", "const->sv is special");
495 is($$gv, 0, "gvsv->gv special is 0 (NULL)");
496 is($$sv, 0, "const->sv special is 0 (NULL)");
497 }
498 else {
499 is(ref($gv), "B::GV", "gvsv->gv is GV");
500 is(ref($sv), "B::IV", "const->sv is IV");
501 pass();
502 pass();
503 }
504
505}
506
507
f9a20969 508done_testing();