Changeset 2592

Show
Ignore:
Timestamp:
06/17/08 16:45:27 (20 months ago)
Author:
mpaschal
Message:

Test straight-up -and, too
Don't bother sorting a result set that's supposed to have one result
spacing
BugzID: 79953

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-40/t/driver-tests.pl

    r2591 r2592  
    415415}  
    416416 
    417 sub conjunctions : Tests(3) { 
     417sub conjunctions : Tests(4) { 
    418418    my $self = shift; 
    419419    $self->make_pc_data(); 
     
    421421 
    422422    my @res = Foo->load([ 
    423         {status => 10}, 
    424         -or => {name => 'Apple'}, 
     423        { status => 10 }, 
     424        -or => { name => 'Apple' }, 
    425425    ]); 
    426426    @res = sort { $a->id <=> $b->id } @res; 
    427     # where foo_status = 10 or foo_name = 'Apple' 
    428427    are_objects(\@res, [ @foos[0,3,4] ], '-or results'); 
     428 
     429    @res = Foo->load([ 
     430        { name => 'Microsoft' }, 
     431        -and => { status => 10 }, 
     432    ]); 
     433    are_objects(\@res, [ $foos[3] ], '-and results'); 
    429434 
    430435    @res = Foo->load([ 
     
    433438        -and_not => { status => 11 }, 
    434439    ]); 
    435     @res = sort { $a->id <=> $b->id } @res; 
    436440    # where (foo_status <= 20 and foo_name = 'Apple') and not (foo_status = 11) 
    437441    are_objects(\@res, [ $foos[4] ], '-and_not results');