Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding integration tests for the "type" attribute #290

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<OverlayData>
<MarkerCategory Name="mycategory"></MarkerCategory>

<MarkerCategory Name="NestedLevel1">
<MarkerCategory Name="NestedLevel2">
<MarkerCategory Name="NestedLevel3"></MarkerCategory>
</MarkerCategory>
</MarkerCategory>

<POIs>
<POI Type="notmycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<POI Type="nestedlevel1.nestedlevel2.nestedlevel3.nestedlevel4" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
</POIs>
</OverlayData>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff

Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<OverlayData>
<MarkerCategory ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<MarkerCategory ID="LJKn7WpADjo=" Name="NestedLevel1">
<MarkerCategory ID="uJrcuLd4as8=" Name="NestedLevel2">
<MarkerCategory ID="cCxU1IXfiKQ=" Name="NestedLevel3">
</MarkerCategory>
</MarkerCategory>
</MarkerCategory>

<POIs>
<POI Type="notmycategory" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI Type="nestedlevel1.nestedlevel2.nestedlevel3.nestedlevel4" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
</POIs>
</OverlayData>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
input_paths:
"pack": "xml"
expected_stdout: |
Error: Category Not Found "notmycategory"
test_cases/type_invalid/input/pack/xml_file.xml
11 | <POI Type="notmycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
| ^^^^^^^^^^^^^
Error: Category Not Found "nestedlevel4"
test_cases/type_invalid/input/pack/xml_file.xml
12 | <POI Type="nestedlevel1.nestedlevel2.nestedlevel3.nestedlevel4" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
expected_stderr: |
expected_returncode: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<OverlayData>
<MarkerCategory Name="mycategory"></MarkerCategory>

<MarkerCategory Name="NestedLevel1">
<MarkerCategory Name="NestedLevel2">
<MarkerCategory Name="NestedLevel3"></MarkerCategory>
</MarkerCategory>
</MarkerCategory>

<POIs>
<POI Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<POI Type="nestedlevel1" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<POI Type="nestedlevel1.nestedlevel2" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<POI Type="nestedlevel1.nestedlevel2.nestedlevel3" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
</POIs>
</OverlayData>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/type_valid/output_proto/markers.bin.textproto._old	2024-05-19 13:07:23.023748094 +0000
+++ xml_converter/integration_tests/test_cases/type_valid/output_proto/markers.bin.textproto._new	2024-05-19 13:07:23.027748107 +0000
@@ -0,0 +1,44 @@
+category {
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}
+category {
+  children {
+    children {
+      icon {
+        map_id: 50
+        position {
+          x: 169.81
+          y: 210.65
+          z: 215.83
+        }
+      }
+      id: "p,T\324\205\337\210\244"
+    }
+    icon {
+      map_id: 50
+      position {
+        x: 169.81
+        y: 210.65
+        z: 215.83
+      }
+    }
+    id: "\270\232\334\270\267xj\317"
+  }
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: ",\222\247\355j@\016:"
+}

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

 2B\Ï)Cf¦RC{ÔWCB(èÌ“^–
a@ 2B\Ï)Cf¦RC{ÔWCBp,Tԅ߈¤ 2B\Ï)Cf¦RC{ÔWCB¸šÜ¸·xjÏ 2B\Ï)Cf¦RC{ÔWCB,’§íj@:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<OverlayData>
<MarkerCategory ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<MarkerCategory ID="LJKn7WpADjo=" Name="NestedLevel1">
<MarkerCategory ID="uJrcuLd4as8=" Name="NestedLevel2">
<MarkerCategory ID="cCxU1IXfiKQ=" Name="NestedLevel3">
</MarkerCategory>
</MarkerCategory>
</MarkerCategory>

<POIs>
<POI Type="mycategory" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI Type="nestedlevel1" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI Type="nestedlevel1.nestedlevel2" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI Type="nestedlevel1.nestedlevel2.nestedlevel3" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
</POIs>
</OverlayData>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
input_paths:
"pack": "xml"
expected_stdout: |
expected_stderr: |
expected_returncode: 0
Loading