draw2d/draw2dpdf/samples_test.go

51 lines
1.2 KiB
Go
Raw Normal View History

2015-07-10 13:11:19 +00:00
// Copyright 2015 The draw2d Authors. All rights reserved.
// created: 26/06/2015 by Stani Michiels
// See also test_test.go
2015-07-06 22:25:24 +00:00
package draw2dpdf_test
import (
"testing"
2015-07-06 22:07:44 +00:00
"github.com/llgcode/draw2d"
2015-07-10 00:07:18 +00:00
"github.com/llgcode/draw2d/samples/android"
"github.com/llgcode/draw2d/samples/frameimage"
"github.com/llgcode/draw2d/samples/gopher"
"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)
}
func TestSampleGopher(t *testing.T) {
test(t, gopher.Main)
}
func TestSampleHelloWorld(t *testing.T) {
// Set the global folder for searching fonts
2015-07-10 00:07:18 +00:00
// 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)
}
2015-07-01 12:44:51 +00:00
func TestSampleLineCap(t *testing.T) {
test(t, linecapjoin.Main)
}
2015-07-01 13:15:37 +00:00
func TestSamplePostscript(t *testing.T) {
test(t, postscript.Main)
}