Commit Graph

77 Commits (c05a70a4ca769664f2315fff1f3bf3cb2ce3e300)

Author SHA1 Message Date
Jean Chalard 0d708b0cf5 Separate input logic tests in several categories.
The intent is to make things easier to read.

Change-Id: Ida95ac8bd4119a2497d3e2a4d92485a96316962d
2012-03-23 14:22:47 +09:00
Jean Chalard 8592ed408e Split input logic tests to make creating new tests easier
This will allow easier reuse of the complicated set up code
and the various helper methods.

Change-Id: I864eb0da476cbf0fe087ddb1713af80d3c3eb850
2012-03-23 14:15:50 +09:00
Jean Chalard 109728193e Don't rely on spell checker proximity in tests
This fixes the input logic tests that were broken and suppresses
their dependency upon the spell checker proximity. Instead, it
gets the Keyboard instance from Latin IME and uses the actual
coordinates, which results in a test run closer to what actually
happens during typing.

Change-Id: I3a81d249ee7fb3ac6ae6940aa2e8b2421e829e5c
2012-03-22 18:08:23 +09:00
Jean Chalard 6ec1209a33 Fix a bug where quotes and dashes are considered letters
Bug: 6174065
Change-Id: I702760d44ead0eeb60d06360aa3bb03c2ec73325
2012-03-15 18:18:52 +09:00
Jean Chalard 274a0643b1 Give InputLogicTests the ability to change language
Also fix a typo, and increase the time allowed to load the main
dictionary to 2 secs instead of 1.

Bug: 6114326
Change-Id: I5f70b34fc4277c55977b18466253152aa98a2507
2012-03-08 16:39:29 +09:00
Jean Chalard 845b24d9d3 Fix a bug with successive manual picks
Bug: 6121571
Change-Id: Ib16fbef1087da3b7da5539901ec57156f242f089
2012-03-07 17:32:42 +09:00
satok 231ef8fa3e Merge "Integrate the logic to calculate the proximities" 2012-03-05 23:25:29 -08:00
satok ca7ec2097c Integrate the logic to calculate the proximities
Bug: 4343280

Change-Id: I0f6a7e6912ed4abea07c10d266da4c7ccb0dae76
2012-03-06 15:34:27 +09:00
Jean Chalard cbad260cf3 Fix a test
To some extent, the test was wrong here.
After space is typed in this case, we wait a small delay before updating
the suggestion strip so that we can display bigram predictions without
introducing delays. The suggestion strip is not displayed until then.

The test was bypassing this by simulating a press on the suggestion
strip, but for LatinIME it was not displayed yet, hence the bug.
The new code waits for the delay, makes sure the suggestion strip is
actually displaying punctuation marks, then press the mark and do
the intended test on space.

Change-Id: I18f82da1bc0a8e584e9b1bac59ff48823d78ec12
2012-03-06 14:00:11 +09:00
Jean Chalard f717c5685e Add basic tests for auto-correct indicator.
Bug: 5975557
Change-Id: I39e782f89813b9d585e369e590d6288e696168a2
2012-03-02 11:08:46 +09:00
Jean Chalard d9f6a0ebb7 Add a method to run the handler's messages from the tests
This is really brutal, but after trying many many things I didn't
find a better way. It works with the current implementation of
MessageQueue.
Since this only introduces a utility method it doesn't really do
anything, but the functionality it provides will be essential to
Bug: 5975557

Change-Id: I81c4113a08f9a8d8a88294d7dd3b6c8c483c8b1d
2012-02-29 11:52:33 +09:00
Jean Chalard bb15f92d4f Add some unit tests.
- Type "tgis", manually pick "thus", press backspace.
  Backspace should revert the manual pick.
  Check "tgis" is the result.
- Type "tgis" followed by a period.
  Period should trigger auto-correct to "this".
  Check "this" is the result.
