Add LifetimeSymbolTable::LookupLifetime().
PiperOrigin-RevId: 413108149
diff --git a/lifetime_annotations/lifetime_symbol_table_test.cc b/lifetime_annotations/lifetime_symbol_table_test.cc
index a4d728f..9453778 100644
--- a/lifetime_annotations/lifetime_symbol_table_test.cc
+++ b/lifetime_annotations/lifetime_symbol_table_test.cc
@@ -30,5 +30,15 @@
EXPECT_EQ(table.LookupNameAndMaybeDeclare("b"), b);
}
+TEST(LifetimeSymbolTableTest, LookupLifetime) {
+ LifetimeSymbolTable table;
+
+ Lifetime a = table.LookupNameAndMaybeDeclare("a");
+ Lifetime b = table.LookupNameAndMaybeDeclare("b");
+
+ EXPECT_EQ(table.LookupLifetime(a), "a");
+ EXPECT_EQ(table.LookupLifetime(b), "b");
+}
+
} // namespace
} // namespace devtools_rust