File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,8 +101,10 @@ set serveroutput on size unlimited format truncated
101101@@lib/ RunTest .sql ut_annotations/ ut_annotations .parse_package_annotations .ParsePackageLevelAnnotationWithKeyValue .sql
102102@@lib/ RunTest .sql ut_annotations/ ut_annotations .parse_package_annotations .ParseAnnotationNotBeforeProcedure .sql
103103@@lib/ RunTest .sql ut_annotations/ ut_annotations .parse_package_annotations .ParsePackageAndProcedureLevelAnnotations .sql
104+ @@lib/ RunTest .sql ut_annotations/ ut_annotations .parse_package_annotations .ParseAnnotationMixedWithWrongBeforeProcedure .sql
104105@@lib/ RunTest .sql ut_annotations/ ut_annotations .parse_package_annotations .ParseComplexPackage .sql
105106
107+
106108-- Global cleanup
107109drop package ut_example_tests;
108110drop procedure check_annotation_parsing;
Original file line number Diff line number Diff line change 1+ PROMPT Parse procedure level annotations with annotations mixed with comments
2+
3+ -- Arrange
4+ declare
5+ l_source clob;
6+ l_parsing_result ut_annotations .typ_annotated_package ;
7+ l_expected ut_annotations .typ_annotated_package ;
8+ l_ann_param ut_annotations .typ_annotation_param ;
9+
10+ begin
11+ l_source := ' PACKAGE test_tt AS
12+ -- %suite(Name of suite)
13+ -- %suitepackage(all.globaltests)
14+
15+ -- %ann1(Name of suite)
16+ -- wrong line
17+ -- %ann2(some_value)
18+ procedure foo;
19+ END;' ;
20+
21+ -- Act
22+ l_parsing_result := ut_annotations .parse_package_annotations (l_source);
23+
24+ -- Assert
25+ l_ann_param := null ;
26+ l_ann_param .value := ' Name of suite' ;
27+ l_expected .package_annotations (' suite' )(1 ) := l_ann_param;
28+
29+ l_ann_param := null ;
30+ l_ann_param .value := ' all.globaltests' ;
31+ l_expected .package_annotations (' suitepackage' )(1 ) := l_ann_param;
32+
33+ l_ann_param := null ;
34+ l_ann_param .value := ' some_value' ;
35+ l_expected .procedure_annotations (' foo' )(' ann2' )(1 ) := l_ann_param;
36+
37+ check_annotation_parsing(l_expected, l_parsing_result);
38+
39+ if ut_assert .get_aggregate_asserts_result = ut_utils .tr_success then
40+ :test_result := ut_utils .tr_success ;
41+ end if;
42+
43+ end;
44+ /
You can’t perform that action at this time.
0 commit comments