Imported Upstream version 5.20.0.180

Former-commit-id: ff953ca879339fe1e1211f7220f563e1342e66cb
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-02-04 20:11:37 +00:00
parent 0e2d47d1c8
commit 0510252385
3360 changed files with 83827 additions and 39243 deletions

View File

@ -34,14 +34,13 @@ using System.Web.Caching;
using NUnit.Framework;
using MonoTests.Helpers;
namespace MonoTests.System.Web.Caching
{
[TestFixture]
public partial class CacheItemPriorityQueueTest
{
const string DATA_DIR = "CacheItemPriorityQueueTestData";
static readonly string dataDir;
sealed class TestCacheItem : CacheItem
{
public Guid Guid;
@ -89,20 +88,12 @@ namespace MonoTests.System.Web.Caching
}
}
static CacheItemPriorityQueueTest ()
{
// Assumes this is compiled into mcs/class/lib/<profile>/test
string class_dir = Directory.GetParent (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location)).Parent.Parent.FullName;
string system_web_dir = Path.Combine (class_dir, "System.Web", "Test", "System.Web.Caching");
dataDir = Path.Combine (system_web_dir, DATA_DIR);
}
void RunTest (string testsFileName, string listFileName)
{
var queue = new CacheItemPriorityQueue ();
var cacheItems = new List <TestCacheItem> ();
string listPath = Path.Combine (dataDir, listFileName);
string testsPath = Path.Combine (dataDir, testsFileName);
string listPath = TestResourceHelper.GetFullPathOfResource ("Test/System.Web.Caching/CacheItemPriorityQueueTestData/" + listFileName);
string testsPath = TestResourceHelper.GetFullPathOfResource ("Test/System.Web.Caching/CacheItemPriorityQueueTestData/" + testsFileName);
string line;
using (var sr = new StreamReader (listPath, Encoding.UTF8)) {