我写了一个使用MS测试的测试方法。为了测试目的,我写了两个断言。我故意使测试用例失败,但我不知道它失败的哪一部分。Assert.IsTrue(concreteObject.Total == 0, "Value should be initially 0");正如在第一个断言中一样,它将失败。因此,第二个方案也将失败。但是说其中一个是有效的。那么,如何识别哪个断言失败了呢?
提
00001 /* assert.h00003 Written by Stephane Carrez (stcarrez@nerim.fr) 00005 This file is free software; you can redistribute it and/or modify it
00006 under the terms of the GNU General Public License as published by