I am 80% sure this works, but i would like to confirm there are tests that prove it works as expected for the case that there is one parent project (that it returns 2)
it might need to be return getProjectLevel(parentNM+1);?
Just a check, I expect I am wrong as I am just a muggle playing around in a world of wizards.. but I'd hate to pull a Gun Sirir and see a potential bug but not the devs.
function getProjectLevel(PledgeAdmin m) internal returns(uint) {
assert(m.adminType == PledgeAdminType.Project);
if (m.parentProject == 0) return(1);
PledgeAdmin storage parentNM = findAdmin(m.parentProject);
return getProjectLevel(parentNM);
I want to learn how to write tests one day.......... one day.....
I am 80% sure this works, but i would like to confirm there are tests that prove it works as expected for the case that there is one parent project (that it returns 2)
it might need to be
return getProjectLevel(parentNM+1);
?Just a check, I expect I am wrong as I am just a muggle playing around in a world of wizards.. but I'd hate to pull a Gun Sirir and see a potential bug but not the devs.
I want to learn how to write tests one day.......... one day.....