| 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/dependency.h"cxx . . $ `<file>/src/internal/dependency.h`/ |
| 25 | #include "internal/type-dependencies.h"cxx . . $ `<file>/src/internal/type-dependencies.h`/ |
| 26 | |
| 27 | #include <QtTest/QtTest> |
| 28 | #include <string> |
| 29 | |
| 30 | using namespace injeqtcxx . . $ injeqt/::internal; |
| 31 | using namespace injeqtcxx . . $ injeqt/::v1; |
| 32 | |
| 33 | class type_1cxx . . $ type_1# : public QObjectcxx . . $ QObject# |
| 34 | { |
| 35 | Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`! |
| 36 | }; |
| 37 | |
| 38 | class type_2cxx . . $ type_2# : public QObjectcxx . . $ QObject# |
| 39 | { |
| 40 | Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`! |
| 41 | }; |
| 42 | |
| 43 | class type_with_dependency_1cxx . . $ type_with_dependency_1# : public QObjectcxx . . $ QObject# |
| 44 | { |
| 45 | Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`! |
| 46 | |
| 47 | public slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 48 | INJEQT_SETcxx . . $ `include/injeqt/injeqt.h:34:11`! void setter_1cxx . . $ type_with_dependency_1#setter_1(2eff8f70aeb41f67).(type_1cxx . . $ type_1# *) { } |
| 49 | INJEQT_SETcxx . . $ `include/injeqt/injeqt.h:34:11`! void setter_2cxx . . $ type_with_dependency_1#setter_2(710a7ba155b447df).(type_2cxx . . $ type_2# *) { } |
| 50 | |
| 51 | }; |
| 52 | |
| 53 | class type_with_dependency_2cxx . . $ type_with_dependency_2# : public QObjectcxx . . $ QObject# |
| 54 | { |
| 55 | Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`! |
| 56 | |
| 57 | public slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 58 | INJEQT_SETcxx . . $ `include/injeqt/injeqt.h:34:11`! void setter_1cxx . . $ type_with_dependency_2#setter_1(2eff8f70aeb41f67).(type_1cxx . . $ type_1# *) { } |
| 59 | INJEQT_SETcxx . . $ `include/injeqt/injeqt.h:34:11`! void setter_2cxx . . $ type_with_dependency_2#setter_2(710a7ba155b447df).(type_2cxx . . $ type_2# *) { } |
| 60 | |
| 61 | }; |
| 62 | |
| 63 | class type_dependencies_testcxx . . $ type_dependencies_test# : public QObjectcxx . . $ QObject# |
| 64 | { |
| 65 | Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`! |
| 66 | |
| 67 | private slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 68 | void should_properly_comparecxx . . $ type_dependencies_test#should_properly_compare(49f6e7a06ebc5aa8).(); |
| 69 | |
| 70 | }; |
| 71 | |
| 72 | void type_dependencies_testcxx . . $ type_dependencies_test#::should_properly_comparecxx . . $ type_dependencies_test#should_properly_compare(49f6e7a06ebc5aa8).() |
| 73 | { |
| 74 | auto d11 = dependencycxx . . $ injeqt/internal/dependency#dependency(28c822c801d90b7b).{make_test_setter_methodcxx . . $ injeqt/v1/make_test_setter_method(fd45cf8d4adedf1d).<type_with_dependency_1cxx . . $ type_with_dependency_1#, type_1cxx . . $ type_1#>("setter_1(type_1*)"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).)}; |
| 75 | auto d12 = dependencycxx . . $ injeqt/internal/dependency#dependency(28c822c801d90b7b).{make_test_setter_methodcxx . . $ injeqt/v1/make_test_setter_method(fd45cf8d4adedf1d).<type_with_dependency_1cxx . . $ type_with_dependency_1#, type_2cxx . . $ type_2#>("setter_2(type_2*)"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).)}; |
| 76 | auto d21 = dependencycxx . . $ injeqt/internal/dependency#dependency(28c822c801d90b7b).{make_test_setter_methodcxx . . $ injeqt/v1/make_test_setter_method(fd45cf8d4adedf1d).<type_with_dependency_2cxx . . $ type_with_dependency_2#, type_1cxx . . $ type_1#>("setter_1(type_1*)"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).)}; |
| 77 | auto d22 = dependencycxx . . $ injeqt/internal/dependency#dependency(28c822c801d90b7b).{make_test_setter_methodcxx . . $ injeqt/v1/make_test_setter_method(fd45cf8d4adedf1d).<type_with_dependency_2cxx . . $ type_with_dependency_2#, type_2cxx . . $ type_2#>("setter_2(type_2*)"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).)}; |
| 78 | |
| 79 | auto td_empty = type_dependenciescxx . . $ injeqt/internal/type_dependencies#type_dependencies(50791c604c871475).{typecxx . . $ injeqt/v1/type#type(49f6e7a06ebc5aa8).{}, dependenciescxx . . $ injeqt/internal/sorted_unique_vector#sorted_unique_vector(49f6e7a06ebc5aa8).{}}; |
| 80 | auto td1a = type_dependenciescxx . . $ injeqt/internal/type_dependencies#type_dependencies(50791c604c871475).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1cxx . . $ type_1#>(), dependenciescxx . . $ injeqt/internal/sorted_unique_vector#sorted_unique_vector(27fd641105185d40).{d11, d12}}; |
| 81 | auto td1b = type_dependenciescxx . . $ injeqt/internal/type_dependencies#type_dependencies(50791c604c871475).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1cxx . . $ type_1#>(), dependenciescxx . . $ injeqt/internal/sorted_unique_vector#sorted_unique_vector(27fd641105185d40).{d11, d12}}; |
| 82 | auto td2a = type_dependenciescxx . . $ injeqt/internal/type_dependencies#type_dependencies(50791c604c871475).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1cxx . . $ type_1#>(), dependenciescxx . . $ injeqt/internal/sorted_unique_vector#sorted_unique_vector(49f6e7a06ebc5aa8).{}}; |
| 83 | auto td2b = type_dependenciescxx . . $ injeqt/internal/type_dependencies#type_dependencies(50791c604c871475).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_1cxx . . $ type_1#>(), dependenciescxx . . $ injeqt/internal/sorted_unique_vector#sorted_unique_vector(49f6e7a06ebc5aa8).{}}; |
| 84 | auto td3a = type_dependenciescxx . . $ injeqt/internal/type_dependencies#type_dependencies(50791c604c871475).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_2cxx . . $ type_2#>(), dependenciescxx . . $ injeqt/internal/sorted_unique_vector#sorted_unique_vector(27fd641105185d40).{d21, d22}}; |
| 85 | auto td3b = type_dependenciescxx . . $ injeqt/internal/type_dependencies#type_dependencies(50791c604c871475).{make_typecxx . . $ injeqt/v1/make_type(10a1ed948a80d481).<type_2cxx . . $ type_2#>(), dependenciescxx . . $ injeqt/internal/sorted_unique_vector#sorted_unique_vector(27fd641105185d40).{d21, d22}}; |
| 86 | |
| 87 | test_comparecxx . . $ injeqt/v1/test_compare(1f10a48923f889af).<type_dependenciescxx . . $ injeqt/internal/type_dependencies#>({cxx . . $ std/vector#vector(9619226211e5a241).{td_empty}, {td1a, td1b}, {td2a, td2b}, {td3a, td3b}}); |
| 88 | } |
| 89 | |
| 90 | QTEST_APPLESS_MAINcxx . . $ `<external>/4204159469433502174/qtest.h:442:9`!(type_dependencies_test) |
| 91 | #include "type-dependencies-test.moc"cxx . . $ `<file>/build/test/type-dependencies-test_autogen/include/type-dependencies-test.moc`/ |