Revision: 3768
Author: [email protected]
Date: Wed Sep 30 09:05:23 2009
Log: Make some non-final tests final
http://codereview.appspot.com/126057
[email protected]
http://code.google.com/p/google-caja/source/detail?r=3768
Modified:
/trunk/tests/com/google/caja/lexer/PositionInfererTest.java
/trunk/tests/com/google/caja/plugin/templates/TemplateSanitizerTest.java
/trunk/tests/com/google/caja/util/CollectionsTest.java
/trunk/tests/com/google/caja/util/NameTest.java
=======================================
--- /trunk/tests/com/google/caja/lexer/PositionInfererTest.java Mon Sep 21
16:29:54 2009
+++ /trunk/tests/com/google/caja/lexer/PositionInfererTest.java Wed Sep 30
09:05:23 2009
@@ -30,7 +30,7 @@
import org.w3c.dom.Node;
public class PositionInfererTest extends CajaTestCase {
- public void testNoGuides() throws ParseException {
+ public final void testNoGuides() throws ParseException {
DocumentFragment f = xmlFragment(fromString("<br/>"));
FilePosition spanningPos = Nodes.getFilePositionFor(f); // 1+1 - 6
@@ -51,7 +51,7 @@
f);
}
- public void testGaps() throws ParseException {
+ public final void testGaps() throws ParseException {
DocumentFragment f = xmlFragment(fromString("<br/>Foo<br/>"));
FilePosition spanningPos = Nodes.getFilePositionFor(f);
@@ -76,7 +76,7 @@
f);
}
- public void testSparseRelations() throws ParseException {
+ public final void testSparseRelations() throws ParseException {
DocumentFragment f = xmlFragment(fromString(
""
+ "<b><hr/><br/></b>\n"
@@ -125,7 +125,7 @@
f);
}
- public void testDoesNotDamageKnownData() throws ParseException {
+ public final void testDoesNotDamageKnownData() throws ParseException {
DocumentFragment f = xmlFragment(fromString(
""
+ "<b><hr/><br/></b>\n"
=======================================
---
/trunk/tests/com/google/caja/plugin/templates/TemplateSanitizerTest.java
Sat Sep 26 18:46:46 2009
+++
/trunk/tests/com/google/caja/plugin/templates/TemplateSanitizerTest.java
Wed Sep 30 09:05:23 2009
@@ -199,7 +199,7 @@
"WARNING: removing disallowed attribute charset on tag a");
}
- public void testStrangeIds() throws Exception {
+ public final void testStrangeIds() throws Exception {
String html =
"<input name=\"tag[]\" />\n"
+ "<input name=\"form$location\" />\n"
=======================================
--- /trunk/tests/com/google/caja/util/CollectionsTest.java Wed Sep 2
15:23:09 2009
+++ /trunk/tests/com/google/caja/util/CollectionsTest.java Wed Sep 30
09:05:23 2009
@@ -23,7 +23,7 @@
import junit.framework.TestCase;
public class CollectionsTest extends TestCase {
- public void testListMultimaps() {
+ public final void testListMultimaps() {
Multimap<String, String> m = Multimaps.newListHashMultimap();
assertTrue(m.isEmpty());
assertEquals("[]", m.keySet().toString());
@@ -65,7 +65,7 @@
assertTrue(m.isEmpty());
}
- public void testSetMultimaps() {
+ public final void testSetMultimaps() {
Multimap<String, String> m = Multimaps.newSetHashMultimap();
assertTrue(m.isEmpty());
assertEquals("[]", m.keySet().toString());
@@ -102,7 +102,7 @@
assertTrue(m.isEmpty());
}
- public void testPetulantCollection() {
+ public final void testPetulantCollection() {
Multimap<String, String> m
= new Multimaps.MultimapImpl<String, String, Collection<String>>(
new Multimaps.Maker<Map<String, Collection<String>>>() {
@@ -150,7 +150,7 @@
assertTrue(m.isEmpty());
}
- public void testClone() {
+ public final void testClone() {
Multimap<String, String> m = Multimaps.newListLinkedHashMultimap();
m.put("a", "A");
m.put("b", "B");
=======================================
--- /trunk/tests/com/google/caja/util/NameTest.java Wed Sep 23 17:42:29 2009
+++ /trunk/tests/com/google/caja/util/NameTest.java Wed Sep 30 09:05:23 2009
@@ -17,13 +17,13 @@
import junit.framework.TestCase;
public class NameTest extends TestCase {
- public void testCss() {
+ public final void testCss() {
assertEquals("color", Name.css("color").getCanonicalForm());
assertEquals("color", Name.css("colOr").getCanonicalForm());
assertEquals("color", Name.css("COLOR").getCanonicalForm());
}
- public void testHtml() {
+ public final void testHtml() {
assertEquals("foo", Name.html("foo").getCanonicalForm());
assertEquals("foo", Name.html("Foo").getCanonicalForm());
assertEquals("foo", Name.html("FOO").getCanonicalForm());
@@ -32,7 +32,7 @@
assertEquals("FOO:BAR", Name.html("FOO:BAR").getCanonicalForm());
}
- public void testXml() {
+ public final void testXml() {
assertEquals("foo", Name.xml("foo").getCanonicalForm());
assertEquals("Foo", Name.xml("Foo").getCanonicalForm());
assertEquals("FOO", Name.xml("FOO").getCanonicalForm());