-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLanguageFrontEndTests.cs
More file actions
33 lines (29 loc) · 1.07 KB
/
Copy pathLanguageFrontEndTests.cs
File metadata and controls
33 lines (29 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using DotPython.Language;
using DotPython.ParserGenerator;
using Xunit;
namespace DotPython.ParserTests;
public sealed class LanguageFrontEndTests
{
[Fact]
public void CurrentLanguageVersion_TargetsPython314()
{
Assert.Equal(new Version(3, 14), PythonLanguageVersion.Current);
}
[Fact]
public void SupportedArtifactVersions_ContainCurrentAndRejectOthers()
{
Assert.Contains(
PythonLanguageVersion.Current,
PythonLanguageVersion.SupportedArtifactVersions
);
Assert.True(PythonLanguageVersion.IsSupportedArtifactVersion(new Version(3, 14)));
Assert.True(PythonLanguageVersion.IsSupportedArtifactVersion(new Version(3, 14, 6)));
Assert.False(PythonLanguageVersion.IsSupportedArtifactVersion(new Version(3, 13)));
Assert.False(PythonLanguageVersion.IsSupportedArtifactVersion(new Version(3, 15)));
}
[Fact]
public void ParserGenerator_UsesParsingExpressionGrammarStrategy()
{
Assert.True(ParserGeneratorCapabilities.SupportsParsingExpressionGrammars);
}
}