mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app: properly initialize editorState for tests
Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu> Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
committed by
Elias Naur
parent
0c145b3815
commit
a274f6fe0f
@@ -6,6 +6,7 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"gioui.org/f32"
|
||||
"testing"
|
||||
"unicode/utf8"
|
||||
|
||||
@@ -40,6 +41,7 @@ func FuzzIME(f *testing.F) {
|
||||
r.Frame(gtx.Ops)
|
||||
|
||||
var state editorState
|
||||
state.Selection.Transform = f32.AffineId()
|
||||
const (
|
||||
cmdReplace = iota
|
||||
cmdSelect
|
||||
@@ -139,6 +141,7 @@ func FuzzIME(f *testing.F) {
|
||||
|
||||
func TestEditorIndices(t *testing.T) {
|
||||
var s editorState
|
||||
s.Selection.Transform = f32.AffineId()
|
||||
const str = "Hello, 😀"
|
||||
s.Snippet = key.Snippet{
|
||||
Text: str,
|
||||
|
||||
Reference in New Issue
Block a user