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.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| BorrowedTextureContractSuite() | Creates the suite, for a subclass. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
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. |
For subclasses
Section titled “For subclasses”| Returns | Signature | Summary |
|---|---|---|
IBorrowedTextureBackend | createBackend() hook abstract protected | JOID calls it once, at the first test of the class. |
Creation details
Section titled “Creation details”BorrowedTextureContractSuite
Section titled “BorrowedTextureContractSuite”BorrowedTextureContractSuite()
Creates the suite, for a subclass.
Method details
Section titled “Method details”startBackend
Section titled “startBackend”void startBackend()
Creates the snapshot backend at the first test of the class.
stopBackend
Section titled “stopBackend”void stopBackend() static
Destroys the snapshot backend after the last test of the class.
drawsABorrowedTexture
Section titled “drawsABorrowedTexture”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.
refusesToWriteABorrowedTexture
Section titled “refusesToWriteABorrowedTexture”void refusesToWriteABorrowedTexture()
Checks that allocate and upload throw an UnsupportedOperationException on a borrowed texture.
readsTheMipLevelsOfTheBorrowedTexture
Section titled “readsTheMipLevelsOfTheBorrowedTexture”void readsTheMipLevelsOfTheBorrowedTexture()
Checks that a borrowed texture reports whether the host gave it mipmaps.
restoresTheTextureParametersAfterTheFrame
Section titled “restoresTheTextureParametersAfterTheFrame”void restoresTheTextureParametersAfterTheFrame()
Checks that the filter and the wrap of the texture of the host are back after a frame that sampled it.
followsTheHandleOfItsSupplier
Section titled “followsTheHandleOfItsSupplier”void followsTheHandleOfItsSupplier()
Checks that a borrowed texture follows the handle that its supplier returns, size included.
createBackend
Section titled “createBackend”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
