Some small typos regarding the ledger exercise

I’ve found a typo in the ledger exercise test suit.
Spec

{
      "uuid": "502c4106-0371-4e7c-a7d8-9ce33f16ccb1",
      "description": "multiple entries on same date ordered by description",
      "property": "formatEntries",
      "input": {
        "currency": "USD",
        "locale": "en_US",
        "entries": [
          {
            "date": "2015-01-02",
            "description": "Get present",
            "amountInCents": 1000
          },
          {
            "date": "2015-01-01",
            "description": "Buy present",
            "amountInCents": -1000
          }
        ]
      },

Desc and date info are not matched.

I’ve looked into the python and C# tracks only.

I found this on the python track and trace it back to spec.
This test pass by random chance because of sorting, the “Buy present” entry will always end up above “Get present” (either by date in the mistake case, or by desc in the correct case).

In the C# track, this has been remedied. However i think there is a slight typo at the test
Dutch_negative_number_with_3_digits_before_decimal_point in the C# track
From the spec and other example on python track, whenever the locale is “nl”, there is a space after the currency part.
Currently it is:

"12-03-2015 | Buy present               |     $ -123,45";

instead of

"12-03-2015 | Buy present               |    $ -123,45 ";

C# test
I’m a little bit unsure about this once since the example code pass the test.

(cc @BethanyG)

Looks like this was a mistake in Python data that got copied over to canonical data in problem specifications. So we can either correct the case, or invalidate the case and reimplement it with the correct information (probably the latter, since test cases are immutable in prob specs).

Once the canonical data is correct, we can re-sync the Python test template. :smile:

@glaxxie - would you like to submit a PR for problem specs? If not, I can do it later today or tomorrow my time (I’m in PST).

I made the PR based on the guidelines, please take a look when you can.

1 Like