mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Update ChangeBatcher tests to reflect encoding behavior for duplicate-named children
- Renamed test case to clarify that children with duplicate names are now encoded rather than skipped. - Adjusted assertions to ensure all children are included in the encoded output, aligning with the updated encoding logic. - Refactored related test cases for improved clarity and maintainability. These changes enhance the accuracy of the ChangeBatcher tests, ensuring they correctly validate the new encoding behavior.
This commit is contained in:
parent
bb9d241253
commit
aabbfb23b2
5 changed files with 75 additions and 32 deletions
|
|
@ -6156,7 +6156,11 @@ fn ref_set_object_value() {
|
|||
let model_path = session
|
||||
.path()
|
||||
.join("src/Workspace/TestObjectValue.model.json5");
|
||||
poll_meta_has_ref_attr(&model_path, "Rojo_Ref_Value", "Workspace/TestModel/Part1.model.json5");
|
||||
poll_meta_has_ref_attr(
|
||||
&model_path,
|
||||
"Rojo_Ref_Value",
|
||||
"Workspace/TestModel/Part1.model.json5",
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -6467,7 +6471,11 @@ fn ref_on_model_json5_instance() {
|
|||
let model_path = session
|
||||
.path()
|
||||
.join("src/Workspace/TestObjectValue.model.json5");
|
||||
poll_meta_has_ref_attr(&model_path, "Rojo_Ref_Value", "Workspace/TestModel/Part1.model.json5");
|
||||
poll_meta_has_ref_attr(
|
||||
&model_path,
|
||||
"Rojo_Ref_Value",
|
||||
"Workspace/TestModel/Part1.model.json5",
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -6829,7 +6837,11 @@ fn ref_ambiguous_path_no_crash() {
|
|||
let meta_path = session
|
||||
.path()
|
||||
.join("src/Workspace/DupParent/init.meta.json5");
|
||||
poll_meta_has_ref_attr(&meta_path, "Rojo_Ref_PrimaryPart", "Workspace/Target.model.json5");
|
||||
poll_meta_has_ref_attr(
|
||||
&meta_path,
|
||||
"Rojo_Ref_PrimaryPart",
|
||||
"Workspace/Target.model.json5",
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -6990,7 +7002,11 @@ fn ref_partial_removal_preserves_remaining_index_entry() {
|
|||
"Workspace/TestModel/Part1.model.json5",
|
||||
);
|
||||
// Verify second ref is there too
|
||||
assert_meta_has_ref_attr(&meta_path, "Rojo_Ref_Adornee", "Workspace/TestModel/Part2.model.json5");
|
||||
assert_meta_has_ref_attr(
|
||||
&meta_path,
|
||||
"Rojo_Ref_Adornee",
|
||||
"Workspace/TestModel/Part2.model.json5",
|
||||
);
|
||||
|
||||
// Step 2: Remove PrimaryPart (set to nil), keep Adornee
|
||||
let mut props2 = UstrMap::default();
|
||||
|
|
@ -7010,7 +7026,11 @@ fn ref_partial_removal_preserves_remaining_index_entry() {
|
|||
thread::sleep(Duration::from_millis(300));
|
||||
assert_meta_no_ref_attr(&meta_path, "Rojo_Ref_PrimaryPart");
|
||||
// Adornee should still be there
|
||||
assert_meta_has_ref_attr(&meta_path, "Rojo_Ref_Adornee", "Workspace/TestModel/Part2.model.json5");
|
||||
assert_meta_has_ref_attr(
|
||||
&meta_path,
|
||||
"Rojo_Ref_Adornee",
|
||||
"Workspace/TestModel/Part2.model.json5",
|
||||
);
|
||||
|
||||
// Step 3: Rename Part2. The RefPathIndex should still have the entry
|
||||
// for Adornee (not overbroad-removed when PrimaryPart was deleted).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue