lullaby/tests/layout_system_test.cc
TEST_F(LayoutSystemTest, CreateLayout_IgnoreNone) {
  const int num_children = 5;
  const Entity parent = CreateParent();
  Entity children[num_children];
  for (int i = 0; i < num_children; ++i) {
    // Enable all except [2].
    children[i] = CreateChildWithEnabled(parent, i != 2);
  }

  for (int i = 0; i < num_children; ++i) {
    const Sqt* sqt = transform_system_->GetSqt(children[i]);
    // Default ignore_mode is none, so all are still affected.
    EXPECT_NEAR(-1, sqt->translation.x, kEpsilon);
    EXPECT_NEAR(1, sqt->translation.y, kEpsilon);
  }
}
// Test that LayoutSystem handles setting the sqt of multiple child components
// when the entities are created via the entity factory and the layout is linear
// instead of radial, with some that are disabled and not ignored.
Test that LayoutSystem handles setting the sqt of multiple child components
when the entities are created via the entity factory and the layout is linear
instead of radial, with some that are disabled and not ignored.
Test that LayoutSystem handles setting the sqt of multiple child components when the entities are created via the entity factory and the layout is linear instead of radial with some that are disabled and not ignored .
TEST_F(LayoutSystemTest, CreateLayout_IgnoreNone) {
  const int num_children = 5;
  const Entity parent = CreateParent();
  Entity children[num_children];
  for (int i = 0; i < num_children; ++i) {
    children[i] = CreateChildWithEnabled(parent, i != 2);
  }
  for (int i = 0; i < num_children; ++i) {
    const Sqt* sqt = transform_system_->GetSqt(children[i]);
    EXPECT_NEAR(-1, sqt->translation.x, kEpsilon);
    EXPECT_NEAR(1, sqt->translation.y, kEpsilon);
  }
}
TEST_F ( LayoutSystemTest , CreateLayout_IgnoreNone ) { const int num_children = 5 ; const Entity parent = CreateParent ( ) ; Entity children [ num_children ] ; for ( int i = 0 ; i < num_children ; ++ i ) { children [ i ] = CreateChildWithEnabled ( parent , i != 2 ) ; } for ( int i = 0 ; i < num_children ; ++ i ) { const Sqt * sqt = transform_system_ -> GetSqt ( children [ i ] ) ; EXPECT_NEAR ( -1 , sqt -> translation . x , kEpsilon ) ; EXPECT_NEAR ( 1 , sqt -> translation . y , kEpsilon ) ; } }
Test that LayoutSystem handles setting the sqt of multiple child components
when the entities are created via the entity factory and the layout is linear
instead of radial, with some that are disabled and not ignored.
Test that LayoutSystem handles setting the sqt of multiple child components when the entities are created via the entity factory and the layout is linear instead of radial with some that are disabled and not ignored .
// Enable all except [2]. // Default ignore_mode is none, so all are still affected.