MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / test_random_inputs

Function test_random_inputs

ciphercore-base/src/ops/adder.rs:384–394  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

382
383 #[test]
384 fn test_random_inputs() -> Result<()> {
385 let random_numbers = [0, 1, 3, 4, 10, 100500, 123456, 787788];
386 for st in [BIT, UINT8, UINT16, UINT32, UINT64] {
387 for &x in random_numbers.iter() {
388 for &y in random_numbers.iter() {
389 test_helper(x, y, st)?;
390 }
391 }
392 }
393 Ok(())
394 }
395
396 fn add_with_overflow_helper(first: u64, second: u64, st: ScalarType) -> Result<(u64, u64)> {
397 let bits = st.size_in_bits();

Callers

nothing calls this directly

Calls 1

test_helperFunction · 0.70

Tested by

no test coverage detected