-
-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename test generator files #610
Conversation
87f1fe2
to
2ec94cb
Compare
README.md
Outdated
**example.go** - This is a reference solution for the exercise. | ||
|
||
**leap.go** - This is a *stub file*, and will only be present in some exercises. | ||
|
||
**leap_test.go** - This is the main test file for the exercise. | ||
|
||
**.meta/** - The *.meta* directory can be used to contain files | ||
that are not meant to be included when a user fetches an exercise, for instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ironically, now that this file says .meta
isn't included, it may imply (solely by omission) that example.go
is delivered to the student - I suggest it would be good to make clear that exmaple.go
is also not delivered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another possibility was including it in example.go
's explanation. I'm OK with either, so keep the one you like more.
README.md
Outdated
that are not meant to be included when a user fetches an exercise, for instance | ||
test case generators. | ||
|
||
**gen.go** - This file generates the *cases_test.go* file, and will only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is any confusion possible about whether gen.go
is in .meta
? I suppose the tree makes it clear enough
README.md
Outdated
directory and run `go run exercises/<problem>/example_gen.go`. You should see | ||
that the `<problem>/test_cases.go` file has changed. Commit the change. | ||
directory and run `go run exercises/<exercise>/.meta/gen.go`. You should see | ||
that the `<exercise>/test_cases.go` file has changed. Commit the change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
funnily enough, it's cases_test.go
(simply so that it has the _test.go
suffix), so while you're changing this line from problem->exercise, probably good to correct this too?
2ec94cb
to
486ef8d
Compare
var dirProblem string | ||
// dirExercise is the location that the test cases should be generated to. | ||
// This assumes that the generator script lives in the .meta directory within | ||
// the exercise directory. Falls back to the present working directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"to the present working directory" is no longer accurate now that it's "..", right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooh, good catch. Left it as is and changed back line 63 in response to your other comment.
gen/gen.go
Outdated
if dirProblem == "" { | ||
dirProblem = "." | ||
if dirExercise == "" { | ||
dirExercise = ".." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsure this really needs to change, but since we never get here for any current generator I can't complain since there is no correct answer nor incorrect answer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel it's probably better to leave as is.
486ef8d
to
40c133a
Compare
gen/gen.go
Outdated
@@ -60,7 +60,7 @@ func init() { | |||
dirExercise = filepath.Join(path, "..", "..") | |||
} | |||
if dirExercise == "" { | |||
dirExercise = ".." | |||
dirExercise = "." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you put this change into the README commit, though it should probably go in the "fix path" commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh fudge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed ✔️
40c133a
to
84da326
Compare
84da326
to
298d434
Compare
closes #607