Closed smoothdeveloper closed 7 years ago
Looks much better (than current master).
Conceptually the expected files should be signature files (*.fsi
).
IMO a folder for each test is a bit overkill. We can have a flat structure with three files for each test:
<test_case>.input.fs
<test_case>.expected.fsi
<test_case>.settings.json
It's your choice though.
The folder (I agree the nesting is abit annoying) simplifies the iteration in the implementation. I'd rather keep it as is for now but can change if someone else also prefer a flat layout.
I should be looking at printing a proper diff at some point also.
I agree with @dungpa, it would be nicer without all the sub-directories
For the iteration just group by substring before the first .
then use a recursive loop to pattern match by the file extension and put the paths into a record which you use to provide the params to your test function. Easy peasy :wink:
I'm still considering maintenance pain, and it feels that adding a new test is easier by copying a directory than manually naming three files.
Would it make sense to keep the directories in this regard?
take a list of all the test names and write a lil script to generate the files, you'll be done in a min or two. Having them all in the same directory make sit easier to include them in the fsproject as non compile files so they can be reviewed/searched in VS
We can make a csproj and a wildcard for content files so the proj files never changes, it works with subfolders too.
And it takes more than a minute or two to pull out the correct script here :smile: sorry!
don't add the csproj, it's not worth it
@dungpa / @cloudRoutine I'll take the idea of no subfolders for later refactorings in other areas, I'd like to focus on more interesting stuff after layground work :smile:
@vasily-kirichenko I just changed the items you mentioned.
@smoothdeveloper why is /tests/data/gotodef/generic-sample
still left in?
Have you tried running all of the directory based tests in parallel?
@cloudRoutine the generic-sample
folder contains the sample json file (used for JsonProvider
).
I haven't tried to make the test run in parallel.
refactor gotodefinition tests (37 refactored over 57, 20 remaining needs another pass of extraction or manual extraction)
1444