MCPcopy Create free account
hub / github.com/apache/datafusion / test_decode_hex_literal

Function test_decode_hex_literal

datafusion/sql/src/expr/value.rs:425–442  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

423
424 #[test]
425 fn test_decode_hex_literal() {
426 let cases = [
427 ("", Some(vec![])),
428 ("FF00", Some(vec![255, 0])),
429 ("a00a", Some(vec![160, 10])),
430 ("FF0", Some(vec![15, 240])),
431 ("f", Some(vec![15])),
432 ("FF0X", None),
433 ("X0", None),
434 ("XX", None),
435 ("x", None),
436 ];
437
438 for (input, expect) in cases {
439 let output = try_decode_hex_literal(input);
440 assert_eq!(output, expect);
441 }
442 }
443
444 #[test]
445 fn test_bigint_to_i256() {

Callers

nothing calls this directly

Calls 1

try_decode_hex_literalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…