@@ -3,6 +3,7 @@ fn test_empty_table_collection() {
33 macro_rules! validate_empty_tables {
44 ( $tables: ident, $table: ident, $table_iter: ident, $row: expr) => {
55 assert!( $tables. $table( ) . row( $row) . is_none( ) ) ;
6+ assert!( $tables. $table( ) . row_view( $row) . is_none( ) ) ;
67 assert_eq!( $tables. $table( ) . num_rows( ) , 0 ) ;
78 assert_eq!( $tables. $table( ) . iter( ) . count( ) , 0 ) ;
89 assert_eq!( $tables. $table_iter( ) . count( ) , 0 ) ;
@@ -43,6 +44,10 @@ mod test_adding_rows_without_metadata {
4344 // are held in an Option.
4445 match tables. $table( ) . row( id) {
4546 Some ( row) => {
47+ match tables. $table( ) . row_view( id) {
48+ Some ( view) => assert_eq!( view, row) ,
49+ None => panic!( "if there is a row, there must be a row view" )
50+ }
4651 assert!( row. metadata. is_none( ) ) ;
4752
4853 // A row equals itself
@@ -273,7 +278,13 @@ mod test_metadata_round_trips {
273278 assert_eq!( $tables. $table( ) . num_rows( ) , 1 ) ;
274279
275280 match $tables. $table( ) . row( id) {
276- Some ( row) => assert!( row. metadata. is_some( ) ) ,
281+ Some ( row) => {
282+ assert!( row. metadata. is_some( ) ) ;
283+ match $tables. $table( ) . row_view( id) {
284+ Some ( view) => assert_eq!( row, view) ,
285+ None => panic!( "if there is a row, there must be a view!" ) ,
286+ }
287+ }
277288 None => panic!( "Expected Some(row) from {} table" , stringify!( table) ) ,
278289 }
279290
0 commit comments