亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? builder.pm

?? BerkeleyDB源碼
?? PM
?? 第 1 頁 / 共 3 頁
字號:
package Test::Builder;use 5.004;# $^C was only introduced in 5.005-ish.  We do this to prevent# use of uninitialized value warnings in older perls.$^C ||= 0;use strict;use vars qw($VERSION);$VERSION = '0.22';$VERSION = eval $VERSION;    # make the alpha version come out as a number# Make Test::Builder thread-safe for ithreads.BEGIN {    use Config;    # Load threads::shared when threads are turned on    if( $] >= 5.008 && $Config{useithreads} && $INC{'threads.pm'}) {        require threads::shared;        # Hack around YET ANOTHER threads::shared bug.  It would         # occassionally forget the contents of the variable when sharing it.        # So we first copy the data, then share, then put our copy back.        *share = sub (\[$@%]) {            my $type = ref $_[0];            my $data;            if( $type eq 'HASH' ) {                %$data = %{$_[0]};            }            elsif( $type eq 'ARRAY' ) {                @$data = @{$_[0]};            }            elsif( $type eq 'SCALAR' ) {                $$data = ${$_[0]};            }            else {                die "Unknown type: ".$type;            }            $_[0] = &threads::shared::share($_[0]);            if( $type eq 'HASH' ) {                %{$_[0]} = %$data;            }            elsif( $type eq 'ARRAY' ) {                @{$_[0]} = @$data;            }            elsif( $type eq 'SCALAR' ) {                ${$_[0]} = $$data;            }            else {                die "Unknown type: ".$type;            }            return $_[0];        };    }    # 5.8.0's threads::shared is busted when threads are off.    # We emulate it here.    else {        *share = sub { return $_[0] };        *lock  = sub { 0 };    }}=head1 NAMETest::Builder - Backend for building test libraries=head1 SYNOPSIS  package My::Test::Module;  use Test::Builder;  require Exporter;  @ISA = qw(Exporter);  @EXPORT = qw(ok);  my $Test = Test::Builder->new;  $Test->output('my_logfile');  sub import {      my($self) = shift;      my $pack = caller;      $Test->exported_to($pack);      $Test->plan(@_);      $self->export_to_level(1, $self, 'ok');  }  sub ok {      my($test, $name) = @_;      $Test->ok($test, $name);  }=head1 DESCRIPTIONTest::Simple and Test::More have proven to be popular testing modules,but they're not always flexible enough.  Test::Builder provides the abuilding block upon which to write your own test libraries I<which canwork together>.=head2 Construction=over 4=item B<new>  my $Test = Test::Builder->new;Returns a Test::Builder object representing the current state of thetest.Since you only run one test per program, there is B<one and only one>Test::Builder object.  No matter how many times you call new(), you'regetting the same object.  (This is called a singleton).=cutmy $Test = Test::Builder->new;sub new {    my($class) = shift;    $Test ||= bless ['Move along, nothing to see here'], $class;    return $Test;}=item B<reset>  $Test->reset;Reinitializes the Test::Builder singleton to its original state.Mostly useful for tests run in persistent environments where the sametest might be run multiple times in the same process.=cutmy $Test_Died;my $Have_Plan;my $No_Plan;my $Curr_Test;     share($Curr_Test);use vars qw($Level);my $Original_Pid;my @Test_Results;  share(@Test_Results);my $Exported_To;my $Expected_Tests;my $Skip_All;my $Use_Nums;my($No_Header, $No_Ending);$Test->reset;sub reset {    my ($self) = @_;    $Test_Died = 0;    $Have_Plan = 0;    $No_Plan   = 0;    $Curr_Test = 0;    $Level     = 1;    $Original_Pid = $$;    @Test_Results = ();    $Exported_To    = undef;    $Expected_Tests = 0;    $Skip_All = 0;    $Use_Nums = 1;    ($No_Header, $No_Ending) = (0,0);    $self->_dup_stdhandles unless $^C;    return undef;}=back=head2 Setting up testsThese methods are for setting up tests and declaring how many thereare.  You usually only want to call one of these methods.=over 4=item B<exported_to>  my $pack = $Test->exported_to;  $Test->exported_to($pack);Tells Test::Builder what package you exported your functions to.This is important for getting TODO tests right.=cutsub exported_to {    my($self, $pack) = @_;    if( defined $pack ) {        $Exported_To = $pack;    }    return $Exported_To;}=item B<plan>  $Test->plan('no_plan');  $Test->plan( skip_all => $reason );  $Test->plan( tests => $num_tests );A convenient way to set up your tests.  Call this and Test::Builderwill print the appropriate headers and take the appropriate actions.If you call plan(), don't call any of the other methods below.=cutsub plan {    my($self, $cmd, $arg) = @_;    return unless $cmd;    if( $Have_Plan ) {        die sprintf "You tried to plan twice!  Second plan at %s line %d\n",          ($self->caller)[1,2];    }    if( $cmd eq 'no_plan' ) {        $self->no_plan;    }    elsif( $cmd eq 'skip_all' ) {        return $self->skip_all($arg);    }    elsif( $cmd eq 'tests' ) {        if( $arg ) {            return $self->expected_tests($arg);        }        elsif( !defined $arg ) {            die "Got an undefined number of tests.  Looks like you tried to ".                "say how many tests you plan to run but made a mistake.\n";        }        elsif( !$arg ) {            die "You said to run 0 tests!  You've got to run something.\n";        }    }    else {        require Carp;        my @args = grep { defined } ($cmd, $arg);        Carp::croak("plan() doesn't understand @args");    }    return 1;}=item B<expected_tests>    my $max = $Test->expected_tests;    $Test->expected_tests($max);Gets/sets the # of tests we expect this test to run and prints outthe appropriate headers.=cutsub expected_tests {    my $self = shift;    my($max) = @_;    if( @_ ) {        die "Number of tests must be a postive integer.  You gave it '$max'.\n"          unless $max =~ /^\+?\d+$/ and $max > 0;        $Expected_Tests = $max;        $Have_Plan      = 1;        $self->_print("1..$max\n") unless $self->no_header;    }    return $Expected_Tests;}=item B<no_plan>  $Test->no_plan;Declares that this test will run an indeterminate # of tests.=cutsub no_plan {    $No_Plan    = 1;    $Have_Plan  = 1;}=item B<has_plan>  $plan = $Test->has_plan  Find out whether a plan has been defined. $plan is either C<undef> (no plan has been set), C<no_plan> (indeterminate # of tests) or an integer (the number of expected tests).=cutsub has_plan {	return($Expected_Tests) if $Expected_Tests;	return('no_plan') if $No_Plan;	return(undef);};=item B<skip_all>  $Test->skip_all;  $Test->skip_all($reason);Skips all the tests, using the given $reason.  Exits immediately with 0.=cutsub skip_all {    my($self, $reason) = @_;    my $out = "1..0";    $out .= " # Skip $reason" if $reason;    $out .= "\n";    $Skip_All = 1;    $self->_print($out) unless $self->no_header;    exit(0);}=back=head2 Running testsThese actually run the tests, analogous to the functions inTest::More.$name is always optional.=over 4=item B<ok>  $Test->ok($test, $name);Your basic test.  Pass if $test is true, fail if $test is false.  Justlike Test::Simple's ok().=cutsub ok {    my($self, $test, $name) = @_;    # $test might contain an object which we don't want to accidentally    # store, so we turn it into a boolean.    $test = $test ? 1 : 0;    unless( $Have_Plan ) {        require Carp;        Carp::croak("You tried to run a test without a plan!  Gotta have a plan.");    }    lock $Curr_Test;    $Curr_Test++;    # In case $name is a string overloaded object, force it to stringify.    $self->_unoverload(\$name);    $self->diag(<<ERR) if defined $name and $name =~ /^[\d\s]+$/;    You named your test '$name'.  You shouldn't use numbers for your test names.    Very confusing.ERR    my($pack, $file, $line) = $self->caller;    my $todo = $self->todo($pack);    $self->_unoverload(\$todo);    my $out;    my $result = &share({});    unless( $test ) {        $out .= "not ";        @$result{ 'ok', 'actual_ok' } = ( ( $todo ? 1 : 0 ), 0 );    }    else {        @$result{ 'ok', 'actual_ok' } = ( 1, $test );    }    $out .= "ok";    $out .= " $Curr_Test" if $self->use_numbers;    if( defined $name ) {        $name =~ s|#|\\#|g;     # # in a name can confuse Test::Harness.        $out   .= " - $name";        $result->{name} = $name;    }    else {        $result->{name} = '';    }    if( $todo ) {        $out   .= " # TODO $todo";        $result->{reason} = $todo;        $result->{type}   = 'todo';    }    else {        $result->{reason} = '';        $result->{type}   = '';    }    $Test_Results[$Curr_Test-1] = $result;    $out .= "\n";    $self->_print($out);    unless( $test ) {        my $msg = $todo ? "Failed (TODO)" : "Failed";        $self->_print_diag("\n") if $ENV{HARNESS_ACTIVE};        $self->diag("    $msg test ($file at line $line)\n");    }     return $test ? 1 : 0;}sub _unoverload {    my $self  = shift;    local($@,$!);    eval { require overload } || return;    foreach my $thing (@_) {        eval {             if( defined $$thing ) {                if( my $string_meth = overload::Method($$thing, '""') ) {                    $$thing = $$thing->$string_meth();                }            }        };    }}=item B<is_eq>  $Test->is_eq($got, $expected, $name);Like Test::More's is().  Checks if $got eq $expected.  This is thestring version.=item B<is_num>  $Test->is_num($got, $expected, $name);Like Test::More's is().  Checks if $got == $expected.  This is thenumeric version.=cutsub is_eq {    my($self, $got, $expect, $name) = @_;    local $Level = $Level + 1;    if( !defined $got || !defined $expect ) {        # undef only matches undef and nothing else        my $test = !defined $got && !defined $expect;        $self->ok($test, $name);        $self->_is_diag($got, 'eq', $expect) unless $test;        return $test;    }    return $self->cmp_ok($got, 'eq', $expect, $name);}sub is_num {    my($self, $got, $expect, $name) = @_;    local $Level = $Level + 1;    if( !defined $got || !defined $expect ) {        # undef only matches undef and nothing else        my $test = !defined $got && !defined $expect;        $self->ok($test, $name);        $self->_is_diag($got, '==', $expect) unless $test;        return $test;    }    return $self->cmp_ok($got, '==', $expect, $name);}sub _is_diag {    my($self, $got, $type, $expect) = @_;    foreach my $val (\$got, \$expect) {        if( defined $$val ) {            if( $type eq 'eq' ) {                # quote and force string context                $$val = "'$$val'"            }            else {                # force numeric context                $$val = $$val+0;            }        }        else {            $$val = 'undef';        }    }    return $self->diag(sprintf <<DIAGNOSTIC, $got, $expect);         got: %s    expected: %sDIAGNOSTIC}    =item B<isnt_eq>  $Test->isnt_eq($got, $dont_expect, $name);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩成人在线| 亚洲少妇最新在线视频| 中文字幕欧美区| 午夜精品成人在线| av一区二区不卡| 日韩一级片在线观看| 18成人在线观看| 国产精品 欧美精品| 91精品在线免费观看| 综合色中文字幕| 国产精品一区二区不卡| 这里只有精品免费| 九九视频精品免费| 欧美色视频在线观看| 国产精品久久久久久久久免费桃花 | 久久精品一区二区三区不卡牛牛| 亚洲精品国产一区二区精华液| 国产精品一区二区果冻传媒| 精品国产伦理网| 美女尤物国产一区| 91精品国产一区二区人妖| 亚洲黄色片在线观看| 成人黄色免费短视频| 国产肉丝袜一区二区| 激情小说欧美图片| 日韩欧美在线影院| 免费成人在线影院| 精品美女一区二区| 蜜臀a∨国产成人精品| 日韩三级视频中文字幕| 五月婷婷另类国产| 9191成人精品久久| 日韩电影在线免费看| 正在播放一区二区| 久久精品国内一区二区三区| 欧美一二三区精品| 久久97超碰色| 久久午夜羞羞影院免费观看| 国产成人午夜精品影院观看视频| 国产午夜精品理论片a级大结局| 国产一区二区三区观看| 久久久久久久久免费| 成人在线综合网| 国产在线精品一区二区| 国产日韩欧美在线一区| 成人少妇影院yyyy| 亚洲欧美视频在线观看| 色美美综合视频| 天堂一区二区在线| 欧美一卡二卡在线| 国产精品一区二区久久不卡| 国产精品理论片| 欧美视频第二页| 日本美女一区二区| 久久久蜜臀国产一区二区| 成人精品鲁一区一区二区| 亚洲码国产岛国毛片在线| 欧美精品精品一区| 韩国一区二区三区| 亚洲日本中文字幕区| 欧美久久久影院| 国产精品 欧美精品| 亚洲精品久久嫩草网站秘色| 91精品国产综合久久久蜜臀粉嫩 | 欧美一区二区三区不卡| 国产激情偷乱视频一区二区三区| 亚洲丝袜自拍清纯另类| 中文字幕五月欧美| 欧美老肥妇做.爰bbww| 国产呦萝稀缺另类资源| 亚洲欧美日韩国产手机在线| 日韩欧美一级精品久久| av影院午夜一区| 免费黄网站欧美| 综合激情网...| 精品日韩在线一区| 在线免费精品视频| 国产成人免费在线观看不卡| 五月天亚洲精品| 国产精品久久久久久亚洲伦| 日韩欧美色综合| 色婷婷综合在线| 国产福利不卡视频| 日韩高清中文字幕一区| 亚洲私人影院在线观看| 久久网站最新地址| 欧美日韩一区久久| 99久久99久久精品免费观看| 精品一区二区免费| 首页国产欧美久久| 一片黄亚洲嫩模| 国产精品无圣光一区二区| 欧美成人a∨高清免费观看| 欧美色图片你懂的| 91蝌蚪porny九色| 成人av在线网| 国产精品性做久久久久久| 香蕉成人啪国产精品视频综合网| 亚洲欧美在线视频观看| 国产区在线观看成人精品| 欧美一区二区播放| 91麻豆精品国产91久久久久久 | 性做久久久久久免费观看| 亚洲欧洲日产国码二区| 国产日韩三级在线| 欧美sm极限捆绑bd| 欧美一级片免费看| 欧美精品亚洲一区二区在线播放| 91国在线观看| 在线观看三级视频欧美| 91社区在线播放| 91玉足脚交白嫩脚丫在线播放| 国产**成人网毛片九色| 风间由美性色一区二区三区| 国产成人免费在线观看| 成人午夜又粗又硬又大| 岛国一区二区在线观看| 成人一区二区在线观看| 成人av网址在线| 91免费视频观看| 色婷婷精品大在线视频| 欧美视频在线不卡| 欧美高清视频www夜色资源网| 欧美精品一二三| 精品少妇一区二区三区视频免付费 | 亚洲欧洲色图综合| 亚洲色图欧洲色图婷婷| 一区二区欧美精品| 午夜精品成人在线视频| 久久99精品久久久久久| 国产在线视视频有精品| 国产精品一二三| 91麻豆免费看片| 欧美私人免费视频| 欧美一区二区久久久| 2023国产一二三区日本精品2022| 国产欧美va欧美不卡在线| 亚洲视频一区在线| 亚洲成人av资源| 国内精品视频一区二区三区八戒| 国产一区不卡视频| 色呦呦国产精品| 91麻豆精品国产91久久久| 国产午夜亚洲精品羞羞网站| 亚洲欧洲精品一区二区三区不卡| 亚洲人成在线播放网站岛国| 五月激情综合色| 国产成人亚洲综合a∨婷婷图片| av电影在线观看完整版一区二区| 欧美亚洲禁片免费| 久久久久久免费网| 亚洲电影第三页| 国产寡妇亲子伦一区二区| 一本色道a无线码一区v| 亚洲精品一线二线三线| 亚洲色图在线看| 精品一区二区在线观看| 一本久久a久久免费精品不卡| 日韩视频国产视频| 亚洲情趣在线观看| 国产精品一区在线观看你懂的| 一本久久精品一区二区| 久久久久久久久久久99999| 一区av在线播放| 不卡一区二区三区四区| 日韩亚洲欧美成人一区| 亚洲人成亚洲人成在线观看图片 | 99国产精品久| 2014亚洲片线观看视频免费| 亚洲亚洲人成综合网络| 国产aⅴ综合色| 日韩欧美第一区| 亚洲高清中文字幕| 91浏览器打开| 久久九九国产精品| 麻豆精品一二三| 欧美色图一区二区三区| 亚洲你懂的在线视频| 国产精品羞羞答答xxdd| 精品国产不卡一区二区三区| 亚洲国产视频直播| 91在线国产观看| 欧美极品xxx| 韩国毛片一区二区三区| 91精品国产色综合久久不卡电影| 一区二区三区四区不卡在线 | 欧美日韩亚洲另类| 亚洲精品一二三| 91农村精品一区二区在线| 国产亚洲精品免费| 国产精品羞羞答答xxdd| 久久一日本道色综合| 麻豆精品国产传媒mv男同| 欧美精品久久99久久在免费线| 亚洲午夜久久久久久久久电影网| 91麻豆国产福利精品| 亚洲欧洲av另类| 99精品视频中文字幕| 亚洲欧美日韩国产中文在线| 91麻豆产精品久久久久久|