(t *testing.T)
| 529 | } |
| 530 | |
| 531 | func TestParseQueryWithVarValAggNested4(t *testing.T) { |
| 532 | query := ` |
| 533 | { |
| 534 | me(func: uid(L), orderasc: val(d) ) { |
| 535 | name |
| 536 | } |
| 537 | |
| 538 | var(func: uid(0x0a)) { |
| 539 | L as friends { |
| 540 | a as age |
| 541 | b as count(friends) |
| 542 | c as count(relatives) |
| 543 | d as math(exp(a + b + 1.0) - max(c,ln(c)) + sqrt(a%b)) |
| 544 | } |
| 545 | } |
| 546 | } |
| 547 | ` |
| 548 | res, err := Parse(Request{Str: query}) |
| 549 | require.NoError(t, err) |
| 550 | require.EqualValues(t, "(+ (- (exp (+ (+ a b) 1E+00)) (max c (ln c))) (sqrt (% a b)))", |
| 551 | res.Query[1].Children[0].Children[3].MathExp.debugString()) |
| 552 | } |
| 553 | |
| 554 | func TestParseQueryWithVarValAggNested5(t *testing.T) { |
| 555 | query := ` |
nothing calls this directly
no test coverage detected
searching dependent graphs…