Assume not oneway by default

This commit is contained in:
Pieter Vander Vennet 2020-11-17 15:57:22 +01:00
parent 1b67267add
commit f003662d8c
2 changed files with 11 additions and 6 deletions

View file

@ -20,6 +20,14 @@ namespace AspectedRouting.Test
return JsonParser.AspectFromJson(new Context(), json, "test.json");
}
private IExpression MustMatchJsonWithOr()
{
var json = "{" +
"\"name\":\"test\"," +
"\"description\":\"test\"," +
"\"$mustMatch\":{\"a\":\"b\",\"x\":\"y\"}}";
return JsonParser.AspectFromJson(new Context(), json, "test.json");
}
[Fact]
public void TestAll_AllTags_Yes()

View file

@ -87,14 +87,11 @@ namespace AspectedRouting.IO.itinero1
" result.speed = speed",
" result.factor = 1 / priority",
"",
" if (oneway == \"both\") then",
" result.direction = 0",
" elseif (oneway == \"with\") then",
" result.direction = 0",
" if (oneway == \"with\" or oneway == \"yes\") then",
" result.direction = 1",
" elseif (oneway == \"against\") then",
" if (oneway == \"against\" or oneway == \"-1\") then",
" result.direction = 2",
" else",
" error(\"Unexpected value for oneway: \"..oneway)",
" end",
"",
"end"