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/ReturnCheckerTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java
index aba819266d..09ec9f408b 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java
@@ -280,4 +280,13 @@ public class ReturnCheckerTest extends CheckerTestCase {
checkNoErrors();
}
+ // int main()
+ // {
+ // char c; // added so function body is non-empty
+ // // no error since return value in main is optional
+ // }
+ public void testMainFunction() {
+ loadCodeAndRunCpp(getAboveComment());
+ checkNoErrors();
+ }
} \ No newline at end of file

Back to the top