lullaby/tests/layout_box_system_test.cc
// Even if OriginalBox or ActualBox is set, desired_size will be null until it
// is manually set.
Even if OriginalBox or ActualBox is set, desired_size will be null until it
is manually set.
Even if OriginalBox or ActualBox is set desired_size will be null until it is manually set .
TEST_F(LayoutBoxSystemTest, GetDesiredSize) {
  Entity e = CreateEntity();
  layout_box_system_->SetOriginalBox(e,
      Aabb({-1.f, -1.f, 0.f}, {1.f, 1.f, 0.f}));
  layout_box_system_->SetActualBox(e, 123,
      Aabb({-1.f, -1.f, 0.f}, {1.f, 1.f, 0.f}));
  dispatcher_->Dispatch();
  const Optional<float> unset;
  const Optional<float> get_x = layout_box_system_->GetDesiredSizeX(e);
  const Optional<float> get_y = layout_box_system_->GetDesiredSizeY(e);
  const Optional<float> get_z = layout_box_system_->GetDesiredSizeZ(e);
  EXPECT_EQ(get_x, unset);
  EXPECT_EQ(get_y, unset);
  EXPECT_EQ(get_z, unset);
}
TEST_F ( LayoutBoxSystemTest , GetDesiredSize ) { Entity e = CreateEntity ( ) ; layout_box_system_ -> SetOriginalBox ( e , Aabb ( { -1.f , -1.f , 0.f } , { 1.f , 1.f , 0.f } ) ) ; layout_box_system_ -> SetActualBox ( e , 123 , Aabb ( { -1.f , -1.f , 0.f } , { 1.f , 1.f , 0.f } ) ) ; dispatcher_ -> Dispatch ( ) ; const Optional < float > unset ; const Optional < float > get_x = layout_box_system_ -> GetDesiredSizeX ( e ) ; const Optional < float > get_y = layout_box_system_ -> GetDesiredSizeY ( e ) ; const Optional < float > get_z = layout_box_system_ -> GetDesiredSizeZ ( e ) ; EXPECT_EQ ( get_x , unset ) ; EXPECT_EQ ( get_y , unset ) ; EXPECT_EQ ( get_z , unset ) ; }
Even if OriginalBox or ActualBox is set, desired_size will be null until it
is manually set.
Even if OriginalBox or ActualBox is set desired_size will be null until it is manually set .