(t *testing.T)
| 92 | } |
| 93 | |
| 94 | func TestCanSupportStructWithSlice(t *testing.T) { |
| 95 | assert := assert.New(t) |
| 96 | data := sliceType{A: "foo", B: []scalars{{"f1", "b1"}, {"correct", "b2"}}} |
| 97 | result, err := Search("B[-1].Foo", data) |
| 98 | assert.Nil(err) |
| 99 | assert.Equal("correct", result) |
| 100 | } |
| 101 | |
| 102 | func TestCanSupportStructWithOrExpressions(t *testing.T) { |
| 103 | assert := assert.New(t) |