Datumsangaben und Uhrzeiten formatieren

882b2549

Celine C.

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

87 % complete

Suggestions

  • Revise incorrect test TextFormatterTest.handlesExtraCharactersAfterBrace. The test failed on line 79 when run against a reference implementation:
    AssertionFailedError: expected: <Am 04.08.2024 ist etwas los> but was: <Am 04.08.2024 ist etwas los.>
  • Testen, dass das Resultat von CasualDateTimeFormat.formatDate den korrekten Monatsnamen enthält. The test suite already does this partially, but it only detects 12 out of 13 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.
  • Testen, dass das Ersetzen in TextFormatter.format auch funktioniert, wenn ein Datum oder eine Zeit ganz am Anfang eines Texts steht. The test suite already does this partially, but it only detects 1 out of 3 possible bugs in this regard.

Implementation

53 % complete 11 / 18 Tests
  • CasualDateTimeFormatTest.casualDateFormatting2000s: Passed
  • CasualDateTimeFormatTest.casualDateFormattingBefore2000: Failed
  • CasualDateTimeFormatTest.testDateFormattingAfter2099: Passed
  • CasualDateTimeFormatTest.testTimeFormattingExactHour: Passed
  • CasualDateTimeFormatTest.testTimeFormattingWithMinutes: Passed
  • FormalDateTimeFormatTest.formalDateFormattingShortYear: Passed
  • FormalDateTimeFormatTest.formalDateFormattingSingleDigitDayAndMonth: Passed
  • FormalDateTimeFormatTest.formalDateFormattingStandardYear: Passed
  • FormalDateTimeFormatTest.formalTimeFormattingFullTime: Passed
  • FormalDateTimeFormatTest.formalTimeFormattingZeroMinutes: Passed
  • TextFormatterTest.formatsMultiplePlaceholders: Failed
  • TextFormatterTest.formatsSingleDateWithFormalFormatter: Failed
  • TextFormatterTest.formatsTimeWithFormalFormatter: Failed
  • TextFormatterTest.formatsWithCasualFormatter: Failed
  • TextFormatterTest.handlesExtraCharactersAfterBrace: Failed
  • TextFormatterTest.ignoresUnopenedPlaceholders: Passed
  • TextFormatterTest.returnsTextUnchangedIfNoPlaceholders: Passed
  • TextFormatterTest.trailingCharactersAfterPlaceholderAreKept: Failed

Other Submissions