Skip to content

Commit 31be96a

Browse files
fix activity_diagram_profiles & resolver & test cases
1 parent 97862ff commit 31be96a

23 files changed

Lines changed: 1838 additions & 262 deletions

File tree

plantuml/parser/integration_test/activity_diagram/resolver/activity_it/activity_diagram.puml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ note left: Basic action and note
2020

2121
if (fatal configuration error?) then (yes)
2222
end
23+
elseif (configuration warning?) then (yes)
24+
:check warning;
2325
else (no)
2426
:Continue setup;
2527
endif
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
{
2+
"activity_diagram.puml": {
3+
"name": "test_activity_beta_syntax",
4+
"statements": [
5+
{
6+
"Title": {
7+
"text": "\"Beta Activity Syntax Coverage\""
8+
}
9+
},
10+
{
11+
"Action": {
12+
"label": "Initialize parser context"
13+
}
14+
},
15+
{
16+
"If": {
17+
"condition": "fatal configuration error?",
18+
"body": [
19+
{
20+
"Control": {
21+
"kind": "Stop"
22+
}
23+
}
24+
],
25+
"else_branch": [
26+
{
27+
"If": {
28+
"condition": "configuration warning?",
29+
"body": [
30+
{
31+
"Action": {
32+
"label": "check warning"
33+
}
34+
}
35+
],
36+
"else_branch": [
37+
{
38+
"Action": {
39+
"label": "Continue setup"
40+
}
41+
}
42+
],
43+
"display": {
44+
"then_label": "yes",
45+
"else_label": "no"
46+
}
47+
}
48+
}
49+
],
50+
"display": {
51+
"then_label": "yes",
52+
"else_label": null
53+
}
54+
}
55+
},
56+
{
57+
"If": {
58+
"condition": "beta syntax enabled?",
59+
"body": [
60+
{
61+
"Action": {
62+
"label": "Enter beta flow"
63+
}
64+
},
65+
{
66+
"If": {
67+
"condition": "extra validation needed?",
68+
"body": [
69+
{
70+
"Action": {
71+
"label": "Run nested validation"
72+
}
73+
}
74+
],
75+
"else_branch": [
76+
{
77+
"Action": {
78+
"label": "Skip nested validation"
79+
}
80+
}
81+
],
82+
"display": {
83+
"then_label": "yes",
84+
"else_label": "no"
85+
}
86+
}
87+
}
88+
],
89+
"else_branch": [
90+
{
91+
"Action": {
92+
"label": "Fallback configuration path"
93+
}
94+
}
95+
],
96+
"display": {
97+
"then_label": "yes",
98+
"else_label": "no"
99+
}
100+
}
101+
},
102+
{
103+
"While": {
104+
"condition": "retry budget available?",
105+
"body": [
106+
{
107+
"Action": {
108+
"label": "Try parse step"
109+
}
110+
},
111+
{
112+
"If": {
113+
"condition": "parse step succeeded?",
114+
"body": [
115+
{
116+
"Control": {
117+
"kind": "Break"
118+
}
119+
}
120+
],
121+
"else_branch": [
122+
{
123+
"Action": {
124+
"label": "Update retry state"
125+
}
126+
}
127+
],
128+
"display": {
129+
"then_label": "yes",
130+
"else_label": "no"
131+
}
132+
}
133+
}
134+
],
135+
"backward": null,
136+
"display": {
137+
"continue_label": "yes",
138+
"exit_label": null
139+
}
140+
}
141+
},
142+
{
143+
"RepeatWhile": {
144+
"body": [
145+
{
146+
"Action": {
147+
"label": "Read next activity token"
148+
}
149+
},
150+
{
151+
"If": {
152+
"condition": "token available?",
153+
"body": [
154+
{
155+
"Action": {
156+
"label": "Consume token"
157+
}
158+
}
159+
],
160+
"else_branch": [
161+
{
162+
"Control": {
163+
"kind": "Break"
164+
}
165+
}
166+
],
167+
"display": {
168+
"then_label": "yes",
169+
"else_label": "no"
170+
}
171+
}
172+
}
173+
],
174+
"condition": "more tokens expected?",
175+
"backward": null,
176+
"display": {
177+
"continue_label": "yes",
178+
"exit_label": null
179+
}
180+
}
181+
},
182+
{
183+
"Action": {
184+
"label": "Finalize result"
185+
}
186+
},
187+
{
188+
"Control": {
189+
"kind": "Stop"
190+
}
191+
}
192+
]
193+
}
194+
}

plantuml/parser/integration_test/activity_diagram/resolver/activity_it/output.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
' *******************************************************************************
2+
' Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
'
4+
' See the NOTICE file(s) distributed with this work for additional
5+
' information regarding copyright ownership.
6+
'
7+
' This program and the accompanying materials are made available under the
8+
' terms of the Apache License Version 2.0 which is available at
9+
' https://www.apache.org/licenses/LICENSE-2.0
10+
'
11+
' SPDX-License-Identifier: Apache-2.0
12+
' *******************************************************************************
13+
@startuml negative_if_unclosed
14+
start
15+
16+
if (condition?) then (yes)
17+
:do something;
18+
19+
stop
20+
@enduml
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
negative_if_unclosed.puml:
14+
error:
15+
type: "UnexpectedEndOfInput"
16+
fields:
17+
context: "if block"
18+
line: "16"
19+
column: "1"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
' *******************************************************************************
2+
' Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
'
4+
' See the NOTICE file(s) distributed with this work for additional
5+
' information regarding copyright ownership.
6+
'
7+
' This program and the accompanying materials are made available under the
8+
' terms of the Apache License Version 2.0 which is available at
9+
' https://www.apache.org/licenses/LICENSE-2.0
10+
'
11+
' SPDX-License-Identifier: Apache-2.0
12+
' *******************************************************************************
13+
@startuml negative_repeat_unclosed
14+
start
15+
16+
repeat
17+
:work inside repeat;
18+
19+
stop
20+
@enduml
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
negative_repeat_unclosed.puml:
14+
error:
15+
type: "UnexpectedEndOfInput"
16+
fields:
17+
context: "repeat loop"
18+
line: "16"
19+
column: "1"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
' *******************************************************************************
2+
' Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
'
4+
' See the NOTICE file(s) distributed with this work for additional
5+
' information regarding copyright ownership.
6+
'
7+
' This program and the accompanying materials are made available under the
8+
' terms of the Apache License Version 2.0 which is available at
9+
' https://www.apache.org/licenses/LICENSE-2.0
10+
'
11+
' SPDX-License-Identifier: Apache-2.0
12+
' *******************************************************************************
13+
@startuml negative_while_unclosed
14+
start
15+
16+
while (keep going?) is (yes)
17+
:work;
18+
19+
stop
20+
@enduml
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
negative_while_unclosed.puml:
14+
error:
15+
type: "UnexpectedEndOfInput"
16+
fields:
17+
context: "while loop"
18+
line: "16"
19+
column: "1"

0 commit comments

Comments
 (0)