lullaby/tests/layout_system_test.cc
// Test that LayoutSystem updates unignored elements.
Test that LayoutSystem updates unignored elements.
Test that LayoutSystem updates unignored elements .
TEST_F(LayoutSystemTest, CreateLayout_SetElementUnignored) {
  const int num_children = 3;
  const Entity parent = CreateParent();
  Entity children[num_children];
  children[0] = CreateIgnoredChild(parent);
  for (int i = 1; i < num_children; ++i) {
    children[i] = CreateChild(parent);
  }
  const mathfu::vec2 ignored_expectations[] = {
      mathfu::vec2(0.f, 0.f), mathfu::vec2(-1.f, 1.f), mathfu::vec2(-1.f, 1.f)
  };
  const mathfu::vec2 expectations[] = {
      mathfu::vec2(-1.f, 1.f), mathfu::vec2(-1.f, 1.f), mathfu::vec2(-1.f, 1.f)
  };
  AssertTranslationsAndSizes(num_children, children, ignored_expectations);
  layout_system_->SetElementIgnored(children[0], false);
  AssertTranslationsAndSizes(num_children, children, expectations);
}
TEST_F ( LayoutSystemTest , CreateLayout_SetElementUnignored ) { const int num_children = 3 ; const Entity parent = CreateParent ( ) ; Entity children [ num_children ] ; children [ 0 ] = CreateIgnoredChild ( parent ) ; for ( int i = 1 ; i < num_children ; ++ i ) { children [ i ] = CreateChild ( parent ) ; } const mathfu :: vec2 ignored_expectations [ ] = { mathfu :: vec2 ( 0.f , 0.f ) , mathfu :: vec2 ( -1.f , 1.f ) , mathfu :: vec2 ( -1.f , 1.f ) } ; const mathfu :: vec2 expectations [ ] = { mathfu :: vec2 ( -1.f , 1.f ) , mathfu :: vec2 ( -1.f , 1.f ) , mathfu :: vec2 ( -1.f , 1.f ) } ; AssertTranslationsAndSizes ( num_children , children , ignored_expectations ) ; layout_system_ -> SetElementIgnored ( children [ 0 ] , false ) ; AssertTranslationsAndSizes ( num_children , children , expectations ) ; }
Test that LayoutSystem updates unignored elements.
Test that LayoutSystem updates unignored elements .