Skip to content

rational-numbers: additional test for abs value#1938

Merged
jiegillet merged 1 commit intoexercism:mainfrom
mstranger:test-case-abs-rational-numbers
Feb 4, 2022
Merged

rational-numbers: additional test for abs value#1938
jiegillet merged 1 commit intoexercism:mainfrom
mstranger:test-case-abs-rational-numbers

Conversation

@mstranger
Copy link
Copy Markdown
Contributor

@mstranger mstranger commented Feb 1, 2022

According to the issue exercism/elixir#1052

@SaschaMann
Copy link
Copy Markdown
Contributor

This feels redundant and we don't have analogous cases for the other methods either. But I'm not opposed to adding the case.

@mstranger
Copy link
Copy Markdown
Contributor Author

In other cases it happens implicitly, as I understand. For example for add([1, 2], [-1, 2]) is expected [0, 1]. But using the plain formula we get [0, 4].

@SaschaMann
Copy link
Copy Markdown
Contributor

I think an equivalent and explicit case for add would be something like add([1, 4], [0, 1]) where the identity is added. Same for multiplication etc.

@jiegillet jiegillet merged commit 4bcdfc3 into exercism:main Feb 4, 2022
ErikSchierboom added a commit to ErikSchierboom/problem-specifications that referenced this pull request Feb 11, 2022
* Format using prettier (exercism#1917)

Format using prettier

* updated description of anagrams exercise (exercism#1928)

* updated description of anagrams

* changed anagram description to be one-sentence-per-line

* updated description of anagrams to use sets

* Update Licence

Give a look at the discussion in BR exercism#1930

* rational-numbers: test to reduce abs value (exercism#1938)

* Change saddle point references to row, column (exercism#1948)

* word-search: Add test case

* Update exercises/word-search/canonical-data.json

Agreed.

Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>

* meetup: improve descriptions by saying why each case is tested (exercism#1919)

descriptions show whether a date is the first, last, or an arbitrary
middle date of the week. This helps understand why certain cases are
selected.

Closes exercism#974

* word-search: Add cases checking for concatenation and wrapping

The author of this commit thinks that concatenation is highly unlikely,
but the wrapping might be useful to check in languages that allow
negative indices.

* `flatten-array` Add additional test cases (exercism#1953)

* Add additional test cases to flatten-array

* Update exercises/flatten-array/canonical-data.json

Co-authored-by: Peter Tseng <petertseng@users.noreply.github.com>

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: Peter Tseng <petertseng@users.noreply.github.com>

* Fix bowling game copy (exercism#1955)

Fixes exercism#1954

* Add action to format code (exercism#1941)

* build(deps): bump DavidAnson/markdownlint-cli2-action (exercism#1952)

Bumps [DavidAnson/markdownlint-cli2-action](https://github.com/DavidAnson/markdownlint-cli2-action) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/DavidAnson/markdownlint-cli2-action/releases)
- [Commits](DavidAnson/markdownlint-cli2-action@b3c3b40...744f913)

---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Reduced rational nr. should be in standard form. (exercism#1958)

* Reduced rational should be in standard form.

The current instructors fail to mention that a reduced rational number should always be rendered in standard form (without any negative value at the denominator).

* remove superflous blank lines; fix wording

* scale-generator: use flat and sharp symbols (exercism#1942)

* Update configlet part in README (exercism#1949)

Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com>

* phone number: only one problem per test input (exercism#1959)

* [Phone Number] Only one problem per test input

Because the area code is not allowed to start with 0 or 1, inputs designed to elicit other errors should not use area codes that start with either of those digits.

* Respect immutability

* Correct field name: s/comment/comments/

* Comments should contain a list.

* Allow prettier to improve comments

* book-store: reorder keys

* darts: reorder keys

* grade-school: reorder keys

* hamming: reorder keys

* high-scores: reorder keys

* largest-series-product: reorder keys

* list-ops: reorder keys

* luhn: reorder keys

* triangle: reorder keys

* scale-generator: reorder keys

* saddle-points: reorder keys

* diffie-hellman: reorder keys

* collatz-conjecture: reorder keys

* anagram: reorder keys

* accumulate: reorder keys

* Add CI script to check correct order of keys

Co-authored-by: Bart Massey <bart.massey@gmail.com>
Co-authored-by: y8l <72172663+yusufadell@users.noreply.github.com>
Co-authored-by: Ivan Ivanov <mr.mstranger@gmail.com>
Co-authored-by: Damian C. Rossney <dcr8898@users.noreply.github.com>
Co-authored-by: mariohuq <mariohuq@github.com>
Co-authored-by: mariohuq <mario.huq@gmail.com>
Co-authored-by: Peter Tseng <petertseng@users.noreply.github.com>
Co-authored-by: Peter Tseng <pht24@cornell.edu>
Co-authored-by: AH WEI <88667293+kwchang0831@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: Cedd Burge <ceddlyburge@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Davide Alberto Molin <davide@davidemolin.com>
Co-authored-by: wolf99 <281700+wolf99@users.noreply.github.com>
Co-authored-by: June <12543047+junedev@users.noreply.github.com>
Co-authored-by: ee7 <45465154+ee7@users.noreply.github.com>
Co-authored-by: Leah Hanson <astrieanna@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants