Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2011-04-25 23:37:18 -0400
committerSergey Prigogin2011-04-25 23:37:18 -0400
commit44a3a89caa3d99168534e7318d387beec125f3d5 (patch)
tree566683340595c24be5997788e5f2474ad3b26e1c /codan/org.eclipse.cdt.codan.core.test
parent37d2f3e93b942f3145fde61cbeb18cab00546d54 (diff)
downloadorg.eclipse.cdt-44a3a89caa3d99168534e7318d387beec125f3d5.tar.gz
org.eclipse.cdt-44a3a89caa3d99168534e7318d387beec125f3d5.tar.xz
org.eclipse.cdt-44a3a89caa3d99168534e7318d387beec125f3d5.zip
Fixed warnings.
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/AssignmentInConditionCheckerTest.java13
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/StatementHasNoEffectCheckerTest.java8
2 files changed, 10 insertions, 11 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/AssignmentInConditionCheckerTest.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/AssignmentInConditionCheckerTest.java
index 6773c81dea..9ca34f899d 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/AssignmentInConditionCheckerTest.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/AssignmentInConditionCheckerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Alena Laskavaia
+ * Copyright (c) 2009, 2010 Alena Laskavaia
* 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
@@ -16,12 +16,13 @@ import org.eclipse.core.resources.IMarker;
/**
* Test for {@see AssignmentInConditionChecker} class
- *
+ *
*/
+@SuppressWarnings("nls")
public class AssignmentInConditionCheckerTest extends CheckerTestCase {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.cdt.codan.core.test.CodanTestCase#setUp()
*/
@Override
@@ -33,7 +34,7 @@ public class AssignmentInConditionCheckerTest extends CheckerTestCase {
// main() {
// int a=1,b=3;
// if (a=b) b=4; // error here on line 3
- // }
+ // }
public void test_basic() {
loadCodeAndRun(getAboveComment());
checkErrorLine(3);
@@ -41,7 +42,7 @@ public class AssignmentInConditionCheckerTest extends CheckerTestCase {
// main() {
// int a=1,b=3;
- //
+ //
// if ((a=b)) b--; // no error
// }
public void test_fixed() {
@@ -99,7 +100,7 @@ public class AssignmentInConditionCheckerTest extends CheckerTestCase {
// main() {
// int a=1,b=3;
// if (a=b) b=4; // error here on line 3
- // }
+ // }
public void test_basic_params() {
loadCodeAndRun(getAboveComment());
IMarker marker = checkErrorLine(3);
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/StatementHasNoEffectCheckerTest.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/StatementHasNoEffectCheckerTest.java
index 5eee2a5f56..25596bf939 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/StatementHasNoEffectCheckerTest.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/StatementHasNoEffectCheckerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Alena Laskavaia
+ * Copyright (c) 2009, 2010 Alena Laskavaia
* 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
@@ -20,7 +20,7 @@ import org.eclipse.core.resources.IMarker;
/**
* Test for {@see StatementHasNoEffectChecker} class
- *
+ *
*/
public class StatementHasNoEffectCheckerTest extends CheckerTestCase {
@Override
@@ -147,9 +147,8 @@ public class StatementHasNoEffectCheckerTest extends CheckerTestCase {
//#define FUNC(a) a
// main() {
// int a;
- // FUNC(a); // error by default
+ // FUNC(a); // error by default
// }
- @SuppressWarnings("restriction")
public void testInMacro() {
IProblemPreference macro = getPreference(StatementHasNoEffectChecker.ER_ID, StatementHasNoEffectChecker.PARAM_MACRO_ID);
macro.setValue(Boolean.TRUE);
@@ -173,7 +172,6 @@ public class StatementHasNoEffectCheckerTest extends CheckerTestCase {
// int a;
// FUNC(a); // no error if macro exp turned off
// }
- @SuppressWarnings("restriction")
public void testInMacroParamOff() {
IProblemPreference macro = getPreference(StatementHasNoEffectChecker.ER_ID, StatementHasNoEffectChecker.PARAM_MACRO_ID);
macro.setValue(Boolean.FALSE);

Back to the top