shorten tests by using panicif()