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

Skip to content

Commit d2f9796

Browse files
committed
Switch to use VARCHAR2 instead of UT_VARCHAR2_ROWS()
Signed-off-by: lwasylow <[email protected]>
1 parent 3058610 commit d2f9796

21 files changed

Lines changed: 92 additions & 80 deletions

source/api/ut.pkb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ create or replace package body ut is
121121
a_client_character_set varchar2,
122122
a_random_test_order integer,
123123
a_random_test_order_seed positive,
124-
a_tags ut_varchar2_rows := null
124+
a_tags varchar2 := null
125125
) is
126126
pragma autonomous_transaction;
127127
begin
@@ -157,7 +157,7 @@ create or replace package body ut is
157157
a_client_character_set varchar2,
158158
a_random_test_order integer,
159159
a_random_test_order_seed positive,
160-
a_tags ut_varchar2_rows := null
160+
a_tags varchar2 := null
161161
) is
162162
pragma autonomous_transaction;
163163
begin
@@ -234,7 +234,7 @@ create or replace package body ut is
234234
a_client_character_set,
235235
a_random_test_order,
236236
a_random_test_order_seed,
237-
ut_varchar2_rows(a_tags)
237+
a_tags
238238
);
239239
if l_reporter is of (ut_output_reporter_base) then
240240
l_results := treat(l_reporter as ut_output_reporter_base).get_lines_cursor();
@@ -273,7 +273,7 @@ create or replace package body ut is
273273
a_client_character_set,
274274
a_random_test_order,
275275
a_random_test_order_seed,
276-
ut_varchar2_rows(a_tags)
276+
a_tags
277277
);
278278
if l_reporter is of (ut_output_reporter_base) then
279279
l_results := treat(l_reporter as ut_output_reporter_base).get_lines_cursor();
@@ -313,7 +313,7 @@ create or replace package body ut is
313313
a_client_character_set,
314314
a_random_test_order,
315315
a_random_test_order_seed,
316-
ut_varchar2_rows(a_tags)
316+
a_tags
317317
);
318318
if l_reporter is of (ut_output_reporter_base) then
319319
l_results := treat(l_reporter as ut_output_reporter_base).get_lines_cursor();
@@ -353,7 +353,7 @@ create or replace package body ut is
353353
a_client_character_set,
354354
a_random_test_order,
355355
a_random_test_order_seed,
356-
ut_varchar2_rows(a_tags)
356+
a_tags
357357
);
358358
if l_reporter is of (ut_output_reporter_base) then
359359
l_results := treat(l_reporter as ut_output_reporter_base).get_lines_cursor();
@@ -393,7 +393,7 @@ create or replace package body ut is
393393
a_client_character_set,
394394
a_random_test_order,
395395
a_random_test_order_seed,
396-
ut_varchar2_rows(a_tags)
396+
a_tags
397397
);
398398
if l_reporter is of (ut_output_reporter_base) then
399399
l_results := treat(l_reporter as ut_output_reporter_base).get_lines_cursor();
@@ -433,7 +433,7 @@ create or replace package body ut is
433433
a_client_character_set,
434434
a_random_test_order,
435435
a_random_test_order_seed,
436-
ut_varchar2_rows(a_tags)
436+
a_tags
437437
);
438438
if l_reporter is of (ut_output_reporter_base) then
439439
l_results := treat(l_reporter as ut_output_reporter_base).get_lines_cursor();
@@ -457,7 +457,7 @@ create or replace package body ut is
457457
a_force_manual_rollback boolean := false,
458458
a_random_test_order boolean := false,
459459
a_random_test_order_seed positive := null,
460-
a_tags ut_varchar2_rows := null
460+
a_tags varchar2 := null
461461
) is
462462
l_reporter ut_reporter_base := a_reporter;
463463
begin
@@ -514,7 +514,7 @@ create or replace package body ut is
514514
a_force_manual_rollback boolean := false,
515515
a_random_test_order boolean := false,
516516
a_random_test_order_seed positive := null,
517-
a_tags ut_varchar2_rows := null
517+
a_tags varchar2 := null
518518
) is
519519
l_reporter ut_reporter_base := a_reporter;
520520
begin
@@ -563,7 +563,7 @@ create or replace package body ut is
563563
a_force_manual_rollback,
564564
a_random_test_order,
565565
a_random_test_order_seed,
566-
ut_varchar2_rows(a_tags)
566+
a_tags
567567
);
568568
end;
569569

