comparison Lib/IMPL/Test/Unit.pm @ 14:65a7bb156fb7

Дом модель и схема
author Sergey
date Fri, 04 Sep 2009 16:38:15 +0400
parents 03e58a454b20
children 16ada169ca75
comparison
equal deleted inserted replaced
13:bb8d67f811ea 14:65a7bb156fb7
34 sub Setup { 34 sub Setup {
35 1; 35 1;
36 } 36 }
37 37
38 sub Cleanup { 38 sub Cleanup {
39 my ($this,$session) = @_;
40
41 $session->{$_} = $this->$_() foreach map $_->DataList, $this->get_meta('IMPL::Test::Unit::SharedData');
42
39 1; 43 1;
40 } 44 }
41 45
42 sub StartUnit { 46 sub StartUnit {
43 my $class = shift; 47 my $class = shift;
79 try { 83 try {
80 $this->$code(); 84 $this->$code();
81 $elapsed = tv_interval ( $t0 ); 85 $elapsed = tv_interval ( $t0 );
82 } finally { 86 } finally {
83 # we need to call Cleanup anyway 87 # we need to call Cleanup anyway
84 $this->Cleanup; 88 $this->Cleanup($session);
85 }; 89 };
86 90
87 return new IMPL::Test::Result( 91 return new IMPL::Test::Result(
88 Name => $this->Name, 92 Name => $this->Name,
89 State => IMPL::Test::Result::SUCCESS, 93 State => IMPL::Test::Result::SUCCESS,