????????????г??????TDD???????????????????????C??????????????Check?????Java??JUnit??д??????????????Manual????????????SO????????????
??????????п????????????TDD????????Щ??????????Щ???????????????Check??????????????????????????? checked fixture ?? CK_NOFORK ???????????????????
????Manual??????????? checked fixture??
????We may want multiple tests that all use the same Money. In such cases?? rather than setting up and tearing down objects for each unit test?? it may be convenient to add some setup that is constant across all the tests in a test case. Each such setup/teardown pair is called a test fixture in test-driven development jargon.
?????????????????????????????????????????????????????????????? Test case???????????????????????? unit test ?????????? checked fixture?????????????? setup() ????? teardown() ?????????????????????????????????????á??????????????????????????и????????????setup?????????????????????????????????????
???????“??????”??????????????????????????????????????????????????浹?????е??????????????teardown???ж???????????????????????????? UNchecked fixture??????checked fixture??manual?н?????????
????Checked fixtures run once for each unit test in a test case?? and so they should not be used for expensive setup.
?????????????????????????????????????????????????????ж???????????????????????????????????????????????????????
??????????????????????????????????????????Щ?????????????????в????????????????????????????????????????manual??????????? loop test????????loop test ??ε? loop ?????????????????????????????????????????á?
????????????????? checked fixture ?? Check?????????????й? ??CK_FORK ?? CK_NOFORK??Check????????????????????????????????fork??????????????????????????????????????????????CK_NOFORK???????????????????????????????????????????????????????????????????????ó? CK_NOFORK ???????????????????????Щ?????????????????manual?????????? CK_FORK????????????????????