Skip to content

Commit d809676

Browse files
committed
[test] added test
1 parent 34b03b7 commit d809676

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

VSharp.Test/Tests/Lists.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,20 @@ public static int TestSolvingCopy9(object[] a, int i, object[] b)
558558
return 3;
559559
}
560560

561+
[Ignore("fix creating SMT-solver model")]
562+
public static int TestSolvingCopy10(string[] a, int i, string[] b)
563+
{
564+
if (a.Length > b.Length && 0 <= i && i < b.Length)
565+
{
566+
Array.Copy(a, b, b.Length);
567+
568+
if (b[i][0] == b[i + 1][0])
569+
return 42;
570+
return 10;
571+
}
572+
return 3;
573+
}
574+
561575
[Ignore("Need to add arrays into type candidates")]
562576
public static int ArrayAliasWrite(object[] o, string[] s, string str1, string str2)
563577
{

VSharp.Utils/Collections.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ module Array =
318318
| :? float as i when elementType = typeof<float> -> fillFast arr i
319319
| _ ->
320320
// Slow case
321-
Logger.trace "Slowly filling array with %d elements..." arr.Length
321+
Logger.trace $"Slowly filling array with {arr.Length} elements..."
322322
let rank = arr.Rank
323323
let dims = Array.init rank id
324324
let lengths = Array.map arr.GetLength dims

0 commit comments

Comments
 (0)