Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
187633e3
Commit
187633e3
authored
Apr 21, 2017
by
Maxime Perrotin
Browse files
Fix Ada backend bug
SEQUENCE OF literal issue reported by IB Krates
parent
01b8ece7
Changes
3
Hide whitespace changes
Inline
Side-by-side
opengeode/AdaGenerator.py
View file @
187633e3
...
...
@@ -2208,17 +2208,14 @@ def _sequence_of(seqof):
seqof_ty
=
seqof
.
exprType
try
:
asn_type
=
find_basic_type
(
TYPES
[
seqof_ty
.
ReferencedTypeName
].
type
)
min_size
,
max_size
=
asn_type
.
Min
,
asn_type
.
Max
except
AttributeError
:
asn_type
=
None
min_size
,
max_size
=
seqof_ty
.
Min
,
seqof_ty
.
Max
if
hasattr
(
seqof
,
'expected_type'
):
asn_type
=
find_basic_type
(
TYPES
[
seqof
.
expected_type
.
ReferencedTypeName
].
type
.
type
)
try
:
min_size
,
max_size
=
asn_type
.
Min
,
asn_type
.
Max
except
AttributeError
:
pass
sortref
=
TYPES
[
seqof
.
expected_type
.
ReferencedTypeName
]
while
(
hasattr
(
sortref
,
"type"
)):
sortref
=
sortref
.
type
asn_type
=
find_basic_type
(
sortref
)
tab
=
[]
for
i
in
xrange
(
len
(
seqof
.
value
)):
item_stmts
,
item_str
,
local_var
=
expression
(
seqof
.
value
[
i
])
...
...
opengeode/opengeode.py
View file @
187633e3
...
...
@@ -1548,7 +1548,8 @@ class SDL_View(QtGui.QGraphicsView, object):
''' Create the SDL view holding the scene '''
super
(
SDL_View
,
self
).
__init__
(
scene
)
self
.
wrapping_window
=
None
self
.
messages_window
=
None
# self.messages_window = None
self
.
messages_window
=
QtGui
.
QListWidget
()
# default
self
.
mode
=
''
self
.
phantom_rect
=
None
self
.
filename
=
''
...
...
tests/pytests/test_qt1.py
View file @
187633e3
#!/usr/bin/env python
import
pytest
from
opengeode.opengeode
import
SDL_Scene
from
PySide
import
QtCore
from
opengeode.opengeode
import
SDL_Scene
,
SDL_View
from
opengeode.sdlSymbols
import
Label
,
Decision
def
test_1
(
qtbot
):
''' Test the parsing of numbers '''
scene
=
SDL_Scene
(
context
=
"process"
)
qtbot
.
addWidget
(
scene
)
scene
.
add_symbol
(
Label
)
# test = parser_init(string='''provided true=false; priority 5;''')
# res = test.continuous_signal()
view
=
SDL_View
(
scene
)
view
.
show
()
qtbot
.
addWidget
(
view
)
qtbot
.
keyClick
(
view
,
25
)
# assert(not isinstance(res.tree, antlr3.tree.CommonErrorNode))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment