Formatting
This commit is contained in:
parent
7dd7f5610b
commit
d10300509e
1 changed files with 2 additions and 4 deletions
|
@ -8,8 +8,7 @@
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
bool do_test(const std::string& x, const std::string& y, int expected)
|
bool do_test(const std::string &x, const std::string &y, int expected) {
|
||||||
{
|
|
||||||
auto actual = edit_distance(x, y);
|
auto actual = edit_distance(x, y);
|
||||||
if (actual != expected) {
|
if (actual != expected) {
|
||||||
std::cout << "*** WRONG: distance(" << x << ", " << y << ") was "
|
std::cout << "*** WRONG: distance(" << x << ", " << y << ") was "
|
||||||
|
@ -19,8 +18,7 @@ bool do_test(const std::string& x, const std::string& y, int expected)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main() {
|
||||||
{
|
|
||||||
int res = do_test("foobar", "foobar", 0);
|
int res = do_test("foobar", "foobar", 0);
|
||||||
res += do_test("x", "x", 0);
|
res += do_test("x", "x", 0);
|
||||||
res += do_test("baz", "bar", 1);
|
res += do_test("baz", "bar", 1);
|
||||||
|
|
Loading…
Reference in a new issue