-
-
Notifications
You must be signed in to change notification settings - Fork 544
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'exercism:main' into queen-attack
- Loading branch information
Showing
8 changed files
with
267 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
collinsdictionary\.com | ||
papyr\.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,240 @@ | ||
{ | ||
"exercise": "ledger", | ||
"cases": [ | ||
{ | ||
"uuid": "d131ecae-a30e-436c-b8f3-858039a27234", | ||
"description": "empty ledger", | ||
"property": "formatEntries", | ||
"input": { | ||
"currency": "USD", | ||
"locale": "en_US", | ||
"entries": [] | ||
}, | ||
"expected": ["Date | Description | Change "] | ||
}, | ||
{ | ||
"uuid": "ce4618d2-9379-4eca-b207-9df1c4ec8aaa", | ||
"description": "one entry", | ||
"property": "formatEntries", | ||
"input": { | ||
"currency": "USD", | ||
"locale": "en_US", | ||
"entries": [ | ||
{ | ||
"date": "2015-01-01", | ||
"description": "Buy present", | ||
"amountInCents": -1000 | ||
} | ||
] | ||
}, | ||
"expected": [ | ||
"Date | Description | Change ", | ||
"01/01/2015 | Buy present | ($10.00)" | ||
] | ||
}, | ||
{ | ||
"uuid": "8d02e9cb-e6ee-4b77-9ce4-e5aec8eb5ccb", | ||
"description": "credit and debit", | ||
"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 | ||
} | ||
] | ||
}, | ||
"expected": [ | ||
"Date | Description | Change ", | ||
"01/01/2015 | Buy present | ($10.00)", | ||
"01/02/2015 | Get present | $10.00 " | ||
] | ||
}, | ||
{ | ||
"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 | ||
} | ||
] | ||
}, | ||
"expected": [ | ||
"Date | Description | Change ", | ||
"01/01/2015 | Buy present | ($10.00)", | ||
"01/02/2015 | Get present | $10.00 " | ||
] | ||
}, | ||
{ | ||
"uuid": "29dd3659-6c2d-4380-94a8-6d96086e28e1", | ||
"description": "final order tie breaker is change", | ||
"property": "formatEntries", | ||
"input": { | ||
"currency": "USD", | ||
"locale": "en_US", | ||
"entries": [ | ||
{ | ||
"date": "2015-01-01", | ||
"description": "Something", | ||
"amountInCents": 0 | ||
}, | ||
{ | ||
"date": "2015-01-01", | ||
"description": "Something", | ||
"amountInCents": -1 | ||
}, | ||
{ | ||
"date": "2015-01-01", | ||
"description": "Something", | ||
"amountInCents": 1 | ||
} | ||
] | ||
}, | ||
"expected": [ | ||
"Date | Description | Change ", | ||
"01/01/2015 | Something | ($0.01)", | ||
"01/01/2015 | Something | $0.00 ", | ||
"01/01/2015 | Something | $0.01 " | ||
] | ||
}, | ||
{ | ||
"uuid": "9b9712a6-f779-4f5c-a759-af65615fcbb9", | ||
"description": "overlong description is truncated", | ||
"property": "formatEntries", | ||
"input": { | ||
"currency": "USD", | ||
"locale": "en_US", | ||
"entries": [ | ||
{ | ||
"date": "2015-01-01", | ||
"description": "Freude schoner Gotterfunken", | ||
"amountInCents": -123456 | ||
} | ||
] | ||
}, | ||
"expected": [ | ||
"Date | Description | Change ", | ||
"01/01/2015 | Freude schoner Gotterf... | ($1,234.56)" | ||
] | ||
}, | ||
{ | ||
"uuid": "67318aad-af53-4f3d-aa19-1293b4d4c924", | ||
"description": "euros", | ||
"property": "formatEntries", | ||
"input": { | ||
"currency": "EUR", | ||
"locale": "en_US", | ||
"entries": [ | ||
{ | ||
"date": "2015-01-01", | ||
"description": "Buy present", | ||
"amountInCents": -1000 | ||
} | ||
] | ||
}, | ||
"expected": [ | ||
"Date | Description | Change ", | ||
"01/01/2015 | Buy present | (€10.00)" | ||
] | ||
}, | ||
{ | ||
"uuid": "bdc499b6-51f5-4117-95f2-43cb6737208e", | ||
"description": "Dutch locale", | ||
"property": "formatEntries", | ||
"input": { | ||
"currency": "USD", | ||
"locale": "nl_NL", | ||
"entries": [ | ||
{ | ||
"date": "2015-03-12", | ||
"description": "Buy present", | ||
"amountInCents": 123456 | ||
} | ||
] | ||
}, | ||
"expected": [ | ||
"Datum | Omschrijving | Verandering ", | ||
"12-03-2015 | Buy present | $ 1.234,56 " | ||
] | ||
}, | ||
{ | ||
"uuid": "86591cd4-1379-4208-ae54-0ee2652b4670", | ||
"description": "Dutch locale and euros", | ||
"property": "formatEntries", | ||
"input": { | ||
"currency": "EUR", | ||
"locale": "nl_NL", | ||
"entries": [ | ||
{ | ||
"date": "2015-03-12", | ||
"description": "Buy present", | ||
"amountInCents": 123456 | ||
} | ||
] | ||
}, | ||
"expected": [ | ||
"Datum | Omschrijving | Verandering ", | ||
"12-03-2015 | Buy present | € 1.234,56 " | ||
] | ||
}, | ||
{ | ||
"uuid": "876bcec8-d7d7-4ba4-82bd-b836ac87c5d2", | ||
"description": "Dutch negative number with 3 digits before decimal point", | ||
"property": "formatEntries", | ||
"input": { | ||
"currency": "USD", | ||
"locale": "nl_NL", | ||
"entries": [ | ||
{ | ||
"date": "2015-03-12", | ||
"description": "Buy present", | ||
"amountInCents": -12345 | ||
} | ||
] | ||
}, | ||
"expected": [ | ||
"Datum | Omschrijving | Verandering ", | ||
"12-03-2015 | Buy present | $ -123,45 " | ||
] | ||
}, | ||
{ | ||
"uuid": "29670d1c-56be-492a-9c5e-427e4b766309", | ||
"description": "American negative number with 3 digits before decimal point", | ||
"property": "formatEntries", | ||
"input": { | ||
"currency": "USD", | ||
"locale": "en_US", | ||
"entries": [ | ||
{ | ||
"date": "2015-03-12", | ||
"description": "Buy present", | ||
"amountInCents": -12345 | ||
} | ||
] | ||
}, | ||
"expected": [ | ||
"Date | Description | Change ", | ||
"03/12/2015 | Buy present | ($123.45)" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
title = "Secret Handshake" | ||
blurb = "Given a decimal number, convert it to the appropriate sequence of events for a secret handshake." | ||
source = "Bert, in Mary Poppins" | ||
source_url = "https://www.imdb.com/title/tt0058331/quotes/qt0437047" | ||
source_url = "https://www.imdb.com/title/tt0058331/quotes/?item=qt0437047" |