最近写个程序,要抽取 几万 到几十万个数据,

这个怎么校验啊?

用的是  多重hash 链表结构,

写 Test::More ,   Test::Deep   也不现实啊,  因为自己要先写正确的 数值,才能比较,
数值太多了 ,

比如

原程序:

.......
use Storable ;
store  $info , 'file' ;  # store the big reference variable out ,
........


测试程序: test.t
use Storable ;
my $info =   retrieve  'file' ;

这个没法写啊, 数据这么多,  要一个一个看 ,
my $correct_one = {
          A ->  {
            B ->  C
           ...
         }
         data2 ->
         data3 ->
         data4 ->
         ......
}

cmp_deeply(  $info ,  $correct_one ,  ' both hash equal' ) ;

用Test::More 也是一样的, 要写很多 is, 比如
is  (  $info->{data1}->{AAA} ,  $correct_value1 , " ok1" }
is  (  $info->{data2}->{AAA} ,  $correct_value1 , " ok2" }
is  (  $info->{data3}->{AAA} ,  $correct_value1 , " ok3" }

-- 
            Yours Sincerely
                    Zeng Hong

-- 
您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
要向此网上论坛发帖,请发送电子邮件至 [email protected]。
要取消订阅此网上论坛,请发送电子邮件至 [email protected]。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

回复