()
| 1382 | |
| 1383 | #[test] |
| 1384 | fn test_write_datum_int_and_string() { |
| 1385 | let mut builder = BinaryRowBuilder::new(2); |
| 1386 | builder.write_datum( |
| 1387 | 0, |
| 1388 | &Datum::Int(42), |
| 1389 | &DataType::Int(crate::spec::IntType::new()), |
| 1390 | ); |
| 1391 | builder.write_datum( |
| 1392 | 1, |
| 1393 | &Datum::String("hello".to_string()), |
| 1394 | &DataType::VarChar(crate::spec::VarCharType::string_type()), |
| 1395 | ); |
| 1396 | let row = builder.build(); |
| 1397 | assert_eq!(row.get_int(0).unwrap(), 42); |
| 1398 | assert_eq!(row.get_string(1).unwrap(), "hello"); |
| 1399 | } |
| 1400 | |
| 1401 | #[test] |
| 1402 | fn test_write_datum_long_string() { |
nothing calls this directly
no test coverage detected