This is an archive of the discontinued Mercurial Phabricator instance.

rust: factorized testing Graphs
ClosedPublic

Authored by gracinet on Jan 14 2019, 9:13 PM.

Details

Summary

it will useful to use these outside of ancestors, too.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

gracinet created this revision.Jan 14 2019, 9:13 PM
kevincox accepted this revision.Jan 15 2019, 2:58 PM
yuja added a subscriber: yuja.Jan 16 2019, 7:42 AM

Queued the series, thanks.

+++ b/rust/hg-core/src/testing.rs

Maybe we can add separate test files, but I don't know which is preferred.

https://doc.rust-lang.org/book/ch11-03-test-organization.html#submodules-in-integration-tests

This revision was automatically updated to reflect the committed changes.

@yuja the doc you're linking is about integration tests, so it wouldn't apply to these tests which are really unitary in my mind. Usually the main difference would be the access to the private constructs that the integration tests can't perform, but it's true that most of these implementations are public anyway.

yuja added a comment.Jan 17 2019, 9:21 AM
@yuja the doc you're linking is about integration tests, so it wouldn't apply to these tests which are really unitary in my mind. Usually the main difference would be the access to the private constructs that the integration tests can't perform, but it's true that most of these implementations are public anyway.

Yep, I tend to ignore the theoretical meanings of unit vs integration, and
use them as test frameworks fit to small/simple and big/complex tests
respectively.

I just don't know if that's common in Rust community.