Skip to content

Commit 0fef27a

Browse files
committed
Regression test for adding enum value and integer
1 parent 573f0d0 commit 0fef27a

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/Bonsai.Scripting.Expressions.Tests/Bonsai.Scripting.Expressions.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
9-
<PackageReference Include="MSTest.TestAdapter" Version="3.8.3" />
10-
<PackageReference Include="MSTest.TestFramework" Version="3.8.3" />
8+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
9+
<PackageReference Include="MSTest.TestAdapter" Version="4.0.2" />
10+
<PackageReference Include="MSTest.TestFramework" Version="4.0.2" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

src/Bonsai.Scripting.Expressions.Tests/ExpressionScriptingTests.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async Task AssertExpressionTransform<TSource, TResult>(string expression, TSourc
2424
Assert.AreEqual(expected, result);
2525
}
2626

27-
[DataTestMethod]
27+
[TestMethod]
2828
[DataRow("it", 42, 42)]
2929
[DataRow("it * 2", 21, 42)]
3030
[DataRow("Single(it)", 42, 42f)]
@@ -38,6 +38,7 @@ async Task AssertExpressionTransform<TSource, TResult>(string expression, TSourc
3838
[DataRow("new[] { it }", 42, new[] { 42 })]
3939
[DataRow("new[] { it }.Select(x => x * 2).ToArray()", 21, new[] { 42 })]
4040
[DataRow("np(string(null).Length) ?? it", 42, 42)]
41+
[DataRow("DayOfWeek(it + 1)", DayOfWeek.Monday, DayOfWeek.Tuesday)]
4142
public Task TestExpressionTransform<TSource, TResult>(string expression, TSource value, TResult expected)
4243
{
4344
return AssertExpressionTransform(expression, value, expected);
@@ -52,7 +53,7 @@ public Task TestExpressionTransform<TSource, TResult>(string expression, TSource
5253
[TestMethod]
5354
public Task TestObjectExpression() => AssertExpressionTransform("object(it)", 42, (object)42);
5455

55-
[DataTestMethod]
56+
[TestMethod]
5657
[DataRow("single(it)", 42, 42f)]
5758
[DataRow("int64?(it).hasvalue", 42, true)]
5859
[DataRow("math.pi", 42, Math.PI)]
@@ -69,7 +70,7 @@ public Task TestCasingCompatibility<TSource, TResult>(string expression, TSource
6970
return AssertExpressionTransform(expression, value, expected);
7071
}
7172

72-
[DataTestMethod]
73+
[TestMethod]
7374
[DataRow("")]
7475
[DataRow("string(it)")]
7576
public Task TestInvalidExpression(string expression)

0 commit comments

Comments
 (0)