On Sat, Sep 24, 2011 at 10:05 PM, Pavel Ivanov <paiva...@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 d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users