mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Fix new create syntax test
This commit is contained in:
parent
801e5eb53d
commit
9a5420ec35
1 changed files with 4 additions and 8 deletions
|
|
@ -722,20 +722,16 @@ TEST("create()", wrap_root(function()
|
||||||
local cleanup = vide.cleanup
|
local cleanup = vide.cleanup
|
||||||
|
|
||||||
do CASE "create(\"ClassName\", props) syntax"
|
do CASE "create(\"ClassName\", props) syntax"
|
||||||
local frame = create("Frame", { BackgroundTransparency = 0.5, Size = UDim2.fromScale(1, 1) })
|
local frame = create("Frame", { BackgroundTransparency = 0.5, Name = "Foo" })
|
||||||
CHECK(typeof(frame) == "Instance")
|
|
||||||
CHECK(frame:IsA("Frame"))
|
|
||||||
CHECK(frame.BackgroundTransparency == 0.5)
|
CHECK(frame.BackgroundTransparency == 0.5)
|
||||||
CHECK(frame.Size == UDim2.fromScale(1, 1))
|
CHECK(frame.Name == "Foo")
|
||||||
end
|
end
|
||||||
|
|
||||||
do CASE "create(Instance, props) syntax"
|
do CASE "create(Instance, props) syntax"
|
||||||
local frame0 = create("Frame", { BackgroundTransparency = 0.5, Size = UDim2.fromScale(1, 1) })
|
local frame0 = create("Frame", { BackgroundTransparency = 0.5, Name = "Foo" })
|
||||||
local frame = create(frame0, { BackgroundTransparency = 1 })
|
local frame = create(frame0, { BackgroundTransparency = 1 })
|
||||||
CHECK(typeof(frame) == "Instance")
|
|
||||||
CHECK(frame:IsA("Frame"))
|
|
||||||
CHECK(frame.BackgroundTransparency == 1)
|
CHECK(frame.BackgroundTransparency == 1)
|
||||||
CHECK(frame.Size == UDim2.fromScale(1, 1))
|
CHECK(frame.Name == "Foo")
|
||||||
end
|
end
|
||||||
|
|
||||||
do CASE "apply default properties"
|
do CASE "apply default properties"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue