mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Use GetDebugId in custom instance properties test
This commit is contained in:
parent
e3981c8db2
commit
f860821498
1 changed files with 3 additions and 4 deletions
|
@ -36,13 +36,12 @@ local _ = part.PassingPartTest
|
||||||
|
|
||||||
local counters = {}
|
local counters = {}
|
||||||
roblox.implementProperty("Instance", "Counter", function(instance)
|
roblox.implementProperty("Instance", "Counter", function(instance)
|
||||||
-- FIXME: Instances do not make for unique table keys for some reason ...
|
local value = counters[instance:GetDebugId()] or 0
|
||||||
local value = counters[tostring(instance)] or 0
|
|
||||||
value += 1
|
value += 1
|
||||||
counters[tostring(instance)] = value
|
counters[instance:GetDebugId()] = value
|
||||||
return value
|
return value
|
||||||
end, function(instance, value)
|
end, function(instance, value)
|
||||||
counters[tostring(instance)] = value
|
counters[instance:GetDebugId()] = value
|
||||||
end)
|
end)
|
||||||
|
|
||||||
assert(inst.Counter == 1, "implementProperty callback should return proper values")
|
assert(inst.Counter == 1, "implementProperty callback should return proper values")
|
||||||
|
|
Loading…
Reference in a new issue