@@ -1561,65 +1561,4 @@ mod serialization_tests {
15611561 let loaded = GnssDegradationConfig :: from_file ( & path) . unwrap ( ) ;
15621562 assert_eq ! ( cfg. seed, loaded. seed) ;
15631563 }
1564-
1565- #[ test]
1566- fn default_config_roundtrip ( ) {
1567- // Test that default config can be serialized and read back
1568- let cfg = GnssDegradationConfig :: default ( ) ;
1569-
1570- // Verify default values
1571- assert_eq ! ( cfg. seed, 42 ) ;
1572- assert ! ( matches!( cfg. scheduler, GnssScheduler :: PassThrough ) ) ;
1573- assert ! ( matches!( cfg. fault, GnssFaultModel :: None ) ) ;
1574-
1575- // Test JSON roundtrip
1576- let f = NamedTempFile :: new ( ) . unwrap ( ) ;
1577- let path = f. path ( ) . with_extension ( "json" ) ;
1578- cfg. to_file ( & path) . unwrap ( ) ;
1579- let loaded = GnssDegradationConfig :: from_file ( & path) . unwrap ( ) ;
1580- assert_eq ! ( cfg. seed, loaded. seed) ;
1581- assert ! ( matches!( loaded. scheduler, GnssScheduler :: PassThrough ) ) ;
1582- assert ! ( matches!( loaded. fault, GnssFaultModel :: None ) ) ;
1583-
1584- // Test YAML roundtrip
1585- let f2 = NamedTempFile :: new ( ) . unwrap ( ) ;
1586- let path2 = f2. path ( ) . with_extension ( "yaml" ) ;
1587- cfg. to_file ( & path2) . unwrap ( ) ;
1588- let loaded2 = GnssDegradationConfig :: from_file ( & path2) . unwrap ( ) ;
1589- assert_eq ! ( cfg. seed, loaded2. seed) ;
1590-
1591- // Test TOML roundtrip
1592- let f3 = NamedTempFile :: new ( ) . unwrap ( ) ;
1593- let path3 = f3. path ( ) . with_extension ( "toml" ) ;
1594- cfg. to_file ( & path3) . unwrap ( ) ;
1595- let loaded3 = GnssDegradationConfig :: from_file ( & path3) . unwrap ( ) ;
1596- assert_eq ! ( cfg. seed, loaded3. seed) ;
1597- }
1598-
1599- #[ test]
1600- fn unsupported_extension_error ( ) {
1601- let cfg = sample_cfg ( ) ;
1602- let f = NamedTempFile :: new ( ) . unwrap ( ) ;
1603- let path = f. path ( ) . with_extension ( "txt" ) ;
1604-
1605- // Test to_file with unsupported extension
1606- let result = cfg. to_file ( & path) ;
1607- assert ! ( result. is_err( ) ) ;
1608- assert_eq ! ( result. unwrap_err( ) . kind( ) , std:: io:: ErrorKind :: InvalidInput ) ;
1609-
1610- // Test from_file with unsupported extension
1611- let result = GnssDegradationConfig :: from_file ( & path) ;
1612- assert ! ( result. is_err( ) ) ;
1613- assert_eq ! ( result. unwrap_err( ) . kind( ) , std:: io:: ErrorKind :: InvalidInput ) ;
1614- }
1615-
1616- #[ test]
1617- fn yml_extension_roundtrip ( ) {
1618- let cfg = sample_cfg ( ) ;
1619- let f = NamedTempFile :: new ( ) . unwrap ( ) ;
1620- let path = f. path ( ) . with_extension ( "yml" ) ;
1621- cfg. to_file ( & path) . unwrap ( ) ;
1622- let loaded = GnssDegradationConfig :: from_file ( & path) . unwrap ( ) ;
1623- assert_eq ! ( cfg. seed, loaded. seed) ;
1624- }
16251564}
0 commit comments