Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 11b5f84

Browse files
committed
Fixed issue with get_Cached_suite_rows syntax.
Resolves #974
1 parent 29c3757 commit 11b5f84

3 files changed

Lines changed: 39 additions & 10 deletions

File tree

source/core/ut_suite_cache_manager.pkb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ create or replace package body ut_suite_cache_manager is
366366
l_cache_rows ut_suite_cache_rows;
367367
l_results ut_suite_items_info;
368368
begin
369-
l_cache_rows := get_cached_suite_rows( a_object_owner, a_object_name );
369+
l_cache_rows := get_cached_suite_rows( a_object_owner => a_object_owner, a_object_name =>a_object_name );
370370
select ut_suite_item_info(
371371
c.object_owner, c.object_name, c.name,
372372
c.description, c.self_type, c.line_no,

test/ut3_tester_helper/run_helper.pkb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ create or replace package body run_helper is
55
begin
66
execute immediate q'[create or replace package ut3$user#.dummy_test_package as
77
--%suite(dummy_test_suite)
8+
--%suitepath(some.path)
89
--%rollback(manual)
910

1011
--%test(dummy_test)
@@ -24,14 +25,21 @@ create or replace package body run_helper is
2425
null;
2526
end;]';
2627

27-
execute immediate q'[grant execute on ut3_tester_helper.dummy_test_procedure to public]';
28+
execute immediate q'[grant execute on ut3_tester_helper.dummy_test_procedure to public]';
29+
30+
execute immediate q'[create or replace package ut3$user#.bad_test_package as
31+
--%rollback(manual)
32+
--%test(dummy_test)
33+
procedure some_dummy_test_procedure;
34+
end;]';
2835
end;
2936

3037
procedure setup_cache_objectstag is
3138
pragma autonomous_transaction;
3239
begin
3340
execute immediate q'[create or replace package ut3$user#.dummy_test_package as
3441
--%suite(dummy_test_suite)
42+
--%suitepath(some.path)
3543
--%tags(dummy)
3644
--%rollback(manual)
3745

test/ut3_user/api/test_ut_runner.pkb

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,22 @@ end;';
267267
select
268268
'UT3$USER#' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'DUMMY_TEST_PACKAGE' item_name,
269269
'dummy_test_suite' item_description, 'UT_SUITE' item_type, 2 item_line_no,
270-
'dummy_test_package' path, 0 disabled_flag,null tags
270+
'some.path.dummy_test_package' path, 0 disabled_flag,null tags
271271
from dual union all
272272
select
273273
'UT3$USER#' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'SOME_DUMMY_TEST_PROCEDURE' item_name,
274-
'dummy_test' item_description, 'UT_TEST' item_type, 5 item_line_no,
275-
'dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag,null tags
274+
'dummy_test' item_description, 'UT_TEST' item_type, 6 item_line_no,
275+
'some.path.dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag,null tags
276+
from dual union all
277+
select
278+
'UT3$USER#' object_owner, 'PATH' object_name, 'PATH' item_name,
279+
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
280+
'some.path' path, 0 disabled_flag, null tags
281+
from dual union all
282+
select
283+
'UT3$USER#' object_owner, 'SOME' object_name, 'SOME' item_name,
284+
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
285+
'some' path, 0 disabled_flag, null tags
276286
from dual;
277287
--Act
278288
open l_actual for select * from table(ut3.ut_runner.get_suites_info('UT3$USER#','DUMMY_TEST_PACKAGE'));
@@ -289,12 +299,22 @@ end;';
289299
select
290300
'UT3$USER#' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'DUMMY_TEST_PACKAGE' item_name,
291301
'dummy_test_suite' item_description, 'UT_SUITE' item_type, 2 item_line_no,
292-
'dummy_test_package' path, 0 disabled_flag,'dummy' tags
302+
'some.path.dummy_test_package' path, 0 disabled_flag,'dummy' tags
293303
from dual union all
294304
select
295305
'UT3$USER#' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'SOME_DUMMY_TEST_PROCEDURE' item_name,
296-
'dummy_test' item_description, 'UT_TEST' item_type, 6 item_line_no,
297-
'dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag,'testtag' tags
306+
'dummy_test' item_description, 'UT_TEST' item_type, 7 item_line_no,
307+
'some.path.dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag,'testtag' tags
308+
from dual union all
309+
select
310+
'UT3$USER#' object_owner, 'PATH' object_name, 'PATH' item_name,
311+
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
312+
'some.path' path, 0 disabled_flag, null tags
313+
from dual union all
314+
select
315+
'UT3$USER#' object_owner, 'SOME' object_name, 'SOME' item_name,
316+
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
317+
'some' path, 0 disabled_flag, null tags
298318
from dual;
299319
--Act
300320
open l_actual for select * from table(ut3.ut_runner.get_suites_info('UT3$USER#','DUMMY_TEST_PACKAGE'));
@@ -562,7 +582,8 @@ end;';
562582
procedure is_test_false is
563583
begin
564584
ut.expect( ut3.ut_runner.is_test( 'UT3$USER#','DUMMY_TEST_PACKAGE', 'BAD' ) ).to_be_false();
565-
ut.expect( ut3.ut_runner.is_test( 'UT3$USER#','DUMMY_TEST_PACKAGE', null ) ).to_be_false();
585+
ut.expect( ut3.ut_runner.is_test( 'UT3$USER#','BAD_TEST_PACKAGE', 'some_dummy_test_procedure' ) ).to_be_false();
586+
ut.expect( ut3.ut_runner.is_test( 'UT3$USER#','DUMMY_TEST_PACKAGE', null ) ).to_be_false();
566587
ut.expect( ut3.ut_runner.is_test( 'UT3$USER#',null,'some_dummy_test_procedure' ) ).to_be_false();
567588
ut.expect( ut3.ut_runner.is_test( null,'DUMMY_TEST_PACKAGE','some_dummy_test_procedure' ) ).to_be_false();
568589
end;
@@ -584,12 +605,12 @@ end;';
584605
ut.expect( ut3.ut_runner.is_suite( 'UT3$USER#','BAD' ) ).to_be_false();
585606
ut.expect( ut3.ut_runner.is_suite( 'UT3$USER#', null ) ).to_be_false();
586607
ut.expect( ut3.ut_runner.is_suite( null,'DUMMY_TEST_PACKAGE' ) ).to_be_false();
608+
ut.expect( ut3.ut_runner.is_suite( 'UT3$USER#','bad_test_package' ) ).to_be_false();
587609
end;
588610

589611
procedure has_suites_true is
590612
begin
591613
ut.expect( ut3.ut_runner.has_suites( a_owner => 'UT3$USER#' ) ).to_be_true();
592-
593614
ut.expect( ut3.ut_runner.has_suites( 'ut3$user#' ) ).to_be_true();
594615
end;
595616

0 commit comments

Comments
 (0)