lullaby/tests/sort_order_test.cc
// Tests that the default offsets are not visible via GetOffset.
Tests that the default offsets are not visible via GetOffset.
Tests that the default offsets are not visible via GetOffset .
TEST(SortOrderTest, DefaultOffsetsNotVisible) {
  Registry registry;
  SortOrderManager manager(&registry);
  const int kNumEntities = 4;
  auto* transform_system =
      CreateTransformSystemWithEntities(&registry, kNumEntities);
  transform_system->AddChild(1, 2);
  transform_system->AddChild(1, 3);
  for (int i = 1; i <= kNumEntities; ++i) {
    EXPECT_THAT(manager.GetOffset(Entity(i)), Eq(kUseDefaultOffset));
  }
}
TEST ( SortOrderTest , DefaultOffsetsNotVisible ) { Registry registry ; SortOrderManager manager ( & registry ) ; const int kNumEntities = 4 ; auto * transform_system = CreateTransformSystemWithEntities ( & registry , kNumEntities ) ; transform_system -> AddChild ( 1 , 2 ) ; transform_system -> AddChild ( 1 , 3 ) ; for ( int i = 1 ; i <= kNumEntities ; ++ i ) { EXPECT_THAT ( manager . GetOffset ( Entity ( i ) ) , Eq ( kUseDefaultOffset ) ) ; } }
Tests that the default offsets are not visible via GetOffset.
Tests that the default offsets are not visible via GetOffset .
// Create a simple hierarchy so we're testing both root level and sibling // offsets.