Open
Description
Describe the bug
Tests for UDAFs are not in CodeCoverage ("0 lines covered").
Provide version info
v3.1.10.3349
To Reproduce
Steps to reproduce the behavior:
- Create the SecondMaxImplementation from Oracle: https://docs.oracle.com/cd/B28359_01/appdev.111/b28425/aggr_functions.htm#BEJBFBHH
- Test it manually:
select secondmax(num) from (select level num from dual connect by level<4);
- Create the Unit Test:
create or replace package secondmax_t authid current_user as
--%suite(Test for UDAF Function)
--%test(Test SECONDMAX.)
procedure secondmax;
end secondmax_t;
/
create or replace package body secondmax_t as
--%suite(Test for UDAF Function)
--%test(Test SECONDMAX.)
procedure secondmax
is
l_result number;
begin
execute immediate 'select secondmax(cnt) from (select level cnt from dual connect by level<4)' into l_result;
ut.expect(a_actual=>l_result).to_equal(a_expected=>2);
end;
end secondmax_t;
/
When you run CodeCoverage the 2 relevant lines are missed...
What is wrong here???