There is no possibility to specifiy infinite at all. "INF" or "inf" or "-1" always leads to a validation error. I understand that this is a restriction of the datatype itself. So our users started to use "other ways" to make it clear, that we wanna have infinite execution.
Unfortunately, even if the user typed some unparseable strings starting with an alphanumeric character, parsing silently continued and used the wrong numbers.
To Reproduce
Try to validate a scenario file with the following configuration:
<ManeuverGroup maximumExecutionCount="1E6"> leads to GetMaximumExecutionCount() == 1
<ManeuverGroup maximumExecutionCount="100.000.000"> leads to GetMaximumExecutionCount() == 100
<ManeuverGroup maximumExecutionCount="100,000,000"> leads to GetMaximumExecutionCount() == 100
<ManeuverGroup maximumExecutionCount="1OoO1"> leads to GetMaximumExecutionCount() == 1
Expected behavior
In all aforementioned examples, the validation should FAIL
In the ideal case "INF" or "inf" is mapped to a IsMaximumExecutionCountInf() method and maximumExecutionCount is set to uint32::max internally.
Desktop (please complete the following information):
Describe the bug
The attribute
maximumExecutionCount
of the elementManeuverGroup
(https://www.asam.net/static_downloads/ASAM_OpenSCENARIO_V1.1.1_Model_Documentation/modelDocumentation/content/ManeuverGroup.html) is anunsignedInt
with range[1...inf[
.There is no possibility to specifiy infinite at all. "INF" or "inf" or "-1" always leads to a validation error. I understand that this is a restriction of the datatype itself. So our users started to use "other ways" to make it clear, that we wanna have infinite execution.
Unfortunately, even if the user typed some unparseable strings starting with an alphanumeric character, parsing silently continued and used the wrong numbers.
To Reproduce
Try to validate a scenario file with the following configuration:
<ManeuverGroup maximumExecutionCount="1E6">
leads toGetMaximumExecutionCount() == 1
<ManeuverGroup maximumExecutionCount="100.000.000">
leads toGetMaximumExecutionCount() == 100
<ManeuverGroup maximumExecutionCount="100,000,000">
leads toGetMaximumExecutionCount() == 100
<ManeuverGroup maximumExecutionCount="1OoO1">
leads toGetMaximumExecutionCount() == 1
Expected behavior
IsMaximumExecutionCountInf()
method and maximumExecutionCount is set touint32::max
internally.Desktop (please complete the following information):