-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
fix: make testing more verbose with -stats (fixes #12) #37
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ee7 much more verbose now! |
ee7
approved these changes
Dec 27, 2022
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.
LGTM.
To others: from the upstream docs:
v -stats file_test.v
- this will run the test_ functions, and show a report about how much time it took to run each of them too.
CI log before:
Checking grade_school exercise...
Checking grains exercise...
CI log after:
Checking grade_school exercise...
---- Testing... ----------------------------------------------------------------
--------------------------------------------------------------------------------
running tests in: /home/runner/work/vlang/vlang/temp/run_test.v
OK [ 1/18] 0.003 ms 1 assert | main.test_empty_roster()
OK [ 2/18] 0.008 ms 1 assert | main.test_roster_one_person()
OK [ 3/18] 0.009 ms 1 assert | main.test_roster_three_people()
OK [ 4/18] 0.006 ms 1 assert | main.test_roster_duplicate_in_same_grade()
--------------------------------------------------------------------------------
OK [ [5](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:6)/18] 0.005 ms 1 assert | main.test_cant_have_one_person_in_two_grades()
OK [ [6](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:7)/18] 0.003 ms 1 assert | main.test_just_one_person_duplicated()
OK [ [7](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:8)/1[8](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:9)] 0.005 ms 1 assert | main.test_students_added_to_multiple_grades()
OK [ 8/18] 0.013 ms 1 assert | main.test_adding_same_student_multiple_grades()
OK [ [9](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:10)/18] 0.003 ms 1 assert | main.test_just_one_person_multiple_grades()
OK [[10](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:11)/18] 0.009 ms 1 assert | main.test_students_sorted_by_grade()
OK [[11](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:12)/18] 0.006 ms 1 assert | main.test_students_sorted_by_name()
OK [[12](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:13)/18] 0.021 ms 1 assert | main.test_students_sorted_by_grade_then_name()
OK [[13](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:14)/18] 0.001 ms 1 assert | main.test_grade_empty_if_no_students_overall()
OK [[14](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:15)/18] 0.007 ms 1 assert | main.test_grade_empty_if_no_students_in_that_grade()
OK [[15](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:16)/18] 0.006 ms 1 assert | main.test_adding_same_student_twice_just_query_grade()
OK [[16](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:17)/18] 0.007 ms 1 assert | main.test_adding_same_student_two_grades_just_query_grade_2()
OK [[17](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:18)/[18](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:19)] 0.005 ms 1 assert | main.test_adding_same_student_two_grades_just_query_grade_3()
OK [18/18] 0.007 ms 1 assert | main.test_students_sorted_by_name_in_grade()
Summary for running V tests in "run_test.v": 18 passed, 18 total. Runtime: 0 ms.
V source code size: 22716 lines, 613590 bytes
generated target code size: 22143 lines, 769000 bytes
compilation took: 313.3[20](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:21) ms, compilation speed: 72500 vlines/s
Summary for all V _test.v files: 1 passed, 1 total. Runtime: 3[22](https://github.com/exercism/vlang/actions/runs/3772486477/jobs/6413447232#step:4:23) ms, on 1 job.
Checking grains exercise...
ErikSchierboom
pushed a commit
to ErikSchierboom/vlang
that referenced
this pull request
Jan 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.