Permalink
Browse files

Fixing EcmaTest display names

  • Loading branch information...
sebastienros committed Nov 28, 2017
1 parent bafd36a commit 92253759ae414deb2441dbf637a2f9f6b4eae38d
Showing with 7 additions and 5 deletions.
  1. +7 −5 Jint.Tests.Ecma/EcmaTest.cs
@@ -76,9 +76,9 @@ protected void RunTestCode(string code, bool negative)
[Theory(DisplayName = "Ecma")]
[MemberData(nameof(SourceFiles), false)]
[MemberData(nameof(SourceFiles), true, Skip = "Skipped")]
protected void RunTest(string localPath, SourceFile sourceFile)
protected void RunTest(SourceFile sourceFile)
{
var fullName = Path.Combine(BasePath, localPath, sourceFile.Source);
var fullName = Path.Combine(BasePath, sourceFile.BasePath, sourceFile.Source);
if (!File.Exists(fullName))
{
throw new ArgumentException("Could not find source file: " + fullName);
@@ -109,11 +109,11 @@ public static IEnumerable<object[]> SourceFiles(bool skipped)
foreach(JObject entry in doc)
{
var sourceFile = new SourceFile(entry);
var sourceFile = new SourceFile(entry, path);
if (skipped == sourceFile.Skip)
{
results.Add(new object [] { path, sourceFile });
results.Add(new object [] { sourceFile });
}
}
@@ -127,16 +127,18 @@ public static IEnumerable<object[]> SourceFiles(bool skipped)
public class SourceFile
{
public SourceFile(JObject node)
public SourceFile(JObject node, string basePath)
{
Skip = node["skip"].Value<bool>();
Source = node["source"].ToString();
Reason = node["reason"].ToString();
BasePath = basePath;
}
public string Source { get; set; }
public bool Skip { get; set; }
public string Reason { get; set; }
public string BasePath { get; }
public override string ToString()
{

0 comments on commit 9225375

Please sign in to comment.