Ad
  • Custom User Avatar

    i revamped the tests suite.

  • Custom 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).
  • Custom 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?
  • Custom User Avatar

    Added C Translation. Please Approve.

  • Custom User Avatar

    thank you for your help,

  • Custom User Avatar

    Added C Translatation, Please Approve.

  • Custom User Avatar

    where is the function array2StringLongLong defined?

  • Custom User Avatar
  • Custom 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.
    `

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom 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
       ^   ^       ^        ^                  ^     ^        ^      ^            ^ ??
    
  • Custom 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...