@@ -595,7 +595,7 @@ create or replace package body ut is
595595
a_force_manual_rollback,
596596
a_random_test_order,
597597
a_random_test_order_seed,
598-
ut_varchar2_rows(a_tags)
598+
a_tags
599599
);
600600
end;
601601

@@ -628,7 +628,7 @@ create or replace package body ut is
628628
a_force_manual_rollback,
629629
a_random_test_order,
630630
a_random_test_order_seed,
631-
ut_varchar2_rows(a_tags)
631+
a_tags
632632
);
633633
end;
634634

@@ -661,7 +661,7 @@ create or replace package body ut is
661661
a_force_manual_rollback,
662662
a_random_test_order,
663663
a_random_test_order_seed,
664-
ut_varchar2_rows(a_tags)
664+
a_tags
665665
);
666666
end;
667667

source/api/ut.pks

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ create or replace package ut authid current_user as
178178
a_force_manual_rollback boolean := false,
179179
a_random_test_order boolean := false,
180180
a_random_test_order_seed positive := null,
181-
a_tags ut_varchar2_rows := null
181+
a_tags varchar2 := null
182182
);
183183

184184
procedure run(
@@ -194,7 +194,7 @@ create or replace package ut authid current_user as
194194
a_force_manual_rollback boolean := false,
195195
a_random_test_order boolean := false,
196196
a_random_test_order_seed positive := null,
197-
a_tags ut_varchar2_rows := null
197+
a_tags varchar2 := null
198198
);
199199

200200
procedure run(

source/api/ut_runner.pkb

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,14 @@ create or replace package body ut_runner is
9191
a_force_manual_rollback boolean := false,
9292
a_random_test_order boolean := false,
9393
a_random_test_order_seed positive := null,
94-
a_tags ut_varchar2_rows := null
94+
a_tags varchar2 := null
9595
) is
9696
l_run ut_run;
9797
l_coverage_schema_names ut_varchar2_rows;
9898
l_exclude_object_names ut_object_names := ut_object_names();
9999
l_include_object_names ut_object_names;
100100
l_paths ut_varchar2_list := ut_varchar2_list();
101101
l_random_test_order_seed positive;
102-
l_tags ut_varchar2_rows := ut_varchar2_rows();
103102
begin
104103
ut_event_manager.initialize();
105104
if a_reporters is not empty then
@@ -126,12 +125,6 @@ create or replace package body ut_runner is
126125
end loop;
127126
end if;
128127

129-
if (a_tags is not null) or not(a_tags is empty) then
130-
for i in 1..a_tags.count loop
131-
l_tags := l_tags multiset union ut_utils.convert_collection(ut_utils.string_to_table(a_string => a_tags(i),a_delimiter => ','));
132-
end loop;
133-
end if;
134-
135128
begin
136129
ut_expectation_processor.reset_invalidation_exception();
137130
ut_utils.save_dbms_output_to_cache();
@@ -161,10 +154,10 @@ create or replace package body ut_runner is
161154
set(a_test_file_mappings),
162155
a_client_character_set,
163156
l_random_test_order_seed,
164-
l_tags
157+
a_tags
165158
);
166159

167-
ut_suite_manager.configure_execution_by_path(l_paths, l_run.items, l_random_test_order_seed, l_tags);
160+
ut_suite_manager.configure_execution_by_path(l_paths, l_run.items, l_random_test_order_seed, a_tags);
168161
if a_force_manual_rollback then
169162
l_run.set_rollback_type( a_rollback_type => ut_utils.gc_rollback_manual, a_force => true );
170163
end if;

source/api/ut_runner.pks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ create or replace package ut_runner authid current_user is
7171
a_force_manual_rollback boolean := false,
7272
a_random_test_order boolean := false,
7373
a_random_test_order_seed positive := null,
74-
a_tags ut_varchar2_rows := null
74+
a_tags varchar2 := null
7575
);
7676

