add test for diagonal function

* this was ported from flycircuit (and has now been removed)