deterministic system execution, remove BEFORE trait, print cyclic dependency paths

This commit is contained in:
BlackMATov
2025-02-19 23:54:38 +07:00
parent 1d6bd81b74
commit 0ca33d195a
4 changed files with 157 additions and 272 deletions
+3 -9
View File
@@ -6531,24 +6531,18 @@ do
local s1 = evo.system():build()
do
local after = evo.get(s1, evo.AFTER)
local before = evo.get(s1, evo.BEFORE)
assert(after == nil)
assert(before == nil)
end
local s2 = evo.system():after(s1):build()
do
local after = evo.get(s2, evo.AFTER)
local before = evo.get(s2, evo.BEFORE)
assert(#after == 1 and after[1] == s1)
assert(before == nil)
end
local s0 = evo.system():before(s1, s2):build()
local s3 = evo.system():after(s1, s2):build()
do
local after = evo.get(s0, evo.AFTER)
local before = evo.get(s0, evo.BEFORE)
assert(after == nil)
assert(#before == 2 and before[1] == s1 and before[2] == s2)
local after = evo.get(s3, evo.AFTER)
assert(#after == 2 and after[1] == s1 and after[2] == s2)
end
end