Possible to deprecate something for consumers of my package **only** - ie not get compile warnings in my unit tests of said package?

What title says...

I want to unit test my deprecated methods, which causes compiler warnings, which annoys me...

1 Like

Not afaik, but would be nice.

IIRC you can deprecate your test method to get the effect you want. Calling a deprecated function from within a deprecated function doesn't warn, and the test harness doesn't care if your test methods are deprecated.

5 Likes