Ad
  • Default User Avatar

    Java fork (author inactive)

    • upgrading to JUnit 5
    • displaying the input in assertion messages
    • removal of Integer constructor, which triggers deprecation warnings (fixing this issue)
  • Default User Avatar
    • first part: duplicate of this issue
    • second part is unclear:
      • "Final test is incorrect" -> how so ? can you provide an example ?
      • "Assertions aren't even on for whatever reason" what does that mean ? please be more precise
  • Custom User Avatar

    Many many errors


    Outdated/deprecated usage of new Integer()

    Remove this entirely, simply use ints.

    Final test is incorrect

    Assertions aren't even on for whatever reason

    Note: src/test/java/TipCalculatorTest.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    
  • Custom User Avatar

    The cheater has been handled, RSpec framework has been used to display the assertion messages properly too, closing !

  • Custom User Avatar

    Approved

  • Default User Avatar

    Encountered issue where I had to refresh the page to update and rerun tests.
    Unclear if due to caching or server-side processing delays.
    I encountered an inconsistency in the calculate_tip function where the return varied between 0 and 'Rating not recognised' depending on the rating input. Initially, the code was set to return 0 when the rating was not recognized in the ratings dictionary. However, upon reviewing the specifications or encountering different test scenarios, I realized that the correct return should be the message 'Rating not recognised' instead of 0 when the rating is not found in the dictionary.

    This inconsistency led to divergent results during testing, as the code was adjusted to adhere to specific expectations for recognized and unrecognized ratings.

  • Default User Avatar

    same problem.

  • Custom User Avatar

    i can't solve this one, any idea how is this work ?

  • Default User Avatar

    same. did you find a solution?

  • Custom User Avatar

    In Java, the type Integer is considered as deprecated and for removal :

    src/test/java/TipCalculatorTest.java:8: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
    assertEquals(new Integer(2), TipCalculator.calculateTip(30d, "poor"));

  • Custom User Avatar

    Fixed without invalidating solutions.

  • Default User Avatar

    enjoyed it but should be 7 kyu

  • Default User Avatar

    Normal should be paying staff a wage that doesn't require tips. A tip from a non American. :)

  • Default User Avatar

    C translation (author gone)

  • Custom User Avatar

    Added for Coffeescript

  • Loading more items...