1 /* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18 #ifndef TEXT_TEST_INTERPRETER_H 19 #define TEXT_TEST_INTERPRETER_H 20 21 #ifndef TEST_RESULT_H 22 #include "test_result.h" 23 #endif 24 25 26 //a simple interpreter which outputs a result of testing 27 class text_test_interpreter 28 { 29 protected: 30 //partial interpretations 31 _STRING header(const test_result& result) const; 32 _STRING footer(const test_result& result) const; 33 _STRING successes(const test_result& result) const; 34 _STRING failures(const test_result& result) const; 35 _STRING errors(const test_result& result) const; 36 _STRING problem_vector_string(const _VECTOR(test_problem, unit_test_allocator)& 37 vect) const; 38 _STRING problem_string(const test_problem& problem) const; 39 public: 40 //returns the interpretation of a test result 41 _STRING interpretation(const test_result& result_to_interpret) const; 42 }; 43 44 #endif 45