Closed josephlr closed 2 weeks ago
@newpavlov @briansmith PTAL. I moved the custom.rs tests back to being an integration test, so both supported and unsupported platforms are now tested without changing the cfg_if!
in lib.rs
.
This looks fine to me, but I am not sure we need to specifically test that custom implementations do not overwrite the default backends.
Also, I have an alternative proposal. I think we can do the following:
I think its important to test that:
The custom backend won't override existing implementations
My concern with changing the lib.rs
logic is that by adding too many test
cfgs, we might end up not actually testing what we want.
This will eliminate the weird juggling around RDRAND and will allow us to test a custom implementation on standard Linux targets. Using
cfg(test)
will ensure that the testing branches will not escape outside of this crate.
I agree that RDRAND has some weird juggling, but that's probably best left for discussion in #476
This moves the tests for the custom RNG registration into custom.rs. It also:
Split out from #471 CC @briansmith