@@ -501,12 +501,18 @@ mod isl_tests {
501
501
"# ) ,
502
502
anonymous_type( [ ordered_elements( [ variably_occurring_type_ref( named_type_ref( "symbol" ) , UsizeRange :: new_single_value( 1 ) ) , variably_occurring_type_ref( anonymous_type_ref( [ type_constraint( named_type_ref( "int" ) ) ] ) , UsizeRange :: new_single_value( 1 ) ) ] ) ] )
503
503
) ,
504
- case:: fields_constraint (
505
- load_isl_type ( r#" // For a schema with fields constraint as below:
506
- { fields: { name: string, id: int} }
504
+ case:: closed_fields_constraint (
505
+ load_isl_type_v2_0 ( r#" // For a schema with fields constraint as below:
506
+ { fields: closed:: { name: string, id: int} }
507
507
"# ) ,
508
- anonymous_type( [ fields( vec![ ( "name" . to_owned( ) , variably_occurring_type_ref( named_type_ref( "string" ) , UsizeRange :: zero_or_one( ) ) ) , ( "id" . to_owned( ) , variably_occurring_type_ref( named_type_ref( "int" ) , UsizeRange :: zero_or_one( ) ) ) ] . into_iter( ) ) ] ) ,
508
+ anonymous_type( [ isl_constraint :: v_2_0 :: fields( vec![ ( "name" . to_owned( ) , variably_occurring_type_ref( named_type_ref( "string" ) , UsizeRange :: zero_or_one( ) ) ) , ( "id" . to_owned( ) , variably_occurring_type_ref( named_type_ref( "int" ) , UsizeRange :: zero_or_one( ) ) ) ] . into_iter( ) , true ) ] ) ,
509
509
) ,
510
+ case:: fields_constraint(
511
+ load_isl_type( r#" // For a schema with fields constraint as below:
512
+ { fields: { name: string, id: int} }
513
+ "# ) ,
514
+ anonymous_type( [ fields( vec![ ( "name" . to_owned( ) , variably_occurring_type_ref( named_type_ref( "string" ) , UsizeRange :: zero_or_one( ) ) ) , ( "id" . to_owned( ) , variably_occurring_type_ref( named_type_ref( "int" ) , UsizeRange :: zero_or_one( ) ) ) ] . into_iter( ) ) ] ) ,
515
+ ) ,
510
516
case:: field_names_constraint(
511
517
load_isl_type_v2_0( r#" // For a schema with field_names constraint as below:
512
518
{ field_names: distinct::symbol }
0 commit comments