1// See also test_test.go
2
3package draw2d_test
4
5import (
6	"testing"
7
8	"github.com/llgcode/draw2d"
9	"github.com/llgcode/draw2d/samples/android"
10	"github.com/llgcode/draw2d/samples/frameimage"
11	"github.com/llgcode/draw2d/samples/geometry"
12	"github.com/llgcode/draw2d/samples/gopher"
13	"github.com/llgcode/draw2d/samples/gopher2"
14	"github.com/llgcode/draw2d/samples/helloworld"
15	"github.com/llgcode/draw2d/samples/line"
16	"github.com/llgcode/draw2d/samples/linecapjoin"
17	"github.com/llgcode/draw2d/samples/postscript"
18)
19
20func TestSampleAndroid(t *testing.T) {
21	test(t, android.Main)
22}
23
24func TestSampleGeometry(t *testing.T) {
25	// Set the global folder for searching fonts
26	// The pdf backend needs for every ttf file its corresponding
27	// json/.z file which is generated by gofpdf/makefont.
28	draw2d.SetFontFolder("resource/font")
29	test(t, geometry.Main)
30}
31
32func TestSampleGopher(t *testing.T) {
33	test(t, gopher.Main)
34}
35
36func TestSampleGopher2(t *testing.T) {
37	test(t, gopher2.Main)
38}
39
40func TestSampleHelloWorld(t *testing.T) {
41	// Set the global folder for searching fonts
42	draw2d.SetFontFolder("resource/font")
43	test(t, helloworld.Main)
44}
45
46func TestSampleFrameImage(t *testing.T) {
47	test(t, frameimage.Main)
48}
49
50func TestSampleLine(t *testing.T) {
51	test(t, line.Main)
52}
53
54func TestSampleLineCapJoin(t *testing.T) {
55	test(t, linecapjoin.Main)
56}
57
58func TestSamplePostscript(t *testing.T) {
59	test(t, postscript.Main)
60}
61