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");
|
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]
|
[Fact]
|
||||||
public void TestAll_AllTags_Yes()
|
public void TestAll_AllTags_Yes()
|
||||||
|
|
|
@ -87,14 +87,11 @@ namespace AspectedRouting.IO.itinero1
|
||||||
" result.speed = speed",
|
" result.speed = speed",
|
||||||
" result.factor = 1 / priority",
|
" result.factor = 1 / priority",
|
||||||
"",
|
"",
|
||||||
" if (oneway == \"both\") then",
|
" result.direction = 0",
|
||||||
" result.direction = 0",
|
" if (oneway == \"with\" or oneway == \"yes\") then",
|
||||||
" elseif (oneway == \"with\") then",
|
|
||||||
" result.direction = 1",
|
" result.direction = 1",
|
||||||
" elseif (oneway == \"against\") then",
|
" if (oneway == \"against\" or oneway == \"-1\") then",
|
||||||
" result.direction = 2",
|
" result.direction = 2",
|
||||||
" else",
|
|
||||||
" error(\"Unexpected value for oneway: \"..oneway)",
|
|
||||||
" end",
|
" end",
|
||||||
"",
|
"",
|
||||||
"end"
|
"end"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue