summaryrefslogtreecommitdiff
path: root/test/shaping
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2018-01-09 21:35:21 +0100
committerBehdad Esfahbod <behdad@behdad.org>2018-01-10 02:50:49 +0100
commit9a3ad307ea91794712531dfc688700c11a1ff263 (patch)
tree2054d20c6a01a78c5f7e1a38b3e85e63a0ebf24f /test/shaping
parentb6b460024d29362914c72cc5f8fbaec215db5b16 (diff)
downloadharfbuzz-9a3ad307ea91794712531dfc688700c11a1ff263.tar.gz
[test] Remove unused hb-diff-ngrams
Diffstat (limited to 'test/shaping')
-rw-r--r--test/shaping/Makefile.am1
-rwxr-xr-xtest/shaping/hb-diff-ngrams5
-rw-r--r--test/shaping/hb_test_tools.py26
3 files changed, 0 insertions, 32 deletions
diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am
index fa1faf51..ffcba977 100644
--- a/test/shaping/Makefile.am
+++ b/test/shaping/Makefile.am
@@ -15,7 +15,6 @@ EXTRA_DIST += \
hb-diff \
hb-diff-colorize \
hb-diff-filter-failures \
- hb-diff-ngrams \
hb-diff-stat \
hb-unicode-decode \
hb-unicode-encode \
diff --git a/test/shaping/hb-diff-ngrams b/test/shaping/hb-diff-ngrams
deleted file mode 100755
index c02f5415..00000000
--- a/test/shaping/hb-diff-ngrams
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env python
-
-from hb_test_tools import *
-
-UtilMains.process_multiple_files (DiffSinks.print_ngrams)
diff --git a/test/shaping/hb_test_tools.py b/test/shaping/hb_test_tools.py
index c9bb1dd3..f7e59434 100644
--- a/test/shaping/hb_test_tools.py
+++ b/test/shaping/hb_test_tools.py
@@ -293,32 +293,6 @@ class DiffSinks:
total = passed + failed
print ("%d out of %d tests passed. %d failed (%g%%)" % (passed, total, failed, 100. * failed / total))
- @staticmethod
- def print_ngrams (f, ns=(1,2,3)):
- gens = tuple (Ngram.generator (n) for n in ns)
- allstats = Stats ()
- allgrams = {}
- for key, lines in DiffHelpers.separate_test_cases (f):
- test = Test (lines)
- allstats.add (test)
-
- for gen in gens:
- for ngram in gen (test.unicodes):
- if ngram not in allgrams:
- allgrams[ngram] = Stats ()
- allgrams[ngram].add (test)
-
- importantgrams = {}
- for ngram, stats in allgrams.iteritems ():
- if stats.failed.count >= 30: # for statistical reasons
- importantgrams[ngram] = stats
- allgrams = importantgrams
- del importantgrams
-
- for ngram, stats in allgrams.iteritems ():
- print ("zscore: %9f failed: %6d passed: %6d ngram: <%s>" % (stats.zscore (allstats), stats.failed.count, stats.passed.count, ','.join ("U+%04X" % u for u in ngram)))
-
-
class Test: