File: print_test.go

package info (click to toggle)
golang-github-gotk3-gotk3 0.6.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,392 kB
  • sloc: ansic: 914; makefile: 4
file content (55 lines) | stat: -rw-r--r-- 1,143 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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) {
	})
}

// TestPrintContext tests creating and manipulating PrintContext