unit test for kstest
correcting unit test for complex posmin/max