[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-27 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum closed https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-25 Thread Vlad Serebrennikov via cfe-commits
@@ -357,6 +359,50 @@ def test_is_restrict_qualified(self): self.assertTrue(i.type.is_restrict_qualified()) self.assertFalse(j.type.is_restrict_qualified()) +def test_get_result(self): +tu = get_tu("void foo(); int bar(char, short);") +foo =

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
@@ -279,6 +280,90 @@ def test_is_default_method(self): self.assertTrue(xc.is_default_method()) self.assertFalse(yc.is_default_method()) +def test_is_deleted_method(self): +source = "class X { X() = delete; }; class Y { Y(); };" +tu = get_tu(

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
@@ -46,6 +46,8 @@ def test_diagnostic_fixit(self): self.assertEqual(tu.diagnostics[0].location.column, 26) self.assertRegex(tu.diagnostics[0].spelling, "use of GNU old-style.*") self.assertEqual(len(tu.diagnostics[0].fixits), 1) +with self.assert

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
@@ -279,6 +280,90 @@ def test_is_default_method(self): self.assertTrue(xc.is_default_method()) self.assertFalse(yc.is_default_method()) +def test_is_deleted_method(self): +source = "class X { X() = delete; }; class Y { Y(); };" +tu = get_tu(

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Vlad Serebrennikov via cfe-commits
@@ -279,6 +280,90 @@ def test_is_default_method(self): self.assertTrue(xc.is_default_method()) self.assertFalse(yc.is_default_method()) +def test_is_deleted_method(self): +source = "class X { X() = delete; }; class Y { Y(); };" +tu = get_tu(

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I have to admit I can't assess the completeness of those tests, but they are certainly welcome. Thank you! https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Vlad Serebrennikov via cfe-commits
@@ -46,6 +46,8 @@ def test_diagnostic_fixit(self): self.assertEqual(tu.diagnostics[0].location.column, 26) self.assertRegex(tu.diagnostics[0].spelling, "use of GNU old-style.*") self.assertEqual(len(tu.diagnostics[0].fixits), 1) +with self.assert

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Vlad Serebrennikov via cfe-commits
@@ -625,6 +762,25 @@ def test_result_type_objc_method_decl(self): self.assertEqual(cursor.kind, CursorKind.OBJC_INSTANCE_METHOD_DECL) self.assertEqual(result_type.kind, TypeKind.VOID) +def test_storage_class(self): +tu = get_tu( +""" +ex

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Vlad Serebrennikov via cfe-commits
@@ -279,6 +280,90 @@ def test_is_default_method(self): self.assertTrue(xc.is_default_method()) self.assertFalse(yc.is_default_method()) +def test_is_deleted_method(self): +source = "class X { X() = delete; }; class Y { Y(); };" +tu = get_tu(

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/109846 >From 68ca7ee24712a48c1b6df6aff480fb4ff3054c57 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Tue, 24 Sep 2024 20:44:23 +0200 Subject: [PATCH 1/2] [libclang/python] Improve test coverage Achieve 100%

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Vlad Serebrennikov via cfe-commits
@@ -357,6 +359,50 @@ def test_is_restrict_qualified(self): self.assertTrue(i.type.is_restrict_qualified()) self.assertFalse(j.type.is_restrict_qualified()) +def test_get_result(self): +tu = get_tu("void foo(); int bar(char, short);") +foo =

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
@@ -357,6 +359,50 @@ def test_is_restrict_qualified(self): self.assertTrue(i.type.is_restrict_qualified()) self.assertFalse(j.type.is_restrict_qualified()) +def test_get_result(self): +tu = get_tu("void foo(); int bar(char, short);") +foo =

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
@@ -357,6 +359,50 @@ def test_is_restrict_qualified(self): self.assertTrue(i.type.is_restrict_qualified()) self.assertFalse(j.type.is_restrict_qualified()) +def test_get_result(self): +tu = get_tu("void foo(); int bar(char, short);") +foo =

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Vlad Serebrennikov via cfe-commits
@@ -357,6 +359,50 @@ def test_is_restrict_qualified(self): self.assertTrue(i.type.is_restrict_qualified()) self.assertFalse(j.type.is_restrict_qualified()) +def test_get_result(self): +tu = get_tu("void foo(); int bar(char, short);") +foo =

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
@@ -625,6 +762,25 @@ def test_result_type_objc_method_decl(self): self.assertEqual(cursor.kind, CursorKind.OBJC_INSTANCE_METHOD_DECL) self.assertEqual(result_type.kind, TypeKind.VOID) +def test_storage_class(self): +tu = get_tu( +""" +ex

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
@@ -357,6 +359,50 @@ def test_is_restrict_qualified(self): self.assertTrue(i.type.is_restrict_qualified()) self.assertFalse(j.type.is_restrict_qualified()) +def test_get_result(self): +tu = get_tu("void foo(); int bar(char, short);") +foo =

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
@@ -308,10 +310,10 @@ def test_element_type(self): def test_invalid_element_type(self): """Ensure Type.element_type raises if type doesn't have elements.""" tu = get_tu("int i;") -i = get_cursor(tu, "i") -self.assertIsNotNone(i) -with

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: @Endilll this adds the tests in preparation as discussed for #105490. While I was at it, I also added full test coverage for all the affected classes. https://github.com/llvm/llvm-project/pull/109846 ___ cfe-

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jannick Kremer (DeinAlptraum) Changes Achieve 100% test coverage on classes Cursor, Diagnostic, Type. --- Full diff: https://github.com/llvm/llvm-project/pull/109846.diff 3 Files Affected: - (modified) clang/bindings/python/tests/cindex

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/109846 Achieve 100% test coverage on classes Cursor, Diagnostic, Type. >From 68ca7ee24712a48c1b6df6aff480fb4ff3054c57 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Tue, 24 Sep 2024 20:44:23 +0200 Subject: [