exercism / cpp

Exercism exercises in C++.
https://exercism.org/tracks/cpp
MIT License
251 stars 205 forks source link

Update test cases #775

Open vaeng opened 5 months ago

vaeng commented 5 months ago

Grab what you want, mark it and make a PR. These exercises need updates:

I made a wiki entry on test case updates if you are unsure how to start.

vaeng commented 5 months ago

I will start with: allergies

CadeMichael commented 5 months ago

I'd love to help but am not sure what needs updating?

IsaacG commented 5 months ago

I'd love to help but am not sure what needs updating?

The above exercises need their tests synced from the problem specs.

See docs for

Reading through prior commits on this repo (look for PRs that mention syncing tests) might prove helpful.

vaeng commented 5 months ago

@CadeMichael Give me some time, I'll write a how-to for Test Cases and put it in the tracks wiki.

vaeng commented 5 months ago

Here is a wiki entry on test case updates to explain what I have been doing so far, maybe it is helpful for you @CadeMichael Do you have additions or suggestions @siebenschlaefer ?

CadeMichael commented 5 months ago

Thank You I'll check it out and try to update for anagram!

CadeMichael commented 5 months ago

Sorry for the slow progress long weekend. I got configlet working and found the testcases that need improvement

[warn] anagram: missing 6 test cases
       - detects two anagrams (03eb9bbe-8906-4ea0-84fa-ffe711b52c8b)
       - does not detect an anagram if the original word is repeated (630abb71-a94e-4715-8395-179ec1df9f91)
       - words are not anagrams of themselves (68934ed0-010b-4ef9-857a-20c9012d1ebf)
       - words are not anagrams of themselves even if letter case is partially different (589384f3-4c8a-4e7d-9edc-51c3e5f0c90e)
       - words are not anagrams of themselves even if letter case is completely different (ba53e423-7e02-41ee-9ae2-71f91e6d18e6)
       - words other than themselves can be anagrams (33d3f67e-fbb9-49d3-a90e-0beb00861da7)

will get a pr done tomorrow

IsaacG commented 5 months ago

Make sure you pull the data from the problem specs!

CadeMichael commented 5 months ago

Make sure you pull the data from the problem specs!

I think that configlet does this automatically ? from my understanding but I'm not sure.

CadeMichael commented 5 months ago

I think I got it. I found the missing tests id's correspond to the same named tests (as already implemented) with different inputs so I've added the testcases and updated the test.toml. I'm not sure if I should be manually updating the toml with the id's of the testcases added but I don't see an automated way of doing it.

IsaacG commented 5 months ago

I think the configlet sync command can update that file.

CadeMichael commented 5 months ago

784

submitted a PR, sorry for all the questions, I think I got the hang of it and made the updates.

DebbieSan commented 5 months ago

Hi everyone! I will start working on triangle. First time here so checking out the documentation and will try to update.

DebbieSan commented 5 months ago

I submitted a PR for revision [https://github.com/exercism/cpp/pull/787]

Please advise, thank you!

ahans commented 5 months ago

Here is a PR that updates hamming: #789 I don't think it's worth discussing this on the forum.

ahans commented 4 months ago

Here is an update for armstrong-numbers: #808

ahans commented 4 months ago

And here goes a sync of gigasecond: #809

KevDi commented 4 months ago

i will take the bank-account

KevDi commented 4 months ago

I will also update the complex-numbers

BNAndras commented 4 months ago

I can take care of pangram and isogram.

ahans commented 4 months ago

I'm taking crypto-square.

BNAndras commented 3 months ago

I'll grab protein translation for next week.

tanno1 commented 2 months ago

First time here. I'll take phone-numbers to start.

tanno1 commented 2 months ago

@vaeng hey, it looks like phone-numbers has all the files and is updated as far as configlet goes, except for when i use configlet sync. i am running it from ./meta/config.js so i dont believe its an error with directory location, but i do get this "Error: file does not have an exercises key:" referring to the config.json file, but i have searched through exercism docs and don't believe that there is supposed to be an exercise key in the config.json file? other than this though, it looks like phone-numbers is updated.

new to open source contributions so apologies in advance if these are simple questions.

image

vaeng commented 2 months ago

@tanno1 You are right. I checked the problem spec and there should be 18 cases (4 of the 22 are implementations) and the cpp test file has 18+ tests. One could fix the tests to represent the new layout and sort the test cases to match the requirement, but that is not what configlet complains about.

The "key" sounds like the UUID from the root-folder config.json, but that is set-up correctly as far as I can tell. Maybe @ErikSchierboom knows a bit better what is going on?

BNAndras commented 2 months ago
(base) anagy@framework:~/Documents/GitHub/exercism-lfe/exercises/practice/allergies/.meta$ ../../../../bin/configlet sync
Updating cached 'problem-specifications' data...
Checking exercises...
Error: file does not have an `exercises` key:
/home/anagy/Documents/GitHub/exercism-lfe/exercises/practice/allergies/.meta/config.json

Configlet is checking the exercise config, not the track config. You need to run that command at the root level repo.

tanno1 commented 1 month ago

@vaeng synced toml & updated test file for phone-numbers: #867. lmk if you have q's/suggestions, once finalized, i will start on another.

thanks!

ErikSchierboom commented 1 month ago

Yep, @BNAndras was right, configlet needs to be run from the root directory.

tanno1 commented 1 month ago

@vaeng, see #870 ^, i submitted another pr for phone numbers after reviewing other pr's from this issue. lmk if there is anything i need to change!

BNAndras commented 1 month ago

Whoops, I forgot about protein-translation. I'll take a look at it later this week and tackle high-scores after that.