Skip to content
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
merged 1 commit into from
Dec 27, 2022

Conversation

1ethanhansen
Copy link
Contributor

No description provided.

@1ethanhansen
Copy link
Contributor Author

@ee7 much more verbose now!

Copy link
Member

@ee7 ee7 left a 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...

@1ethanhansen 1ethanhansen merged commit 57faa45 into main Dec 27, 2022
@1ethanhansen 1ethanhansen deleted the more-verbose-testing branch December 27, 2022 16:28
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants