aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/llgcode/draw2d/draw2dpdf/samples_test.go
blob: ca3441f6d15a3c274a70825b4334d2bba4b5ff89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright 2015 The draw2d Authors. All rights reserved.
// created: 26/06/2015 by Stani Michiels
// See also test_test.go

package draw2dpdf_test

import (
	"testing"

	"github.com/llgcode/draw2d"
	"github.com/llgcode/draw2d/samples/android"
	"github.com/llgcode/draw2d/samples/frameimage"
	"github.com/llgcode/draw2d/samples/geometry"
	"github.com/llgcode/draw2d/samples/gopher"
	"github.com/llgcode/draw2d/samples/gopher2"
	"github.com/llgcode/draw2d/samples/helloworld"
	"github.com/llgcode/draw2d/samples/line"
	"github.com/llgcode/draw2d/samples/linecapjoin"
	"github.com/llgcode/draw2d/samples/postscript"
)

func TestSampleAndroid(t *testing.T) {
	test(t, android.Main)
}

// TODO: FillString: w (width) is incorrect
func TestSampleGeometry(t *testing.T) {
	// Set the global folder for searching fonts
	// The pdf backend needs for every ttf file its corresponding
	// json/.z file which is generated by gofpdf/makefont.
	draw2d.SetFontFolder("../resource/font")
	test(t, geometry.Main)
}

func TestSampleGopher(t *testing.T) {
	test(t, gopher.Main)
}

func TestSampleGopher2(t *testing.T) {
	test(t, gopher2.Main)
}

func TestSampleHelloWorld(t *testing.T) {
	// Set the global folder for searching fonts
	// The pdf backend needs for every ttf file its corresponding
	// json/.z file which is generated by gofpdf/makefont.
	draw2d.SetFontFolder("../resource/font")
	test(t, helloworld.Main)
}

func TestSampleFrameImage(t *testing.T) {
	test(t, frameimage.Main)
}

func TestSampleLine(t *testing.T) {
	test(t, line.Main)
}

func TestSampleLineCap(t *testing.T) {
	test(t, linecapjoin.Main)
}

func TestSamplePostscript(t *testing.T) {
	test(t, postscript.Main)
}