1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _RTL_TRES_HXX_ 25 #define _RTL_TRES_HXX_ 26 27 28 #include <rtl/tres.h> 29 30 //#include <stdarg.h> 31 32 // <namespace_rtl> 33 namespace rtl 34 { 35 /*==========================================================================*/ 36 37 // <class_TestResult> 38 class TestResult 39 { 40 // pointer to testresult structure 41 rtl_TestResult* pData; 42 43 // <private_ctors> 44 TestResult(); 45 TestResult( const TestResult& oRes ); 46 // </private_ctors> 47 48 public: 49 50 51 // <public_ctors> TestResult(const sal_Char * meth,sal_uInt32 flags=0)52 TestResult( const sal_Char* meth, sal_uInt32 flags = 0 ) 53 { 54 pData = rtl_tres_create( meth, flags ); 55 } // </public_ctors> 56 57 // <dtor> ~TestResult()58 ~TestResult() 59 { 60 rtl_tres_destroy( pData ); 61 } 62 // </dtor> 63 64 // <public_methods> getData()65 rtl_TestResult* getData() 66 { 67 return pData; 68 } 69 // <method_state> state(sal_Bool tst_state,const sal_Char * msg=0,const sal_Char * sub=0,sal_Bool verbose=sal_False)70 sal_Bool state( 71 sal_Bool tst_state, 72 const sal_Char* msg = 0, 73 const sal_Char* sub = 0, 74 sal_Bool verbose = sal_False 75 ) 76 { 77 return pData->pFuncs->state_( pData, tst_state, msg, sub, verbose ); 78 } // </method_state> 79 end(sal_Char * msg=0)80 void end( sal_Char* msg = 0 ) 81 { 82 pData->pFuncs->end_( pData, msg ); 83 } // </method_state> 84 }; // </class_TestResult> 85 86 } // </namespace_rtl> 87 #endif 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109