diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-09-28 08:42:14 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-09-28 15:30:16 +0000 |
commit | e241444ba3c8a6d3e6bcf2b8188a290f13bb3881 (patch) | |
tree | f9597ced8eb6134a1504fa8f7e5dc53541c92ce6 | |
parent | b534b2b0b9e0f41547ccb05b6a930a89b707fb14 (diff) | |
download | qt-creator-e241444ba3c8a6d3e6bcf2b8188a290f13bb3881.tar.gz |
C++: Comment out a flaky test
The test relied on logic that was reverted with change
915f68deac95bf17bd97d1a2644264afb0b86f0b.
LookupScopePrivate::findSpecialization() gets a "TemplateNameIdTable
&specializations" with a non-deterministic order. Without the extra
logic, the very first entry will be chosen as the found specialization.
The non-deterministic order comes from the TemplateNameId::Compare,
which calls std::lexicographical_compare() with the template arguments,
which are FullySpecifiedTypes. The result of
FullySpecifiedType::operator<() might depend on a pointer comparison.
Change-Id: I8d69d1bb5831145b1c21a5ea848c0043f17ec415
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
-rw-r--r-- | src/plugins/cpptools/cppcompletion_test.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp index 7a6dce2a3a..d57742ca31 100644 --- a/src/plugins/cpptools/cppcompletion_test.cpp +++ b/src/plugins/cpptools/cppcompletion_test.cpp @@ -333,7 +333,6 @@ void CppToolsPlugin::test_completion() QEXPECT_FAIL("template_specialization_with_reference", "test of reverted change", Abort); QEXPECT_FAIL("specialization_multiple_arguments", "test of reverted change", Abort); QEXPECT_FAIL("specialization_with_default_value", "test of reverted change", Abort); - QEXPECT_FAIL("partial_specialization_with_pointer", "test of reverted change", Abort); QEXPECT_FAIL("enum_in_function_in_struct_in_function", "QTCREATORBUG-13757", Abort); QEXPECT_FAIL("enum_in_function_in_struct_in_function_cxx11", "QTCREATORBUG-13757", Abort); QEXPECT_FAIL("enum_in_function_in_struct_in_function_anon", "QTCREATORBUG-13757", Abort); @@ -2704,21 +2703,21 @@ void CppToolsPlugin::test_completion_data() << QLatin1String("i") << QLatin1String("s")); - QTest::newRow("partial_specialization_with_pointer") << _( - "struct b {};\n" - "struct a : b {};\n" - "template<class X, class Y> struct s { float f; };\n" - "template<class X> struct s<X, b*> { int i; };\n" - "template<class X> struct s<X, a*> { char j; };\n" - "\n" - "void f()\n" - "{\n" - " s<int, a*> var;\n" - " @\n" - "}\n" - ) << _("var.") << (QStringList() - << QLatin1String("j") - << QLatin1String("s")); +// QTest::newRow("partial_specialization_with_pointer") << _( +// "struct b {};\n" +// "struct a : b {};\n" +// "template<class X, class Y> struct s { float f; };\n" +// "template<class X> struct s<X, b*> { int i; };\n" +// "template<class X> struct s<X, a*> { char j; };\n" +// "\n" +// "void f()\n" +// "{\n" +// " s<int, a*> var;\n" +// " @\n" +// "}\n" +// ) << _("var.") << (QStringList() +// << QLatin1String("j") +// << QLatin1String("s")); QTest::newRow("partial_specialization_templated_argument") << _( "template<class T> struct t {};\n" |