cpp icon indicating copy to clipboard operation
cpp copied to clipboard

Update test cases

Open vaeng opened this issue 1 year ago • 47 comments

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

  • [ ] grade school (@Elahi-cs )
  • [ ] matching-brackets (@sz245 )
  • [ ] protein-translation (@vaeng) #912
  • [ ] high-scores (@vaeng) #911
  • [x] pangram (@BNAndras) #848
  • [x] isogram (@BNAndras) #849
  • [x] allergies (@vaeng) #817
  • [x] anagram (@CadeMichael) #784
  • [x] armstrong-numbers (@ahans) #808
  • [x] bank-account (@KevDi) #826
  • [x] complex-numbers (@KevDi) #829
  • [x] crypto-square (@ahans) #827
  • [x] gigasecond (@ahans) #810
  • [x] hamming (@ahans) #775 #789
  • [x] luhn (@vaeng) #818
  • [x] perfect-numbers (@vaeng) #819
  • [x] phone-number (@tanno1 ) #870
  • [x] prime-factors (@JagritGumber ) #895
  • [x] say (@Elahi-cs ) #903
  • [x] triangle (@DebbieSan) #787
  • [x] word-count (@vaeng) #820

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

vaeng avatar Jan 14 '24 16:01 vaeng

I will start with: allergies

vaeng avatar Jan 14 '24 16:01 vaeng

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

CadeMichael avatar Jan 16 '24 23:01 CadeMichael

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.

IsaacG avatar Jan 17 '24 02:01 IsaacG

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

vaeng avatar Jan 17 '24 08:01 vaeng

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 ?

vaeng avatar Jan 17 '24 09:01 vaeng

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

CadeMichael avatar Jan 17 '24 15:01 CadeMichael

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

CadeMichael avatar Jan 23 '24 08:01 CadeMichael

Make sure you pull the data from the problem specs!

IsaacG avatar Jan 23 '24 11:01 IsaacG

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 avatar Jan 23 '24 21:01 CadeMichael

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.

CadeMichael avatar Jan 23 '24 22:01 CadeMichael

I think the configlet sync command can update that file.

IsaacG avatar Jan 24 '24 00:01 IsaacG

#784

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

CadeMichael avatar Jan 24 '24 07:01 CadeMichael

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

DebbieSan avatar Jan 28 '24 02:01 DebbieSan

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

Please advise, thank you!

DebbieSan avatar Jan 28 '24 05:01 DebbieSan

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

ahans avatar Jan 29 '24 11:01 ahans

Here is an update for armstrong-numbers: #808

ahans avatar Feb 14 '24 20:02 ahans

And here goes a sync of gigasecond: #809

ahans avatar Feb 14 '24 21:02 ahans

i will take the bank-account

KevDi avatar Mar 01 '24 17:03 KevDi

I will also update the complex-numbers

KevDi avatar Mar 02 '24 16:03 KevDi

I can take care of pangram and isogram.

BNAndras avatar Mar 02 '24 18:03 BNAndras

I'm taking crypto-square.

ahans avatar Mar 02 '24 19:03 ahans

I'll grab protein translation for next week.

BNAndras avatar Mar 28 '24 18:03 BNAndras

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

tanno1 avatar May 02 '24 22:05 tanno1

@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

tanno1 avatar May 03 '24 19:05 tanno1

@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?

vaeng avatar May 03 '24 19:05 vaeng

(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.

BNAndras avatar May 04 '24 18:05 BNAndras

@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!

tanno1 avatar May 06 '24 00:05 tanno1

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

ErikSchierboom avatar May 07 '24 05:05 ErikSchierboom

@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!

tanno1 avatar May 13 '24 01:05 tanno1

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

BNAndras avatar May 15 '24 05:05 BNAndras