Log inGet started
Package

ownership.module

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

Test.ownership

Which of the things a suite can leave behind are the engine's own. The test framework reads these when it judges what a suite handed back: what the engine keeps for itself is no suite's to answer for.

  • engineOwnedModule(key) answers whether a require-cache key names a module of the built-in library or one of the VM's standard libraries.
  • engineOwnedBuffer(name) answers whether the named GPU buffer was made through the substrate by a module of the engine's.
  • substrateNames() answers the names every named GPU buffer stands under right now, or nil when the substrate cannot be read.
  • engineComputeRow(row, named) answers whether a compute resource row is one of the engine's own: a params ring page, the __params uniform of a program the engine or a .computeShader asset compiled, an arena page, or a buffer a module of the engine's made. named is substrateNames() read with the rows.
local Ownership = require("@builtin::assetTypes.testSuite.shared.ownership")
assert(Ownership.engineOwnedModule("@builtin::modules.json"))
assert(not Ownership.engineOwnedModule("/zero/source/mine.luau"))
print(Ownership.substrateNames())