(t *testing.T)
| 552 | } |
| 553 | |
| 554 | func TestParseQueryWithVarValAggNested5(t *testing.T) { |
| 555 | query := ` |
| 556 | { |
| 557 | me(func: uid(L), orderasc: val(d) ) { |
| 558 | name |
| 559 | } |
| 560 | |
| 561 | var(func: uid(0x0a)) { |
| 562 | L as friends { |
| 563 | a as age |
| 564 | b as count(friends) |
| 565 | c as count(relatives) |
| 566 | d as math(a * b / c) |
| 567 | } |
| 568 | } |
| 569 | } |
| 570 | ` |
| 571 | res, err := Parse(Request{Str: query}) |
| 572 | require.NoError(t, err) |
| 573 | require.EqualValues(t, "(/ (* a b) c)", |
| 574 | res.Query[1].Children[0].Children[3].MathExp.debugString()) |
| 575 | } |
| 576 | |
| 577 | func TestParseQueryWithVarValAggLogSqrt(t *testing.T) { |
| 578 | query := ` |
nothing calls this directly
no test coverage detected