Skip to content

Commit 769eca6

Browse files
committed
Tests for simple array instanciation and init
1 parent 7d94fd8 commit 769eca6

File tree

5 files changed

+60
-0
lines changed

5 files changed

+60
-0
lines changed

CodingSeb.ExpressionEvaluator.Tests/ExpressionEvaluatorScriptEvaluateTests.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,12 @@ public static IEnumerable<TestCaseData> TestCasesForScriptEvaluateTests
568568

569569
#region Array content assignation
570570

571+
yield return new TestCaseData(Resources.Script0033, null, null, null)
572+
.SetCategory("Script")
573+
.SetCategory("Array Assignation")
574+
.SetCategory("=")
575+
.Returns("[0,5,0]");
576+
571577
yield return new TestCaseData(Resources.Script0034, null, null, null)
572578
.SetCategory("Script")
573579
.SetCategory("Array instanciation")
@@ -576,6 +582,22 @@ public static IEnumerable<TestCaseData> TestCasesForScriptEvaluateTests
576582
.SetCategory("=")
577583
.Returns("[0,5,0]");
578584

585+
yield return new TestCaseData(Resources.Script0035, null, null, null)
586+
.SetCategory("Script")
587+
.SetCategory("Array instanciation")
588+
.SetCategory("new")
589+
.SetCategory("Array Assignation")
590+
.SetCategory("=")
591+
.Returns("[1,2,3]");
592+
593+
yield return new TestCaseData(Resources.Script0036, null, null, null)
594+
.SetCategory("Script")
595+
.SetCategory("Array instanciation")
596+
.SetCategory("new")
597+
.SetCategory("Array Assignation")
598+
.SetCategory("=")
599+
.Returns("[1,2,3]");
600+
579601
#endregion
580602

581603
#endregion

CodingSeb.ExpressionEvaluator.Tests/Resources.Designer.cs

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CodingSeb.ExpressionEvaluator.Tests/Resources.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,10 @@
220220
<data name="Script0034" type="System.Resources.ResXFileRef, System.Windows.Forms">
221221
<value>resources\script0034.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
222222
</data>
223+
<data name="Script0035" type="System.Resources.ResXFileRef, System.Windows.Forms">
224+
<value>resources\script0035.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
225+
</data>
226+
<data name="Script0036" type="System.Resources.ResXFileRef, System.Windows.Forms">
227+
<value>resources\script0036.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
228+
</data>
223229
</root>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* Script0035 */
2+
3+
array = new int[] {1, 2, 3};
4+
array.Json;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* Script0036 */
2+
3+
array = new int[3] {1, 2, 3};
4+
array.Json;

0 commit comments

Comments
 (0)