Skip to content

Commit d7c5631

Browse files
committed
Added erroring and failing test to see the outcomes on sonar.
1 parent 3eced4c commit d7c5631

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Diff for: test/between_string/test_betwnstr.pkb

+12-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,18 @@ create or replace package body test_betwnstr as
1717

1818
procedure null_string is
1919
begin
20-
ut.expect( betwnstr( null, 2, 5 ) ).to_( be_null );
20+
ut.expect( betwnstr( null, 2, 5 ) ).to_( be_null() );
21+
end;
22+
23+
procedure bad_params is
24+
begin
25+
ut.expect( betwnstr( '1234567', 'a', 'b' ) ).to_( be_null() );
26+
end;
27+
28+
procedure bad_test
29+
is
30+
begin
31+
ut.expect( betwnstr( '1234567', 0, 500 ) ).to_( equal('1') );
2132
end;
2233

2334
procedure disabled_test is

Diff for: test/between_string/test_betwnstr.pks

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ create or replace package test_betwnstr as
1414
-- %test(Returns null for null input string value)
1515
procedure null_string;
1616

17+
-- %test(A demo of test raising runtime exception)
18+
procedure bad_params;
19+
20+
-- %test(A demo of failing test)
21+
procedure bad_test;
22+
1723
-- %test(Demo of a disabled test)
1824
-- %disabled
1925
procedure disabled_test;

0 commit comments

Comments
 (0)