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

Use do-while instead of while in tests. #1119

Merged
merged 1 commit into from Aug 25, 2018
Merged

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Aug 25, 2018

This forces all the loop bodies to be executed at least once, which is
harmless since it just means one more tox event loop iteration. This
reduces the jitter we see in coverage measurements, which is partially
caused by loops sometimes being entered and sometimes not (because their
condition happens to randomly already be true).


This change is Reviewable

@iphydf iphydf added this to the v0.2.x milestone Aug 25, 2018
@codecov
Copy link

codecov bot commented Aug 25, 2018

Codecov Report

Merging #1119 into master will increase coverage by <.1%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #1119     +/-   ##
========================================
+ Coverage    82.4%   82.5%   +<.1%     
========================================
  Files          80      80             
  Lines       14339   14340      +1     
========================================
+ Hits        11821   11832     +11     
+ Misses       2518    2508     -10
Impacted Files Coverage Δ
auto_tests/dht_test.c 47.1% <ø> (ø) ⬆️
auto_tests/tox_many_tcp_test.c 100% <ø> (ø) ⬆️
auto_tests/tox_many_test.c 100% <ø> (ø) ⬆️
auto_tests/save_load_test.c 98.6% <ø> (ø) ⬆️
auto_tests/conference_test.c 97.7% <100%> (ø) ⬆️
auto_tests/typing_test.c 100% <100%> (ø) ⬆️
auto_tests/set_status_message_test.c 100% <100%> (ø) ⬆️
auto_tests/set_name_test.c 100% <100%> (ø) ⬆️
auto_tests/send_message_test.c 94.7% <100%> (ø) ⬆️
auto_tests/tcp_relay_test.c 100% <100%> (ø) ⬆️
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0935aab...94b0681. Read the comment docs.

@iphydf iphydf force-pushed the do-while branch 2 times, most recently from ff5dc50 to ef0108e Compare August 25, 2018 13:58
This forces all the loop bodies to be executed at least once, which is
harmless since it just means one more tox event loop iteration. This
reduces the jitter we see in coverage measurements, which is partially
caused by loops sometimes being entered and sometimes not (because their
condition happens to randomly already be true).
@iphydf iphydf merged commit 94b0681 into TokTok:master Aug 25, 2018
@iphydf iphydf deleted the do-while branch August 25, 2018 15:39
@robinlinden robinlinden modified the milestones: v0.2.x, v0.2.7 Aug 30, 2018
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.

None yet

3 participants