Fix codec fallback and generate type imports
[govpp.git] / binapigen / generator_test.go
index ddbda99..9e5b342 100644 (file)
@@ -18,6 +18,15 @@ import (
        "testing"
 )
 
+func TestModule(t *testing.T) {
+       const expected = "git.fd.io/govpp.git/examples/binapi"
+
+       impPath := resolveImportPath("../examples/binapi")
+       if impPath != expected {
+               t.Fatalf("expected: %q, got: %q", expected, impPath)
+       }
+}
+
 func TestBinapiTypeSizes(t *testing.T) {
        tests := []struct {
                name    string