From ec5e91b8c97f02707a70a789ba4af84d51394ea5 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 25 Mar 2025 04:42:30 +0900 Subject: system: optimise string formatting Signed-off-by: Ophestra --- system/op_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'system/op_test.go') diff --git a/system/op_test.go b/system/op_test.go index 9d179699..5fb1beb0 100644 --- a/system/op_test.go +++ b/system/op_test.go @@ -37,15 +37,17 @@ func TestTypeString(t *testing.T) { {system.EX11, system.EX11.String()}, {system.EDBus, system.EDBus.String()}, {system.EPulse, system.EPulse.String()}, - {system.User, "User"}, - {system.Process, "Process"}, + {system.User, "user"}, + {system.Process, "process"}, + {system.User | system.Process, "user, process"}, + {system.EWayland | system.User | system.Process, "wayland, user, process"}, + {system.EX11 | system.Process, "x11, process"}, } for _, tc := range testCases { t.Run("label type string "+tc.want, func(t *testing.T) { if got := system.TypeString(tc.e); got != tc.want { - t.Errorf("TypeString(%d) = %v, want %v", - tc.e, + t.Errorf("TypeString: %q, want %q", got, tc.want) } }) -- cgit v1.3.1