Modified test_randlines.m for better data generation and improved test cases