src/ui/scenic/lib/flatland/tests/flatland_unittest.cc
// Test that Transforms can be children to multiple different parents.
Test that Transforms can be children to multiple different parents.
Test that Transforms can be children to multiple different parents .
TEST_F(FlatlandTest, MultichildUsecase) {
  Flatland flatland = CreateFlatland();
  const TransformId kIdParent1 = 1;
  const TransformId kIdParent2 = 2;
  const TransformId kIdChild1 = 3;
  const TransformId kIdChild2 = 4;
  const TransformId kIdChild3 = 5;
  flatland.CreateTransform(kIdParent1);
  flatland.CreateTransform(kIdParent2);
  flatland.CreateTransform(kIdChild1);
  flatland.CreateTransform(kIdChild2);
  flatland.CreateTransform(kIdChild3);
  PRESENT(flatland, true);
  flatland.AddChild(kIdParent1, kIdChild1);
  flatland.AddChild(kIdParent1, kIdChild2);
  flatland.AddChild(kIdParent1, kIdChild3);
  PRESENT(flatland, true);
  flatland.AddChild(kIdParent2, kIdChild1);
  flatland.AddChild(kIdParent2, kIdChild2);
  flatland.AddChild(kIdParent2, kIdChild3);
  PRESENT(flatland, true);
}
TEST_F ( FlatlandTest , MultichildUsecase ) { Flatland flatland = CreateFlatland ( ) ; const TransformId kIdParent1 = 1 ; const TransformId kIdParent2 = 2 ; const TransformId kIdChild1 = 3 ; const TransformId kIdChild2 = 4 ; const TransformId kIdChild3 = 5 ; flatland . CreateTransform ( kIdParent1 ) ; flatland . CreateTransform ( kIdParent2 ) ; flatland . CreateTransform ( kIdChild1 ) ; flatland . CreateTransform ( kIdChild2 ) ; flatland . CreateTransform ( kIdChild3 ) ; PRESENT ( flatland , true ) ; flatland . AddChild ( kIdParent1 , kIdChild1 ) ; flatland . AddChild ( kIdParent1 , kIdChild2 ) ; flatland . AddChild ( kIdParent1 , kIdChild3 ) ; PRESENT ( flatland , true ) ; flatland . AddChild ( kIdParent2 , kIdChild1 ) ; flatland . AddChild ( kIdParent2 , kIdChild2 ) ; flatland . AddChild ( kIdParent2 , kIdChild3 ) ; PRESENT ( flatland , true ) ; }
Test that Transforms can be children to multiple different parents.
Test that Transforms can be children to multiple different parents .
// Setup // Add all children to first parent. // Add all children to second parent.