summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-12-08 16:10:18 +0100
committerNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-12-16 15:21:21 +0000
commit86f3194cc1229911fae153971677b25fe211499d (patch)
tree3fa5357b60d73e1167005d49553234ec50727b07 /tests/unit
parent20d22e52dfd3908bfdee7bb9bfd9fb95b7cec6b6 (diff)
downloadqt-creator-86f3194cc1229911fae153971677b25fe211499d.tar.gz
Clang: Add disabled test ArgumentToUserDefinedIndexOperator
It looks like there is no way to mark a test as expected to fail, so disable it. Task-number: QTCREATORBUG-15473 Change-Id: Ic6cb2c00a64cf647cb499492064d451d0dd08075 Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/unittest/data/highlightinginformations.cpp9
-rw-r--r--tests/unit/unittest/highlightinginformationstest.cpp8
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/unit/unittest/data/highlightinginformations.cpp b/tests/unit/unittest/data/highlightinginformations.cpp
index ca7eaa392f..5c3ffaaa36 100644
--- a/tests/unit/unittest/data/highlightinginformations.cpp
+++ b/tests/unit/unittest/data/highlightinginformations.cpp
@@ -424,3 +424,12 @@ typedef int EnumerationTypeDef;
enum Enumeration2 : EnumerationTypeDef {
};
+
+struct Bar {
+ Bar &operator[](int &key);
+};
+
+void argumentToUserDefinedIndexOperator(Bar object, int index = 3)
+{
+ object[index];
+}
diff --git a/tests/unit/unittest/highlightinginformationstest.cpp b/tests/unit/unittest/highlightinginformationstest.cpp
index 29e68042b6..7f351b010c 100644
--- a/tests/unit/unittest/highlightinginformationstest.cpp
+++ b/tests/unit/unittest/highlightinginformationstest.cpp
@@ -952,6 +952,14 @@ TEST_F(HighlightingInformations, DISABLED_EnumerationTypeDef)
ASSERT_THAT(infos[3], HasType(HighlightingType::Type));
}
+// QTCREATORBUG-15473
+TEST_F(HighlightingInformations, DISABLED_ArgumentToUserDefinedIndexOperator)
+{
+ const auto infos = translationUnit.highlightingInformationsInRange(sourceRange(434, 19));
+
+ ASSERT_THAT(infos[2], HasType(HighlightingType::LocalVariable));
+}
+
Data *HighlightingInformations::d;
void HighlightingInformations::SetUpTestCase()