Datumsangaben und Uhrzeiten formatieren

1b37f323

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

32 % complete

Suggestions

  • Revise incorrect test CasualDateTimeFormatTest.testDateFormattingAfter2099. The test failed on line 31 when run against a reference implementation:
    ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 12
  • Revise incorrect test FormalDateTimeFormatTest.formalDateFormattingShortYear. The test failed on line 18 when run against a reference implementation:
    AssertionFailedError: expected: <02.02.925> but was: <02.02.0925>
  • Revise incorrect test TextFormatterTest.formatsMultiplePlaceholders. The test failed on line 39 when run against a reference implementation:
    AssertionFailedError: expected: <Start: 04.08.2024, Uhrzeit: 13:45.> but was: <Start: 04.08.2024 Uhrzeit: 13:45>
  • Revise incorrect test TextFormatterTest.formatsSingleDateWithFormalFormatter. The test failed on line 23 when run against a reference implementation:
    AssertionFailedError: expected: <Das Projekt startet am 04.08.2024.> but was: <Das Projekt startet am 04.08.2024>
  • Revise incorrect test TextFormatterTest.formatsTimeWithFormalFormatter. The test failed on line 31 when run against a reference implementation:
    AssertionFailedError: expected: <Die Uhrzeit ist 09:00.> but was: <Die Uhrzeit ist 09:00>
  • Revise incorrect test TextFormatterTest.formatsWithCasualFormatter. The test failed on line 70 when run against a reference implementation:
    AssertionFailedError: expected: <Beginn: 4. August '24, Zeit: 18 Uhr 30.> but was: <Beginn: 4. August '24 Zeit: 18 Uhr 30>
  • Revise incorrect test TextFormatterTest.handlesBrokenClosingBraceGracefully. The test failed on line 78 when run against a reference implementation:
    NoSuchElementException:
  • Revise incorrect test TextFormatterTest.handlesExtraCharactersAfterBrace. The test failed on line 86 when run against a reference implementation:
    AssertionFailedError: expected: <Am 04.08.2024! ist etwas los.> but was: <Am 04.08.2024 ist etwas los.>
  • Revise incorrect test TextFormatterTest.leavesInvalidPlaceholderUnchanged. The test failed on line 47 when run against a reference implementation:
    InputMismatchException:
  • Revise incorrect test TextFormatterTest.trailingCharactersAfterPlaceholderAreKept. The test failed on line 62 when run against a reference implementation:
    AssertionFailedError: expected: <Termin ist am 04.08.2024!> but was: <Termin ist am 04.08.2024>
  • Testen, dass FormalDateTimeFormat ein Datum auch dann korrekt formatiert, wenn das Jahr weniger als vier Ziffern hat.
  • Testen, dass das Resultat von CasualDateTimeFormat.formatDate den korrekten Monatsnamen enthält. The test suite already does this partially, but it only detects 9 out of 13 possible bugs in this regard.
  • 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.

Implementation

32 % complete 20 / 20 Tests
  • CasualDateTimeFormatTest.casualDateFormatting2000s: Passed
  • CasualDateTimeFormatTest.casualDateFormattingBefore2000: Passed
  • 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: Passed
  • TextFormatterTest.formatsSingleDateWithFormalFormatter: Passed
  • TextFormatterTest.formatsTimeWithFormalFormatter: Passed
  • TextFormatterTest.formatsWithCasualFormatter: Passed
  • TextFormatterTest.handlesBrokenClosingBraceGracefully: Passed
  • TextFormatterTest.handlesExtraCharactersAfterBrace: Passed
  • TextFormatterTest.ignoresUnopenedPlaceholders: Passed
  • TextFormatterTest.leavesInvalidPlaceholderUnchanged: Passed
  • TextFormatterTest.returnsTextUnchangedIfNoPlaceholders: Passed
  • TextFormatterTest.trailingCharactersAfterPlaceholderAreKept: Passed

Other Submissions