wurstscript / WurstScript

Programming language and toolkit to create Warcraft III Maps
https://wurstlang.org
Apache License 2.0
226 stars 28 forks source link

[compiletime] GroupAddUnit must return `false` if the passed unit is already in the group #1009

Closed GetLocalPlayer closed 3 years ago

GetLocalPlayer commented 3 years ago
let g = CreateGroup()
let u = createUnit(Player(0), 'hfoo', vec2(0, 0), 0 .fromDeg())
GroupAddUnit(g, u).assertTrue()
GroupAddUnit(g, u).assertFalse() // <-- line 101
    FAILED assertion:
    Test failed: Expected <false>, Actual <true>
... when calling boolean_assertFalse(true) in GroupTests.wurst:101
... when calling testVararg() in GroupTests.wurst:86
Frotty commented 3 years ago

Thanks, could you make a PR for the stdlib to add the unit test?

GetLocalPlayer commented 3 years ago

Cannot due another issue.