aboutsummaryrefslogtreecommitdiffstats
path: root/binapigen/binapigen_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'binapigen/binapigen_test.go')
-rw-r--r--binapigen/binapigen_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/binapigen/binapigen_test.go b/binapigen/binapigen_test.go
index 2fbd163..9a25420 100644
--- a/binapigen/binapigen_test.go
+++ b/binapigen/binapigen_test.go
@@ -53,3 +53,20 @@ func TestGenerator(t *testing.T) {
})
}
}
+
+func TestSanitize(t *testing.T) {
+ tests := []struct {
+ name string
+ expected string
+ }{
+ {"interface", "interfaces"},
+ }
+ for _, test := range tests {
+ t.Run(test.name, func(t *testing.T) {
+ s := sanitizedName(test.name)
+ if s != test.expected {
+ t.Fatalf("expected: %q, got: %q", test.expected, s)
+ }
+ })
+ }
+}