Datumsangaben und Uhrzeiten formatieren

fc69b940

Diego M.

A newer submission is available.
Some tests are incorrect: They fail when run against a reference implementation. The test suite score has been reduced.

Test Suite

50 % complete

Suggestions

  • Revise incorrect test CasualDateTimeFormatTest.formats_out_of_range_years_correctly(int, int, int, java.lang.String, java.lang.String). The test failed on line 67 when run against a reference implementation:
    AssertionFailedError: Case: y0999_Nov ==> expected: <5. November 0999> but was: <5. November 999>
  • Revise incorrect test CasualDateTimeFormatTest.rejects_invalid_month(int, int, int). The test failed on line 104 when run against a reference implementation:
    AssertionFailedError: Unexpected exception type thrown, expected: <java.lang.IllegalArgumentException> but was: <java.lang.ArrayIndexOutOfBoundsException>
  • Revise incorrect test FormalDateTimeFormatTest.formats_time_and_rejects_invalid. The test failed on line 50 when run against a reference implementation:
    AssertionFailedError: Expected java.lang.IllegalArgumentException to be thrown, but nothing was thrown.
  • Revise incorrect test FormalDateTimeFormatTest.rejects_invalid_day(int, int, int). The test failed on line 89 when run against a reference implementation:
    AssertionFailedError: Expected java.lang.IllegalArgumentException to be thrown, but nothing was thrown.
  • Revise incorrect test FormalDateTimeFormatTest.rejects_invalid_day_in_april. The test failed on line 33 when run against a reference implementation:
    AssertionFailedError: Expected java.lang.IllegalArgumentException to be thrown, but nothing was thrown.
  • Revise incorrect test FormalDateTimeFormatTest.rejects_invalid_month. The test failed on line 26 when run against a reference implementation:
    AssertionFailedError: Expected java.lang.IllegalArgumentException to be thrown, but nothing was thrown.
  • Revise incorrect test FormalDateTimeFormatTest.rejects_invalid_month(int, int, int). The test failed on line 77 when run against a reference implementation:
    AssertionFailedError: Expected java.lang.IllegalArgumentException to be thrown, but nothing was thrown.
  • Revise incorrect test FormalDateTimeFormatTest.rejects_invalid_time(int, int). The test failed on line 111 when run against a reference implementation:
    AssertionFailedError: Expected java.lang.IllegalArgumentException to be thrown, but nothing was thrown.
  • Revise incorrect test TextFormatterTest.replaces_with_casual_year_rule. The test failed on line 33 when run against a reference implementation:
    AssertionFailedError: expected: <Abgabe bis 19.02.24 um 09:05.> but was: <Abgabe bis 19. Februar '24 um 9 Uhr 5>
  • Testen, dass FormalDateTimeFormat ein Datum auch dann korrekt formatiert, wenn das Jahr weniger als vier Ziffern hat.
  • Testen, dass CasualDateTimeFormat auch Daten ausserhalb der Jahre 2000 – 2099 korrekt formatiert. The test suite already does this partially, but it only detects 2 out of 5 possible bugs in this regard.
  • Testen, dass man ein TextFormatter-Objekt erstellen kann, die Methode format vorhanden ist und dass beim Formatieren eines leeren Textes wieder ein leerer Text zurückgegeben wird. The test suite already does this partially, but it only detects 1 out of 2 possible bugs in this regard.

Implementation

34 % complete 15 / 22 Tests
  • CasualDateTimeFormatTest.formats_valid_dates(int, int, int, java.lang.String): Passed
  • CasualDateTimeFormatTest.casual_formatDate_contains_correct_month_name: Passed
  • CasualDateTimeFormatTest.casual_has_formatDate_and_formatTime_and_is_instantiable: Passed
  • CasualDateTimeFormatTest.formal_formats_year_with_less_than_four_digits_correctly: Failed
  • CasualDateTimeFormatTest.formats_out_of_range_years_correctly(int, int, int, java.lang.String, java.lang.String): Failed
  • CasualDateTimeFormatTest.formats_valid_time(int, int, java.lang.String): Failed
  • CasualDateTimeFormatTest.month_names_are_correct_in_range_2000_2099(int, int, java.lang.String): Passed
  • CasualDateTimeFormatTest.rejects_invalid_month(int, int, int): Passed
  • FormalDateTimeFormatTest.formats_valid_dates(int, int, int, java.lang.String): Failed
  • FormalDateTimeFormatTest.rejects_invalid_month(int, int, int): Passed
  • FormalDateTimeFormatTest.rejects_invalid_day(int, int, int): Passed
  • FormalDateTimeFormatTest.formats_valid_time(int, int, java.lang.String): Passed
  • FormalDateTimeFormatTest.rejects_invalid_time(int, int): Passed
  • FormalDateTimeFormatTest.formats_simple: Passed
  • FormalDateTimeFormatTest.formats_time_and_rejects_invalid: Passed
  • FormalDateTimeFormatTest.rejects_invalid_day_in_april: Passed
  • FormalDateTimeFormatTest.rejects_invalid_month: Passed
  • FormalDateTimeFormatTest.year_is_padded: Failed
  • TextFormatterTest.keeps_plain_text_unchanged: Passed
  • TextFormatterTest.replaces_date_and_time_formal: Passed
  • TextFormatterTest.replaces_with_casual_year_rule: Failed
  • TextFormatterTest.single_time_with_punctuation: Failed

Other Submissions