rust-practice / cargo-leet

Program to make working on leetcode problems locally more convenient
Apache License 2.0
5 stars 3 forks source link

Problem Solutions #91

Open c-git opened 2 months ago

c-git commented 2 months ago

Adds the ability to download the problem descriptions and extracts the solutions from the description to add to the test cases added to the generated code

Antosser commented 2 months ago

Honestly, I have no idea what I was reading, but all the individual parts looked fine.

Did you leave the .snap files in on purpose? You made a *.snap.new line in .gitignore but it doesn't affect those .snap files

c-git commented 2 months ago

Yes the .snap files are there on purpose. They store the value the test is supposed to return. The .snap.new one's are the files used when the test returns something different do that you can compare.

It's not actually very complicated, I'd be happy to explain it if you want. We can do a synchronous call on discord or you can tell me which parts are not clear and I can type the explanation.

c-git commented 2 months ago

The tests added to src/tool/core/generate.rs add snapshot testing for the generate output that was desired in #47