File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
crates/artifacts/solc/src Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -2229,4 +2229,18 @@ mod tests {
22292229 let content = fs:: read_to_string ( path) . unwrap ( ) ;
22302230 let _output: CompilerOutput = serde_json:: from_str ( & content) . unwrap ( ) ;
22312231 }
2232+
2233+ // <https://github.com/foundry-rs/foundry/issues/9322>
2234+ #[ test]
2235+ fn can_sanitize_optimizer_inliner ( ) {
2236+ let settings = Settings :: default ( ) . with_via_ir_minimum_optimization ( ) ;
2237+ let input =
2238+ SolcInput { language : SolcLanguage :: Solidity , sources : Default :: default ( ) , settings } ;
2239+
2240+ input. clone ( ) . sanitized ( & "0.8.4" . parse ( ) . unwrap ( ) ) ;
2241+ assert_eq ! ( input. settings. optimizer. details. clone( ) . unwrap( ) . inliner, None ) ;
2242+
2243+ input. clone ( ) . sanitized ( & "0.8.4" . parse ( ) . unwrap ( ) ) ;
2244+ assert_eq ! ( input. settings. optimizer. details. clone( ) . unwrap( ) . inliner, None ) ;
2245+ }
22322246}
You can’t perform that action at this time.
0 commit comments