Skip to content

Commit

Permalink
More fixes for auto test project.
Browse files Browse the repository at this point in the history
  • Loading branch information
vchelaru committed Feb 22, 2024
1 parent f711b5c commit 7b2a241
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,9 @@ public static void GetPostInitializeForNamedObjectList(NamedObjectSave container
ReferencedFileSave rfsReferenced = GetReferencedFileSaveReferencedByNamedObject(nos, element, ref throwAway);


bool wrappInIf = nos.SetByDerived || nos.SetByContainer;
bool wrappInIf = nos.SetByDerived || nos.SetByContainer ||
// This could be not instantiated here, and the order of PostInitialize may make this null
nos.DefinedByBase;
// This may be a SetByDerived NOS, so it could be null
if (wrappInIf)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ private void TestTextWidth()
newTextWidth.ShouldBe(widthFromText + 10, "because the text should be 10 units larger than its children, which is the measured width");

text.Text = "";
(text.RenderableComponent as Text).WrappedText.Count.ShouldBe(1);
(text.RenderableComponent as Text).WrappedText[0].ShouldBe("");
(text.RenderableComponent as Text).WrappedText.Count.ShouldBeLessThan(2, "because an empty text should have 0 or 1 string, it probably doesn't matter which");

text.GetAbsoluteWidth().ShouldBe(10, "because this has 10 + length of text, but there is no text");

Expand Down

0 comments on commit 7b2a241

Please sign in to comment.