Testing function with Boolean

Zabi

Member
Hi

I have started using the test manager (very useful tool).
The thing is that I have a function that returns a boolean, but when I try to test it I am unable to use a boolean on the test script.
If someone can help me with this issue I would be very grateful.

Thanks
 
Boolean variables can indeed no be passed to or from a test script. If you right-click on a boolean function and select "Test", a script like the following is generated:
Code:
declare
  -- Boolean parameters are translated from/to integers:
  -- 0/1/null <--> false/true/null
  result boolean;
begin
  -- Call the function
  result := even(p_value => :p_value);
  -- Convert false/true/null to 0/1/null
  :result := sys.diutil.bool_to_int(result);
end;
The boolean variable is represented as an integer, where 0 is false and 1 is true.
 
Back
Top