POV-Ray : Newsgroups : povray.off-topic : Unit tests : Re: Unit tests Server Time
4 Sep 2024 03:16:04 EDT (-0400)
  Re: Unit tests  
From: Orchid XP v8
Date: 3 Jun 2010 14:41:22
Message: <4c07f752@news.povray.org>
Darren New wrote:
> Thinking on it a bit, it sounds like unit testing is just a way to add 
> Eiffel-style programming-by-contract to your code without any actual 
> language support for it.

I thought the term was "design by contract"?

Well whatever. Contracts seem like a nice idea; you make it clear who's 
supposed to check for error conditions - whether it's supposed to be the 
caller or the callee. And you can enforce it by enabling checks at 
runtime. Having said that, I don't recall using it much myself in my own 
code.

On top of that, any kind of testing is going to be easier if a 
function's output depends only on its current inputs...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.