| 12 | } |
| 13 | |
| 14 | void test() { |
| 15 | rep(it,0,8000) { |
| 16 | string a = rand_string(1, 50), |
| 17 | b = rand_string(1, 10000); |
| 18 | size_t x = b.find(a); |
| 19 | int ans = string_match(b, a); |
| 20 | if (x == string::npos) { |
| 21 | assert_equal(-1, ans); |
| 22 | } else { |
| 23 | assert_equal((int)x, ans); |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | // vim: cc=60 ts=2 sts=2 sw=2: |
nothing calls this directly
no test coverage detected