Skip to content

Commit

Permalink
adapted tests after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
filipw committed Mar 4, 2019
1 parent bf068e1 commit e514da2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/Scripting/CSharpTest/ScriptOptionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Scripting;
using Microsoft.CodeAnalysis.Scripting;
using Roslyn.Test.Utilities;
using Xunit;

namespace Microsoft.CodeAnalysis.Scripting.Test
namespace Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests
{
public class ScriptOptionsTests : TestBase
{
Expand Down
11 changes: 5 additions & 6 deletions src/Scripting/CSharpTest/ScriptTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -924,16 +924,15 @@ public void StreamWithOffset()
}

[Fact]
public void CreateScriptWithNullableContextWithoutCSharp8()
public void CreateScriptWithFeatureThatIsNotSupportedInTheSelectedLanguageVersion()
{
var script = CSharpScript.Create(@"#nullable enable
string x = null;", ScriptOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7_3));
var script = CSharpScript.Create(@"string x = default;", ScriptOptions.Default.WithLanguageVersion(LanguageVersion.CSharp7));
var compilation = script.GetCompilation();

compilation.VerifyDiagnostics(
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "nullable").
WithArguments("nullable reference types", "8.0").
WithLocation(1, 2)
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7, "default").
WithArguments("default literal", "7.1").
WithLocation(1, 12)
);
}

Expand Down

0 comments on commit e514da2

Please sign in to comment.