This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] spellcheck.c: add another selftest for PR c/82967


This adds another testcase for overzealous spellchecker suggestions,
reported on IRC.

Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.

Committed to trunk as r266798, under the "obvious" rule.

gcc/ChangeLog:
	PR c/82967
	* spellcheck.c (selftest::test_suggestions): Add another
	assertion.
---
 gcc/spellcheck.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/spellcheck.c b/gcc/spellcheck.c
index 690e6fa..391a242 100644
--- a/gcc/spellcheck.c
+++ b/gcc/spellcheck.c
@@ -378,6 +378,9 @@ test_suggestions ()
 
   ASSERT_NOT_SUGGESTED_FOR ("__DATE__", "__i386__");
   // dist == 4, max_length == min_length == 8
+
+  ASSERT_NOT_SUGGESTED_FOR ("start_input_device", "InputDevice");
+  // dist == 9, max_length == 18, min_length == 11
 }
 
 /* Verify that find_closest_string is sane.  */
-- 
1.8.5.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]