function TestSession.finalize(Z)if#Z.nodeStack~=0 then error("\067\097\110\110\111\116 \102\105\110\097\108\105\122\101 \084\101\115\116\082\101\115\117\108\116\115 \119\105\116\104 \110\111\100\101\115 \115\116\105\108\108 \111\110 \116\104\101 \115\116\097\099\107\033",2)end Z:calculateTotals()Z:gatherErrors()return Z.results end
--[[
	Calculates test totals, verifies the tree is valid, and returns results.
]]
function TestSession:finalize()
	if #self.nodeStack ~= 0 then
		error("Cannot finalize TestResults with nodes still on the stack!", 2)
	end

	self:calculateTotals()
	self:gatherErrors()

	return self.results
end
