Repository navigation
Add object template support - #5
Merged
Merged
Conversation
Move Object into its own module (src/object.zig) and add support for .tj template files. When an object references a template, field values and properties from the template are applied as defaults; instance values always take precedence. Instance properties with the same key as a template property correctly free the template allocation before replacing it.
- Property.property_type defaults to null to avoid requiring callers to set it explicitly - Expose standardOptimizeOption in the build so the module respects release modes - Remove empty propertytype strings from test fixture - Bump version to 0.2.4
Test that template field values are applied when absent from the instance (height, rotation), that instance values take precedence (width, name, visible), and that properties from both sources are merged with instance winning on key conflicts. Adds dedicated fixture files to cover the property-override case not exercised by the existing map.tmj.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First pass at adding object template support.
Closes #3