Add additional inspectables

Summary:
This change adds support for more inspectables and also introduces more complex types to be used as a value.

This become specially useful for more complex yet primitive types like coordinate, size, bounds, etc.

Reviewed By: LukeDefeo

Differential Revision: D40307885

fbshipit-source-id: 125e832f06d6b31f56eb5405182d1c0d61388930
This commit is contained in:
Lorenzo Blasa
2022-10-18 04:30:51 -07:00
committed by Facebook GitHub Bot
parent f7a624a143
commit 0572808f1a
27 changed files with 417 additions and 132 deletions

View File

@@ -8,9 +8,9 @@
package com.facebook.flipper.plugins.uidebugger
import android.view.View
import com.facebook.flipper.plugins.uidebugger.common.EnumData
import com.facebook.flipper.plugins.uidebugger.common.EnumMapping
import com.facebook.flipper.plugins.uidebugger.common.InspectableValue
import com.facebook.flipper.plugins.uidebugger.model.Enumeration
import com.facebook.flipper.plugins.uidebugger.model.InspectableValue
import org.hamcrest.CoreMatchers.*
import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test
@@ -42,6 +42,6 @@ class EnumMappingTest {
visibility.toInspectable(View.GONE, true),
equalTo(
InspectableValue.Enum(
EnumData(setOf("VISIBLE", "INVISIBLE", "GONE"), "GONE"), mutable = true)))
Enumeration(setOf("VISIBLE", "INVISIBLE", "GONE"), "GONE"), mutable = true)))
}
}