@@ -23,10 +23,11 @@ regex-syntax = { path = "regex-syntax", version = "0.2.5" }
23
23
utf8-ranges = " 0.1"
24
24
25
25
[dev-dependencies ]
26
- # To prevent the benchmarking harness from running setup code more than once.
27
- # Why? Because it takes too long.
26
+ # For examples.
28
27
lazy_static = " 0.1"
29
- # For generating random text to test/benchmark with.
28
+ # For property based tests.
29
+ quickcheck = " 0.2"
30
+ # For generating random test data.
30
31
rand = " 0.3"
31
32
32
33
[features ]
@@ -41,57 +42,53 @@ bench = false
41
42
# Generally these tests specific pieces of the regex implementation.
42
43
[[test ]]
43
44
path = " src/lib.rs"
44
- name = " regex"
45
+ name = " regex-inline "
45
46
46
47
# Run the test suite on the default behavior of Regex::new.
47
48
# This includes a mish mash of NFAs and DFAs, which are chosen automatically
48
49
# based on the regex. We test both of the NFA implementations by forcing their
49
50
# usage with the test definitions below. (We can't test the DFA implementations
50
51
# in the same way since they can't be used for every regex tested.)
51
52
[[test ]]
52
- path = " tests/test_dynamic.rs"
53
- name = " dynamic"
53
+ path = " tests/test_default.rs"
54
+ name = " default"
55
+ test = false
54
56
55
- # Run the test suite on the NFA algorithm over Unicode codepoints .
57
+ # The same as the default tests, but run on bytes::Regex .
56
58
[[test ]]
57
- path = " tests/test_dynamic_nfa .rs"
58
- name = " dynamic-nfa "
59
+ path = " tests/test_default_bytes .rs"
60
+ name = " default-bytes "
59
61
60
- # Run the test suite on the NFA algorithm over bytes .
62
+ # Run the test suite on the NFA algorithm over Unicode codepoints .
61
63
[[test ]]
62
- path = " tests/test_dynamic_nfa_bytes .rs"
63
- name = " dynamic- nfa-bytes "
64
+ path = " tests/test_nfa .rs"
65
+ name = " nfa"
64
66
65
- # Run the test suite on the backtracking engine over Unicode codepoints .
67
+ # Run the test suite on the NFA algorithm over bytes that match UTF-8 only .
66
68
[[test ]]
67
- path = " tests/test_dynamic_backtrack .rs"
68
- name = " dynamic-backtrack "
69
+ path = " tests/test_nfa_utf8bytes .rs"
70
+ name = " nfa-utf8bytes "
69
71
70
- # Run the test suite on the backtracking engine over bytes.
72
+ # Run the test suite on the NFA algorithm over arbitrary bytes.
71
73
[[test ]]
72
- path = " tests/test_dynamic_backtrack_bytes .rs"
73
- name = " dynamic-backtrack -bytes"
74
+ path = " tests/test_nfa_bytes .rs"
75
+ name = " nfa -bytes"
74
76
75
- # Run the benchmarks on the default behavior of Regex::new.
76
- #
77
- # N.B. These benchmarks were originally taken from Russ Cox.
78
- [[bench ]]
79
- name = " dynamic"
80
- path = " benches/bench_dynamic.rs"
81
- test = false
82
- bench = true
77
+ # Run the test suite on the backtracking engine over Unicode codepoints.
78
+ [[test ]]
79
+ path = " tests/test_backtrack.rs"
80
+ name = " backtrack"
83
81
84
- # Run the benchmarks on the NFA algorithm. We avoid chasing other permutations.
85
- #
86
- # N.B. These can take a *loong* time to run.
87
- [[bench ]]
88
- name = " dynamic-nfa"
89
- path = " benches/bench_dynamic_nfa.rs"
90
- test = false
91
- bench = true
82
+ # Run the test suite on the backtracking engine over bytes that match UTF-8
83
+ # only.
84
+ [[test ]]
85
+ path = " tests/test_backtrack_utf8bytes.rs"
86
+ name = " backtrack-utf8bytes"
92
87
93
- [profile .bench ]
94
- debug = true
88
+ # Run the test suite on the backtracking engine over arbitrary bytes.
89
+ [[test ]]
90
+ path = " tests/test_backtrack_bytes.rs"
91
+ name = " backtrack-bytes"
95
92
96
93
[profile .test ]
97
94
debug = true
0 commit comments