Skip to content

Refactored grains to use bigint #440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

joshiraez
Copy link
Contributor

Fixes #21

  • Modified sample solution to use bigint
  • Modified tests to expect for big int
  • Added a note on the instructions to use bigint with a link to the docs.

I'm unsure what else would be needed or how to run the tests - the yarn command in README.md I'm not sure what it does, but it fails 😅 . If anyone can tell me if there is something else missing or how to run the test, I can check that out/finish it. Thanks!

@SleeplessByte
Copy link
Member

@joshiraez ah yes. I will fix all of those this weekend and ping you (here and on Slack) and then ALL SHOULD WORK :D :D 🗡️

@SleeplessByte SleeplessByte force-pushed the 21/implement-grains-with-bigint branch from c0ea215 to 60a9182 Compare April 10, 2021 14:44
@SleeplessByte
Copy link
Member

@joshiraez I've rebased the PR, fixed the proof, and added you to the contributors list for this exercise. For future reference:

  1. Go into the root of the repository and yarn install
  2. From the root of the repository, you can now run all the scripts:
# Testing a single exercise
ASSIGNMENT=practice/grains yarn babel-node scripts/test

Running tests for practice/grains...

PASS tmp_exercises/grains.test.ts
  returns the number of grains on the square
    √ 1 (2 ms)
    √ 2
    √ 3
    √ 4
    √ 16
    √ 32 (1 ms)
    √ 64
    √ square 0 raises an exception (3 ms)
    √ negative square raises an exception
    √ square greater than 64 raises an exception (1 ms)
  returns the total number of grains on the board
    √ total
# Testing all exercises
 yarn babel-node scripts/test

If you incorrectly fill in a slug (like in the CI right now), it will guess:

$ ASSIGNMENT=grains yarn babel-node scripts/test

[Failure] that's not a valid assignment reference
Expected {type}\{slug}, actual: grains.
- Use concept\grains if grains is a concept exercise.
- Use practice\grains if grains is a practice exercise.

Did you mean:
- practice\grains

@SleeplessByte SleeplessByte force-pushed the 21/implement-grains-with-bigint branch from a42fb27 to 3fdd84b Compare April 10, 2021 15:10
@SleeplessByte SleeplessByte merged commit 9a0446e into exercism:main Apr 10, 2021
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.

Implement grains after TS gains int Type
2 participants