public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] spellcheck.c: add another selftest for PR c/82967
@ 2018-12-04 21:35 David Malcolm
  0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2018-12-04 21:35 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-04 21:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04 21:35 [committed] spellcheck.c: add another selftest for PR c/82967 David Malcolm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).