Skip to content

Commit f424af5

Browse files
committed
Fixed a errors in benchmarks for .NET Core App 3.1
1 parent 499b525 commit f424af5

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

test/JavaScriptEngineSwitcher.Benchmarks/Assert.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ private static bool EqualInternal(string a, string b, bool ignoreLineBreaks)
2929
{
3030
if (!ignoreLineBreaks)
3131
{
32-
return a.Equals(b);
32+
return a == b;
3333
}
3434

3535
if (ReferenceEquals(a, b))

test/JavaScriptEngineSwitcher.Benchmarks/HostObjectsEmbeddingBenchmark.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ private static void EmbedAndUseHostObjects(Func<IJsEngine> createJsEngine)
7676
7777
return result;
7878
}(someObj, log));";
79-
const string targetOutput = "RmFsc2V8MjkxNHwwLjg3Mjg1OTEwNzM4ODQyNHxBU0RG0KTQq9CS0JA=";
79+
#if NETCOREAPP3_1
80+
const string targetOutput = "RmFsc2V8MjkxNHwwLjg3Mjg1OTEwNzM4ODQyMzV8QVNERtCk0KvQktCQ";
81+
#else
82+
const string targetOutput = "RmFsc2V8MjkyMHwwLjg3Mjg1OTEwNzM4ODQyNHxBU0RG0KTQq9CS0JA=";
83+
#endif
8084
string targetLogOutput = "-= Start code execution =-" + Environment.NewLine +
8185
"-= End of code execution =-" + Environment.NewLine;
8286

test/JavaScriptEngineSwitcher.Benchmarks/HostTypesEmbeddingBenchmark.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ private static void EmbedAndUseHostTypes(Func<IJsEngine> createJsEngine)
6262
6363
return result;
6464
}(SomeClass, Point, SomeOtherClass));";
65+
#if NETCOREAPP3_1
66+
const string targetOutput = "RmFsc2V8MjkyMHwwLjg3Mjg1OTEwNzM4ODQyMzV8QVNERtCk0KvQktCQ";
67+
#else
6568
const string targetOutput = "RmFsc2V8MjkyMHwwLjg3Mjg1OTEwNzM4ODQyNHxBU0RG0KTQq9CS0JA=";
69+
#endif
6670

6771
// Act
6872
string output;

0 commit comments

Comments
 (0)