Click here to Skip to main content
15,890,973 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 4:54
professionalJeremy Falcon21-Apr-24 4:54 
GeneralRe: Unit Testing... yay or nay? Pin
Greg Utas21-Apr-24 5:32
professionalGreg Utas21-Apr-24 5:32 
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 
Daniel Pfeffer wrote:
IMO, it only makes sense to do unit testing when the inputs & outputs from a function/module can be specified.
Fo sho, that's actually a unit test. There other type of larger tests (functional tests) that get a bit more abstract, which one can make a case for or against. But, a unit test should test a very small unit. Typically that will equate to a routine, um... unless you have 5 page long functions. Laugh | :laugh:
Daniel Pfeffer wrote:
In cases where the output is not easy to check (for example a trigonometric function), exhaustive testing is impractical. In this case, only very simple "sanity" tests can be performed.
Keep in mind, I don't know trig like at all... but most testing frameworks allow you to test all kinds of output. If by not being able to test trig you mean like a picture on the screen, you can even test that too whether it's against a fixture or something else. Or perhaps test the routine before it gets sent to a renderer than then also visually compare and so on. It's like riding a bike, the more you do it the mo' easy it becomes to test.
Jeremy Falcon

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 
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 

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.