Technical means to improve program quality: Test, DBC

Source: Internet
Author: User
Currently, we can think of the following:

Unit 1 Test
2 DBC-design by contract

Unit Tests are widely used. It seems that the application of DBC is not enough. I searched for it today and Microsoft provided a spec #, which looks pretty good. After I installed it, vs crashed and there were very few online materials. It seems that it is not mature yet. I wonder if there is any alternative.

DBC can checkCodeYou can avoid many errors efficiently by calling parameter errors.

Currently, only argumentexception can be generated by yourself. I personally think that every method should check the parameters. It seems that there is an early error principle, although it seems tedious.
We hope we can use DBC early.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.