OTest2
A C++ testing framework
assertionannotation.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Ondrej Starek
3  *
4  * This file is part of OTest2.
5  *
6  * OTest2 is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License,
9  * or (at your option) any later version.
10  *
11  * OTest2 is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14  * License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with OTest2. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef OTest2__INCLUDE_OTEST2_ASSERTIONANNOTATION_H_
21 #define OTest2__INCLUDE_OTEST2_ASSERTIONANNOTATION_H_
22 
23 #ifndef OTEST2_PARSER_ACTIVE
24 
25 #define TEST_ASSERTION_MARK(class_, method_)
26 #define TEST_ASSERTION_MARK_TMPL(class_, method_)
27 #define TEST_ASSERTION_EXPR_MARK(class_, generic_method_, comparison_method_)
28 
29 #else /* -- OTEST2_PARSER_ACTIVE */
30 
31 #define TEST_ASSERTION_MARK(class_, method_) __attribute__((annotate("otest2::assertion(" #class_ ";" #method_ ")")))
32 #define TEST_ASSERTION_MARK_TMPL(class_, method_) __attribute__((annotate("otest2::assertion(" class_ ";" method_ ")")))
33 #define TEST_ASSERTION_EXPR_MARK(class_, generic_method_, comparison_method_) __attribute__((annotate("otest2::assertionExpr(" class_ ";" generic_method_ ";" comparison_method_ ")")))
34 
35 #endif /* -- OTEST2_PARSER_ACTIVE */
36 
37 #endif /* -- OTest2__INCLUDE_OTEST2_ASSERTIONANNOTATION_H_ */