util_test.go 651 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * EliasDB
  3. *
  4. * Copyright 2016 Matthias Ladkau. All rights reserved.
  5. *
  6. * This Source Code Form is subject to the terms of the Mozilla Public
  7. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  9. */
  10. package dbfunc
  11. import (
  12. "testing"
  13. "devt.de/krotik/eliasdb/graph"
  14. )
  15. func TestRaiseGraphEventHandled(t *testing.T) {
  16. sn := &RaiseGraphEventHandledFunc{}
  17. if _, err := sn.DocString(); err != nil {
  18. t.Error(err)
  19. return
  20. }
  21. if _, err := sn.Run("", nil, nil, 0, []interface{}{}); err != graph.ErrEventHandled {
  22. t.Error("Unexpected result:", err)
  23. return
  24. }
  25. }