(t *testing.T)
| 84 | } |
| 85 | |
| 86 | func TestVAdd(t *testing.T) { |
| 87 | m := &mockCmdable{} |
| 88 | c := m.asCmdable() |
| 89 | vec := &VectorValues{Val: []float64{1, 2}} |
| 90 | c.VAdd(context.Background(), "k", "e", vec) |
| 91 | cmd, ok := m.lastCmd.(*BoolCmd) |
| 92 | if !ok { |
| 93 | t.Fatalf("expected BoolCmd, got %T", m.lastCmd) |
| 94 | } |
| 95 | if cmd.args[0] != "vadd" || cmd.args[1] != "k" || cmd.args[len(cmd.args)-1] != "e" { |
| 96 | t.Errorf("unexpected args: %v", cmd.args) |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | func TestVAddWithArgs_AllOptions(t *testing.T) { |
| 101 | m := &mockCmdable{} |