You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of working on #774, I noticed that recently some unit tests unrelated to what I have been working on have started failing, most likely because I am running in a ubuntu container (and I suspect the cicd test suite is on windows?)
The test failure is quite explicit, the issue is that generated exception messages have different new line characters, depending on which OS you are on, but the expected messages check for the windows new line character explicitly (/r/n).
The full test error is:
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:02.44] RegularObjectWorks [FAIL]
[xUnit.net 00:00:02.44] InheritedMembersWorks [FAIL]
Failed RegularObjectWorks [88 ms]
Error Message:
Assert.Equal() Failure
↓ (pos 12)
Expected: Prop1: hello\r\nProp2: 1\r\n# A Description\r\nHello: "worl···
Actual: Prop1: hello\nProp2: 1\n# A Description\nHello: "world"\n···
↑ (pos 12)
Stack Trace:
at YamlDotNet.Test.Analyzers.StaticGenerator.ObjectTests.RegularObjectWorks() in <redacted>/YamlDotNet.Test/Analyzers/StaticGenerator/ObjectTests.cs:line 73
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Failed InheritedMembersWorks [3 ms]
Error Message:
Assert.Equal() Failure
↓ (pos 19)
Expected: NotInherited: hello\r\nInherited: world\r\n
Actual: NotInherited: hello\nInherited: world\n
↑ (pos 19)
Stack Trace:
at YamlDotNet.Test.Analyzers.StaticGenerator.ObjectTests.InheritedMembersWorks() in <redacted>/YamlDotNet.Test/Analyzers/StaticGenerator/ObjectTests.cs:line 40
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Failed! - Failed: 2, Passed: 1649, Skipped: 0, Total: 1651, Duration: 2 s - YamlDotNet.Test.dll (net7.0)
The text was updated successfully, but these errors were encountered:
I think that is the test that I fixed about a week or 2 ago for the exact same reason. I do my builds for the static code generator package on Linux due to the huge time difference between compiling on Windows vs Linux. Can you try rebasing on master and let me know if its still broken?
As part of working on #774, I noticed that recently some unit tests unrelated to what I have been working on have started failing, most likely because I am running in a ubuntu container (and I suspect the cicd test suite is on windows?)
The test failure is quite explicit, the issue is that generated exception messages have different new line characters, depending on which OS you are on, but the expected messages check for the windows new line character explicitly (
/r/n
).The full test error is:
The text was updated successfully, but these errors were encountered: