Debian Codegraph @

test/unit/implemented-by-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 "expect.h"cxx . . $ `<file>/test/unit/expect.h`/
22 #include "utils.h"cxx . . $ `<file>/test/unit/utils.h`/
23
24 #include "internal/implemented-by.h"cxx . . $ `<file>/src/internal/implemented-by.h`/
25
26 #include <QtTest/QtTest>
27
28 using namespace injeqtcxx . . $ injeqt/::internal;
29 using namespace injeqtcxx . . $ injeqt/::v1;
30
31 class type_1cxx . . $ type_1# : public QObjectcxx . . $ QObject#
32 {
33 Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`!
34 };
35
36 class type_2cxx . . $ type_2# : public QObjectcxx . . $ QObject#
37 {
38 Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`!
39 };
40
41 class type_1_subtype_1cxx . . $ type_1_subtype_1# : public type_1cxx . . $ type_1#
42 {
43 Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`!
44 };
45
46 class type_1_subtype_1_subtype_1cxx . . $ type_1_subtype_1_subtype_1# : public type_1_subtype_1cxx . . $ type_1_subtype_1#
47 {
48 Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`!
49 };
50
51 class implemented_by_testcxx . . $ implemented_by_test# : public QObjectcxx . . $ QObject#
52 {
53 Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`!
54
55 private slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!:
56 void should_accept_implemented_by_selfcxx . . $ implemented_by_test#should_accept_implemented_by_self(49f6e7a06ebc5aa8).();
57 void should_accept_implemented_by_subtypecxx . . $ implemented_by_test#should_accept_implemented_by_subtype(49f6e7a06ebc5aa8).();
58 void should_properly_comparecxx . . $ implemented_by_test#should_properly_compare(49f6e7a06ebc5aa8).();
59
60 };
61
62 void implemented_by_testcxx . . $ implemented_by_test#::should_accept_implemented_by_selfcxx . . $ implemented_by_test#should_accept_implemented_by_self(49f6e7a06ebc5aa8).()
63 {
64 auto i = implemented_bycxx . . $ injeqt/internal/implemented_by#implemented_by(4db51c5aea7c0a3b).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1cxx . . $ type_1#>(), make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1cxx . . $ type_1#>()};
65
66 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(make_type<type_1>(), i.interface_type());
67 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(make_type<type_1>(), i.implementation_type());
68 }
69
70 void implemented_by_testcxx . . $ implemented_by_test#::should_accept_implemented_by_subtypecxx . . $ implemented_by_test#should_accept_implemented_by_subtype(49f6e7a06ebc5aa8).()
71 {
72 auto i = implemented_bycxx . . $ injeqt/internal/implemented_by#implemented_by(4db51c5aea7c0a3b).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1cxx . . $ type_1#>(), make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1_subtype_1_subtype_1cxx . . $ type_1_subtype_1_subtype_1#>()};
73
74 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(make_type<type_1>(), i.interface_type());
75 QCOMPAREcxx . . $ `<external>/8602788698586413231/qtestcase.h:86:9`!(make_type<type_1_subtype_1_subtype_1>(), i.implementation_type());
76 }
77
78 void implemented_by_testcxx . . $ implemented_by_test#::should_properly_comparecxx . . $ implemented_by_test#should_properly_compare(49f6e7a06ebc5aa8).()
79 {
80 auto ib1a = implemented_bycxx . . $ injeqt/internal/implemented_by#implemented_by(4db51c5aea7c0a3b).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1cxx . . $ type_1#>(), make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1_subtype_1cxx . . $ type_1_subtype_1#>()};
81 auto ib1b = implemented_bycxx . . $ injeqt/internal/implemented_by#implemented_by(4db51c5aea7c0a3b).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1cxx . . $ type_1#>(), make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1_subtype_1cxx . . $ type_1_subtype_1#>()};
82 auto ib2a = implemented_bycxx . . $ injeqt/internal/implemented_by#implemented_by(4db51c5aea7c0a3b).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1cxx . . $ type_1#>(), make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1_subtype_1_subtype_1cxx . . $ type_1_subtype_1_subtype_1#>()};
83 auto ib2b = implemented_bycxx . . $ injeqt/internal/implemented_by#implemented_by(4db51c5aea7c0a3b).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1cxx . . $ type_1#>(), make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1_subtype_1_subtype_1cxx . . $ type_1_subtype_1_subtype_1#>()};
84 auto ib3a = implemented_bycxx . . $ injeqt/internal/implemented_by#implemented_by(4db51c5aea7c0a3b).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1_subtype_1cxx . . $ type_1_subtype_1#>(), make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1_subtype_1_subtype_1cxx . . $ type_1_subtype_1_subtype_1#>()};
85 auto ib3b = implemented_bycxx . . $ injeqt/internal/implemented_by#implemented_by(4db51c5aea7c0a3b).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1_subtype_1cxx . . $ type_1_subtype_1#>(), make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1_subtype_1_subtype_1cxx . . $ type_1_subtype_1_subtype_1#>()};
86
87 test_comparecxx . . $ injeqt/v1/test_compare(1f10a48923f889af).<implemented_bycxx . . $ injeqt/internal/implemented_by#>({cxx . . $ std/vector#vector(9619226211e5a241).{ib1a, ib1b}, {ib2a, ib2b}, {ib3a, ib3b}});
88 }
89
90 QTEST_APPLESS_MAINcxx . . $ `<external>/4204159469433502174/qtest.h:442:9`!(implemented_by_test)
91 #include "implemented-by-test.moc"cxx . . $ `<file>/build/test/implemented-by-test_autogen/include/implemented-by-test.moc`/