2015-07-01 08:34:23 +00:00
|
|
|
// See also test_test.go
|
|
|
|
|
2015-06-30 23:10:32 +00:00
|
|
|
package draw2d_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stanim/draw2d"
|
|
|
|
"github.com/stanim/draw2d.samples"
|
|
|
|
"github.com/stanim/draw2d.samples/android"
|
|
|
|
"github.com/stanim/draw2d.samples/frameimage"
|
|
|
|
"github.com/stanim/draw2d.samples/gopher"
|
|
|
|
"github.com/stanim/draw2d.samples/helloworld"
|
2015-07-01 08:34:23 +00:00
|
|
|
"github.com/stanim/draw2d.samples/line"
|
2015-07-01 12:44:51 +00:00
|
|
|
"github.com/stanim/draw2d.samples/linecapjoin"
|
2015-07-01 13:15:37 +00:00
|
|
|
"github.com/stanim/draw2d.samples/postscript"
|
2015-06-30 23:10:32 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
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
|
|
|
|
draw2d.SetFontFolder(samples.Dir("helloworld", ""))
|
|
|
|
test(t, helloworld.Main)
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestSampleFrameImage(t *testing.T) {
|
|
|
|
test(t, frameimage.Main)
|
|
|
|
}
|
2015-07-01 08:34:23 +00:00
|
|
|
|
|
|
|
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)
|
|
|
|
}
|