mirror of
https://github.com/lune-org/lune.git
synced 2025-04-18 10:53:46 +01:00
Move assertion message outside of pcall in some Content tests
This commit is contained in:
parent
dfef0c15fa
commit
57e30a2071
1 changed files with 4 additions and 6 deletions
|
@ -20,7 +20,8 @@ assert(not pcall(Content.fromUri), "Content.fromUri accepted no argument")
|
||||||
assert(not pcall(Content.fromUri, false), "Content.fromUri accepted a boolean argument")
|
assert(not pcall(Content.fromUri, false), "Content.fromUri accepted a boolean argument")
|
||||||
assert(not pcall(Content.fromUri, Enum), "Content.fromUri accepted a UserData as an argument")
|
assert(not pcall(Content.fromUri, Enum), "Content.fromUri accepted a UserData as an argument")
|
||||||
assert(
|
assert(
|
||||||
not pcall(Content.fromUri, buffer.create(0), "Content.fromUri accepted a buffer as an argument")
|
not pcall(Content.fromUri, buffer.create(0)),
|
||||||
|
"Content.fromUri accepted a buffer as an argument"
|
||||||
)
|
)
|
||||||
|
|
||||||
-- It feels weird that this is allowed because `EditableImage` is very much
|
-- It feels weird that this is allowed because `EditableImage` is very much
|
||||||
|
@ -38,11 +39,8 @@ assert(
|
||||||
"Content.fromObject accepted a non-Instance/Object UserData as an argument"
|
"Content.fromObject accepted a non-Instance/Object UserData as an argument"
|
||||||
)
|
)
|
||||||
assert(
|
assert(
|
||||||
not pcall(
|
not pcall(Content.fromObject, buffer.create(0)),
|
||||||
Content.fromObject,
|
"Content.fromObject accepted a buffer as an argument"
|
||||||
buffer.create(0),
|
|
||||||
"Content.fromObject accepted a buffer as an argument"
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
|
|
Loading…
Add table
Reference in a new issue