(t *testing.T)
| 600 | } |
| 601 | |
| 602 | func TestParseQueryWithVarValDotProduct(t *testing.T) { |
| 603 | query := ` |
| 604 | { |
| 605 | me(func: uid(L), orderasc: val(d) ) { |
| 606 | name |
| 607 | } |
| 608 | |
| 609 | var(func: uid(0x0a)) { |
| 610 | L as friends { |
| 611 | a as vfloat |
| 612 | b as vfloat |
| 613 | c as count(relatives) |
| 614 | d as math(a dot b * c) |
| 615 | } |
| 616 | } |
| 617 | } |
| 618 | ` |
| 619 | res, err := Parse(Request{Str: query}) |
| 620 | require.NoError(t, err) |
| 621 | require.EqualValues(t, "(dot a (* b c))", |
| 622 | res.Query[1].Children[0].Children[3].MathExp.debugString()) |
| 623 | } |
| 624 | |
| 625 | func TestParseQueryWithVarValDotProduct2(t *testing.T) { |
| 626 | query := ` |
nothing calls this directly
no test coverage detected