Skip to content

Commit

Permalink
added test for invalid phase state input. refs #4673
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Oct 19, 2018
1 parent c08987c commit a4d50f1
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Error: When adding phase: illegal character '0' in state
Quitting (on error).
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on Thu 25 Feb 2016 02:59:32 PM CET by Netedit Version dev-SVN-r20069
This data file and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/netedit.exeConfiguration.xsd">
<output>
<output-file value="net.net.xml"/>
<plain-output-prefix value="/scr2/debug/2172/input_plain"/>
</output>
<processing>
<no-turnarounds value="true"/>
<offset.disable-normalization value="true"/>
</processing>
</configuration>
-->

<connections version="0.25" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/connections_file.xsd">
<connection from="SC" to="CE" fromLane="0" toLane="0"/>

<connection from="WC" to="CE" fromLane="0" toLane="0"/>

</connections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on Thu 25 Feb 2016 02:59:32 PM CET by Netedit Version dev-SVN-r20069
This data file and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/netedit.exeConfiguration.xsd">
<output>
<output-file value="net.net.xml"/>
<plain-output-prefix value="/scr2/debug/2172/input_plain"/>
</output>
<processing>
<no-turnarounds value="true"/>
<offset.disable-normalization value="true"/>
</processing>
</configuration>
-->

<edges version="0.25" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/edges_file.xsd">
<edge id="CE" from="C" to="gneJ4" priority="1" numLanes="1" speed="13.89"/>
<edge id="SC" from="gneJ2" to="C" priority="1" numLanes="1" speed="13.89" shape="-14.98,42.66 34.83,46.98"/>
<edge id="WC" from="gneJ0" to="C" priority="1" numLanes="1" speed="13.89"/>
</edges>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on Thu 25 Feb 2016 02:59:32 PM CET by Netedit Version dev-SVN-r20069
This data file and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/netedit.exeConfiguration.xsd">
<output>
<output-file value="net.net.xml"/>
<plain-output-prefix value="/scr2/debug/2172/input_plain"/>
</output>
<processing>
<no-turnarounds value="true"/>
<offset.disable-normalization value="true"/>
</processing>
</configuration>
-->

<nodes version="0.25" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/nodes_file.xsd">
<location netOffset="0.00,0.00" convBoundary="-15.47,42.66,87.61,52.65" origBoundary="10000000000.00,10000000000.00,-10000000000.00,-10000000000.00" projParameter="!"/>

<node id="C" x="39.03" y="52.40" type="traffic_light" tl="C" shape="40.49,44.51 40.47,52.33 48.09,52.03 48.25,48.99 40.49,44.51"/>
<node id="gneJ0" x="-15.47" y="52.65" type="unregulated"/>
<node id="gneJ2" x="-14.98" y="42.66" type="unregulated"/>
<node id="gneJ4" x="87.61" y="51.54" type="unregulated"/>
</nodes>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on Thu 25 Feb 2016 02:59:32 PM CET by Netedit Version dev-SVN-r20069
This data file and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/netedit.exeConfiguration.xsd">
<output>
<output-file value="net.net.xml"/>
<plain-output-prefix value="/scr2/debug/2172/input_plain"/>
</output>
<processing>
<no-turnarounds value="true"/>
<offset.disable-normalization value="true"/>
</processing>
</configuration>
-->

<tlLogics version="0.25" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/tllogic_file.xsd">
<tlLogic id="C" type="static" programID="0" offset="0">
<phase duration="41" state="g0"/>
</tlLogic>

<connection from="SC" to="CE" fromLane="0" toLane="0" tl="C" linkIndex="0"/>
<connection from="WC" to="CE" fromLane="0" toLane="0" tl="C" linkIndex="1"/>
</tlLogics>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-e input_plain.edg.xml -n input_plain.nod.xml -x input_plain.con.xml -i
input_plain.tll.xml
Empty file.
3 changes: 3 additions & 0 deletions tests/netconvert/import/XML/errors/testsuite.netconvert
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ xml_looped_edge
# invalid node id
node_id_invalid

# traffic light with illegal state
phase_state_invalid

# Tests for broken edges
broken_edge

0 comments on commit a4d50f1

Please sign in to comment.