MCPcopy Create free account
hub / github.com/erans/pgsqlite / test_integer_value_handling

Function test_integer_value_handling

src/protocol/value_handler.rs:441–456  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

439
440 #[test]
441 fn test_integer_value_handling() {
442 let handler = ValueHandler::new();
443 let int_value = SqliteValue::Integer(42);
444
445 let result = handler.convert_value(&int_value, 23, false).unwrap(); // INT4
446
447 match result {
448 Some(MappedValue::Small(small)) => {
449 // Verify it's a small int with value 42
450 let mut buffer = [0u8; 32];
451 let len = small.write_text_to_buffer(&mut buffer);
452 assert_eq!(&buffer[..len], b"42");
453 }
454 _ => panic!("Expected small value storage for integer 42"),
455 }
456 }
457
458 #[test]
459 fn test_null_value_handling() {

Callers

nothing calls this directly

Calls 2

write_text_to_bufferMethod · 0.80
convert_valueMethod · 0.45

Tested by

no test coverage detected