Skip to content

BorrowedTextureContractSuite

abstract class BorrowedTextureContractSuite
Package: dev.joid.test.contract · Module: tool-testkit · Source: BorrowedTextureContractSuite.java

The contract tests of the textures that a backend borrows from its host.

ReturnsSignatureSummary
BorrowedTextureContractSuite()Creates the suite, for a subclass.

ReturnsSignatureSummary
voidstartBackend()Creates the snapshot backend at the first test of the class.
voidstopBackend() staticDestroys the snapshot backend after the last test of the class.
voiddrawsABorrowedTexture()Checks that a resource made from a borrowed texture draws its pixels at its size.
voidkeepsTheBorrowedTextureOnceTheResourceIsReleased()Checks that releasing the resource leaves the texture of the host alive.
voidrefusesToWriteABorrowedTexture()Checks that allocate and upload throw an UnsupportedOperationException on a borrowed texture.
voidreadsTheMipLevelsOfTheBorrowedTexture()Checks that a borrowed texture reports whether the host gave it mipmaps.
voidrestoresTheTextureParametersAfterTheFrame()Checks that the filter and the wrap of the texture of the host are back after a frame that sampled it.
voidfollowsTheHandleOfItsSupplier()Checks that a borrowed texture follows the handle that its supplier returns, size included.
ReturnsSignatureSummary
IBorrowedTextureBackendcreateBackend() hook abstract protectedJOID calls it once, at the first test of the class.

BorrowedTextureContractSuite()

Creates the suite, for a subclass.

void startBackend()

Creates the snapshot backend at the first test of the class.

void stopBackend() static

Destroys the snapshot backend after the last test of the class.

void drawsABorrowedTexture()

Checks that a resource made from a borrowed texture draws its pixels at its size.

keepsTheBorrowedTextureOnceTheResourceIsReleased

Section titled “keepsTheBorrowedTextureOnceTheResourceIsReleased”

void keepsTheBorrowedTextureOnceTheResourceIsReleased()

Checks that releasing the resource leaves the texture of the host alive.

void refusesToWriteABorrowedTexture()

Checks that allocate and upload throw an UnsupportedOperationException on a borrowed texture.

void readsTheMipLevelsOfTheBorrowedTexture()

Checks that a borrowed texture reports whether the host gave it mipmaps.

void restoresTheTextureParametersAfterTheFrame()

Checks that the filter and the wrap of the texture of the host are back after a frame that sampled it.

void followsTheHandleOfItsSupplier()

Checks that a borrowed texture follows the handle that its supplier returns, size included.

IBorrowedTextureBackend createBackend() hook abstract protected

JOID calls it once, at the first test of the class. Return a new snapshot backend of your backend that implements IBorrowedTextureBackend.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page