diff --git a/cl/_testmockc/function/in.h b/cl/_testc/function/in.h similarity index 100% rename from cl/_testmockc/function/in.h rename to cl/_testc/function/in.h diff --git a/cl/_testmockc/function/out.go b/cl/_testc/function/out.go similarity index 100% rename from cl/_testmockc/function/out.go rename to cl/_testc/function/out.go diff --git a/cl/_testmockc/inline/in.cfg b/cl/_testc/inline/in.cfg similarity index 100% rename from cl/_testmockc/inline/in.cfg rename to cl/_testc/inline/in.cfg diff --git a/cl/_testmockc/inline/in.h b/cl/_testc/inline/in.h similarity index 100% rename from cl/_testmockc/inline/in.h rename to cl/_testc/inline/in.h diff --git a/cl/_testmockc/inline/out.go b/cl/_testc/inline/out.go similarity index 100% rename from cl/_testmockc/inline/out.go rename to cl/_testc/inline/out.go diff --git a/cl/_testmockc/type/in.cfg b/cl/_testc/type/in.cfg similarity index 100% rename from cl/_testmockc/type/in.cfg rename to cl/_testc/type/in.cfg diff --git a/cl/_testmockc/type/in.h b/cl/_testc/type/in.h similarity index 100% rename from cl/_testmockc/type/in.h rename to cl/_testc/type/in.h diff --git a/cl/_testmockc/type/out.go b/cl/_testc/type/out.go similarity index 100% rename from cl/_testmockc/type/out.go rename to cl/_testc/type/out.go diff --git a/cl/_testmockcpp/fields/in.h b/cl/_testcpp/fields/in.h similarity index 100% rename from cl/_testmockcpp/fields/in.h rename to cl/_testcpp/fields/in.h diff --git a/cl/_testmockcpp/fields/out.go b/cl/_testcpp/fields/out.go similarity index 100% rename from cl/_testmockcpp/fields/out.go rename to cl/_testcpp/fields/out.go diff --git a/cl/_testmockcpp/inline/in.cfg b/cl/_testcpp/inline/in.cfg similarity index 100% rename from cl/_testmockcpp/inline/in.cfg rename to cl/_testcpp/inline/in.cfg diff --git a/cl/_testmockcpp/inline/in.h b/cl/_testcpp/inline/in.h similarity index 100% rename from cl/_testmockcpp/inline/in.h rename to cl/_testcpp/inline/in.h diff --git a/cl/_testmockcpp/inline/out.go b/cl/_testcpp/inline/out.go similarity index 100% rename from cl/_testmockcpp/inline/out.go rename to cl/_testcpp/inline/out.go diff --git a/cl/_testmockcpp/methods/in.h b/cl/_testcpp/methods/in.h similarity index 100% rename from cl/_testmockcpp/methods/in.h rename to cl/_testcpp/methods/in.h diff --git a/cl/_testmockcpp/methods/out.go b/cl/_testcpp/methods/out.go similarity index 100% rename from cl/_testmockcpp/methods/out.go rename to cl/_testcpp/methods/out.go diff --git a/cl/_testmockcpp/overload_fn/in.h b/cl/_testcpp/overload_fn/in.h similarity index 100% rename from cl/_testmockcpp/overload_fn/in.h rename to cl/_testcpp/overload_fn/in.h diff --git a/cl/_testmockcpp/overload_fn/out.go b/cl/_testcpp/overload_fn/out.go similarity index 100% rename from cl/_testmockcpp/overload_fn/out.go rename to cl/_testcpp/overload_fn/out.go diff --git a/cl/_testcpp/overload_mthd/in.h b/cl/_testcpp/overload_mthd/in.h new file mode 100644 index 00000000..2be0df95 --- /dev/null +++ b/cl/_testcpp/overload_mthd/in.h @@ -0,0 +1,6 @@ +class bar +{ +public: + unsigned f(int a); + void f(); +}; diff --git a/cl/_testcpp/overload_mthd/out.go b/cl/_testcpp/overload_mthd/out.go new file mode 100644 index 00000000..33d0c8d9 --- /dev/null +++ b/cl/_testcpp/overload_mthd/out.go @@ -0,0 +1,17 @@ +package foo + +import "github.com/goplus/lib/c" + +const XGoPackage = true + +type Bar struct { +} + +// llgo:link (*Bar).F__1 C._ZN3bar1fEi +func (this *Bar) F__1(a c.Int) c.Uint { + return 0 +} + +// llgo:link (*Bar).F__0 C._ZN3bar1fEv +func (this *Bar) F__0() { +} diff --git a/cl/_testmockcpp/struct/in.h b/cl/_testcpp/struct/in.h similarity index 100% rename from cl/_testmockcpp/struct/in.h rename to cl/_testcpp/struct/in.h diff --git a/cl/_testmockcpp/struct/out.go b/cl/_testcpp/struct/out.go similarity index 100% rename from cl/_testmockcpp/struct/out.go rename to cl/_testcpp/struct/out.go diff --git a/cl/compile_test.go b/cl/compile_test.go index 5443e728..91cf20e7 100644 --- a/cl/compile_test.go +++ b/cl/compile_test.go @@ -82,12 +82,12 @@ func testFromDir(t *testing.T, sel, relDir string, lang cl.Language) { }) } -func TestMockC(t *testing.T) { - testFromDir(t, "", "./_testmockc", cl.LanguageC) +func TestC(t *testing.T) { + testFromDir(t, "", "./_testc", cl.LanguageC) } -func TestMockCpp(t *testing.T) { - testFromDir(t, "", "./_testmockcpp", cl.LanguageCXX) +func TestCpp(t *testing.T) { + testFromDir(t, "", "./_testcpp", cl.LanguageCXX) } // -----------------------------------------------------------------------------