在vs2008中创建单元测试 一,打开vs2008,创建一个类库VSTSDemo.因为我在学习的时候用的就是vs2008,其它版本的vs,方法应该差不多,大家自己研究吧 :) 删除掉默认生成的类,然后创建一个LogonInfo类,然后我们在这个类中写一个很简单的获取最大值的方法GetMax(int[] aryNum).方法的代码如下: namespace VSTSDemo{ public class LogonInfo { public int GetMax(int[]…
代码覆盖率 代码覆盖率测试一般包括行覆盖,条件覆盖,FSM覆盖,翻转覆盖率等.在不同的代码级别有不同的覆盖率,Behavioral code包含line+condition+path(branch)+FSM:在RTL code包含line+condition+path+toggle+FSM:Gate-level Code只包含Toggle覆盖率. What is Code Coverage? Have all the line of the RTL been stimulated? Have a…