Skip to content

Commit e03e427

Browse files
committed
formatting tests/functors.cc
1 parent 52bfae4 commit e03e427

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

Diff for: tests/functors.cc

+19-19
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ struct tbl_functor {
1919
int main() {
2020

2121
try {
22-
database db(":memory:");
23-
db << "CREATE TABLE tbl (id integer, name string);";
24-
db << "INSERT INTO tbl VALUES (?, ?);" << 1 << "hello";
25-
db << "INSERT INTO tbl VALUES (?, ?);" << 2 << "world";
22+
database db(":memory:");
23+
db << "CREATE TABLE tbl (id integer, name string);";
24+
db << "INSERT INTO tbl VALUES (?, ?);" << 1 << "hello";
25+
db << "INSERT INTO tbl VALUES (?, ?);" << 2 << "world";
2626

2727
vector<pair<int,string> > vec;
2828
db << "select id,name from tbl;" >> tbl_functor(vec);
2929

3030
if(vec.size() != 2) {
31-
cout << "Bad result on line " << __LINE__ << endl;
32-
exit(EXIT_FAILURE);
31+
cout << "Bad result on line " << __LINE__ << endl;
32+
exit(EXIT_FAILURE);
3333
}
3434

3535
vec.clear();
@@ -38,20 +38,20 @@ int main() {
3838
db << "select id,name from tbl;" >> functor;
3939

4040
if(vec.size() != 2 || vec[0].first != 1 || vec[0].second != "hello") {
41-
cout << "Bad result on line " << __LINE__ << endl;
42-
exit(EXIT_FAILURE);
41+
cout << "Bad result on line " << __LINE__ << endl;
42+
exit(EXIT_FAILURE);
4343
}
4444

4545
}
46-
catch(sqlite_exception e) {
47-
cout << "Unexpected error " << e.what() << endl;
48-
exit(EXIT_FAILURE);
49-
}
50-
catch(...) {
51-
cout << "Unknown error\n";
52-
exit(EXIT_FAILURE);
53-
}
54-
55-
cout << "OK\n";
56-
exit(EXIT_SUCCESS);
46+
catch(sqlite_exception e) {
47+
cout << "Unexpected error " << e.what() << endl;
48+
exit(EXIT_FAILURE);
49+
}
50+
catch(...) {
51+
cout << "Unknown error\n";
52+
exit(EXIT_FAILURE);
53+
}
54+
55+
cout << "OK\n";
56+
exit(EXIT_SUCCESS);
5757
}

0 commit comments

Comments
 (0)