lullaby/tests/sort_order_test.cc
// Tests that explicitly set offsets are stored and returned.
Tests that explicitly set offsets are stored and returned.
Tests that explicitly set offsets are stored and returned .
TEST(SortOrderTest, SetOffset) {
  Registry registry;
  SortOrderManager manager(&registry);
  manager.SetOffset(Entity(1), 1);
  manager.SetOffset(Entity(2), 1);
  manager.SetOffset(Entity(3), -1);
  manager.SetOffset(Entity(4), 1);
  manager.SetOffset(Entity(5), 2);
  manager.SetOffset(Entity(6), 3);
  manager.SetOffset(Entity(7), 4);
  manager.SetOffset(Entity(8), -5);
  EXPECT_THAT(manager.GetOffset(Entity(1)), Eq(1));
  EXPECT_THAT(manager.GetOffset(Entity(2)), Eq(1));
  EXPECT_THAT(manager.GetOffset(Entity(3)), Eq(-1));
  EXPECT_THAT(manager.GetOffset(Entity(4)), Eq(1));
  EXPECT_THAT(manager.GetOffset(Entity(5)), Eq(2));
  EXPECT_THAT(manager.GetOffset(Entity(6)), Eq(3));
  EXPECT_THAT(manager.GetOffset(Entity(7)), Eq(4));
  EXPECT_THAT(manager.GetOffset(Entity(8)), Eq(-5));
}
TEST ( SortOrderTest , SetOffset ) { Registry registry ; SortOrderManager manager ( & registry ) ; manager . SetOffset ( Entity ( 1 ) , 1 ) ; manager . SetOffset ( Entity ( 2 ) , 1 ) ; manager . SetOffset ( Entity ( 3 ) , -1 ) ; manager . SetOffset ( Entity ( 4 ) , 1 ) ; manager . SetOffset ( Entity ( 5 ) , 2 ) ; manager . SetOffset ( Entity ( 6 ) , 3 ) ; manager . SetOffset ( Entity ( 7 ) , 4 ) ; manager . SetOffset ( Entity ( 8 ) , -5 ) ; EXPECT_THAT ( manager . GetOffset ( Entity ( 1 ) ) , Eq ( 1 ) ) ; EXPECT_THAT ( manager . GetOffset ( Entity ( 2 ) ) , Eq ( 1 ) ) ; EXPECT_THAT ( manager . GetOffset ( Entity ( 3 ) ) , Eq ( -1 ) ) ; EXPECT_THAT ( manager . GetOffset ( Entity ( 4 ) ) , Eq ( 1 ) ) ; EXPECT_THAT ( manager . GetOffset ( Entity ( 5 ) ) , Eq ( 2 ) ) ; EXPECT_THAT ( manager . GetOffset ( Entity ( 6 ) ) , Eq ( 3 ) ) ; EXPECT_THAT ( manager . GetOffset ( Entity ( 7 ) ) , Eq ( 4 ) ) ; EXPECT_THAT ( manager . GetOffset ( Entity ( 8 ) ) , Eq ( -5 ) ) ; }
Tests that explicitly set offsets are stored and returned.
Tests that explicitly set offsets are stored and returned .