(t *testing.T)
| 623 | } |
| 624 | |
| 625 | func TestParseQueryWithVarValDotProduct2(t *testing.T) { |
| 626 | query := ` |
| 627 | { |
| 628 | me(func: uid(L), orderasc: val(d) ) { |
| 629 | name |
| 630 | } |
| 631 | |
| 632 | var(func: uid(0x0a)) { |
| 633 | L as friends { |
| 634 | a as vfloat |
| 635 | b as vfloat |
| 636 | c as count(relatives) |
| 637 | d as math(a dot b / c) |
| 638 | } |
| 639 | } |
| 640 | } |
| 641 | ` |
| 642 | res, err := Parse(Request{Str: query}) |
| 643 | require.NoError(t, err) |
| 644 | require.EqualValues(t, "(dot a (/ b c))", |
| 645 | res.Query[1].Children[0].Children[3].MathExp.debugString()) |
| 646 | } |
| 647 | |
| 648 | func TestParseQueryWithVarValAggNestedConditional(t *testing.T) { |
| 649 | query := ` |
nothing calls this directly
no test coverage detected