Datumsangaben und Uhrzeiten formatieren

997ca799

Irina P.

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

11 % complete

Suggestions

  • Revise incorrect test CasualDateTimeFormatTest.testFormatDate. The test failed on line 15 when run against a reference implementation:
    AssertionFailedError: expected: <01.02.2025> but was: <2025. Februar 1>
  • Revise incorrect test FormalDateTimeFormatTest.testFormatDateSingleDigits. The test failed on line 28 when run against a reference implementation:
    AssertionFailedError: expected: <01.02.2025> but was: <2025.02.0001>
  • Revise incorrect test TextFormatterTest.testFormatText_withDate. The test failed on line 17 when run against a reference implementation:
    AssertionFailedError: expected: <Das heutige Datum ist 19.07.2025.> but was: <Das heutige Datum ist {$ 2025 7 19 }.>
  • Revise incorrect test TextFormatterTest.testFormatText_withMixedText. The test failed on line 39 when run against a reference implementation:
    AssertionFailedError: expected: <Treffen am 01.12.2025 um 14:05.> but was: <Treffen am {$ 2025 12 1 } um {$ 14 5 }.>
  • Revise incorrect test TextFormatterTest.testFormatText_withTime. The test failed on line 28 when run against a reference implementation:
    AssertionFailedError: expected: <Die Uhrzeit ist 09:30.> but was: <Die Uhrzeit ist {$ 9 30 }.>
  • Testen, dass man ein FormalDateTimeFormat-Objekt erstellen kann und die Methoden formatDate und formatTime vorhanden sind. The test suite already does this partially, but it only detects 6 out of 8 possible bugs in this regard.
  • Testen, dass FormalDateTimeFormat ein Datum korrekt formatiert, zumindest für den einfachsten Fall. The test suite already does this partially, but it only detects 1 out of 8 possible bugs in this regard.
  • Testen, dass FormalDateTimeFormat ein Datum auch dann korrekt formatiert, wenn das Jahr weniger als vier Ziffern hat.

Implementation

8 % complete 6 / 8 Tests
  • CasualDateTimeFormatTest.testFormatDate: Passed
  • FormalDateTimeFormatTest.create: Passed
  • FormalDateTimeFormatTest.testFormatDateSingleDigits: Passed
  • FormalDateTimeFormatTest.testFormatTime: Passed
  • TextFormatterTest.testFormatText_withDate: Failed
  • TextFormatterTest.testFormatText_withInvalidPlaceholder: Failed
  • TextFormatterTest.testFormatText_withMixedText: Passed
  • TextFormatterTest.testFormatText_withTime: Passed

Other Submissions