|
| 1 | +Set Serveroutput On Size Unlimited format truncated |
| 2 | +set linesize 10000 |
| 3 | +set echo off |
| 4 | + |
| 5 | +create or replace package demo_doc_reporter1 is |
| 6 | + -- %suite(Demo of documentation reporter) |
| 7 | + -- %test(A passing test sample) |
| 8 | + procedure passing_test; |
| 9 | + -- %test |
| 10 | + procedure test_without_name; |
| 11 | + -- %test(A failing test exsample) |
| 12 | + procedure failing_test; |
| 13 | + -- %test |
| 14 | + procedure failing_no_name; |
| 15 | + -- %test(repoting exception) |
| 16 | + procedure failing_exception_raised; |
| 17 | +end; |
| 18 | +/ |
| 19 | + |
| 20 | +create or replace package body demo_doc_reporter1 is |
| 21 | + |
| 22 | + procedure passing_test is begin null; end; |
| 23 | + |
| 24 | + procedure test_without_name is |
| 25 | + begin |
| 26 | + ut.expect(1).to_(equal(1)); |
| 27 | + end; |
| 28 | + |
| 29 | + procedure failing_test is |
| 30 | + begin |
| 31 | + ut.expect(1).to_(equal(2)); |
| 32 | + end; |
| 33 | + procedure failing_no_name is |
| 34 | + begin |
| 35 | + ut.expect(sysdate).to_(equal(to_char(sysdate))); |
| 36 | + end; |
| 37 | + procedure failing_exception_raised is |
| 38 | + l_date date; |
| 39 | + begin |
| 40 | + l_date := to_date('abcd'); |
| 41 | + end; |
| 42 | +end; |
| 43 | +/ |
| 44 | + |
| 45 | +create or replace package demo_doc_reporter2 is |
| 46 | + -- %suite(A suite pacakge without body) |
| 47 | + -- %test(A test) |
| 48 | + procedure passing_test1; |
| 49 | + -- %test |
| 50 | + procedure passing_test2; |
| 51 | +end; |
| 52 | +/ |
| 53 | + |
| 54 | +create or replace package suite_package_without_name is |
| 55 | + -- %suite |
| 56 | + -- %test(A passing test sample) |
| 57 | + procedure passing_test1; |
| 58 | + -- %test(A passing test sample) |
| 59 | + procedure passing_test2; |
| 60 | +end; |
| 61 | +/ |
| 62 | + |
| 63 | +create or replace package body suite_package_without_name is |
| 64 | + |
| 65 | + procedure passing_test1 is begin null; end; |
| 66 | + |
| 67 | + procedure passing_test2 is |
| 68 | + begin |
| 69 | + ut.expect(1).to_(equal(1)); |
| 70 | + end; |
| 71 | +end; |
| 72 | +/ |
| 73 | + |
| 74 | +begin |
| 75 | + ut_suite_manager.run_cur_schema_suites_static(ut_documentation_reporter(), a_force_parse_again => true); |
| 76 | +end; |
| 77 | +/ |
| 78 | + |
| 79 | + |
| 80 | +drop package demo_doc_reporter2; |
| 81 | +drop package suite_package_without_name; |
| 82 | +drop package demo_doc_reporter1; |
0 commit comments