Fixed bob exercise's testForcefulQuestions test

Pull Request: on github at path exercism/objective-c/pull/296

  • Fixed testForcefulQuestions test to expect @"Calm down, I know what I'm doing!" to meet the execise’s requirement “He answers ‘Calm down, I know what I’m doing!’ if you yell a question at him.”
  • Deleted description.md previously “pinned” in 6c96e6ab3ae6d3cb585beab4eb9f2bb8a2f168a, which didn’t seem to work correctly. ‣ The pinned description was neither being used for README.md generation nor for the instructions on the website at Bob in Objective-C on Exercism .
  1. Changed to common exercises should be made to the problem spec then propagated from there to the various tracks. Changes to the track should ideally sync from that location.
  2. This changes the expected behavior and would break all the existing solutions on the track, which is something the track maintainers may not feel is good to do.

@capnslipp Thanks :slightly_smiling_face:

Looking at Problem Specs, it seems to have the change that @capnslipp has implemented. The exercise seems to be out of date there. I’ll reopen the PR and see if Katrina can take a look :slightly_smiling_face:

Sync `bob` tests by BNAndras · Pull Request #346 · exercism/objective-c · GitHub will sync Bob to the current upstream problem specifications test suite including this change as well.

It’s pretty likely there are a lot of unsynced tests so I’ll take a pass through the other exercises time permitting. I already synced Allergies and Triangle.

1 Like

If only there was a test generator… cough :smiley:

1 Like

Maybe something that rhymed with Ninja? That’d be pretty cool if it existed…

I’m tried to nerd snipe you into doing this. Don’t you turn that around on me!

Bah. Fine. I could probably slap together a template or two and reuse the Python Jinja generator sometime over the next few days. Unmaintained repo, though… Should we wait for a maintainer?

1 Like

https://github.com/exercism/objective-c/pull/349

Hopefully this kicks things off. I’m not sure I have the time to actually write all the templates here :slight_smile:

Given the number of tracks reusing this generator, do you suppose it makes sense to push it to the generic-track repo?

» grep -l 'def problem_spec_dir' */bin/* 2>/dev/null
awk/bin/generate_tests
bash/bin/generate_tests
fortran/bin/generate_tests
gdscript/bin/generate_tests
jq/bin/test-generator
objective-c/bin/generate_tests
scala/bin/generate-tests
scheme/bin/generate_tests.py
sqlite/bin/generate_tests

Probably, but this track has been unmaintained for a while so I think setting up these templates would be useful so if a future maintainer comes along, it’ll be a lot easier for them to start maintaining. So I think I’ll sync what tests I can without changing what’s expected of students and then remove the rest from tests.toml files. Then configlet sync will represent what’s present, and a maintainer knows what tests are missing and has a starting template.

Would it make sense as its own repo like configlet? Then you can just update that repo instead of generic-track-repo, which feels more a starting template for WIP tracks than an ongoing thing we should be syncing changes from to other tracks.

We should probably start a separate thread about something like that though so we’re not going off-topic which is fixing Objective-C test suites.

1 Like
A Exercise Claimed
gigasecond
grade-school
robot-name
series
transpose
acronym
all-your-base
allergies
anagram
atbash-cipher
beer-song
binary-search
bob
clock
collatz-conjecture
crypto-square
difference-of-squares
etl
flatten-array
grains
hamming
hello-world
isogram
largest-series-product
leap
luhn
matching-brackets
meetup
nth-prime
nucleotide-count
pangram
pascals-triangle
perfect-numbers
phone-number
prime-factors
raindrops
reverse-string
rna-transcription
roman-numerals
run-length-encoding
say
scrabble-score
secret-handshake
sieve
space-age
strain
sublist
sum-of-multiples
triangle
two-fer
word-count

Does anyone want to jump in and create some templates?

My workflow:

  1. Create a new git branch
  2. Copy an existing .meta/template.j2, preferably from an exercise with similar structure (same number of inputs/outputs and has/does not have error handling).
  3. Open the *Test.m and template file side by side. Compare. Change the template to match the existing structure.
  4. Run bin/generate_tests && g diff to evaluate the effect.
  5. Rinse and repeat until the template generates good looking tests.

Note, bin/generate_tests can be called with --no-pull to skip the git pull step if the problem spec repo is up to date. configlet sync can also be used to update the problem spec clone.

1 Like

I’ll take care of a couple.

1 Like

Thanks. Feel free to ping me here or on Discord if you want any help with anything!

I’ll grab a few more.

1 Like

Alright, I think I’ve petered out. We now only have five left if anyone wants to grab one: gigasecond, grade-school, robot-name, series, and transpose. Robot Name doesn’t have canonical data so I think that can be skipped unless the generator allows us to just hardcode the existing test suite.

I mean … you can. But there’s no point in doing that.