Commit Graph

46 Commits

Author SHA1 Message Date
luoliwoshang
e11ae0e21b test: add comprehensive tests and CI for export feature
Add extensive test coverage, demo program, and CI integration for
//export with different names feature:

Unit Tests (cl/builtin_test.go):
- TestHandleExportDiffName: core functionality with 4 scenarios
  * Different names with enableExportRename
  * Same names with enableExportRename
  * Different names with spaces in export directive
  * Matching names without enableExportRename
- TestInitLinknameByDocExportDiffNames: flag behavior verification
  * Export with different names when enabled
  * Export with same name when enabled
  * Normal linkname directives
- TestInitLinkExportDiffNames: edge case handling
  * Symbol not found in decl packages (silent handling)

Demo (_demo/embed/export/):
- Example program demonstrating various export patterns
- Verification script testing both embedded and non-embedded targets
- Documents expected behavior and error cases

CI Integration (.github/workflows/llgo.yml):
- Add export demo to embedded target tests
- Ensure feature works correctly across platforms
- Catch regressions in future changes

The tests verify:
✓ Different names work with -target flag
✓ Same names work in all cases
✓ Different names fail without -target flag
✓ Proper error messages for invalid exports
✓ Silent handling for decl packages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 18:52:58 +08:00
luoliwoshang
04f613dd15 cl/test:asmFull error 2025-08-21 23:44:46 +08:00
Li Jie
ed366568b4 move out c/cpp/py 2025-04-03 16:26:11 +08:00
Li Jie
1172e5bdce build: separate compiler and libs 2025-01-08 14:59:01 +08:00
visualfc
38091b2021 ssa: func Instantiate 2024-10-30 21:39:30 +08:00
visualfc
2feb3e1d7a ssa: prog.linkname; abi llvm.LinkOnceAnyLinkage always 2024-08-20 21:11:27 +08:00
Aofei Sheng
482f796bad ssa: add llgo:link support to Builder.abiMthd 2024-08-04 11:00:31 +08:00
xushiwei
2b08e3604d TestConstBool; Test allocaCStrs 2024-07-13 12:47:29 +08:00
xushiwei
e138951e9e c.AllocaCStrs; ssa: AllocaU/ArrayAlloca/Times/AllocaCStrs 2024-07-12 21:40:13 +08:00
xushiwei
3f344b55bb TestToBackground 2024-07-09 12:58:51 +08:00
xushiwei
e55e90db1a py.Str; py.FromCStr/FromCStrAndLen/FromGoString 2024-07-04 18:34:00 +08:00
xushiwei
fe18c35dab patch: Clone/Merge 2024-06-28 15:14:30 +08:00
xushiwei
bfa4e08a4e cl: c.Func (llgo.funcAddr); demo: cppintf (how to use c++ interface) 2024-06-21 23:44:56 +08:00
xushiwei
4a1712f4cd llgo.string (llgo/ssa.MakeString) fix 2024-06-20 00:30:36 +08:00
xushiwei
ebc9711309 TestErrImport 2024-06-17 04:11:31 +08:00
xushiwei
b4794dc541 patch sync/atomic; typepatch fix (don't change types) 2024-06-17 03:38:01 +08:00
xushiwei
68a63bb280 TestIgnoreName 2024-06-16 23:11:28 +08:00
xushiwei
7d2f68c5e4 TestErrBuiltin 2024-06-16 16:44:22 +08:00
xushiwei
dcb8eb7d6d TestCollectSkipNames 2024-06-15 18:22:26 +08:00
xushiwei
b70b868552 TestReplaceGoName 2024-06-13 03:00:55 +08:00
xushiwei
45f470e3a7 merge upstream 2024-06-12 21:02:26 +08:00
xushiwei
5e5d149ca5 cl: isVargs support defer/go 2024-06-11 10:35:27 +08:00
Li Jie
c8cc2dac04 cl: test decl only pkg kind 2024-06-09 19:23:22 +08:00
xushiwei
abf461a049 TestErrBuiltin 2024-06-08 15:17:49 +08:00
xushiwei
91513a12b4 llgo/ssa: refactor python related names (PyXXX) 2024-05-15 17:19:47 +08:00
xushiwei
b133f70b6b build: PkgLinkExtern 2024-05-09 14:51:01 +08:00
xushiwei
a13d9a92bd TestErrAllocaCStr 2024-05-09 06:55:07 +08:00
xushiwei
b0b38c02b2 TestRecvTypeName 2024-05-08 15:01:50 +08:00
xushiwei
14cf646c47 cl: importPkg support linkname of method 2024-05-08 13:12:22 +08:00
xushiwei
073cac8530 TestErrInitLinkname 2024-05-07 17:39:12 +08:00
xushiwei
bc3dca45e7 importPkg refactor: don't depend token.Pos 2024-05-07 17:31:25 +08:00
xushiwei
244da4b10a disable TestErrCompileValue 2024-05-05 21:38:58 +08:00
xushiwei
889fc8b6a9 TestErrCompileValue 2024-05-04 17:59:28 +08:00
xushiwei
330cb22351 TestErrCompileInstrOrValue 2024-05-03 18:35:14 +08:00
xushiwei
d462e548b1 TestErrAdvance 2024-05-02 00:04:37 +08:00
xushiwei
8f15fd45f2 initLinkname: support var 2024-05-01 20:33:46 +08:00
xushiwei
a6d31ad8b8 TestErrAlloca 2024-04-29 18:55:09 +08:00
xushiwei
4eb2ddaf15 cl: support llgo.cstr 2024-04-29 13:59:06 +08:00
xushiwei
637db665c3 TestPkgKindOf 2024-04-29 11:58:48 +08:00
xushiwei
bb1da81a01 build: skip PkgDeclOnly 2024-04-29 11:34:59 +08:00
xushiwei
d4ddc61a9f cl: TestPkgNoInit/TestPkgKind 2024-04-29 10:06:47 +08:00
xushiwei
b45172bef1 cl: pkgKind = normal/noinit/decl 2024-04-29 09:51:32 +08:00
xushiwei
f09d5bd155 TestIsAny, TestIntVal 2024-04-28 22:38:04 +08:00
xushiwei
f86cd74a98 cl: go:linkname specifies call convention by C.xxx 2024-04-26 13:09:24 +08:00
xushiwei
2c3e1d1055 cl: TestImport/TestVarOf 2024-04-26 05:39:15 +08:00
xushiwei
773ae2c8c6 llgo run: strlen 2024-04-26 04:44:49 +08:00