-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added ScriptOptionsTests for C# lang version
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using Microsoft.CodeAnalysis.CSharp; | ||
using Microsoft.CodeAnalysis.CSharp.Scripting; | ||
using Roslyn.Test.Utilities; | ||
using Xunit; | ||
|
||
namespace Microsoft.CodeAnalysis.Scripting.Test | ||
{ | ||
public class ScriptOptionsTests : TestBase | ||
{ | ||
[Fact] | ||
public void WithLanguageVersion() | ||
{ | ||
var options = ScriptOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); | ||
Assert.Equal(LanguageVersion.CSharp8, ((CSharpParseOptions)options.ParseOptions).LanguageVersion); | ||
} | ||
|
||
[Fact] | ||
public void WithEmitDebugInformation_SameValueTwice_DoesNotCreateNewInstance() | ||
{ | ||
var options = ScriptOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); | ||
Assert.Same(options, options.WithLanguageVersion(LanguageVersion.CSharp8)); | ||
} | ||
} | ||
} |