Skip to content
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

Add shared docs #158

Merged
merged 1 commit into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions config/exercise_readme.go.tmpl

This file was deleted.

8 changes: 8 additions & 0 deletions exercises/shared/.docs/help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Help

To get help if you're having trouble, you can use one of the following resources:

- [DRefLanguage](https://dlang.org/spec/spec.html) contains the D language specification
- [DReference](https://dlang.org/phobos/index.html) contains the D standard library documentation
- [/r/dlang](https://www.reddit.com/r/dlang) is the D subreddit.
- [StackOverflow](http://stackoverflow.com/questions/tagged/d) can be used to search for your problem and see if it has been answered already. You can also ask and answer questions.
29 changes: 29 additions & 0 deletions exercises/shared/.docs/tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Tests

You can run the tests by running the following command in the exercise's directory:

```bash
dub test
```

## Passing the Tests

Get the first test compiling, linking and passing by following the [three
rules of test-driven development](http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd).
Create just enough structure by declaring namespaces, functions, classes,
etc., to satisfy any compiler errors and get the test to fail. Then write
just enough code to get the test to pass. Once you've done that,
uncomment the next test by moving the following line past the next test.

```D
static if (all_tests_enabled)
```

This may result in compile errors as new constructs may be invoked that
you haven't yet declared or defined. Again, fix the compile errors minimally
to get a failing test, then change the code minimally to pass the test,
refactor your implementation for readability and expressiveness and then
go on to the next test.

Try to use standard D facilities in preference to writing your own
low-level algorithms or facilities by hand.