From a087e5e8f1b24e5601a0a2fa26b903561144a659 Mon Sep 17 00:00:00 2001 From: klingbolt Date: Wed, 11 Sep 2024 00:38:38 -0400 Subject: [PATCH] Fixed a bug that caused trails to not inherit attributes correctly --- .../xml_inheritance/input/pack/texture_one.png | Bin 0 -> 99 bytes .../xml_inheritance/input/pack/xml_file.xml | 9 +++++++++ .../xml_inheritance/output_proto/markers.bin | Bin 0 -> 58 bytes .../xml_inheritance/output_proto/texture_one.png | Bin 0 -> 99 bytes .../xml_inheritance/output_xml/texture_one.png | Bin 0 -> 99 bytes .../xml_inheritance/output_xml/xml_file.xml | 9 +++++++++ .../test_cases/xml_inheritance/testcase.yaml | 5 +++++ xml_converter/src/packaging_xml.cpp | 2 +- 8 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/texture_one.png create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/markers.bin create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/texture_one.png create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/texture_one.png create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/xml_file.xml create mode 100644 xml_converter/integration_tests/test_cases/xml_inheritance/testcase.yaml diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/texture_one.png b/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/texture_one.png new file mode 100644 index 0000000000000000000000000000000000000000..392885bb045268983c0e7f9a7151abceeebad090 GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^+(695$P6SS?92`TDYgKg5ZC`e1_OiRVj+-(gr|#R s2*>s0goK0#i3tLU2?>s_pBy;Z7+9_{gq+!ZHU^~D)78&qol`;+0E~JTx&QzG literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/xml_file.xml new file mode 100644 index 00000000..6d6285d8 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_inheritance/input/pack/xml_file.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/markers.bin new file mode 100644 index 0000000000000000000000000000000000000000..a1b8ed6bf1c0a5c9eab5ba745754fc357379d58d GIT binary patch literal 58 zcmd;5=Hm9PRB%o#Nlni$s+3|8U{o+t0+UW08ZXYU9hw|BO^88Akc+=0wW6f7C^bGm KFIBG~FC74>V-Q&Y literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/texture_one.png b/xml_converter/integration_tests/test_cases/xml_inheritance/output_proto/texture_one.png new file mode 100644 index 0000000000000000000000000000000000000000..392885bb045268983c0e7f9a7151abceeebad090 GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^+(695$P6SS?92`TDYgKg5ZC`e1_OiRVj+-(gr|#R s2*>s0goK0#i3tLU2?>s_pBy;Z7+9_{gq+!ZHU^~D)78&qol`;+0E~JTx&QzG literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/texture_one.png b/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/texture_one.png new file mode 100644 index 0000000000000000000000000000000000000000..392885bb045268983c0e7f9a7151abceeebad090 GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^+(695$P6SS?92`TDYgKg5ZC`e1_OiRVj+-(gr|#R s2*>s0goK0#i3tLU2?>s_pBy;Z7+9_{gq+!ZHU^~D)78&qol`;+0E~JTx&QzG literal 0 HcmV?d00001 diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/xml_file.xml new file mode 100644 index 00000000..c6f53a62 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_inheritance/output_xml/xml_file.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_inheritance/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_inheritance/testcase.yaml new file mode 100644 index 00000000..9510c793 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_inheritance/testcase.yaml @@ -0,0 +1,5 @@ +input_paths: + "pack": "xml" +expected_stdout: | +expected_stderr: | +expected_returncode: 0 diff --git a/xml_converter/src/packaging_xml.cpp b/xml_converter/src/packaging_xml.cpp index 3f096b1d..9e235ad2 100644 --- a/xml_converter/src/packaging_xml.cpp +++ b/xml_converter/src/packaging_xml.cpp @@ -168,7 +168,7 @@ vector parse_pois(rapidxml::xml_node<>* root_node, mapicon_attributes.size(); i++) { trail->init_xml_attribute( - categories[category_index]->icon_attributes[i], + categories[category_index]->trail_attributes[i], &ignored_errors, state); }