(t *testing.T)
| 676 | } |
| 677 | |
| 678 | func TestParseQueryWithVarValAggNested3(t *testing.T) { |
| 679 | query := ` |
| 680 | { |
| 681 | me(func: uid(L), orderasc: val(d) ) { |
| 682 | name |
| 683 | } |
| 684 | |
| 685 | var(func: uid(0x0a)) { |
| 686 | L as friends { |
| 687 | a as age |
| 688 | b as count(friends) |
| 689 | c as count(relatives) |
| 690 | d as math(a + b * c / a + exp(a + b + 1.0) - ln(c)) |
| 691 | } |
| 692 | } |
| 693 | } |
| 694 | ` |
| 695 | res, err := Parse(Request{Str: query}) |
| 696 | require.NoError(t, err) |
| 697 | require.EqualValues(t, "(+ (+ a (/ (* b c) a)) (- (exp (+ (+ a b) 1E+00)) (ln c)))", |
| 698 | res.Query[1].Children[0].Children[3].MathExp.debugString()) |
| 699 | } |
| 700 | |
| 701 | func TestParseQueryWithVarValAggNested_Error1(t *testing.T) { |
| 702 | // No args to mulvar. |
nothing calls this directly
no test coverage detected