local v=require("template_default_arg_overloaded")

function check(expected, got)
  assert(expected == got, "Expected: " .. expected .. " got: " .. got)
end

local pl = v.PropertyList()
check(1, pl:setInt("int", 10))
check(1, pl:setInt("int", 10, false))
check(2, pl:set("int", pl))
check(2, pl:set("int", pl, false))
check(3, pl:setInt("int", 10, "int"))
check(3, pl:setInt("int", 10, "int", false))

pl = v.PropertyListGlobal()
check(1, pl:setIntGlobal("int", 10))
check(1, pl:setIntGlobal("int", 10, false))
check(2, pl:set("int", pl))
check(2, pl:set("int", pl, false))
check(3, pl:setIntGlobal("int", 10, "int"))
check(3, pl:setIntGlobal("int", 10, "int", false))

check(1, v.GoopIntGlobal(10))
check(1, v.GoopIntGlobal(10, true))
check(2, v.goopGlobal(3))
check(2, v.goopGlobal())
check(3, v.GoopIntGlobal("int", false))
check(3, v.GoopIntGlobal("int"))
check(1, v.GoopInt(10))
check(1, v.GoopInt(10, true))
check(2, v.goop(3))
check(2, v.goop())
check(3, v.GoopInt("int", false))
check(3, v.GoopInt("int"))
