• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • Dunit初步詳解(2)

    發表于:2011-12-22來源:未知作者:娃娃點擊數: 標簽:dunit
    end; implementation procedure TTestCaseFirst.TestFirst; begin Check(BeTestForm.BeTestFunction(1,3)=3,First Test fail); end; procedure TTestCaseFirst.TestSecond; begin Check(BeTestForm.BeTestFunction(1

      end;

      implementation

      procedure TTestCaseFirst.TestFirst;

      begin

      Check(BeTestForm.BeTestFunction(1,3)=3,'First Test fail');

      end;

      procedure TTestCaseFirst.TestSecond;

      begin

      Check(BeTestForm.BeTestFunction(1,3)=6,'Second Test fail');

      end;

      initialization

      TestFramework.RegisterTest(TTestCaseFirst.Suite);

      end.

      5.修改Project主文件,點擊Project->View Source,查看項目的源碼。並以下面的程序碼取代:

      program TestCaseProject;

      uses

      Forms,

      TestFrameWork,

      GUITestRunner,

      TestUnit in 'TestUnit.pas';

      {$R *.res}

      begin

      Application.Initialize;

      //Application.Run;

      GUITestRunner.RUnRegisteredTests;

      end.

      6.一切搞定,注意一點(很重要):被測單元和測試用例一定要保存在同一個目錄下!

      下面開始運行我們的TestCase.,點擊運行按鈕。

      我們這里有一個TestSecond是錯誤的,所以執行中會有Failures出現!

      下面附上兩個案例的源碼文件!

      附件: 案例.rar (2006-6-15 16:30, 653.91 K)

      Dunit的路徑加載到Delphi中

      TestCase1 運行結果

      TestCase2 運行結果

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>