Debian Codegraph @

test/unit/types-by-name-test.cpp

raw symbols SCIP
1 /*
2 * %injeqt copyright begin%
3 * Copyright 2014 Rafał Malinowski ([email protected])
4 * %injeqt copyright end%
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #include <QtTest/QtTest>
22
23 #include "internal/types-by-name.h"cxx . . $ `<file>/src/internal/types-by-name.h`/
24
25 using namespace injeqtcxx . . $ injeqt/::internal;
26 using namespace injeqtcxx . . $ injeqt/::v1;
27
28 class type_1cxx . . $ type_1# : public QObjectcxx . . $ QObject#
29 {
30 Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`!
31 };
32
33 class type_2cxx . . $ type_2# : public QObjectcxx . . $ QObject#
34 {
35 Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`!
36 };
37
38 class type_3cxx . . $ type_3# : public QObjectcxx . . $ QObject#
39 {
40 Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`!
41 };
42
43 class types_by_name_testcxx . . $ types_by_name_test# : public QObjectcxx . . $ QObject#
44 {
45 Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`!
46
47 public:
48 types_by_name_testcxx . . $ types_by_name_test#types_by_name_test(49f6e7a06ebc5aa8).();
49
50 private slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!:
51 void should_return_empty_for_empty_namecxx . . $ types_by_name_test#should_return_empty_for_empty_name(49f6e7a06ebc5aa8).();
52 void should_return_empty_for_asterixcxx . . $ types_by_name_test#should_return_empty_for_asterix(49f6e7a06ebc5aa8).();
53 void should_return_empty_for_type_namecxx . . $ types_by_name_test#should_return_empty_for_type_name(49f6e7a06ebc5aa8).();
54 void should_return_valid_for_type_name_with_asterixcxx . . $ types_by_name_test#should_return_valid_for_type_name_with_asterix(49f6e7a06ebc5aa8).();
55 void should_return_empty_for_unknown_type_name_with_asterixcxx . . $ types_by_name_test#should_return_empty_for_unknown_type_name_with_asterix(49f6e7a06ebc5aa8).();
56
57 private:
58 types_by_namecxx . . $ injeqt/internal/types_by_name# _known_typescxx . . $ types_by_name_test#_known_types.;
59
60 };
61
62 types_by_name_testcxx . . $ types_by_name_test#::types_by_name_testcxx . . $ types_by_name_test#types_by_name_test(49f6e7a06ebc5aa8).() :
63 _known_typescxx . . $ types_by_name_test#_known_types.{
64 make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1cxx . . $ type_1#>(),
65 make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_2cxx . . $ type_2#>()
66 }
67 {
68 }
69
70 void types_by_name_testcxx . . $ types_by_name_test#::should_return_empty_for_empty_namecxx . . $ types_by_name_test#should_return_empty_for_empty_name(49f6e7a06ebc5aa8).()
71 {
72 auto t = type_by_pointercxx . . $ injeqt/internal/type_by_pointer(d5fc4731e87e33af).(_known_typescxx . . $ types_by_name_test#_known_types., {cxx . . $ std/__cxx11/basic_string#basic_string(49f6e7a06ebc5aa8).});
73 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(t.is_empty());
74 }
75
76 void types_by_name_testcxx . . $ types_by_name_test#::should_return_empty_for_asterixcxx . . $ types_by_name_test#should_return_empty_for_asterix(49f6e7a06ebc5aa8).()
77 {
78 auto t = type_by_pointercxx . . $ injeqt/internal/type_by_pointer(d5fc4731e87e33af).(_known_typescxx . . $ types_by_name_test#_known_types., "*"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).);
79 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(t.is_empty());
80 }
81
82 void types_by_name_testcxx . . $ types_by_name_test#::should_return_empty_for_type_namecxx . . $ types_by_name_test#should_return_empty_for_type_name(49f6e7a06ebc5aa8).()
83 {
84 auto t = type_by_pointercxx . . $ injeqt/internal/type_by_pointer(d5fc4731e87e33af).(_known_typescxx . . $ types_by_name_test#_known_types., "type_1"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).);
85 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(t.is_empty());
86 }
87
88 void types_by_name_testcxx . . $ types_by_name_test#::should_return_valid_for_type_name_with_asterixcxx . . $ types_by_name_test#should_return_valid_for_type_name_with_asterix(49f6e7a06ebc5aa8).()
89 {
90 auto t1 = type_by_pointercxx . . $ injeqt/internal/type_by_pointer(d5fc4731e87e33af).(_known_typescxx . . $ types_by_name_test#_known_types., "type_1*"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).);
91 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(make_type<type_1>(), t1);
92
93 auto t2 = type_by_pointercxx . . $ injeqt/internal/type_by_pointer(d5fc4731e87e33af).(_known_typescxx . . $ types_by_name_test#_known_types., "type_2*"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).);
94 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(make_type<type_2>(), t2);
95 }
96
97 void types_by_name_testcxx . . $ types_by_name_test#::should_return_empty_for_unknown_type_name_with_asterixcxx . . $ types_by_name_test#should_return_empty_for_unknown_type_name_with_asterix(49f6e7a06ebc5aa8).()
98 {
99 auto t = type_by_pointercxx . . $ injeqt/internal/type_by_pointer(d5fc4731e87e33af).(_known_typescxx . . $ types_by_name_test#_known_types., "type_3*"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).);
100 QVERIFYcxx . . $ `<external>/8602788698586413231/qtestcase.h:63:9`!(t.is_empty());
101 }
102
103 QTEST_APPLESS_MAINcxx . . $ `<external>/4204159469433502174/qtest.h:442:9`!(types_by_name_test)
104 #include "types-by-name-test.moc"cxx . . $ `<file>/build/test/types-by-name-test_autogen/include/types-by-name-test.moc`/