diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-06-20 09:02:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-06-20 09:02:43 +0000 |
commit | 566b7539fcaf9c455da665cb641016d2cfbb1b47 (patch) | |
tree | eb12baa08d99313d6da7eb8c1be17c5e447f1586 /src/regex/test_regex_proofs.c | |
parent | de9409f80dbfc5cc61a28316b271600e9da95cdc (diff) | |
download | gnunet-566b7539fcaf9c455da665cb641016d2cfbb1b47.tar.gz gnunet-566b7539fcaf9c455da665cb641016d2cfbb1b47.zip |
renaming symbols from libgnunetregextest to have the prefix REGEX_TEST
Diffstat (limited to 'src/regex/test_regex_proofs.c')
-rw-r--r-- | src/regex/test_regex_proofs.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/regex/test_regex_proofs.c b/src/regex/test_regex_proofs.c index d7c743c77..74f0c1615 100644 --- a/src/regex/test_regex_proofs.c +++ b/src/regex/test_regex_proofs.c | |||
@@ -43,17 +43,17 @@ static unsigned int | |||
43 | test_proof (const char *regex) | 43 | test_proof (const char *regex) |
44 | { | 44 | { |
45 | unsigned int error; | 45 | unsigned int error; |
46 | struct REGEX_ITERNAL_Automaton *dfa; | 46 | struct REGEX_INTERNAL_Automaton *dfa; |
47 | char *c_rx1; | 47 | char *c_rx1; |
48 | const char *c_rx2; | 48 | const char *c_rx2; |
49 | 49 | ||
50 | dfa = REGEX_ITERNAL_construct_dfa (regex, strlen (regex), 1); | 50 | dfa = REGEX_INTERNAL_construct_dfa (regex, strlen (regex), 1); |
51 | GNUNET_assert (NULL != dfa); | 51 | GNUNET_assert (NULL != dfa); |
52 | c_rx1 = GNUNET_strdup (REGEX_ITERNAL_get_canonical_regex (dfa)); | 52 | c_rx1 = GNUNET_strdup (REGEX_INTERNAL_get_canonical_regex (dfa)); |
53 | REGEX_ITERNAL_automaton_destroy (dfa); | 53 | REGEX_INTERNAL_automaton_destroy (dfa); |
54 | dfa = REGEX_ITERNAL_construct_dfa (c_rx1, strlen (c_rx1), 1); | 54 | dfa = REGEX_INTERNAL_construct_dfa (c_rx1, strlen (c_rx1), 1); |
55 | GNUNET_assert (NULL != dfa); | 55 | GNUNET_assert (NULL != dfa); |
56 | c_rx2 = REGEX_ITERNAL_get_canonical_regex (dfa); | 56 | c_rx2 = REGEX_INTERNAL_get_canonical_regex (dfa); |
57 | 57 | ||
58 | error = (0 == strcmp (c_rx1, c_rx2)) ? 0 : 1; | 58 | error = (0 == strcmp (c_rx1, c_rx2)) ? 0 : 1; |
59 | 59 | ||
@@ -65,7 +65,7 @@ test_proof (const char *regex) | |||
65 | } | 65 | } |
66 | 66 | ||
67 | GNUNET_free (c_rx1); | 67 | GNUNET_free (c_rx1); |
68 | REGEX_ITERNAL_automaton_destroy (dfa); | 68 | REGEX_INTERNAL_automaton_destroy (dfa); |
69 | 69 | ||
70 | return error; | 70 | return error; |
71 | } | 71 | } |
@@ -91,7 +91,7 @@ test_proofs_random (unsigned int count, size_t rx_length) | |||
91 | 91 | ||
92 | for (i = 0; i < count; i++) | 92 | for (i = 0; i < count; i++) |
93 | { | 93 | { |
94 | rand_rx = REGEX_ITERNAL_generate_random_regex (rx_length, NULL); | 94 | rand_rx = REGEX_TEST_generate_random_regex (rx_length, NULL); |
95 | failures += test_proof (rand_rx); | 95 | failures += test_proof (rand_rx); |
96 | GNUNET_free (rand_rx); | 96 | GNUNET_free (rand_rx); |
97 | } | 97 | } |
@@ -124,20 +124,20 @@ test_proofs_static () | |||
124 | 124 | ||
125 | const char *canon_rx1; | 125 | const char *canon_rx1; |
126 | const char *canon_rx2; | 126 | const char *canon_rx2; |
127 | struct REGEX_ITERNAL_Automaton *dfa1; | 127 | struct REGEX_INTERNAL_Automaton *dfa1; |
128 | struct REGEX_ITERNAL_Automaton *dfa2; | 128 | struct REGEX_INTERNAL_Automaton *dfa2; |
129 | 129 | ||
130 | error = 0; | 130 | error = 0; |
131 | 131 | ||
132 | for (i = 0; i < 8; i += 2) | 132 | for (i = 0; i < 8; i += 2) |
133 | { | 133 | { |
134 | dfa1 = REGEX_ITERNAL_construct_dfa (regex[i], strlen (regex[i]), 1); | 134 | dfa1 = REGEX_INTERNAL_construct_dfa (regex[i], strlen (regex[i]), 1); |
135 | dfa2 = REGEX_ITERNAL_construct_dfa (regex[i + 1], strlen (regex[i + 1]), 1); | 135 | dfa2 = REGEX_INTERNAL_construct_dfa (regex[i + 1], strlen (regex[i + 1]), 1); |
136 | GNUNET_assert (NULL != dfa1); | 136 | GNUNET_assert (NULL != dfa1); |
137 | GNUNET_assert (NULL != dfa2); | 137 | GNUNET_assert (NULL != dfa2); |
138 | 138 | ||
139 | canon_rx1 = REGEX_ITERNAL_get_canonical_regex (dfa1); | 139 | canon_rx1 = REGEX_INTERNAL_get_canonical_regex (dfa1); |
140 | canon_rx2 = REGEX_ITERNAL_get_canonical_regex (dfa2); | 140 | canon_rx2 = REGEX_INTERNAL_get_canonical_regex (dfa2); |
141 | 141 | ||
142 | error += (0 == strcmp (canon_rx1, canon_rx2)) ? 0 : 1; | 142 | error += (0 == strcmp (canon_rx1, canon_rx2)) ? 0 : 1; |
143 | 143 | ||
@@ -148,8 +148,8 @@ test_proofs_static () | |||
148 | regex[i], canon_rx1, regex[i + 1], canon_rx2); | 148 | regex[i], canon_rx1, regex[i + 1], canon_rx2); |
149 | } | 149 | } |
150 | 150 | ||
151 | REGEX_ITERNAL_automaton_destroy (dfa1); | 151 | REGEX_INTERNAL_automaton_destroy (dfa1); |
152 | REGEX_ITERNAL_automaton_destroy (dfa2); | 152 | REGEX_INTERNAL_automaton_destroy (dfa2); |
153 | } | 153 | } |
154 | 154 | ||
155 | return error; | 155 | return error; |