You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fw-daemon/vendor/github.com/gotk3/gogtk3/gtk/print_test.go

56 lines
1.1 KiB

package gtk
import (
"testing"
)
func init() {
Init(nil)
}
// TestPageSetup tests creating and manipulating PageSetup
func TestPageSetup(t *testing.T) {
_, err := PageSetupNew()
if err != nil {
t.Error(err)
}
}
// TestPaperSize tests creating and manipulating PaperSize
func TestPaperSize(t *testing.T) {
_, err := PaperSizeNew(PAPER_NAME_A4)
if err != nil {
t.Error(err)
}
}
// TestPrintContext tests creating and manipulating PrintContext
// TestPrintOperation tests creating and manipulating PrintOperation
func TestPrintOperation(t *testing.T) {
_, err := PrintOperationNew()
if err != nil {
t.Error(err)
}
}
// TestPrintOperationPreview tests creating and manipulating PrintOperationPreview
// TestPrintSettings tests creating and manipulating PrintSettings
func TestPrintSettings(t *testing.T) {
settings, err := PrintSettingsNew()
if err != nil {
t.Error(err)
}
settings.Set("Key1", "String1")
settings.SetBool("Key2", true)
settings.Set("Key3", "String2")
settings.SetInt("Key4", 2)
settings.ForEach(func(key, value string, ptr uintptr) {
}, 0)
}
// TestPrintContext tests creating and manipulating PrintContext