Ad
  • Default User Avatar

    i revamped the tests suite.

  • Default User Avatar

    Thanks for working with me through this process. I updated the Solution Setup to remove incorrect prototypes and documentation, changed the test assertions to provide input,output, and expected output upon failure, and removed asprintf prototypes.

  • Custom User Avatar
    • Sample tests and solution setup are not updated. They still use old prototype of chmod_calculator, cr_assert_eq, etc.
    • All references to asprintf are unnecessary now.
    • Assertion messages are much better, but they could also display input (to make debugging easier).
  • Default User Avatar

    Thank you for your code review. I have corrected the referenced deficiencies. Would you mind reviewing again?

  • Custom User Avatar
    • Why does even the return string have to be dynamically allocated by solution? Passing in a buffer to be filled in would be much better. Allocating dynamically all of input, expected, and the solution answer every time is a poor choice for small strings of fixed size.
    • Why is chmod_inverse defined in the solution? Does user have to write this function?
    • Assertion messages are not helpful at all, tests could use something better than The expression (strcmp(result,expected)) == (0) is false.
    • Helper functions should be marked static.
    • Random generator is not seeded.
    • Various declarations of perms[ ] differ, some are declared with size of 9, and some of 10.
    • Any special reason why tests use cr_assert_eq instead of string assertions?
  • Default User Avatar

    Added C Translation. Please Approve.

  • Default User Avatar

    thank you for your help,

  • Default User Avatar

    Added C Translatation, Please Approve.

  • Default User Avatar

    where is the function array2StringLongLong defined?

  • Default User Avatar
  • Default User Avatar

    I think the test case for "should_work_for_a_single_glider_over_all_4_repeating_generations" is broken in C.
    I can alter the test provided case changing int **actual = get_generation(cells, 1, &rows, &columns); to int **actual = get_generation(cells, 801, &rows, &columns); or any multiple of 4 + 1, and pass the test. Valgrind says my code has no memory issues. Yet, the test case "should_work_for_a_single_glider_over_all_4_repeating_generations" segfaults. I see this exercise has a low number of completions in C. Perhaps this test case is new, and untested.
    `

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Thank You, I understood 'formed by deleting some characters' to be too broad, including reordering characters.

  • Default User Avatar

    being longest isn't the only requirement, it also needs to be in the dictionary and be a subsequence of the string. you're only considering two of those three requirements

    cvpdavvnhlwndlwrbucdkzacnnzhcouwliceshgdshujxujahowjxydrudfepfbkvcticpyyedkpj
       ^   ^       ^        ^                  ^     ^        ^      ^            ^ ??
    
  • Default User Avatar

    I am currently experiencing incorrect results on random tests
    For instance with the provided word : "cvpdavvnhlwndlwrbucdkzacnnzhcouwliceshgdshujxujahowjxydrudfepfbkvcticpyyedkpj" , I received expected 'acoukv' but got 'dnrnjofcsbadforvab'. This isn't correct because the latter is obviously much longer than the former, and lexical order doesn't matter here.

  • Loading more items...