lullaby/tests/layout_system_test.cc
// Same as above, but closer source is second.
Same as above, but closer source is second.
Same as above but closer source is second .
TEST_F(QueuedLayoutSystemTest, ActualBoxClosestSource_Second) {
  const Entity grandgrandparent = CreateParent();
  const Entity grandparent = CreateChild(grandgrandparent, 1.0f);
  const Entity parent = CreateChild(grandparent, 1.0f, true);
  const Entity child = CreateChild(parent, 1.0f);
  dispatcher_->Dispatch();
  ClearListeners();
  layout_box_system_->SetActualBox(child, grandgrandparent,
                                   Aabb({-1.f, -1.f, 0.f}, {1.f, 1.f, 0.f}));
  layout_box_system_->SetActualBox(child, grandparent,
                                   Aabb({-1.f, -1.f, 0.f}, {1.f, 1.f, 0.f}));
  AssertListenersEmpty();
  dispatcher_->Dispatch();
  AssertListenerEmpty(original_boxes_);
  AssertListenerEmpty(desired_sizes_);
  AssertListenerMatch({ {parent, 1}, {child, 2} }, actual_boxes_);
  AssertSourcesMatch({ {parent, grandparent}, {child, grandparent} },
                     actual_sources_);
}
TEST_F ( QueuedLayoutSystemTest , ActualBoxClosestSource_Second ) { const Entity grandgrandparent = CreateParent ( ) ; const Entity grandparent = CreateChild ( grandgrandparent , 1.0f ) ; const Entity parent = CreateChild ( grandparent , 1.0f , true ) ; const Entity child = CreateChild ( parent , 1.0f ) ; dispatcher_ -> Dispatch ( ) ; ClearListeners ( ) ; layout_box_system_ -> SetActualBox ( child , grandgrandparent , Aabb ( { -1.f , -1.f , 0.f } , { 1.f , 1.f , 0.f } ) ) ; layout_box_system_ -> SetActualBox ( child , grandparent , Aabb ( { -1.f , -1.f , 0.f } , { 1.f , 1.f , 0.f } ) ) ; AssertListenersEmpty ( ) ; dispatcher_ -> Dispatch ( ) ; AssertListenerEmpty ( original_boxes_ ) ; AssertListenerEmpty ( desired_sizes_ ) ; AssertListenerMatch ( { { parent , 1 } , { child , 2 } } , actual_boxes_ ) ; AssertSourcesMatch ( { { parent , grandparent } , { child , grandparent } } , actual_sources_ ) ; }
Same as above, but closer source is second.
Same as above but closer source is second .