Oracle PRAGMA COVERAGE
Version 12.2.0.1

General Information
Library Note [an error occurred while processing this directive]
Purpose The COVERAGE pragma marks PL/SQL code which is infeasible to test for coverage. These marks improve coverage metric accuracy. The COVERAGE pragma marks PL/SQL source code to indicate that the code may not be feasibly tested for coverage. The pragma marks a specific code section. Marking infeasible code improves the quality of coverage metrics used to assess how much testing has been achieved.
Documented No
First Available 12.2.0.1
 
COVERAGE (new 12.2)
  PRAGMA COVERAGE (<NOT_FEASIBLE | NOT_FEASIBLE_START | NOT_FEASIBILE_END>);
DECLARE
 x PLS_INTEGER := 42;
 y PLS_INTEGER;
BEGIN
  IF (x <= 0) THEN
    y :=2;
  ELSE
    PRAGMA COVERAGE('NOT_FEASIBLE'); -- 1
    z:=3;
  END IF;

  IF (y >= 99) THEN
    z :=2;
  ELSE
    PRAGMA COVERAGE('NOT_FEASIBLE'); -- 2
    z :=3;
  END IF;
END;
/

Related Topics
AUTONOMOUS_TRANSACTION
Built-in Functions
Built-in Packages
DEPRECATION
EXCEPTION_INIT
FIPSFLAG
INLINE
Pragmas
SERIALLY_REUSABLE
SUPPLEMENTAL_LOG_DATA
What's New In 12cR1
What's New In 12cR2

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved