I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
In a situation like the one you gave as an example, the tests aren't needed - they're verifying that stuff works that's natively part of the language. I know it's a simple example, but if you don't add anything, why would you need the tests? Or the namespace for that matter? Wouldn't the "Good" variant be nothing at all?
Learn something new every day.
- I am a senior software engineer working in industry, teaching and writing on software design, SOLID principles, DDD and TDD.
Location
Buenos Aires
Education
Computer Science Degree at Universidad de Buenos Aires
In a situation like the one you gave as an example, the tests aren't needed - they're verifying that stuff works that's natively part of the language. I know it's a simple example, but if you don't add anything, why would you need the tests? Or the namespace for that matter? Wouldn't the "Good" variant be nothing at all?
That is the point !!