MCPcopy Create free account
hub / github.com/NationalSecurityAgency/TraceAnalysis / integer_addition

Function integer_addition

dynamic-dataflow/core/src/value.rs:1608–1622  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1606
1607 #[test]
1608 fn integer_addition() {
1609 // u8, no wrap
1610
1611 let v1 = SizedValue::from(45u8);
1612 let v2 = SizedValue::from(54u8);
1613
1614 assert!(SizedValue::from(99u8) == v1 + v2, "45 + 54 != 99");
1615
1616 // u8, wrap
1617
1618 let v1 = SizedValue::from(254u8);
1619 let v2 = SizedValue::from(50u8);
1620
1621 assert!(SizedValue::from(48u8) == v1 + v2, "254 + 50 != 48");
1622 }
1623}
1624
1625pub(crate) trait PrimitiveExt {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected