graphtest

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectIteratedQuads

func ExpectIteratedQuads(t testing.TB, qs graph.QuadStore, it graph.Iterator, exp []quad.Quad, sortQuads bool)

func ExpectIteratedRawStrings

func ExpectIteratedRawStrings(t testing.TB, qs graph.QuadStore, it graph.Iterator, exp []string)

func ExpectIteratedValues

func ExpectIteratedValues(t testing.TB, qs graph.QuadStore, it graph.Iterator, exp []quad.Value)

func IteratedQuads

func IteratedQuads(t testing.TB, qs graph.QuadStore, it graph.Iterator) []quad.Quad

func IteratedRawStrings

func IteratedRawStrings(t testing.TB, qs graph.QuadStore, it graph.Iterator) []string

func IteratedValues

func IteratedValues(t testing.TB, qs graph.QuadStore, it graph.Iterator) []quad.Value

func MakeQuadSet

func MakeQuadSet() []quad.Quad

This is a simple test graph.

+---+                        +---+
| A |-------               ->| F |<--
+---+       \------>+---+-/  +---+   \--+---+
             ------>|#B#|      |        | E |
+---+-------/      >+---+      |        +---+
| C |             /            v
+---+           -/           +---+
  ----    +---+/             |#G#|
      \-->|#D#|------------->+---+
          +---+

func MakeWriter

func MakeWriter(t testing.TB, qs graph.QuadStore, opts graph.Options, data ...quad.Quad) graph.QuadWriter

func TestAddRemove

func TestAddRemove(t testing.TB, gen DatabaseFunc, conf *Config)

TODO(dennwc): add tests to verify that QS behaves in a right way with IgnoreOptions, returns ErrQuadExists, ErrQuadNotExists is doing rollback.

func TestAll

func TestAll(t testing.TB, gen DatabaseFunc, conf *Config)

func TestCompareTypedValues

func TestCompareTypedValues(t testing.TB, gen DatabaseFunc, conf *Config)

func TestDeleteQuad

func TestDeleteQuad(t testing.TB, gen DatabaseFunc)

func TestDeletedFromIterator

func TestDeletedFromIterator(t testing.TB, gen DatabaseFunc)

func TestHorizonInt

func TestHorizonInt(t testing.TB, gen DatabaseFunc, conf *Config)

func TestIterator

func TestIterator(t testing.TB, gen DatabaseFunc)

func TestIteratorsAndNextResultOrderA

func TestIteratorsAndNextResultOrderA(t testing.TB, gen DatabaseFunc)

func TestLoadOneQuad

func TestLoadOneQuad(t testing.TB, gen DatabaseFunc)

func TestLoadTypedQuads

func TestLoadTypedQuads(t testing.TB, gen DatabaseFunc, conf *Config)

func TestSetIterator

func TestSetIterator(t testing.TB, gen DatabaseFunc)

Types

type Config

type Config struct {
	UnTyped   bool // converts all values to Raw representation
	NoHashes  bool // cannot exchange raw values into typed ones
	TimeInMs  bool
	TimeInMcs bool
	TimeRound bool

	OptimizesComparison bool

	SkipDeletedFromIterator  bool
	SkipSizeCheckAfterDelete bool
	SkipIntHorizon           bool
	// TODO(dennwc): these stores are not garbage-collecting nodes after quad removal
	SkipNodeDelAfterQuadDel bool
}

type DatabaseFunc

type DatabaseFunc func(t testing.TB) (graph.QuadStore, graph.Options, func())

type ValueSizer

type ValueSizer interface {
	SizeOf(graph.Value) int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL