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

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

?? builder.pm

?? linux 下的源代碼分析閱讀器 red hat公司新版
?? 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鲁色资源网| 成人欧美一区二区三区在线播放| 国产精品自拍一区| 国产精品乱码一区二区三区软件| 成人综合在线观看| 亚洲精品视频一区二区| 欧美网站大全在线观看| 日韩国产欧美一区二区三区| 精品黑人一区二区三区久久| 国产精品一二三四| 成人免费在线播放视频| 欧美精品乱码久久久久久按摩| 日本aⅴ免费视频一区二区三区 | 91美女在线视频| 亚洲一区二区3| 欧美xingq一区二区| 成人av片在线观看| 午夜视黄欧洲亚洲| 久久久久久日产精品| 色综合久久88色综合天天免费| 亚洲一区二区三区四区在线| 欧美tickling网站挠脚心| 国产高清不卡一区二区| 亚洲图片欧美色图| 久久婷婷国产综合精品青草| 色香蕉久久蜜桃| 久久66热偷产精品| 亚洲精品欧美激情| 日韩免费视频线观看| 91视频国产资源| 久久国产精品色婷婷| 亚洲欧美自拍偷拍| 精品日韩欧美在线| 在线观看亚洲成人| 高清成人免费视频| 美女脱光内衣内裤视频久久网站| 国产精品国产精品国产专区不片| 欧美一级一区二区| 日本二三区不卡| 国产伦精品一区二区三区免费迷| 亚洲成人激情综合网| 国产精品伦理在线| 亚洲精品一区二区三区香蕉| 欧美日韩精品一二三区| 97精品国产露脸对白| 久久成人av少妇免费| 亚洲午夜精品在线| 国产精品久久久久久久久晋中| 日韩美女视频在线| 欧美天天综合网| 99久久亚洲一区二区三区青草| 狠狠色丁香久久婷婷综| 视频在线观看一区| 日韩视频免费直播| 欧美精品高清视频| 欧美日韩一区高清| 色婷婷久久久久swag精品 | 男女男精品视频| 亚洲自拍偷拍网站| 中文字幕人成不卡一区| 久久久精品国产99久久精品芒果| 正在播放亚洲一区| 777久久久精品| 制服丝袜在线91| 欧美日韩国产一级二级| 在线精品国精品国产尤物884a| 91亚洲国产成人精品一区二三 | 日韩精品一区二区三区视频在线观看 | 久久精品视频在线看| 日韩精品一区二区在线观看| 欧美精品第一页| 欧美高清性hdvideosex| 69堂亚洲精品首页| 欧美一区二区三区色| 欧美人成免费网站| 欧美久久久久中文字幕| 久久久精品影视| 精品久久久网站| 亚洲精品一区二区三区蜜桃下载 | 91视视频在线观看入口直接观看www | 成人午夜视频在线| eeuss鲁片一区二区三区在线看| 成人av电影在线网| 91美女片黄在线观看91美女| 91福利社在线观看| 7777精品伊人久久久大香线蕉| 91精品午夜视频| 欧美电影免费提供在线观看| 精品国产不卡一区二区三区| 国产婷婷精品av在线| 国产精品无码永久免费888| 亚洲手机成人高清视频| 亚洲成av人片一区二区三区| 日韩中文字幕av电影| 美脚の诱脚舐め脚责91| 国产精品一区免费视频| 成人午夜短视频| 欧美午夜精品理论片a级按摩| 欧美精三区欧美精三区| 精品国产青草久久久久福利| 久久免费的精品国产v∧| 一区在线播放视频| 亚洲成av人片在www色猫咪| 精品一区二区三区视频在线观看| 国产精品一区二区视频| 色视频欧美一区二区三区| 欧美老肥妇做.爰bbww视频| 精品久久久久99| 亚洲男人的天堂av| 日韩精品一二区| 大尺度一区二区| 欧美精品一二三区| 欧美激情在线观看视频免费| 亚洲自拍偷拍av| 国产麻豆欧美日韩一区| 在线视频一区二区免费| 欧美一区二区三区小说| 国产精品色哟哟| 日韩av在线免费观看不卡| 成人免费视频国产在线观看| 在线电影欧美成精品| 国产精品国产精品国产专区不蜜| 爽好久久久欧美精品| 成人黄色一级视频| 日韩一区二区在线免费观看| 亚洲三级视频在线观看| 久久精品国产99国产精品| 色综合天天在线| 久久精品视频免费观看| 亚洲3atv精品一区二区三区| 成人福利视频在线看| 日韩一区二区在线观看视频播放| 亚洲男同1069视频| 国产精品夜夜嗨| 日韩小视频在线观看专区| 一区二区在线观看av| 国产精品亚洲人在线观看| 欧美精品粉嫩高潮一区二区| 亚洲摸摸操操av| 福利电影一区二区三区| 日韩精品中文字幕在线一区| 亚洲一区二区高清| 色婷婷av一区二区三区大白胸| 久久精品网站免费观看| 久久99深爱久久99精品| 欧美精品粉嫩高潮一区二区| 悠悠色在线精品| 99精品视频免费在线观看| 久久一区二区三区四区| 免费观看30秒视频久久| 精品视频免费看| 亚洲一区在线电影| 色综合久久88色综合天天 | 欧美岛国在线观看| 日韩黄色在线观看| 欧美精品第1页| 天天亚洲美女在线视频| 欧美性受xxxx| 亚洲精品视频一区二区| 色香蕉久久蜜桃| 亚洲精品国产成人久久av盗摄| 9人人澡人人爽人人精品| 中文字幕精品一区二区三区精品| 国产精品自在在线| 久久久久久久久免费| 国产精品自拍网站| 久久精品日韩一区二区三区| 国产精品一级在线| 国产日韩欧美制服另类| 高清国产一区二区三区| 国产精品免费视频观看| 成人一区在线看| 国产精品盗摄一区二区三区| 国产.精品.日韩.另类.中文.在线.播放| 久久综合九色综合97婷婷女人| 国产精品资源站在线| 中文字幕第一区| 91日韩一区二区三区| 一区二区三区毛片| 在线电影欧美成精品| 免费高清在线视频一区·| 日韩精品一区二区三区视频| 另类欧美日韩国产在线| 26uuuu精品一区二区| 懂色av中文字幕一区二区三区 | 亚洲综合色在线| 欧美老女人在线| 国产一区二区三区四区五区入口| 日本一区二区三区国色天香 | 国产一区欧美日韩| 欧美国产激情一区二区三区蜜月| 成人av在线资源网站| 国产综合色产在线精品 | 亚洲女爱视频在线| 欧美日韩另类一区| 国产精品自拍av| 亚洲一区二区三区四区的| 精品国产乱码久久久久久免费| 国产91精品精华液一区二区三区 |