• @FourPacketsOfPeanuts
    link
    561 month ago

    There are over 600 lines of test code for every line of code in SQLite

    Holy mother of god

      • @[email protected]
        link
        fedilink
        131 month ago

        A limitation of testing is that you can only write tests for cases that you can think of, and cases you can think of ways to write tests for.

        It’s still valuable despite this limitation, of course.

        • @[email protected]
          link
          fedilink
          31 month ago

          That’s not entirely true, e.g. you can do fuzz testing or constrained random testing. Maybe you aren’t including those in “testing”?

          • @[email protected]
            link
            fedilink
            31 month ago

            I was mostly thinking about hand-written tests and manual test procedures, but yeah, fuzzing can help you catch issues as well and you don’t necessarily consciously know about the test cases you put into the system in that case.

            Then again, you have to design the fuzzing input consciously so I guess that’s kind of a “what you can think about”-limitation.

            Good point regardless, thanks

      • @[email protected]
        link
        fedilink
        English
        41 month ago

        You can write shit tests. Finding new bugs doesn’t surprise me. Putting that much effort in does, but 600:1? That’s some serious red flags there. There are only so many variables in a single line of code. How many unhappy paths can there be for a single line?

        • Kogasa
          link
          fedilink
          91 month ago

          SQLite is one of the best tested codebases in existence. Having only so many variables per line means nothing