Ad
  • Custom User Avatar

    You would put the random tests in the Test Cases panel of the editor. You could use a crate such as rand in order to generate random values for the tests.

  • Custom User Avatar

    hello thanks for your comment, I am new to this, how would I go about creating a random test or to be more specific where do I put a random test, the creation section confused me a bit.

  • Custom User Avatar

    The kata has no random tests.

  • Custom User Avatar

    Hello again, I have updated the kata to take into account the issues you have brought up, the only issue I did not add was the multiple bus stops I decided to make it simpler and just not have multiple bus stops, also I am still pretty new to this creating kata thing, how do I put some things inside a block like I like to keep some infomation in a block to make it easier to read but for now its messy.

  • Custom User Avatar

    I see I have created some issues by not being clear enough, so the answer your questions.
    1 if there is no bus stop lucy should just walk normally.
    2 lucy should go back to school if the bus stop is further out, though I have not coded my solution to take that into account.
    3 I would assume one bus stop or maybe have it so we ignore any future bus stops.
    4 if lucy finds a bike before a bus she would only use the bike and not get on the bus, comepletly ignoring everthing.

    Thanks for your questions I see I have to refactor my solution and update the discription, as I currently have it these issues arent present since I have coded the tests to work with my solution so I will update it to take account these issues, thank you.

  • Custom User Avatar

    Some questions:

    • What happens if there is a bus but no bus stop?
    • What if the next bus stop is after the school? Does Lucy take the bus and then walk back to the school?
    • Could there be multiple bus stops between Lucy and the school?
    • What if Lucy finds a bike before a bus? Will Lucy still have the bike after riding the bus?
  • Custom User Avatar

    I figured it out, so the input is an array [] even though I was expecting an array inside an array and since I was indexing the second array which didnt exist it caused my issue.

  • Custom User Avatar

    I have no clue what I am doing wrong on random_tests it keeps complaining about length being 0 but I dont know why its 0, does that mean its empty so I should return an empty vec but its not working still, Im so confused language RUST.