local v=require("multiple_inheritance_overload")

local i = 0
local b1 = v.Derived()
assert(b1:Method(i) == 0, "b1.Method")
assert(b1:MethodForRenaming(i) == 0, "b1.MethodForRenaming")
assert(b1:MethodForRenamingConst(i) == 1, "b1.MethodForRenamingConst")
assert(b1:MethodWarningSuppressed(i) == 0, "b1.MethodWarningSuppressed")
assert(b1:NotVirtualMethod(i) == 0, "b1.NotVirtualMethod")
assert(b1:SimilarOverloadedMethod(i) == 0, "b1.NotVirtualMethod")

local d1 = v.Derived()
assert(d1:Method(i) == 0, "d1.Method")
assert(d1:MethodForRenaming(i) == 0, "d1.MethodForRenaming")
assert(d1:MethodForRenamingConst(i) == 1, "d1.MethodForRenamingConst")
assert(d1:MethodWarningSuppressed(i) == 0, "d1.MethodWarningSuppressed")
assert(d1:NotVirtualMethod(i) == 0, "d1.NotVirtualMethod")
assert(d1:SimilarOverloadedMethod(i) == 0, "d1.NotVirtualMethod")
assert(d1:AnotherMethod(i) == 0, "d1.AnotherMethod")

local db1 = v.Base.in_out(d1)
assert(db1:Method(i) == 0, "db1.Method")
assert(db1:MethodForRenaming(i) == 0, "db1.MethodForRenaming")
assert(db1:MethodForRenamingConst(i) == 1, "db1.MethodForRenamingConst")
assert(db1:MethodWarningSuppressed(i) == 0, "db1.MethodWarningSuppressed")
assert(db1:NotVirtualMethod(i) == 0, "db1.NotVirtualMethod")
assert(db1:SimilarOverloadedMethod(i) == 0, "db1.NotVirtualMethod")

local m1 = v.MoreDerived()
assert(m1:Method(i) == 0, "m1.Method")
assert(m1:MethodForRenaming(i) == 0, "m1.MethodForRenaming")
assert(m1:MethodForRenamingConst(i) == 1, "m1.MethodForRenamingConst")
assert(m1:MethodWarningSuppressed(i) == 0, "m1.MethodWarningSuppressed")
assert(m1:NotVirtualMethod(i) == 0, "m1.NotVirtualMethod")
assert(m1:SimilarOverloadedMethod(i) == 0, "m1.NotVirtualMethod")
assert(m1:AnotherMethod(i) == 0, "m1.AnotherMethod")

local mb2 = v.Base.in_out(m1)
assert(mb2:Method(i) == 0, "mb2.Method")
assert(mb2:MethodForRenaming(i) == 0, "mb2.MethodForRenaming")
assert(mb2:MethodForRenamingConst(i) == 1, "mb2.MethodForRenamingConst")
assert(mb2:MethodWarningSuppressed(i) == 0, "mb2.MethodWarningSuppressed")
assert(mb2:NotVirtualMethod(i) == 0, "mb2.NotVirtualMethod")
assert(mb2:SimilarOverloadedMethod(i) == 0, "mb2.NotVirtualMethod")
