This instance will be upgraded to Heptapod 0.17.2 on 2020-12-03 at 14:00 UTC+1 (a few minutes of down time)

Commit 67728809 authored by Jesse McGrew's avatar Jesse McGrew

Fix cross-platform inconsistency in ArgDecoder constraint errors.

parent 6d2ff97430d5
......@@ -16,6 +16,7 @@
* along with ZILF. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
......@@ -533,7 +534,7 @@ namespace Zilf.Language.Signatures
public override string ToString()
{
return EnglishList(Constraints.Select(c => c.ToString()).OrderBy(s => s), "and");
return EnglishList(Constraints.Select(c => c.ToString()).OrderBy(s => s, StringComparer.Ordinal), "and");
}
public override void Accept(IConstraintVisitor visitor) => visitor.VisitConjunctionConstraint(Constraints);
......@@ -650,7 +651,7 @@ namespace Zilf.Language.Signatures
public override string ToString()
{
return EnglishList(Constraints.Select(c => c.ToString()).OrderBy(s => s), "or");
return EnglishList(Constraints.Select(c => c.ToString()).OrderBy(s => s, StringComparer.Ordinal), "or");
}
public override void Accept(IConstraintVisitor visitor) => visitor.VisitDisjunctionConstraint(Constraints);
......
......@@ -468,7 +468,7 @@ namespace Zilf.Tests.Interpreter
[TestMethod]
public void Test_DeclArg_Fail()
{
const string SExpectedMessage = "dummy: arg 1: expected ATOM and 'ZILF";
const string SExpectedMessage = "dummy: arg 1: expected 'ZILF and ATOM";
var methodInfo = GetMethod(nameof(Dummy_DeclArg));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment