Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: 'state' variables and unit testing

by moritz (Cardinal)
on Feb 01, 2014 at 20:57 UTC ( #1072996=note: print w/ replies, xml ) Need Help??


in reply to Re^2: 'state' variables and unit testing
in thread 'state' variables and unit testing

Something like this untestable too

To me it looks like a bug, not just untestable. Tests just reveal the bug.

Let me rephrase my earlier point: APIs are testable or not testable; state variables are just a way to implement an API. state vars are a tool, and neither good nor evil; it's only misuse of state vars (and thus broken APIs) that makes stuff hard to test.


Comment on Re^3: 'state' variables and unit testing

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1072996]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2015-07-03 18:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (55 votes), past polls