-
Notifications
You must be signed in to change notification settings - Fork 11
test(llcppsymg): replace test logics with source func #493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
luoliwoshang
merged 6 commits into
xgo-dev:main
from
MeteorsLiu:llcppsymg/use-source-func
Jul 4, 2025
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f13863f
test: replace test logics with source func
MeteorsLiu 86b968c
test: regenerate mock libs in linux
MeteorsLiu c321ead
test: close gen mode
MeteorsLiu 6dfc8f6
test: regenerate mock data for each platform
MeteorsLiu 7904ab2
test: remove unused lib
MeteorsLiu e8860c4
test: remove unused code
MeteorsLiu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #include "c.h" | ||
|
|
||
| char *Foo_Print(const Foo *item) {} | ||
| // config not be a method in llcppg.cfg/symMap | ||
| void Foo_Delete(Foo *item) {} | ||
| // normal function no be a method | ||
| Foo *Foo_ParseWithLength(const char *value, size_t buffer_length) {} | ||
| // only can be a normal function but config be a method,keep output as function | ||
| Foo *Foo_ParseWithSize(const char *value, size_t buffer_length) {} | ||
|
|
||
| Foo *Foo_ignoreFunc() {} | ||
|
|
||
| // config Foo_ForBar to Bar,so Foo_Bar to Bar__1 | ||
| void Foo_Bar() {} | ||
| void Foo_ForBar() {} | ||
|
|
||
| void Foo_Prefix_BarMethod(Foo *item) {} // to BarMethod,but follow config the BarMethod,so it need add prefix | ||
| void Foo_BarMethod(Foo *item) {} // config BarMethod | ||
| void Foo_ForBarMethod(Foo *item) {} // config BarMethod,so it need add suffix | ||
|
|
||
| // first receiver Foo's method,with name 'Parse' | ||
| void Foo_ReceiverParse(Foo *item) {} | ||
| // first function with name 'Parse' | ||
| void Foo_FunctionParse() {} | ||
| // second receiver Foo's method,with name 'Parse', and the next method name is the same,so we need add suffix | ||
| void Foo_ReceiverParse2(Foo *item) {} | ||
| // not same receiver,but same function name,we don't need add suffix | ||
| void Foo_Receiver2Parse2(Foo2 *item) {} |
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #include "cJSON.h" | ||
|
|
||
| CJSON_PUBLIC(char *) | ||
| cJSON_Print(const cJSON *item) {} | ||
| CJSON_PUBLIC(cJSON *) | ||
| cJSON_ParseWithLength(const char *value, size_t buffer_length) {} | ||
| /* Delete a cJSON entity and all subentities. */ | ||
| CJSON_PUBLIC(void) | ||
| cJSON_Delete(cJSON *item) {} |
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #include "cpp.h" | ||
|
|
||
| Foo::Foo(const char *filename) {} | ||
| Foo::Foo(const char *buffer, long buffer_size) {} | ||
| Foo::Foo::~Foo() {} | ||
| int Foo::ParseBar() const {} | ||
| const char *Foo::Get(const char *section, const char *name, | ||
| const char *default_value) const {} | ||
|
|
||
| const char *Foo::MakeBar(const char *section, const char *name) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file added
BIN
+728 Bytes
_xtool/llcppsymg/internal/symg/testdata/gpgerror/darwin/libgpgerror.a
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #include "gpgrt.h" | ||
|
|
||
| const char *gpg_strerror(gpg_error_t err) {} | ||
| int gpg_strerror_r(gpg_error_t err, char *buf, size_t buflen) {} | ||
| const char *gpg_strsource(gpg_error_t err) {} |
Binary file not shown.
Binary file added
BIN
+648 Bytes
_xtool/llcppsymg/internal/symg/testdata/include/darwin/libinclude.a
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #include "temp.h" | ||
|
|
||
| void Foo() {} | ||
| void Foo_Conf() {} | ||
| void Foo_Bar() {} | ||
| static void Foo_Bar_Private() {} | ||
| private void Foo_Bar_Private2() {} |
10 changes: 10 additions & 0 deletions
10
_xtool/llcppsymg/internal/symg/testdata/inireader/INIReader.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #include "INIReader.h" | ||
|
|
||
| __attribute__((visibility("default"))) INIReader::INIReader(const char *filename) {} | ||
| INI_API INIReader::INIReader(const char *buffer, long buffer_size) {} | ||
| INIReader::~INIReader() {} | ||
| INI_API int INIReader::ParseError() const {} | ||
| INI_API const char *INIReader::Get(const char *section, const char *name, | ||
| const char *default_value) const {} | ||
|
|
||
| const char *INIReader::MakeKey(const char *section, const char *name) {} |
Binary file added
BIN
+1.43 KB
_xtool/llcppsymg/internal/symg/testdata/inireader/darwin/libinireader.a
Binary file not shown.
Binary file added
BIN
+1.76 KB
_xtool/llcppsymg/internal/symg/testdata/inireader/linux/libinireader.a
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #include "isl/polynomial.h" | ||
|
|
||
| isl_ctx *isl_pw_qpolynomial_get_ctx(__isl_keep isl_pw_qpolynomial *pwqp) {} |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.