home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / testcase.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.2 KB  |  80 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef _testcase_h_
  20. #define _testcase_h_
  21.  
  22. #include "testcasemanager.h"
  23.  
  24. #define TEST1  1
  25. #define TEST2  2
  26.  
  27.  
  28. extern void WhiteBox_DeleteMessage1(CTestCaseManager *tc);
  29. extern void TrialTestCase2(CTestCaseManager *tc);
  30.  
  31. // global variable
  32. class CTestCase;
  33. extern CTestCase QA_TestCase;
  34.  
  35.  
  36. class CTestCase {
  37. private:
  38.     CString m_sTestID;
  39.     CString m_sBaseFile;
  40.     CString m_sLogFile;
  41.     CString m_sResultFile;
  42.     CString m_sBeakerFile;
  43.     CString m_sStartDate;
  44.     CString m_sEndDate;
  45.     CString m_sStartTime;
  46.     CString m_sStartTimeString;
  47.     CString m_sEndTime;
  48.     CString m_sEndTimeString;
  49.     CString m_sManualResult;
  50.     CString m_sExpectedResults;
  51.     CString m_sActualResults;
  52.     BOOL    m_bFileCompareResult;
  53.     BOOL    m_bPhaseTwoResult;
  54.     BOOL    m_bOverallResult;
  55.     BOOL    m_bCreateBaseLine;
  56.     CTestCaseManager *m_TCManager;
  57.     
  58. public :    
  59.     CTestCase() { };
  60.     CTestCase(CTestCaseManager *tc);  // create vars
  61.     ~CTestCase();  // record end time, log result, delete
  62.     void LogResult();  // Appends run times and results to Overall result file
  63.     void LogBeakerResult();
  64.     CString m_GetLogFile() { return m_sLogFile; }
  65.     BOOL FileCompare();
  66.     void QA_Trace(CString msg);
  67.     void QA_LogError(CString msg);
  68.     void DeleteLogFile() { CFile::Remove(m_sLogFile); }
  69.     void WrapUp();
  70.     void PrintToFile(CString& sFile, CString& str);
  71.     void PhaseTwoIsTrue() { m_bPhaseTwoResult = TRUE; }
  72.     void PhaseTwoIsFalse() { m_bPhaseTwoResult = FALSE; }
  73.     void DoWrapup() { m_TCManager->Wrapup(); }
  74. };
  75.  
  76. #endif _testcase_h_
  77.  
  78.  
  79.  
  80.