Skip to content

Commit

Permalink
adding achievement bitmask tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AsherGlick committed Nov 9, 2023
1 parent a5ca652 commit 04d3cbf
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
</MarkerCategory>

<POIs>
<POI AchievementBit="0" Type="mycategory" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI AchievementBit="5" Type="mycategory" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI AchievementBit="2147483647" Type="mycategory" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<Trail AchievementBit="5" Type="mycategory"/>
<POI AchievementBit="-2147483648" Type="mycategory" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI AchievementBit="-5" Type="mycategory" 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,19 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
</MarkerCategory>

<POIs>
<POI AchievementBit="0" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<POI AchievementBit="5" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<POI AchievementBit="2147483647" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<Trail AchievementBit="5" Type="mycategory" />

<!-- TODO: textproto seems to think a fixed32 is a uint32, but we support negative values for this currently. We should probably adjust that -->
<POI AchievementBit="-2147483648" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<POI AchievementBit="-5" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />

<!-- TODO: These throw errors and crash but probably should not if this were a uint32 -->
<!-- <POI AchievementBit="4294967295" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" /> -->
<!-- <POI AchievementBit="2147483648" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" /> -->
</POIs>
</OverlayData>
9 changes: 8 additions & 1 deletion xml_converter/intigration_tests/testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ class Testcase:
'./inputs/xml_mount_filter_invalid/xml_file.xml',
'9 | <POI Mount="Raptor,NotAMount,Springer" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />',
' | ^^^^^^^^^^^^^^^^^^^^^^^^^',
]
]
),

Testcase(
name="achievement_bitmask",
xml_input_paths=["./inputs/xml_achievement_bitmask_valid"],
expected_output_xml_path="./expected_outputs/xml_achievement_bitmask_valid",
expected_output_proto_path="./expected_outputs/proto_achievement_bitmask_valid",
),
]

0 comments on commit 04d3cbf

Please sign in to comment.