- Type "tgis" followed by a period, then backspace.
  Period should trigger auto-correct to "this", and backspace should
  revert the auto-correction.
  Check "tgis." is the result.

Change-Id: I7e23c8a26fbdbe23336149a05ff01bc51707422e
2012-02-22 01:35:11 -08:00
Jean Chalard 9159b9953d Fix the auto-composer to support supplementary chars
Change-Id: I61ff218ae2ca4eb443a370e581b677755258670a
2012-02-08 15:45:51 +09:00
Jean Chalard de60d87a60 Add some unit tests for punctuation and special keys
Bug: 5962053
Change-Id: I7dd68767be6e724675428910fa2c00290f76e869
2012-02-07 20:34:56 +09:00
Jean Chalard 816a8a0fd8 Fix a race condition that makes tests unstable
Change-Id: Ic19d380eb64855884bc6ded8547c200dd772ffe9
2012-02-07 19:22:37 +09:00
Jean Chalard fb684cebe8 Stop inserting a space after a manually picked word.
Bug: 4994861
Change-Id: I6ae256a94dbaddea4304304779d17025620c5025
2012-02-03 18:45:44 +09:00
Jean Chalard 825e2bbd91 Fix a bug when deleting the last char
And unit test

Change-Id: Ic4fc3626f8b86e10156d770d41cd6deab5d31f39
2012-02-03 13:03:54 +09:00
Jean Chalard 9242a2bcf8 Fix string iterations in a couple places.
Seems I didn't get how to iterate on a String correctly >.>
Talk about a big bug. Anyway, I think it's working now.

Bug: 5955228
Change-Id: I988c900cf2a16c44b9505cfd4f77c7cda7e592f0
2012-02-03 11:15:46 +09:00
Jean Chalard cca2183f5a Add unit tests in prevision of magic space removal
Bug: 4994861
Change-Id: I114a1117cf19aa6e514ac7342f733175dc5d5df1
2012-02-02 18:21:10 +09:00
Jean Chalard a02e703289 Add a missing brace
Change-Id: Ia51da6506d78a295b8b70a241208fb81602cf0ea
2012-01-26 16:08:53 +09:00
Jean Chalard 9184d8b235 Add a test for moving cursor then backspace
This is a test for the case in
Bug: 5851148

Change-Id: I58ee459d85f463b445a28137bdc6c40bc3067ff5
2012-01-26 15:39:29 +09:00
Jean Chalard 41df8a98fd Add a test case for backspace at start of line
Tests the behavior from
Bug: 5784542

Change-Id: I78ec9d77c5dd1e3ea8eff530f9d7d284a1c094d4
2012-01-26 15:36:27 +09:00
Jean Chalard 60e7718462 Add tests for double space behavior
Bug: 5875776
Change-Id: Icc28b6c5c0132a3afc8d603841c9e321f720b7c9
2012-01-26 10:10:38 +09:00
Jean Chalard 0bfe359ee4 Add a test for auto-correction.
Fix two related subtle bugs:
- Stop singling out fat-finger-only corrections for rejection
  when touch coordinates are not available.
- Remove a racy check that would happen only in debug mode

Change-Id: Ic904f9b27c091ca6b369052c4e65a630bff81257
2012-01-25 19:29:40 +09:00
Jean Chalard 1e4684ad24 Test that delete actually removes any selected text.
Bug: 5699301
Change-Id: I09a967eb03690251e8bd69503285c982d6958a7d
2012-01-24 18:17:09 +09:00
Jean Chalard bc10e4145e Enable DEBUG mode for logic tests.
This enables a wealth of useful checks. We want to run unit
tests with debug mode on.

Change-Id: Ic45caaf43a889287f5aec203e7d1ba63136fc58e
2012-01-20 19:23:34 +09:00
Jean Chalard 83c72d1dae Add the first tests for the input login in LatinIME class
Change-Id: Ifcf9ab55ee01bf7c6c6829e699246e5654975456
2012-01-20 13:00:40 +09:00