Skip to content

Reorder custom-set tests to improve flow#257

Merged
IanWhitney merged 1 commit intoexercism:masterfrom
ryanplusplus:ReorderCustomSetTests
May 31, 2016
Merged

Reorder custom-set tests to improve flow#257
IanWhitney merged 1 commit intoexercism:masterfrom
ryanplusplus:ReorderCustomSetTests

Conversation

@ryanplusplus
Copy link
Copy Markdown
Member

@ryanplusplus ryanplusplus commented May 21, 2016

The goal of this change is to ensure that no tests that require set equality in an assertion precede the tests for set equality. This allows each set of tests to introduce as little new functionality as possible (assuming that tests are completed from top to bottom).

For example, the add tests assert set equality to determine whether add is implemented correctly, but these tests precede the equal tests which explicitly test the set equality method. Without this change, set equality and adding new elements to a set are both introduced in the add tests. After this change, the equal tests precede the add tests so that set equality is implemented prior to its use in the add tests.

Note that the equal tests were maintained below the subset tests to gently encourage set equality to be implemented using subsets (see #232).

@kytrinyx
Copy link
Copy Markdown
Member

The allows each set of tests to introduce as little new functionality as possible

I think this is important.

@IanWhitney IanWhitney merged commit 1543b45 into exercism:master May 31, 2016
@IanWhitney
Copy link
Copy Markdown
Contributor

@ryanplusplus, do you want to make a blazon issue that lets tracks know about this change?

@ryanplusplus ryanplusplus deleted the ReorderCustomSetTests branch May 31, 2016 12:39
@ryanplusplus
Copy link
Copy Markdown
Member Author

@IanWhitney: Sure, but you'll have to teach me how :)

@IanWhitney
Copy link
Copy Markdown
Contributor

The main thing to do is write up the issue text. Here's the one I just did for Pangram.

New tests for the Pangram problem

We have found that the Pangram tests miss edge cases allowing students to pass all of the current tests with an incorrect implementation.

To cover these cases we have added new tests to the Pangram test set. Those new tests were added in this commit

Since this track implements Pangram, please take a look at the new pangram.json file and see if your track should update its tests.

If you do need to update your tests, please refer to this issue in your PR. That helps us see which tracks still need to update their tests.

If your track is already up to date, go ahead and close this issue.

More details on this change are available in x-common issue 222.

The blazon tool will publish that issue to all tracks that implement Custom Set. Installing blazon isn't that big a deal if your machine is already set up to run Go programs. Mine was not, so I had to do some extra work.

  • I installed go (using brew, since I'm on OSX)
  • I created a directory to put go stuff in
  • I set my GOPATH variable to be that path
  • I then installed blazon
  • And configured blazon

I think blazon runs best if you have your issue text in a file. So, for pangram, I would run

blazon -file blazon/pangram.txt -exercise 'pangram'

And that would show me the results of a dry-run.

Once I was happy with my file and wanted to create the issue for real, I would pass the --yes flag

blazon -file blazon/pangram.txt -exercise 'pangram' --yes

If you don't want to do any of the Go stuff, that's fine. I can submit the issue once you've written it.

Thanks!

@kytrinyx
Copy link
Copy Markdown
Member

Be sure to read the "tips" section in the blazon readme: https://github.com/exercism/blazon#tips

@ryanplusplus
Copy link
Copy Markdown
Member Author

Thanks @IanWhitney, @kytrinyx. I finally got some time to set up and use blazon and it looks like everything went smoothly. Very neat.

kotp added a commit to exercism/ruby that referenced this pull request Jun 22, 2016
The custom-set exercise is generated using data from x-common
repository.

fixes #365
fixes #348
references exercism/problem-specifications#257
kotp added a commit to exercism/ruby that referenced this pull request Jun 22, 2016
The custom-set exercise is generated using data from x-common
repository.

fixes #365
fixes #348
references exercism/problem-specifications#257
kotp added a commit to exercism/ruby that referenced this pull request Jun 23, 2016
The custom-set exercise is generated using data from x-common
repository.

fixes #365
fixes #348
references exercism/problem-specifications#257
kotp added a commit to exercism/ruby that referenced this pull request Jun 23, 2016
The custom-set exercise is generated using data from x-common
repository.

fixes #365
fixes #348
references exercism/problem-specifications#257
kotp added a commit to exercism/ruby that referenced this pull request Jun 23, 2016
The custom-set exercise is generated using data from x-common
repository.

fixes #365
fixes #348
references exercism/problem-specifications#257
kotp added a commit to exercism/ruby that referenced this pull request Jun 24, 2016
The custom-set exercise is generated using data from x-common
repository.

fixes #365
fixes #348
references exercism/problem-specifications#257
kotp added a commit to exercism/ruby that referenced this pull request Jun 26, 2016
The custom-set exercise is generated using data from x-common
repository.

fixes #365
fixes #348
references exercism/problem-specifications#257
kotp added a commit to exercism/ruby that referenced this pull request Jun 28, 2016
The custom-set exercise is generated using data from x-common
repository.

fixes #365
fixes #348
references exercism/problem-specifications#257
kotp added a commit to exercism/ruby that referenced this pull request Jun 28, 2016
The custom-set exercise is generated using data from x-common
repository.

fixes #365
fixes #348
references exercism/problem-specifications#257
kotp added a commit to exercism/ruby that referenced this pull request Jun 30, 2016
The custom-set exercise is generated using data from x-common
repository.

fixes #365
fixes #348
references exercism/problem-specifications#257
kotp added a commit to exercism/ruby that referenced this pull request Jul 1, 2016
The custom-set exercise is generated using data from x-common
repository.

fixes #365
fixes #348
references exercism/problem-specifications#257
robphoenix pushed a commit to robphoenix/exercism-go that referenced this pull request Jan 17, 2017
updated tests for custom-set exercism#328

In the process of updating the tests I ended up simplifying(hopefully)
the tests cases. I removed all the extra methods and functions including
String which fundamentally changed the tests. I've also added a stub
with only the Set type in it, so that the exercise focuses on the set
operations rather than defining a set type. This also means that the set
type is agreed up front and so there's no need to accomodate all
possible types that people could come up with for a set by defining it
with something like a string method.

Also relevant for reference:
exercism/problem-specifications#232
exercism/problem-specifications#257
robphoenix pushed a commit to robphoenix/exercism-go that referenced this pull request Jan 17, 2017
updated tests for custom-set exercism#328

In the process of updating the tests I ended up simplifying(hopefully)
the tests cases. I removed all the extra methods and functions including
String which fundamentally changed the tests. I've also added a stub
with only the Set type in it, so that the exercise focuses on the set
operations rather than how to define the set type. This also means that
the set type is agreed up front and so there's no need to accomodate all
possible types that people could come up with for a set by defining it
with something like a string method.

Also relevant for reference:
exercism/problem-specifications#232
exercism/problem-specifications#257
robphoenix pushed a commit to robphoenix/exercism-go that referenced this pull request Jan 20, 2017
robphoenix pushed a commit to robphoenix/exercism-go that referenced this pull request Jan 20, 2017
robphoenix pushed a commit to robphoenix/exercism-go that referenced this pull request Jan 20, 2017
robphoenix pushed a commit to robphoenix/exercism-go that referenced this pull request Jan 20, 2017
robphoenix pushed a commit to robphoenix/exercism-go that referenced this pull request Jan 21, 2017
robphoenix pushed a commit to robphoenix/exercism-go that referenced this pull request Jan 21, 2017
emcoding pushed a commit that referenced this pull request Nov 19, 2018
Removes tests for nil as content for the buffer

Fixes #257
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.

3 participants