()
| 1651 | } |
| 1652 | #[test] |
| 1653 | fn test_nulls() { |
| 1654 | let schema = Arc::new(Schema::new(vec![ |
| 1655 | Field::new("c_int", DataType::UInt64, false), |
| 1656 | Field::new("c_float", DataType::Float32, true), |
| 1657 | Field::new("c_string", DataType::Utf8, true), |
| 1658 | Field::new("c_bool", DataType::Boolean, false), |
| 1659 | ])); |
| 1660 | |
| 1661 | let file = File::open("test/data/null_test.csv").unwrap(); |
| 1662 | |
| 1663 | let mut csv = ReaderBuilder::new(schema) |
| 1664 | .with_header(true) |
| 1665 | .build(file) |
| 1666 | .unwrap(); |
| 1667 | |
| 1668 | let batch = csv.next().unwrap().unwrap(); |
| 1669 | |
| 1670 | assert!(!batch.column(1).is_null(0)); |
| 1671 | assert!(!batch.column(1).is_null(1)); |
| 1672 | assert!(batch.column(1).is_null(2)); |
| 1673 | assert!(!batch.column(1).is_null(3)); |
| 1674 | assert!(!batch.column(1).is_null(4)); |
| 1675 | } |
| 1676 | |
| 1677 | #[test] |
| 1678 | fn test_init_nulls() { |
nothing calls this directly
no test coverage detected