Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 3
    Hmm. It sounds like you think pre and post conditions are completely disconnected from testing. They aren't. Think of pre-conditions as the inputs to your test (or the setup state) and post-conditions as the outputs of your test (or the things to be asserted). Why do you think pre/post conditions are different from the testing aspect of "just writing a program and unit test it"? Commented Mar 21, 2012 at 13:46
  • 6
    C and C++ are extremely different languages. There is no such thing as C(++). Commented Mar 21, 2012 at 14:30
  • 1
    @DeadMG, we are doing C++ but not the plus-plus part (classes and stuff)... Commented Mar 21, 2012 at 14:32
  • 6
    @Charlie: That's not really C++, then, it's C you've compiled with a C++ compiler. Commented Mar 21, 2012 at 14:43
  • 2
    It isn't design by contract, it is Hoare logic en.wikipedia.org/wiki/Hoare_logic It is the first step to axiomatic semantics, and the formal verification of program correctness. Commented Mar 22, 2012 at 19:01