[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] MC/DC coverage explained wrong in the home page?
From:       Richard Hipp <drh () sqlite ! org>
Date:       2011-09-25 17:38:05
Message-ID: CALwJ=MyBt3rn4Crtth-nuEfejJZ_XyZ0sYcbOXrUT4dQ6-vXoA () mail ! gmail ! com
[Download RAW message or body]

On Sat, Sep 24, 2011 at 10:05 PM, Pavel Ivanov <paivanof@gmail.com> wrote:

>
> > Dead code is indicative of a bug. Usually programmers write code only
> > in the expectation that it be run. The same can be said of conditions
> > in an if statement, and what the compiler does to it doesn't change
> > that.
>
> Programmers write code expecting it to be executed, right. But also
> some programs have like 10 or 20 years of history. And all those years
> were spent not only on writing a new code, but also on doing some
> changes to the existing one. And sometimes changes in one place can
> result in a dead code in another. And that doesn't mean that there's a
> bug. It just means that this code is not needed anymore but nobody
> deleted it yet.
>

The testing philosophy of SQLite is "if it isn't tested, it doesn't work."
Or, all code is assumed to be broken unless proven otherwise.  Dead code is
therefore broken code.

The DO-178B philosophy is a little different.  With DO-178B level A, you are
expected to achieve 100% MC/DC using *requirements tests only*.  In other
words, just by running test cases against the requirements document, you
should achieve 100% MC/DC.  If there are untested conditions in your program
after testing all requirements, that means that the program does things
which are not called for the requirements.  That indicates either a bug in
the program, or a deficiency in the requirements.

-- 
D. Richard Hipp
drh@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic