What is with these draconian rules of having any limit at all? There are tons of edge cases where allowing a 100k line of text would totally make sense to most developers.
Are the tools at Google and elsewhere unable to diff code if a line exceeds some arbitrary width?
The tools at Google are perfectly capable of diffing lines of arbitrary width.
Those in charge of the C++ style guide choose not to allow them without strong justification. In practice, you just convince your reviewer and move on. Most reviewers are reasonable, but edge cases a where it is needed are rare.
I don’t especially like it, but in terms of annoying style issues, it is very far down the list, especially when the tooling handles it all for you via auto formatting and whatnot.
Sure. Unit test where you have hundreds of signature specimens which need to be evaluated against graphics processing code. Maintaining a separate list of binary files for each resource was a mess for us. Inline base64 string in each unit test method containing the exact specimen was way more convenient. These lines are long but cause no trouble for IDE responsiveness or our github tooling.
I think maintaining a directory of binary files and using it at runtime is a lot better in the long run. Either through a separate build step which embeds them into the test binary. Or via proper env setup where tests actually know how to find the data in the file system.
At the very least you can inspect your test data easily without having to extract it from base64-encoded strings.
Current approach may be working for your team, but I can totally see why a company which has a dedicated team working on build and testing infra, prefers a slightly more complex approach. It requires one-off investment in tooling which can be payed off very soon given enough people using it.
Why does it need to be in the same test file at all? That sounds like a test resource that should be in some kind of test material/resources folder where it can be read from.
Of course you can embed binary files as base64, but have you thought if you should
Are the tools at Google and elsewhere unable to diff code if a line exceeds some arbitrary width?