Skip to content

Commit

Permalink
[test] ignored extern mocking tests
Browse files Browse the repository at this point in the history
- shims are not supported for .NET 7
  • Loading branch information
MchKosticyn committed Sep 7, 2023
1 parent e73278e commit d512986
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
15 changes: 10 additions & 5 deletions VSharp.Test/Tests/ExternMocks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public static DateTime CallStrDt(int a)
return dt;
}

[TestSvm(hasExternMocking: true)]
// [TestSvm(hasExternMocking: true)]
[Ignore("shims are not supported for .NET 7")]
public static DateTime DtNowRet()
{
var t1 = DateTime.Now;
Expand All @@ -35,30 +36,34 @@ public static int DtNowCompareTo()
return 0;
}

[TestSvm(hasExternMocking: true)]
// [TestSvm(hasExternMocking: true)]
[Ignore("shims are not supported for .NET 7")]
public static string ReadLine()
{
var str = Console.ReadLine();
return str;
}

[TestSvm(hasExternMocking: true)]
// [TestSvm(hasExternMocking: true)]
[Ignore("shims are not supported for .NET 7")]
public static string ReadLineTwice()
{
var str = Console.ReadLine();
var str2 = Console.ReadLine();
return str2;
}

[TestSvm(hasExternMocking: true)]
// [TestSvm(hasExternMocking: true)]
[Ignore("shims are not supported for .NET 7")]
public static string ReadLineLength()
{
string s = Console.ReadLine();
var len = s.Length;
return s;
}

[TestSvm(hasExternMocking: true)]
// [TestSvm(hasExternMocking: true)]
[Ignore("shims are not supported for .NET 7")]
public static bool ReadLineCharEq()
{
string s = Console.ReadLine();
Expand Down
16 changes: 11 additions & 5 deletions VSharp.Test/Tests/IOFile.cs
Original file line number Diff line number Diff line change
@@ -1,41 +1,47 @@
using NUnit.Framework;
using VSharp.Test;

namespace IntegrationTests
{
[TestSvmFixture]
public sealed class IOFile
{
[TestSvm(hasExternMocking: true)]
// [TestSvm(hasExternMocking: true)]
[Ignore("shims are not supported for .NET 7")]
public static string ReadFromEmptyFname()
{
var s1 = System.IO.File.ReadAllText("");
return s1;
}

[TestSvm(hasExternMocking: true)]
// [TestSvm(hasExternMocking: true)]
[Ignore("shims are not supported for .NET 7")]
public static bool ReadTwiceFromCorrectPath()
{
var s1 = System.IO.File.ReadAllText("/etc/inputrc");
var s2 = System.IO.File.ReadAllText("/etc/inputrc");
return s1 == s2;
}

[TestSvm(hasExternMocking: true)]
// [TestSvm(hasExternMocking: true)]
[Ignore("shims are not supported for .NET 7")]
public static bool ReadTwiceFromIncorrectPath()
{
var s1 = System.IO.File.ReadAllText("aVeryStrangeFileName");
var s2 = System.IO.File.ReadAllText("42");
return s1 == s2;
}

[TestSvm(hasExternMocking: true)]
// [TestSvm(hasExternMocking: true)]
[Ignore("shims are not supported for .NET 7")]
public static int ReadToArray2()
{
var s1 = System.IO.File.ReadAllLines("/etc/inputrc");
return s1.Length;
}

[TestSvm(hasExternMocking: true)]
// [TestSvm(hasExternMocking: true)]
[Ignore("shims are not supported for .NET 7")]
public static bool ReadToArray()
{
var s1 = System.IO.File.ReadAllLines("aVeryStrangeFileName");
Expand Down

0 comments on commit d512986

Please sign in to comment.