Assume not oneway by default
This commit is contained in:
parent
1b67267add
commit
f003662d8c
2 changed files with 11 additions and 6 deletions
|
@ -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()
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue