add an assert and moving test file in the good directory

small assert to avoid segmentation fault with empty samples ..