// With Package
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("Lcom/foo/MyClass$$ExternalSyntheticLambda0;"), "Lcom/foo/MyClass$$0;");
// As an array (not expected, but we should handle it gracefully)
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("[[LMyClass$$ExternalSyntheticLambda0;"), "[[LMyClass$$0;");
}
// With Package
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("Lcom/foo/MyClass$$737;"), "Lcom/foo/MyClass$$ExternalSyntheticLambda737;");
// As an array (not expected, but we should handle it gracefully)
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("[[Lcom/foo/MyClass$$737;"), "[[Lcom/foo/MyClass$$ExternalSyntheticLambda737;");
}
TEST(SyntheticClassFormatUtil, RewriteSyntheticProfileClassIfNeeded_Noop) { // No change (synthetic not at the end)
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("LMyClass$$ExternalSyntheticLambda0$Extra;"),
std::nullopt);
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("LMyClass$$ExternalSyntheticLambda77Extra;"),
std::nullopt);
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("LMyClass$$77$Extra;"), std::nullopt);
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("LMyClass$$Extra77;"), std::nullopt);
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("LMyClass$$77Extra;"), std::nullopt);
// No change (not an R8 synthetic)
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("LMyClass$1;"), std::nullopt);
// No change (standard inner class)
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("LMyClass$$Inner;"), std::nullopt);
// No change (regular class)
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("LMyClass;"), std::nullopt);
// No change (primitive type or primitive array)
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("[[B"), std::nullopt);
EXPECT_EQ(RewriteSyntheticProfileClassIfNeeded("J"), std::nullopt);
}
} // namespace art
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.