Migrate enum possible values to metadata

Summary:
Before this change, possible values for an enumeration were embedded within the attribute value itself.

After this change, possible values are located within the attribute metadata.

Reviewed By: LukeDefeo

Differential Revision: D41337003

fbshipit-source-id: cef5654a679e9b961e82993abb201b518fcbcd00
This commit is contained in:
Lorenzo Blasa
2022-11-17 04:42:22 -08:00
committed by Facebook GitHub Bot
parent 0ebedc9c49
commit 0ac8c2a6b3
10 changed files with 312 additions and 197 deletions

View File

@@ -39,7 +39,6 @@ class EnumMappingTest {
@Test
fun testTurnsIntoEnumInspectable() {
assertThat(
visibility.toInspectable(View.GONE),
equalTo(InspectableValue.Enum(Enumeration(setOf("VISIBLE", "INVISIBLE", "GONE"), "GONE"))))
visibility.toInspectable(View.GONE), equalTo(InspectableValue.Enum(Enumeration("GONE"))))
}
}