Skip to content

[compiletime] BlzGroupAddGroupFast must return the number of added units #1010

@GetLocalPlayer

Description

@GetLocalPlayer

In addition, it must check if added unit is already in the group.

@Test
function test()
	let list = new LinkedList<unit>
	for i = 0 to 9
		list.add(createUnit(localPlayer, 'hfoo', ZERO2, angle(0)))
	let g = CreateGroup()
	let a = CreateGroup()
	..add(list.get(0), list.get(1), list.get(2), list.get(3), list.get(4))
	let b = CreateGroup()
	..add(list.get(2), list.get(3), list.get(4), list.get(5))
	print(BlzGroupAddGroupFast(a, g))
	print(BlzGroupAddGroupFast(b, g))
	print("size = " + g.size().toString())

init
	doAfter(1) ->
		test()

Ingame output:
Screenshot_5

Compiletime output:

Running <Hello:7 - test>..
5
9
size = 9
	OK!
Tests succeeded: 1/1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions