Changeset 21 for trunk/epic

Show
Ignore:
Timestamp:
08/31/08 18:51:36 (3 years ago)
Author:
fumanchu
Message:

Changed assert_rows arg names to 'call' for uniformity.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/epic/epic.sql

    r20 r21  
    615615 
    616616 
    617 CREATE OR REPLACE FUNCTION test.assert_rows(source text, expected text) RETURNS VOID AS $$ 
     617CREATE OR REPLACE FUNCTION test.assert_rows(call_1 text, call_2 text) RETURNS VOID AS $$ 
    618618-- Asserts that two sets of rows have equal values. 
    619619-- 
    620620-- Both arguments should be SELECT statements yielding a single row or a set of rows. 
    621621-- Either may also be any table, view, or procedure call that returns records. 
    622 -- It is also common for the 'expected' arg to be sans a FROM clause, and simply SELECT values. 
     622-- It is also common for the second arg to be sans a FROM clause, and simply SELECT values. 
    623623-- Neither source nor expected need to be sorted. Either may include a trailing semicolon. 
    624624-- 
     
    632632  e       text; 
    633633BEGIN 
    634   s := test.statement(source); 
    635   e := test.statement(expected); 
     634  s := test.statement(call_1); 
     635  e := test.statement(call_2); 
    636636   
    637637  FOR rec in EXECUTE s || ' EXCEPT ' || e 
    638638  LOOP 
    639     RAISE EXCEPTION 'Record: % from: % not found in: %', rec, source, expected; 
     639    RAISE EXCEPTION 'Record: % from: % not found in: %', rec, call_1, call_2; 
    640640  END LOOP; 
    641641   
    642642  FOR rec in EXECUTE e || ' EXCEPT ' || s 
    643643  LOOP 
    644     RAISE EXCEPTION 'Record: % from: % not found in: %', rec, expected, source; 
     644    RAISE EXCEPTION 'Record: % from: % not found in: %', rec, call_2, call_1; 
    645645  END LOOP; 
    646646END;