graphtest

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2017 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SandraB = "Sandra Bullock"
	KeanuR  = "Keanu Reeves"
)

Variables

This section is empty.

Functions

func BenchmarkQueries added in v0.7.0

func BenchmarkQueries(b *testing.B, gen testutil.DatabaseFunc)

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 IteratedStrings added in v0.7.0

func IteratedStrings(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 TestAddRemove

func TestAddRemove(t testing.TB, gen testutil.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.T, gen testutil.DatabaseFunc, conf *Config)

func TestCompareTypedValues

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

func TestDeleteQuad

func TestDeleteQuad(t testing.TB, gen testutil.DatabaseFunc, _ *Config)

func TestDeletedFromIterator

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

func TestHasA added in v0.6.1

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

func TestIntegration added in v0.7.0

func TestIntegration(t *testing.T, gen testutil.DatabaseFunc, force bool)

func TestIterator

func TestIterator(t testing.TB, gen testutil.DatabaseFunc, _ *Config)

func TestIteratorsAndNextResultOrderA

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

func TestLoadOneQuad

func TestLoadOneQuad(t testing.TB, gen testutil.DatabaseFunc, c *Config)

func TestLoadTypedQuads

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

func TestNodeDelete added in v0.7.0

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

func TestSchema added in v0.7.0

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

func TestSetIterator

func TestSetIterator(t testing.TB, gen testutil.DatabaseFunc, _ *Config)

func TestSizes added in v0.7.0

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

Types

type Config

type Config struct {
	NoPrimitives bool
	UnTyped      bool // converts all values to Raw representation
	TimeInMs     bool
	TimeInMcs    bool
	TimeRound    bool

	OptimizesComparison bool

	AlwaysRunIntegration bool // always run integration tests

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

type ValueSizer

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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