diff options
author | Maximilian Szengel <gnunet@maxsz.de> | 2012-09-27 14:11:42 +0000 |
---|---|---|
committer | Maximilian Szengel <gnunet@maxsz.de> | 2012-09-27 14:11:42 +0000 |
commit | efaee22e6bc145305a6f8104c68914cfa07b1ac3 (patch) | |
tree | 127828caf63c032dcb6b76f0a0541db632aaec51 /src/regex/test_regex_iptoregex.c | |
parent | bb325e4a419aa2ec5ddff34b45a49dcaaa53d0ab (diff) | |
download | gnunet-efaee22e6bc145305a6f8104c68914cfa07b1ac3.tar.gz gnunet-efaee22e6bc145305a6f8104c68914cfa07b1ac3.zip |
tests
Diffstat (limited to 'src/regex/test_regex_iptoregex.c')
-rw-r--r-- | src/regex/test_regex_iptoregex.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/regex/test_regex_iptoregex.c b/src/regex/test_regex_iptoregex.c index 7fe1c384f..004d79041 100644 --- a/src/regex/test_regex_iptoregex.c +++ b/src/regex/test_regex_iptoregex.c | |||
@@ -65,13 +65,7 @@ test_iptoregex (const char *ipv4, const char *netmask, const char *expectedv4, | |||
65 | int | 65 | int |
66 | main (int argc, char *argv[]) | 66 | main (int argc, char *argv[]) |
67 | { | 67 | { |
68 | GNUNET_log_setup ("test-regex", | 68 | GNUNET_log_setup ("test-regex", "WARNING", NULL); |
69 | #if VERBOSE | ||
70 | "DEBUG", | ||
71 | #else | ||
72 | "WARNING", | ||
73 | #endif | ||
74 | NULL); | ||
75 | 69 | ||
76 | int error; | 70 | int error; |
77 | 71 | ||
@@ -83,16 +77,26 @@ main (int argc, char *argv[]) | |||
83 | "1111111111111111(0|1)+"); | 77 | "1111111111111111(0|1)+"); |
84 | 78 | ||
85 | error += | 79 | error += |
80 | test_iptoregex ("187.238.225.0", "255.255.255.128", | ||
81 | "1011101111101110111000010(0|1)+", "E1E1:73F9:51BE::0", 49, | ||
82 | "1110000111100001011100111111100101010001101111100(0|1)+"); | ||
83 | |||
84 | error += | ||
86 | test_iptoregex ("255.255.255.255", "255.255.255.255", | 85 | test_iptoregex ("255.255.255.255", "255.255.255.255", |
87 | "11111111111111111111111111111111", | 86 | "11111111111111111111111111111111", |
88 | "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF", 128, | 87 | "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF", 128, |
89 | "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"); | 88 | "11111111111111111111111111111111" |
89 | "11111111111111111111111111111111" | ||
90 | "11111111111111111111111111111111" | ||
91 | "11111111111111111111111111111111"); | ||
90 | 92 | ||
91 | error += | 93 | error += |
92 | test_iptoregex ("0.0.0.0", "255.255.255.255", | 94 | test_iptoregex ("0.0.0.0", "255.255.255.255", |
93 | "00000000000000000000000000000000", "0::0", 128, | 95 | "00000000000000000000000000000000", "0::0", 128, |
94 | "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); | 96 | "00000000000000000000000000000000" |
95 | 97 | "00000000000000000000000000000000" | |
98 | "00000000000000000000000000000000" | ||
99 | "00000000000000000000000000000000"); | ||
96 | 100 | ||
97 | return error; | 101 | return error; |
98 | } | 102 | } |