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

Skip to content

Commit 89df1dd

Browse files
committed
Clarify intention of end-position, make it more visible how it's defined
1 parent 86185a8 commit 89df1dd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

source/core/ut_suite_builder.pkb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,10 +817,11 @@ create or replace package body ut_suite_builder is
817817
begin
818818
if a_annotations.by_name.exists(gc_name) then
819819
l_context_names := a_annotations.by_name( gc_name );
820+
-- Maximum end-position to look for %name annotation is either the next %context or the next %endcontext annotation
820821
l_end_position :=
821822
least(
822-
coalesce( get_endcontext_position(a_start_position, a_annotations.by_line), a_annotations.by_line.last ),
823-
coalesce( a_annotations.by_name(gc_context).next(a_start_position), a_annotations.by_line.last )
823+
coalesce( get_next_annotation_of_type(a_start_position, gc_endcontext, a_annotations.by_name), a_annotations.by_line.last ),
824+
coalesce( get_next_annotation_of_type(a_start_position, gc_context, a_annotations.by_name), a_annotations.by_line.last )
824825
);
825826
l_annotation_pos := l_context_names.first;
826827

0 commit comments

Comments
 (0)