Skip to content

feat(rules)!: replace coco_generate's mocks with coco_package's cpp_mocks and csharp_mocks - #257

Open
GPLeemrijse wants to merge 1 commit into
feat/package-attributesfrom
fix/generate-mocks
Open

GPLeemrijse wants to merge 1 commit into
feat/package-attributesfrom
fix/generate-mocks

Conversation

@GPLeemrijse

@GPLeemrijse GPLeemrijse commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

mocks = True never reached popili, so it only worked when generateMocks was also set in Coco.toml, and nothing documented that. It is replaced by the coco_package attributes cpp_mocks and csharp_mocks, which mirror generator.cpp.generateMocks / generator.csharp.generateMocks like the other generator attributes (#269) and declare the *Mock.* outputs. The README table now lists them. Passing popili's --mocks is not possible: --mocks=none makes popili write only the mocks and none of the regular code. We therefore never pass the flag and all this attribute does is declare the outputs. C has no mocks setting, so test/c_mocks_unsupported is gone.

Breaking: replace mocks = True on the coco_generate with cpp_mocks = "GMock" (or "GMockNumberMacros") on its coco_package, matching Coco.toml; for a C# coco_generate, with csharp_mocks = "NSubstitute".

@GPLeemrijse
GPLeemrijse added this pull request to stack #267 November 6, 2026 16:07
@GPLeemrijse
GPLeemrijse removed this pull request from stack #267 November 6, 2026 17:39
@GPLeemrijse GPLeemrijse changed the title feat(rules)!: replace coco_generate's mocks with cpp_mocks and csharp_mocks feat(rules)!: replace coco_generate's mocks with coco_package's cpp_mocks and csharp_mocks Nov 6, 2026
@GPLeemrijse
GPLeemrijse changed the base branch from main to feat/package-attributes November 6, 2026 17:39
@GPLeemrijse
GPLeemrijse added this pull request to stack #270 November 6, 2026 17:40
…ocks and csharp_mocks

The attributes mirror generator.cpp.generateMocks and generator.csharp.generateMocks
and only declare the mock outputs; passing popili's --mocks is not possible while
--mocks=none suppresses the regular generated code.
@GPLeemrijse
GPLeemrijse marked this pull request as ready for review November 6, 2026 18:26
@GPLeemrijse
GPLeemrijse requested a review from tomgr November 6, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants