function TestPlan.addRoot(x,Y,s,Z)local b=x for s=#Y,1,-1 do local x=nil for Z,b in ipairs(b.children)do if b.phrase==Y[s]then x=b break end end if x==nil then local J=getFilePathFromInstance(Z)x=b:addChild(Y[s],TestEnum.NodeType.Describe,nil,J)end b=x end b.isRoot=true b.instance=Z b.callback=s b:expand()end

function TestPlan:addRoot(path, method, instance)
	local curNode = self
	for i = #path, 1, -1 do
		local nextNode = nil

		for _, child in ipairs(curNode.children) do
			if child.phrase == path[i] then
				nextNode = child
				break
			end
		end

		if nextNode == nil then
			local filePath = getFilePathFromInstance(instance)
			nextNode = curNode:addChild(path[i], TestEnum.NodeType.Describe, nil, filePath)
		end

		curNode = nextNode
	end

	curNode.isRoot = true
	curNode.instance = instance
	curNode.callback = method
	curNode:expand()
end
