(t *testing.T)
| 1663 | } |
| 1664 | |
| 1665 | func TestBigFloatSort(t *testing.T) { |
| 1666 | s1 := testSchema + "\n amount: bigfloat @index(bigfloat) .\n" |
| 1667 | |
| 1668 | setSchema(s1) |
| 1669 | triples := ` |
| 1670 | <0x666> <amount> "100" . |
| 1671 | <0x124> <amount> "99.1231231233" . |
| 1672 | <0x777> <amount> "99" . |
| 1673 | <0x888> <amount> "99.0000000000000000000001" . |
| 1674 | <0x123> <amount> "123123.123123123132" . |
| 1675 | ` |
| 1676 | addTriplesToCluster(triples) |
| 1677 | |
| 1678 | q1 := ` |
| 1679 | { |
| 1680 | me(func: has(amount), orderasc: amount) { |
| 1681 | uid |
| 1682 | } |
| 1683 | }` |
| 1684 | js := processQueryNoErr(t, q1) |
| 1685 | expectedRes := `{"data":{"me":[{"uid":"0x777"},{"uid":"0x888"}` + |
| 1686 | `,{"uid":"0x124"},{"uid":"0x666"},{"uid":"0x123"}]}}` |
| 1687 | require.JSONEq(t, js, expectedRes) |
| 1688 | } |
| 1689 | |
| 1690 | func TestBigFloatMax(t *testing.T) { |
| 1691 | s1 := testSchema + "\n amount: bigfloat @index(bigfloat) .\n" |
nothing calls this directly
no test coverage detected
searching dependent graphs…