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

Fixing the category key when loading proto files #332

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

AsherGlick
Copy link
Owner

Changes the proto loading code to properly assign category names to the category children map. This was causing errors where no output was being written to proto files if the input was also proto files.

Also adding new tests
Also adding the ability to have proto file inputs to the test harness.

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/display_name_valid/output_proto/markers.bin.textproto._old	2024-08-18 04:11:07.024577588 +0000
+++ xml_converter/integration_tests/test_cases/display_name_valid/output_proto/markers.bin.textproto._new	2024-08-18 04:11:07.032577619 +0000
@@ -0,0 +1,48 @@
+category {
+  name: "My Category"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}
+category {
+  name: "Nested Level One"
+  children {
+    name: "Nested Level Two"
+    children {
+      name: "Nested Level Three"
+      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:"
+}

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/proto_type_valid/input/pack/markers.bin.textproto._old	2024-08-18 04:11:07.076577796 +0000
+++ xml_converter/integration_tests/test_cases/proto_type_valid/input/pack/markers.bin.textproto._new	2024-08-18 04:11:07.084577829 +0000
@@ -0,0 +1,48 @@
+category {
+  name: "My Category"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}
+category {
+  name: "Nested Level One"
+  children {
+    name: "Nested Level Two"
+    children {
+      name: "Nested Level Three"
+      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:"
+}

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/proto_type_valid/output_proto/markers.bin.textproto._old	2024-08-18 04:11:07.092577861 +0000
+++ xml_converter/integration_tests/test_cases/proto_type_valid/output_proto/markers.bin.textproto._new	2024-08-18 04:11:07.100577892 +0000
@@ -0,0 +1,48 @@
+category {
+  name: "My Category"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}
+category {
+  name: "Nested Level One"
+  children {
+    name: "Nested Level Two"
+    children {
+      name: "Nested Level Three"
+      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:"
+}

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/display_name_valid/output_proto/markers.bin.textproto._old	2024-08-18 21:26:25.288712905 +0000
+++ xml_converter/integration_tests/test_cases/display_name_valid/output_proto/markers.bin.textproto._new	2024-08-18 21:26:25.296712852 +0000
@@ -0,0 +1,48 @@
+category {
+  name: "My Category"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}
+category {
+  name: "Nested Level One"
+  children {
+    name: "Nested Level Two"
+    children {
+      name: "Nested Level Three"
+      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:"
+}

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/proto_type_valid/input/pack/markers.bin.textproto._old	2024-08-18 21:26:25.304712800 +0000
+++ xml_converter/integration_tests/test_cases/proto_type_valid/input/pack/markers.bin.textproto._new	2024-08-18 21:26:25.312712750 +0000
@@ -0,0 +1,48 @@
+category {
+  name: "My Category"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}
+category {
+  name: "Nested Level One"
+  children {
+    name: "Nested Level Two"
+    children {
+      name: "Nested Level Three"
+      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:"
+}

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/proto_type_valid/output_proto/markers.bin.textproto._old	2024-08-18 21:26:25.320712697 +0000
+++ xml_converter/integration_tests/test_cases/proto_type_valid/output_proto/markers.bin.textproto._new	2024-08-18 21:26:25.328712645 +0000
@@ -0,0 +1,48 @@
+category {
+  name: "My Category"
+  icon {
+    map_id: 50
+    position {
+      x: 169.81
+      y: 210.65
+      z: 215.83
+    }
+  }
+  id: "(\350\314\006\302\223^\226"
+}
+category {
+  name: "Nested Level One"
+  children {
+    name: "Nested Level Two"
+    children {
+      name: "Nested Level Three"
+      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:"
+}

@AsherGlick AsherGlick merged commit 548e043 into xml_converter Aug 19, 2024
13 checks passed
@AsherGlick AsherGlick deleted the proto-loading-category-fix branch August 19, 2024 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants