blob: 4bbf1371e184d4acf67453b561b0965f894f8af7 [file] [log] [blame]
package android.dawn
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Assert.assertThrows
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class ErrorTest {
@Test
/**
* Test that an invalid parameter raises an error that is converted to a Kotlin exception by
* the adapter in DawnTestLauncher.
*/
fun errorTest() {
dawnTestLauncher { device ->
assertThrows(UncapturedErrorException::class.java) {
device.createTexture(
TextureDescriptor(
usage = TextureUsage.None,
size = Extent3D(0),
format = TextureFormat.Undefined // Invalid parameter for createTexture().
)
)
}
}
}
}