lullaby/tests/layout_system_test.cc
// Test that the LayoutSystem will SetOriginalBox and no children SetDesiredSize
// in response to a ActualBoxChangedEvent with source == self.
Test that the LayoutSystem will SetOriginalBox and no children SetDesiredSize
in response to a ActualBoxChangedEvent with source == self.
Test that the LayoutSystem will SetOriginalBox and no children SetDesiredSize in response to a ActualBoxChangedEvent with source == self .
TEST_F(QueuedLayoutSystemTest, ActualBoxSameSource) {
  const Entity parent = CreateParent();
  const Entity child = CreateChild(parent, 1.0f);
  dispatcher_->Dispatch();
  ClearListeners();
  layout_box_system_->SetActualBox(child, parent, Aabb({-1.f, -1.f, 0.f},
                                                       {1.f, 1.f, 0.f}));
  AssertListenersEmpty();
  dispatcher_->Dispatch();
  AssertListenerMatch({ {parent, 1} }, original_boxes_);
  AssertListenerEmpty(desired_sizes_);
  AssertListenerMatch({ {child, 1} }, actual_boxes_);
  AssertSourcesMatch({ {child, parent} }, actual_sources_);
}
TEST_F ( QueuedLayoutSystemTest , ActualBoxSameSource ) { const Entity parent = CreateParent ( ) ; const Entity child = CreateChild ( parent , 1.0f ) ; dispatcher_ -> Dispatch ( ) ; ClearListeners ( ) ; layout_box_system_ -> SetActualBox ( child , parent , Aabb ( { -1.f , -1.f , 0.f } , { 1.f , 1.f , 0.f } ) ) ; AssertListenersEmpty ( ) ; dispatcher_ -> Dispatch ( ) ; AssertListenerMatch ( { { parent , 1 } } , original_boxes_ ) ; AssertListenerEmpty ( desired_sizes_ ) ; AssertListenerMatch ( { { child , 1 } } , actual_boxes_ ) ; AssertSourcesMatch ( { { child , parent } } , actual_sources_ ) ; }
Test that the LayoutSystem will SetOriginalBox and no children SetDesiredSize
in response to a ActualBoxChangedEvent with source == self.
Test that the LayoutSystem will SetOriginalBox and no children SetDesiredSize in response to a ActualBoxChangedEvent with source == self .