blob: 4d2c094a5f78d1990b5170c4d316317f387bf3dc [file] [log] [blame]
package androidx.webgpu
import org.junit.Assert.assertEquals
import org.junit.Test
class StructuresTest {
@Test
fun defaultZeroTest() {
val bindingLayoutEntry = BindGroupLayoutEntry(binding = 0, visibility = ShaderStage.Vertex)
assertEquals("default=zero member structures not initializing enums to their zero value",
SamplerBindingType.BindingNotUsed, bindingLayoutEntry.sampler.type)
}
@Test
fun defaultTest() {
val sampler = SamplerBindingLayout()
assertEquals("Non-defaulted structure not initialized enum to IDL-specified default",
SamplerBindingType.Filtering, sampler.type)
}
}