Added support for IAD rules; fix for Bug 8251. RCL_2_0
authorstechong
Fri, 03 Apr 2009 09:35:11 -0500
branchRCL_2_0
changeset 34 60053ab1f6b7
parent 33 2d1c891725ea
child 35 dc08f14a7565
Added support for IAD rules; fix for Bug 8251.
core/com.nokia.carbide.cpp.codescanner.tests/src/com/nokia/carbide/cpp/codescanner/tests/CSConfigManagerTest.java
core/com.nokia.carbide.cpp.codescanner.tests/src/com/nokia/carbide/cpp/codescanner/tests/CSConfigSettingsTest.java
--- a/core/com.nokia.carbide.cpp.codescanner.tests/src/com/nokia/carbide/cpp/codescanner/tests/CSConfigManagerTest.java	Fri Apr 03 09:33:43 2009 -0500
+++ b/core/com.nokia.carbide.cpp.codescanner.tests/src/com/nokia/carbide/cpp/codescanner/tests/CSConfigManagerTest.java	Fri Apr 03 09:35:11 2009 -0500
@@ -171,6 +171,7 @@
 		assertTrue(settings.get(CSPreferenceConstants.RULE_SEVERITIES).length() > 0);
 		assertTrue(settings.get(CSPreferenceConstants.RULES_ENABLED).length() > 0);
 		assertTrue(settings.get(CSPreferenceConstants.CCLASSIGNORE).length() > 0);
+		assertTrue(settings.get(CSPreferenceConstants.ICONS).length() == 0);
 		assertTrue(settings.get(CSPreferenceConstants.LFUNCTIONIGNORE).length() > 0);
 		assertTrue(settings.get(CSPreferenceConstants.LONGLINES_LENGTH).length() > 0);
 		assertTrue(settings.get(CSPreferenceConstants.OPENIGNORE).length() > 0);
@@ -194,6 +195,7 @@
 		assertTrue(store.getString(CSPreferenceConstants.RULE_SEVERITIES).length() > 0);
 		assertTrue(store.getString(CSPreferenceConstants.RULES_ENABLED).length() > 0);
 		assertTrue(store.getString(CSPreferenceConstants.CCLASSIGNORE).length() > 0);
+		assertTrue(store.getString(CSPreferenceConstants.ICONS).length() >= 0);
 		assertTrue(store.getString(CSPreferenceConstants.LFUNCTIONIGNORE).length() > 0);
 		assertTrue(store.getString(CSPreferenceConstants.LONGLINES_LENGTH).length() > 0);
 		assertTrue(store.getString(CSPreferenceConstants.OPENIGNORE).length() > 0);
--- a/core/com.nokia.carbide.cpp.codescanner.tests/src/com/nokia/carbide/cpp/codescanner/tests/CSConfigSettingsTest.java	Fri Apr 03 09:33:43 2009 -0500
+++ b/core/com.nokia.carbide.cpp.codescanner.tests/src/com/nokia/carbide/cpp/codescanner/tests/CSConfigSettingsTest.java	Fri Apr 03 09:35:11 2009 -0500
@@ -309,13 +309,27 @@
 		assertTrue(result.equals("secret"));
 	}
 
+	public void testGetScriptIcons() throws Exception {
+		String result = "";
+		result = this.configSettings.getScriptIcons();
+		assertNull(result);
+	}
+
+	public void testSetScriptIcons() throws Exception {
+		this.configSettings.setScriptIcons("myicon.png");
+		String result = "";
+		result = this.configSettings.getScriptIcons();
+		assertNotNull(result);
+		assertTrue(result.equals("myicon.png"));
+	}
+
 	public void testGetScriptLFunctionIgnore() throws Exception {
 		String result = "";
 		result = this.configSettings.getScriptLFunctionIgnore();
 		assertTrue(result.length() > 0);
 	}
 
-	public void testSetLFunctionCClassIgnore() throws Exception {
+	public void testSetScriptLFunctionIgnore() throws Exception {
 		this.configSettings.setScriptLFunctionIgnore("RunL|MyfuncL");
 		String result = "";
 		result = this.configSettings.getScriptLFunctionIgnore();