60 lines
1.4 KiB
Go
60 lines
1.4 KiB
Go
// See also test_test.go
|
|
|
|
package draw2d_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"gopkg.in/llgcode/draw2d.v1"
|
|
"gopkg.in/llgcode/draw2d.v1/samples/android"
|
|
"gopkg.in/llgcode/draw2d.v1/samples/frameimage"
|
|
"gopkg.in/llgcode/draw2d.v1/samples/geometry"
|
|
"gopkg.in/llgcode/draw2d.v1/samples/gopher"
|
|
"gopkg.in/llgcode/draw2d.v1/samples/gopher2"
|
|
"gopkg.in/llgcode/draw2d.v1/samples/helloworld"
|
|
"gopkg.in/llgcode/draw2d.v1/samples/line"
|
|
"gopkg.in/llgcode/draw2d.v1/samples/linecapjoin"
|
|
"gopkg.in/llgcode/draw2d.v1/samples/postscript"
|
|
)
|
|
|
|
func TestSampleAndroid(t *testing.T) {
|
|
test(t, android.Main)
|
|
}
|
|
|
|
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
|
|
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 TestSampleLineCapJoin(t *testing.T) {
|
|
test(t, linecapjoin.Main)
|
|
}
|
|
|
|
func TestSamplePostscript(t *testing.T) {
|
|
test(t, postscript.Main)
|
|
}
|