Click here to Skip to main content
15,890,995 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon21-Apr-24 16:24
professionalJeremy Falcon21-Apr-24 16:24 
GeneralRe: Unit Testing... yay or nay? Pin
haughtonomous21-Apr-24 23:07
haughtonomous21-Apr-24 23:07 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon22-Apr-24 4:24
professionalJeremy Falcon22-Apr-24 4:24 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon20-Apr-24 9:19
professionalJeremy Falcon20-Apr-24 9:19 
AnswerRe: Unit Testing... yay or nay? Pin
Daniel Pfeffer20-Apr-24 10:25
professionalDaniel Pfeffer20-Apr-24 10:25 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon20-Apr-24 10:34
professionalJeremy Falcon20-Apr-24 10:34 
GeneralRe: Unit Testing... yay or nay? Pin
Daniel Pfeffer20-Apr-24 15:15
professionalDaniel Pfeffer20-Apr-24 15:15 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon21-Apr-24 5:02
professionalJeremy Falcon21-Apr-24 5:02 
Daniel Pfeffer wrote:
One can only test a trigonometric function by comparing its results to the results of another implementation coded using a different approximation.
There's nothing preventing you from unit testing that. It's call mocking and just about every testing framework supports that. Testing approximations with even random values is completely doable in just about any testing framework.
Daniel Pfeffer wrote:
One can perform spot checks by comparing the results to known result calculated by another implementation, but that is hardly an exhaustive test of one's implementation.
There's always more code to write a unit test even if you're testing how to cross the street with grandma. That's not the point. The point is, it's worth it. And tests are an art just like software development, it's as exhaustive as you make it. Just because I don't know trig, doesn't mean I don't know things like cryptography and randomness. You can test that. Promise.

But, let's pretend you can't test that one tiny part. Just for the sake of argument. You can still test 80-90% of the rest of the application.

Edit: Btw, I hope this post didn't come across as sour man. I never know these days, and well most online chats are... you know. Unsure | :~
Jeremy Falcon


modified 21-Apr-24 11:20am.

GeneralRe: Unit Testing... yay or nay? Pin
Daniel Pfeffer21-Apr-24 22:31
professionalDaniel Pfeffer21-Apr-24 22:31 
GeneralRe: Unit Testing... yay or nay? Pin
haughtonomous21-Apr-24 23:12
haughtonomous21-Apr-24 23:12 
GeneralRe: Unit Testing... yay or nay? Pin
Daniel Pfeffer22-Apr-24 4:30
professionalDaniel Pfeffer22-Apr-24 4:30 
AnswerRe: Unit Testing... yay or nay? Pin
Ravi Bhavnani20-Apr-24 10:48
professionalRavi Bhavnani20-Apr-24 10:48 
GeneralRe: Unit Testing... yay or nay? Pin
Daniel Pfeffer20-Apr-24 15:28
professionalDaniel Pfeffer20-Apr-24 15:28 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon21-Apr-24 5:07
professionalJeremy Falcon21-Apr-24 5:07 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon21-Apr-24 5:06
professionalJeremy Falcon21-Apr-24 5:06 
GeneralRe: Unit Testing... yay or nay? Pin
Ravi Bhavnani21-Apr-24 10:18
professionalRavi Bhavnani21-Apr-24 10:18 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon21-Apr-24 16:18
professionalJeremy Falcon21-Apr-24 16:18 
JokeRe: Unit Testing... yay or nay? Pin
Daniel Pfeffer21-Apr-24 22:22
professionalDaniel Pfeffer21-Apr-24 22:22 
AnswerRe: Unit Testing... yay or nay? Pin
lmoelleb20-Apr-24 22:39
lmoelleb20-Apr-24 22:39 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon21-Apr-24 4:51
professionalJeremy Falcon21-Apr-24 4:51 
AnswerRe: Unit Testing... yay or nay? Pin
Nelson Goncalves Oct202221-Apr-24 20:31
Nelson Goncalves Oct202221-Apr-24 20:31 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon22-Apr-24 4:08
professionalJeremy Falcon22-Apr-24 4:08 
AnswerRe: Unit Testing... yay or nay? Pin
Private Dobbs21-Apr-24 20:46
Private Dobbs21-Apr-24 20:46 
GeneralRe: Unit Testing... yay or nay? Pin
Jeremy Falcon22-Apr-24 4:09
professionalJeremy Falcon22-Apr-24 4:09 
AnswerRe: Unit Testing... yay or nay? Pin
DT Bullock21-Apr-24 22:55
DT Bullock21-Apr-24 22:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.