Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'codan/org.eclipse.cdt.codan.core.test')
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/NonVirtualDestructorCheckerTest.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/NonVirtualDestructorCheckerTest.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/NonVirtualDestructorCheckerTest.java
index 2e5c88d899..edecd93c06 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/NonVirtualDestructorCheckerTest.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/NonVirtualDestructorCheckerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Patrick Hofer and others.
+ * Copyright (c) 2011, 2012 Patrick Hofer and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -181,4 +181,18 @@ public class NonVirtualDestructorCheckerTest extends CheckerTestCase {
loadCodeAndRun(getAboveComment());
checkErrorLines(4);
}
+
+ // class C : public C {};
+ public void testBug368446_stackOverflow() throws Exception {
+ loadCodeAndRun(getAboveComment());
+ checkNoErrors();
+ }
+
+ // class B;
+ // class A : public B {};
+ // class B : public A {};
+ public void testBug368446_stackOverflow_indirect() throws Exception {
+ loadCodeAndRun(getAboveComment());
+ checkNoErrors();
+ }
}

Back to the top