Timeline for Are simple lambdas testable?
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 3, 2022 at 20:06 | comment | added | candied_orange | @Flater updated. Better now? | |
| Mar 3, 2022 at 20:03 | history | edited | candied_orange | CC BY-SA 4.0 | added 6 characters in body |
| Mar 3, 2022 at 19:30 | history | edited | candied_orange | CC BY-SA 4.0 | added 22 characters in body |
| Mar 2, 2022 at 16:42 | comment | added | candied_orange | @Caleth same is true in Java. What difference does that make? | |
| Mar 2, 2022 at 10:17 | comment | added | Caleth | I'm not sure about other languages, but in C++ you simply can't unit test a lambda in-situ. You can only unit test a different lambda, because each lambda expression defines a unique class type. | |
| Mar 1, 2022 at 18:55 | vote | accept | DaCool1 | ||
| Mar 1, 2022 at 16:23 | comment | added | candied_orange | @Flater true, if the behavior is critical then even if the logic is simple you can justify regression tests, integration tests, and acceptance tests. What you should avoid is testing for no better reason then because you don't trust that string concatenation works. Interesting logic though needs testing even if it doesn't show up in the requirements. Question didn't specify any requirements and this code isn't interesting. | |
| Mar 1, 2022 at 8:42 | comment | added | Flater | That being said though, if the software requirements specify an exact message, testing may be warranted. This matters for integrated components where the value is not merely meant for human readability. | |
| Mar 1, 2022 at 6:06 | history | answered | candied_orange | CC BY-SA 4.0 |