aboutsummaryrefslogtreecommitdiffstats
path: root/common/tests
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2012-06-18 22:33:39 -0700
committerTor Norbye <tnorbye@google.com>2012-06-22 14:42:30 -0700
commit5e290ab6060c3204be3a3eb6084db6f92c88adee (patch)
tree6edefecd33f674e453b070b38bb90813588f44e7 /common/tests
parent960433ddfada5e246feccdc167a0af183f30bb0a (diff)
downloadsdk-5e290ab6060c3204be3a3eb6084db6f92c88adee.zip
sdk-5e290ab6060c3204be3a3eb6084db6f92c88adee.tar.gz
sdk-5e290ab6060c3204be3a3eb6084db6f92c88adee.tar.bz2
Add typo detector
This changeset adds a new typo detector. There are also some lint infrastructure fixes to better handle positions within text nodes, and to allow Eclipse lint quickfixes to supply multiple fixes for a single issue (such as multiple misspelling alternative replacements.) Change-Id: Ie26f0bafc571e02ae09ff27a7f4b221fe0c2ea5b
Diffstat (limited to 'common/tests')
-rw-r--r--common/tests/src/com/android/util/PositionXmlParserTest.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/tests/src/com/android/util/PositionXmlParserTest.java b/common/tests/src/com/android/util/PositionXmlParserTest.java
index ba560a6..961d7d6 100644
--- a/common/tests/src/com/android/util/PositionXmlParserTest.java
+++ b/common/tests/src/com/android/util/PositionXmlParserTest.java
@@ -155,6 +155,12 @@ public class PositionXmlParserTest extends TestCase {
assertEquals(11, start.getLine());
assertEquals(10, start.getColumn());
assertEquals(xml.indexOf("some text"), start.getOffset());
+
+ // Check attribute positions with text node offsets
+ start = parser.getPosition(text, 13, 15);
+ assertEquals(11, start.getLine());
+ assertEquals(12, start.getColumn());
+ assertEquals(xml.indexOf("me"), start.getOffset());
}
public void testLineEndings() throws Exception {