feat(camera-test): migrate to test-lib (manifest.lib + run_tests) (Test-Opt Phase 3.3)
Per ADR-0037 Tests-as-Libs Convention. Renamed on Gitea + moved locally. History preserved.
This commit is contained in:
6
init.lua
6
init.lua
@@ -5,7 +5,9 @@
|
|||||||
local camera = require("lib-core.camera")
|
local camera = require("lib-core.camera")
|
||||||
local T = engine.test
|
local T = engine.test
|
||||||
|
|
||||||
function init(ctx)
|
local M = {}
|
||||||
|
|
||||||
|
function M.run_tests(ctx)
|
||||||
-- State setters/getters (3)
|
-- State setters/getters (3)
|
||||||
camera.set_target(100, 200)
|
camera.set_target(100, 200)
|
||||||
local t = camera.target()
|
local t = camera.target()
|
||||||
@@ -62,3 +64,5 @@ function init(ctx)
|
|||||||
-- Hygiene: reset bounds for any subsequent loads (init-only-lifecycle but defensive)
|
-- Hygiene: reset bounds for any subsequent loads (init-only-lifecycle but defensive)
|
||||||
camera.clear_bounds()
|
camera.clear_bounds()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|||||||
10
manifest.lib
Normal file
10
manifest.lib
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"id": "lib-core.camera-test",
|
||||||
|
"role": "test",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"api_min": "0.1",
|
||||||
|
"deps": [
|
||||||
|
{"id": "lib-core.camera", "version": "0.3.0"},
|
||||||
|
{"id": "lib-core.input", "version": "0.4.0"}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "lib-core.camera-test",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"kind": "test-module",
|
|
||||||
"api": "^0.1",
|
|
||||||
"entry_point": "init.lua",
|
|
||||||
"deps": [
|
|
||||||
{ "id": "lib-core.camera", "version": "0.3.0" },
|
|
||||||
{ "id": "lib-core.input", "version": "0.4.0" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user