lullaby/tests/layout_system_test.cc
// Test that LayoutSystem will aggregate events from multiple children and only
// ApplyLayout once in a frame if there isn't any resizing.
Test that LayoutSystem will aggregate events from multiple children and only
ApplyLayout once in a frame if there isn't any resizing.
Test that LayoutSystem will aggregate events from multiple children and only ApplyLayout once in a frame if there isn ' t any resizing .
TEST_F(QueuedLayoutSystemTest, AggregateEvents) {
  const int num_children = 4;
  Entity children[num_children];
  const Entity parent = CreateParent();
  for (int i = 0; i < num_children; ++i) {
    children[i] = CreateChild(parent);
  }
  AssertListenersEmpty();
  dispatcher_->Dispatch();
  AssertListenerMatch({ {parent, 1} }, layouts_changed_);
}
TEST_F ( QueuedLayoutSystemTest , AggregateEvents ) { const int num_children = 4 ; Entity children [ num_children ] ; const Entity parent = CreateParent ( ) ; for ( int i = 0 ; i < num_children ; ++ i ) { children [ i ] = CreateChild ( parent ) ; } AssertListenersEmpty ( ) ; dispatcher_ -> Dispatch ( ) ; AssertListenerMatch ( { { parent , 1 } } , layouts_changed_ ) ; }
Test that LayoutSystem will aggregate events from multiple children and only
ApplyLayout once in a frame if there isn't any resizing.
Test that LayoutSystem will aggregate events from multiple children and only ApplyLayout once in a frame if there isn ' t any resizing .