Changeset 13795


Ignore:
Timestamp:
01/23/12 14:45:26 (4 weeks ago)
Author:
CrawfordCurrie
Message:

Item11466: fixes for borked unit tests; looks like 'someone' is running unit tests with ASSERT disabled. Tsk tsk.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/UnitTestContrib/test/unit/FoswikiTestCase.pm

    r13703 r13795  
    741741    $this->{request} = $this->{session}{request}; 
    742742    ASSERT( defined $Foswiki::Plugins::SESSION ) if SINGLE_SINGLETONS; 
    743     ( $this->{test_topicObject} ) = 
    744       Foswiki::Func::readTopic( $this->{test_web}, $this->{test_topic} ); 
     743    if ($this->{test_web} && $this->{test_topic}) { 
     744        ( $this->{test_topicObject} ) = 
     745            Foswiki::Func::readTopic( $this->{test_web}, $this->{test_topic} ); 
     746    } 
    745747 
    746748    return $this->{session}; 
  • trunk/core/lib/Foswiki/Meta.pm

    r13781 r13795  
    12471247        if ( defined $name ) { 
    12481248 
    1249 #this code presumes the _indices are there (Sven would like it to re-create when needed..) 
    1250 # Paul.H notes that we trip over this one when meta obj is unloaded (I think, see Item10927) 
    1251             ASSERT( defined( $this->{_indices} ) ) if DEBUG; 
    1252             my $indices = $this->{_indices}->{$type}; 
     1249            my $indices = $this->{_indices}; 
     1250            return undef unless defined $indices; 
     1251            $indices = $indices->{$type}; 
    12531252            return undef unless defined $indices; 
    12541253            return undef unless defined $indices->{$name}; 
Note: See TracChangeset for help on using the changeset viewer.