Debian Codegraph @

tests/hash_collision.c

raw symbols SCIP
1 /* liblouis Braille Translation and Back-Translation Library
2
3 Copyright (C) 2013,2015 Swiss Library for the Blind, Visually Impaired and Print Disabled
4
5 Copying and distribution of this file, with or without modification,
6 are permitted in any medium without royalty provided the copyright
7 notice and this notice are preserved. This file is offered as-is,
8 without any warranty. */
9
10 #include <config.h>
11
12 #include <stdio.h>
13 #include "liblouis.h"
14 #include "brl_checks.h"
15
16 int
17 main (int argc, char **argv)
18 {
19 int result = 0;
20 char *table = "tests/tables/empty.ctb";
21 char rule[18];
22
23 lou_compileString(table, "include tables/latinLetterDef6Dots.uti");
24
25 for (char c1 = 'a'; c1 <= 'z'; c1++) {
26 for (char c2 = 'a'; c2 <= 'z'; c2++) {
27 for (char c3 = 'a'; c3 <= 'z'; c3++) {
28 sprintf(rule, "always aa%c%c%c 1", c1, c2, c3);
29 lou_compileString(table, rule);
30 }
31 }
32 }
33
34 result |= check(table, "aaaaa", "a");
35 result |= check(table, "aaaaa", "a");
36 result |= check(table, "aazzz", "a");
37
38 lou_free();
39 return result;
40 }