MCPcopy Create free account
hub / github.com/apache/arrow-rs / test_string_roundtrip

Function test_string_roundtrip

arrow-buffer/src/bigint/mod.rs:1486–1503  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1484
1485 #[test]
1486 fn test_string_roundtrip() {
1487 let roundtrip_cases = [
1488 i256::ZERO,
1489 i256::ONE,
1490 i256::MINUS_ONE,
1491 i256::from_i128(123456789),
1492 i256::from_i128(-123456789),
1493 i256::from_i128(i128::MIN),
1494 i256::from_i128(i128::MAX),
1495 i256::MIN,
1496 i256::MAX,
1497 ];
1498 for case in roundtrip_cases {
1499 let formatted = case.to_string();
1500 let back: i256 = formatted.parse().unwrap();
1501 assert_eq!(case, back);
1502 }
1503 }
1504
1505 #[test]
1506 fn test_from_string() {

Callers

nothing calls this directly

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected