File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
src/Workspaces/CoreTest/WorkspaceTests Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,19 @@ public void SetOptions_PublicGlobalOptions()
199199 {
200200 foreach ( var language in OptionsTestHelpers . GetApplicableLanguages ( option ) )
201201 {
202- Assert . Equal ( value , workspace2 . Options . GetOption ( new OptionKey ( option , language ) ) ) ;
202+ var currentValue = workspace2 . Options . GetOption ( new OptionKey ( option , language ) ) ;
203+ if ( ! Equals ( currentValue , value ) )
204+ {
205+ if ( currentValue . GetType ( ) . IsEnum && value . GetType ( ) . IsEnum )
206+ {
207+ // Enum values are not equal if they are different instances, even if they have the same value.
208+ Assert . Equal ( Convert . ToInt32 ( currentValue ) , Convert . ToInt32 ( value ) ) ;
209+ }
210+ else
211+ {
212+ Assert . Equal ( value , currentValue ) ;
213+ }
214+ }
203215 }
204216 }
205217 }
You can’t perform that action at this time.
0 commit comments