LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
TestCase.h
Go to the documentation of this file.
1// Copyright 2002-2013 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6/***************************************************************************
7 * Copyright (C) 2004 by Benoit Mathieu *
8 * mathieub@zoe.cea.fr *
9 * *
10 ***************************************************************************/
11#ifndef LIMA_COMMON_TGV_TESTCASE_H
12#define LIMA_COMMON_TGV_TESTCASE_H
13
15
16#include <string>
17#include <map>
18#include <list>
19#include <set>
20#include <stdexcept>
21#include "common/LimaCommon.h"
22
23namespace Lima
24{
25namespace Common
26{
27namespace TGV
28{
29 typedef std::map<std::string,std::string> SimpleValCallParams;
30 typedef std::map<std::string,std::list<std::string> > MultiValCallParams;
31 typedef std::map<std::string,std::map<std::string,std::string> > MapValCallParams;
32
37{
38 TestCase() : tests() {};
39 friend LIMA_TGV_EXPORT std::ostream & operator << (std::ostream &os, const TestCase& tc);
40 void print(std::ostream &os) const;
41 // recuperation de la valeur du parametre key
42 std::string getParam( const std::string& key ) const;
43 // recuperation de la liste des valeurs pour le parametre multivalue key
44 void getList( const std::string& key, std::list<std::string >& list ) const;
45 void getMap( const std::string& key, std::map<std::string,std::string >& map ) const;
46
47 struct TestUnit
48 {
49 TestUnit() : id(),trace(),comment(),left(),op(),right(),conditional(false) {};
50 friend LIMA_TGV_EXPORT std::ostream & operator << (std::ostream &os, const TestUnit& tcu);
51 void print(std::ostream &os) const;
52 std::string id;
53 std::string trace;
54 std::string comment;
55 std::string left;
56 std::string op;
57 std::string right;
59 };
60
64
65 std::string id;
66 std::string type;
67 std::string explanation;
68 std::list<TestUnit> tests;
69
70};
71
72LIMA_TGV_EXPORT std::ostream& operator<<(std::ostream& out,const std::set<std::string>& s);
73
74
75} // TGV
76} // Common
77} // Lima
78
79#endif
QDebug & operator<<(QDebug &qd, const std::string &str)
Definition QsLog.cpp:39
#define LIMA_TGV_EXPORT
std::map< std::string, std::map< std::string, std::string > > MapValCallParams
Definition TestCase.h:31
std::map< std::string, std::string > SimpleValCallParams
Definition TestCase.h:29
std::map< std::string, std::list< std::string > > MultiValCallParams
Definition TestCase.h:30
std::ostream & operator<<(std::ostream &os, const Lima::Common::TGV::TestCase &tc)
Definition TestCase.cpp:28
NAUTITIA.
MultiValCallParams multiValCallParams
Definition TestCase.h:62
SimpleValCallParams simpleValCallParams
Definition TestCase.h:61
MapValCallParams mapValCallParams
Definition TestCase.h:63
std::list< TestUnit > tests
Definition TestCase.h:68