7777
/**

source/core/types/ut_run.tpb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ create or replace type body ut_run as
2727
a_test_file_mappings ut_file_mappings := null,
2828
a_client_character_set varchar2 := null,
2929
a_random_test_order_seed positive := null,
30-
a_run_tags ut_varchar2_rows := null
30+
a_run_tags varchar2 := null
3131
) return self as result is
3232
begin
3333
self.run_paths := a_run_paths;

source/core/types/ut_run.tps

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ create or replace type ut_run under ut_suite_item (
2121
project_name varchar2(4000),
2222
items ut_suite_items,
2323
run_paths ut_varchar2_list,
24-
run_tags ut_varchar2_rows,
24+
run_tags varchar2(4000),
2525
coverage_options ut_coverage_options,
2626
test_file_mappings ut_file_mappings,
2727
client_character_set varchar2(100),
@@ -37,7 +37,7 @@ create or replace type ut_run under ut_suite_item (
3737
a_test_file_mappings ut_file_mappings := null,
3838
a_client_character_set varchar2 := null,
3939
a_random_test_order_seed positive := null,
40-
a_run_tags ut_varchar2_rows := null
40+
a_run_tags varchar2 := null
4141
) return self as result,
4242
overriding member procedure mark_as_skipped(self in out nocopy ut_run),
4343
overriding member function do_execute(self in out nocopy ut_run) return boolean,

source/core/types/ut_suite.tpb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ create or replace type body ut_suite as
1818

1919
constructor function ut_suite (
2020
self in out nocopy ut_suite, a_object_owner varchar2, a_object_name varchar2, a_line_no integer,
21-
a_suite_tags ut_varchar2_rows := null
21+
a_tags varchar2 := null
2222
) return self as result is
2323
begin
2424
self.self_type := $$plsql_unit;
2525
self.init(a_object_owner, a_object_name, a_object_name, a_line_no);
2626
self.items := ut_suite_items();
2727
before_all_list := ut_executables();
2828
after_all_list := ut_executables();
29-
self.suite_tags := a_suite_tags;
29+
self.tags := a_tags;
3030
return;
3131
end;
3232

source/core/types/ut_suite.tps

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ create or replace type ut_suite under ut_logical_suite (
2929
/**
3030
* Hold list of tags assign to suite
3131
*/
32-
suite_tags ut_varchar2_rows,
32+
tags varchar2(4000),
3333
constructor function ut_suite (
3434
self in out nocopy ut_suite, a_object_owner varchar2, a_object_name varchar2, a_line_no integer,
35-
a_suite_tags ut_varchar2_rows := null
35+
a_tags varchar2 := null
3636
) return self as result,
3737
overriding member function do_execute(self in out nocopy ut_suite) return boolean,
3838
overriding member function get_error_stack_traces(self ut_suite) return ut_varchar2_list,

source/core/types/ut_test.tpb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ create or replace type body ut_test as
1818

1919
constructor function ut_test(
2020
self in out nocopy ut_test, a_object_owner varchar2 := null, a_object_name varchar2, a_name varchar2,
21-
a_line_no integer, a_expected_error_codes ut_integer_list := null, a_test_tags ut_varchar2_rows := null
21+
a_line_no integer, a_expected_error_codes ut_integer_list := null, a_tags varchar2 := null
2222
) return self as result is
2323
begin
2424
self.self_type := $$plsql_unit;
@@ -31,7 +31,7 @@ create or replace type body ut_test as
3131
self.all_expectations := ut_expectation_results();
3232
self.failed_expectations := ut_expectation_results();
3333
self.expected_error_codes := a_expected_error_codes;
34-
self.test_tags := a_test_tags;
34+
self.tags := a_tags;
3535
return;
3636
end;
3737

source/core/types/ut_test.tps

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ create or replace type ut_test force under ut_suite_item (
5858
/**
5959
* Hold list of tags assign to test
6060
*/
61-
test_tags ut_varchar2_rows,
61+
tags varchar2(4000),
6262
constructor function ut_test(
6363
self in out nocopy ut_test, a_object_owner varchar2 := null, a_object_name varchar2, a_name varchar2,
64-
a_line_no integer, a_expected_error_codes ut_integer_list := null, a_test_tags ut_varchar2_rows := null
64+
a_line_no integer, a_expected_error_codes ut_integer_list := null, a_tags varchar2 := null
6565
) return self as result,
6666
overriding member procedure mark_as_skipped(self in out nocopy ut_test),
6767
overriding member function do_execute(self in out nocopy ut_test) return boolean,

0 commit comments

Comments
 (0)